diff --git a/.github/workflows/notify-new-pr.yml b/.github/workflows/notify-new-pr.yml new file mode 100644 index 000000000..737919032 --- /dev/null +++ b/.github/workflows/notify-new-pr.yml @@ -0,0 +1,15 @@ +name: Notify new PR + +on: + pull_request_target: + types: + - "opened" + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: Notify new PR + uses: ecmwf-actions/notify-teams-pr@v1 + with: + incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }} diff --git a/.gitignore b/.gitignore index a20dc2122..bfdfd9434 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,8 @@ configure grib_api.spec grib_api.pc grib_api_f90.pc +*.analyzerinfo +*.snalyzerinfo # compiled source # ################### diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d18f0377..050e8ff70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,8 +21,8 @@ cmake_minimum_required( VERSION 3.12 FATAL_ERROR ) find_package( ecbuild 3.7 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild) # Initialise project -project( eccodes VERSION 2.30.4 LANGUAGES CXX ) -set(CMAKE_CXX_STANDARD 11) +project( eccodes LANGUAGES CXX ) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/INSTALL b/INSTALL index 802e3cc22..b75d5b2b5 100644 --- a/INSTALL +++ b/INSTALL @@ -3,11 +3,9 @@ How to build and install ecCodes library/tools Building and installation has been tested on several platforms and with several compilers. However for some platforms modifications to the installation engine may be required. -If you encounter any problems during the installation procedure please send an e-mail -with your problem to: - - Software.Support@ecmwf.int +If you encounter any problems during the installation procedure, please visit our Support Portal: + https://support.ecmwf.int Installation using CMake ------------------------ diff --git a/README.md b/README.md index 982fd2476..024dc5c33 100644 --- a/README.md +++ b/README.md @@ -67,9 +67,9 @@ To add the Python3 bindings, use pip3 install from PyPI as follows: For more details, please see: https://confluence.ecmwf.int/display/ECC/ecCodes+installation -If you encounter any problems please send an e-mail with your problem to: +If you encounter any problems please visit our Support Portal: - Software.Support@ecmwf.int + https://support.ecmwf.int diff --git a/VERSION b/VERSION new file mode 100644 index 000000000..bafceb320 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +2.31.0 diff --git a/data/tigge_pf_ecmwf.grib2.ref b/data/tigge_pf_ecmwf.grib2.ref index 838b9b75a..29bda54cf 100644 --- a/data/tigge_pf_ecmwf.grib2.ref +++ b/data/tigge_pf_ecmwf.grib2.ref @@ -8,7 +8,7 @@ ecmf 3 pt K Potential temperature ecmf 60 pv K m**2 kg**-1 s**-1 Potential vorticity ecmf 235 skt K Skin temperature ecmf 228141 sd kg m**-2 Snow depth water equivalent -ecmf 228144 sf kg m**-2 Snow Fall water equivalent +ecmf 228144 sf kg m**-2 Snowfall water equivalent ecmf 228039 sm kg m**-3 Soil moisture ecmf 228139 st K Soil temperature ecmf 133 q kg kg**-1 Specific humidity diff --git a/definitions/add_params_from_tsv.pl b/definitions/add_params_from_tsv.pl deleted file mode 100755 index 6aa471bd4..000000000 --- a/definitions/add_params_from_tsv.pl +++ /dev/null @@ -1,439 +0,0 @@ -#!/usr/bin/env perl -# -# (C) Copyright 2005- 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. -# -####################################################################### -# Script for GRIB2 parameter definitions -# Can either write the *.def files or push to the Parameter DB -# -# Reads an input TSV (tab-separated-value) file which should contain -# parameter keys as columns. See the @columns variable for expected contents -# -####################################################################### -$|=1; -use strict; -use warnings; -use DBI; -use Time::localtime; -use Getopt::Long; - -my $SANITY_CHECK = 0; -my $WRITE_TO_FILES = 0; -my $WRITE_TO_PARAMDB = 0; # Be careful. Fill in $contactId before proceeding -my $contactId; # JIRA issue ID - -# Process arguments. Must be at least one file -if (scalar @ARGV < 1) { - &usage; -} -my $result = GetOptions ( - "s" => \$SANITY_CHECK, - "f" => \$WRITE_TO_FILES, - "p" => \$WRITE_TO_PARAMDB, - "c:s" => \$contactId - ); - -$ARGV[0] or &usage; - - -my ($paramId, $shortName, $name, $units, $cfVarName, $interpol); -my ($discipline, $pcategory, $pnumber, $type1, $type2, $scaledValue1, $scaleFactor1, $scaledValue2, $scaleFactor2); -my ($stat, $aero, $constit); -my ($typeGen, $localTV, $typeOfWLInt, $scaleFactorWL1, $scaledValueWL1, $scaleFactorWL2, $scaledValueWL2, $sourceSink); - -my @columns = ("paramId", "shortName", "name", "units", "interpolation", - "discipline", "parameterCategory", "parameterNumber", - "typeOfFirstFixedSurface", "scaleFactorOfFirstFixedSurface", "scaledValueOfFirstFixedSurface", - "typeOfSecondFixedSurface", "scaleFactorOfSecondFixedSurface", "scaledValueOfSecondFixedSurface", - "typeOfStatisticalProcessing", "aerosolType", "constituentType", "typeOfGeneratingProcess", "localTablesVersion", - "typeOfWavelengthInterval", "scaleFactorOfFirstWavelength", "scaledValueOfFirstWavelength", - "scaleFactorOfSecondWavelength", "scaledValueOfSecondWavelength", "sourceSinkChemicalPhysicalProcess"); - -my %key_to_attrib_map = ( - 'discipline' => 4, - 'parameterCategory' => 8, - 'parameterNumber' => 5, - 'localTablesVersion' => 16, - 'typeOfFirstFixedSurface' => 6, - 'scaleFactorOfFirstFixedSurface' => 7, - 'scaledValueOfFirstFixedSurface' => 9, - 'typeOfStatisticalProcessing' => 11, - 'typeOfSecondFixedSurface' => 13, - 'scaledValueOfSecondFixedSurface' => 14, - 'scaleFactorOfSecondFixedSurface' => 15, - 'typeOfGeneratingProcess' => 28, - 'constituentType' => 40, - 'aerosolType' => 46 -); -my $db = "param"; -my $host = $ENV{'PARAM_DB_HOST'} || 'unknown'; -my $user = $ENV{'PARAM_DB_USER'} || 'unknown'; -my $pass = $ENV{'PARAM_DB_PASS'} || 'unknown'; -my $dbh = 0; -my $centre_wmo = -3; # WMO centre ID -my $centre_ecmwf = 98; # ECMWF centre ID -my $edition = 2; # GRIB edition 2 - -my $PARAMID_FILENAME = "paramId.def"; -my $SHORTNAME_FILENAME = "shortName.def"; -my $NAME_FILENAME = "name.def"; -my $UNITS_FILENAME = "units.def"; -my $CFVARNAME_FILENAME = "cfVarName.def"; - -my $tm = localtime; -my $today_date = sprintf("%04d-%02d-%02d", $tm->year+1900, ($tm->mon)+1, $tm->mday); - -if ($WRITE_TO_PARAMDB || $SANITY_CHECK) { - print "Connecting to database ...\n"; - $dbh = DBI->connect("dbi:mysql(RaiseError=>1):database=$db;host=$host",$user,$pass) or die $DBI::errstr; - # STRICT_TRANS_TABLES: - # Strict mode controls how MySQL handles invalid or missing values in data-change statements such as INSERT or UPDATE. - # A value can be invalid for several reasons e.g., it might have the wrong data type for the column, or it might be out of range. - $dbh->do( q{SET sql_mode = 'STRICT_TRANS_TABLES'} ); -} - -my $first = 1; -my $lcount = 0; - -if ($SANITY_CHECK) { - my %map_sn = (); # map of shortNames - my %map_pid = (); # map of paramIds - my $sanity_error_count = 0; - print "Checking sanity: uniqueness of paramId and shortName keys ...\n"; - while (<>) { - chomp; - $lcount++; - s/\r//g; # Remove DOS carriage returns - if ($first == 1) { - $first = 0; - next; - } - - ($paramId, $shortName, $name, $units) = split(/\t/); - - die "Error: shortName=$shortName is duplicated (line $lcount)\n" if (exists $map_sn{$shortName}); - $map_sn{$shortName}++; # increment count in shortName map - - die "Error: paramId=$paramId is duplicated (line $lcount)\n" if (exists $map_pid{$paramId}); - $map_pid{$paramId}++; # increment count in paramId map - - if (!is_integer($paramId)) { - warn "Error: paramId=$paramId is not an integer (line $lcount)\n"; - $sanity_error_count++; - } - - my $x = $dbh->selectrow_array("select * from param.param where id = ?",undef,$paramId); - if (defined $x) { - warn "Error: paramId=$x exists in the database (line $lcount)\n"; - $sanity_error_count++; - } - - if ($name =~ / $/) { - warn "Error: Name '$name': ends in space" ; - $sanity_error_count++; - } - if ($name =~ /^ /) { - warn "Error: Name '$name': starts with space" ; - $sanity_error_count++; - } - if ($name !~ /^[A-Z0-9]/) { - warn "Error: name \"$name\" should have uppercase 1st letter or digit (line $lcount)\n"; - $sanity_error_count++; - } - - $x = $dbh->selectrow_array("select shortName from param.param where shortName = ?",undef,$shortName); - if (defined $x) { - warn "Error: shortName=$x exists in the database (line $lcount)\n"; - $sanity_error_count++; - } - - if (!check_units($units)) { - warn "Error: Database does not contain units=$units (line $lcount)\n"; - $sanity_error_count++; - } - } - if ($sanity_error_count == 0) { - print "\nSanity checking completed. $lcount rows checked. No errors.\n"; - } else { - die "\nSanity checking FAILED. $lcount rows checked. $sanity_error_count error(s).\n"; - } - exit 0; -} - -if ($WRITE_TO_FILES) { - create_or_append(\*OUT_PARAMID, "$PARAMID_FILENAME"); - create_or_append(\*OUT_SHORTNAME, "$SHORTNAME_FILENAME"); - create_or_append(\*OUT_NAME, "$NAME_FILENAME"); - create_or_append(\*OUT_UNITS, "$UNITS_FILENAME"); - create_or_append(\*OUT_CFVARNAME, "$CFVARNAME_FILENAME"); -} - - -while (<>) { - chomp; - s/\r//g; # Remove DOS carriage returns - if ($first == 1) { - check_first_row_column_names($_); - $first = 0; - next; - } - $lcount++; - - ($paramId, $shortName, $name, $units, $interpol, - $discipline, $pcategory, $pnumber, - $type1, $scaleFactor1, $scaledValue1, $type2, $scaleFactor2, $scaledValue2, - $stat, $aero, $constit, - $typeGen, $localTV, $typeOfWLInt, $scaleFactorWL1, $scaledValueWL1, $scaleFactorWL2, $scaledValueWL2, $sourceSink - ) = split(/\t/); - - die "Error: paramID \"$paramId\" is not an integer (input row=$lcount)!\n" if (!is_integer($paramId)); - die "Error: shortName \"$shortName\" has an invalid character (input row=$lcount)!\n" if ($shortName =~ /[ '"]/); - die "Error: name \"$name\" should have uppercase 1st letter or digit (input row=$lcount)!\n" if ($name !~ /^[A-Z0-9]/); - die "Error: typeOfFirstFixedSurface \"$type1\" is not an integer (input row=$lcount)!\tPick a value from Code Table 4.5\n" - if ($type1 ne "" && !is_integer($type1)); - die "Error: typeOfSecondFixedSurface \"$type2\" is not an integer (input row=$lcount)!\tPick a value from Code Table 4.5\n" - if ($type2 ne "" && !is_integer($type2)); - - $units = "~" if ($units eq ""); - $cfVarName = $shortName; - $cfVarName = '\\'.$shortName if ($shortName =~ /^[0-9]/); - $scaleFactorWL1 = undef if ($scaleFactorWL1 =~ /missing/); - $scaledValueWL1 = undef if ($scaledValueWL1 =~ /missing/); - $scaleFactorWL2 = undef if ($scaleFactorWL2 =~ /missing/); - $scaledValueWL2 = undef if ($scaledValueWL2 =~ /missing/); - - $scaledValue1 = undef if ($scaledValue1 =~ /missing/); - $scaleFactor1 = undef if ($scaleFactor1 =~ /missing/); - $scaledValue2 = undef if ($scaledValue2 =~ /missing/); - $scaleFactor2 = undef if ($scaleFactor2 =~ /missing/); - - if ($WRITE_TO_FILES) { - write_out_file(\*OUT_PARAMID, $name, $paramId); - write_out_file(\*OUT_SHORTNAME, $name, $shortName); - write_out_file(\*OUT_NAME, $name, $name); - write_out_file(\*OUT_UNITS, $name, $units); - write_out_file(\*OUT_CFVARNAME, $name, $cfVarName); - } - - if ($WRITE_TO_PARAMDB) { - my $units_code = get_db_units_code($units); - my $is_chem = ""; - my $is_aero = ""; - my $is_srcsink = ""; - if ($aero ne "") { - $is_aero = "1"; - $is_chem = ""; - $is_srcsink = ""; - } - if ($constit ne "") { - $is_aero = ""; - $is_chem = "1"; - $is_srcsink = ""; - } - if ($sourceSink ne "") { - $is_aero = ""; - $is_chem = ""; - $is_srcsink = "1"; - } - my $centre = $localTV ne "" ? $centre_ecmwf : $centre_wmo; - - die "Error: Both aerosolType and constituentType cannot be set!" if ($constit ne "" && $aero ne ""); - die "Error: No contact ID provided\n" if (!$contactId); - print "Inserting paramId $paramId (centre=" . centre_as_str($centre) . ") ...\n"; - $dbh->do("insert into param(id,shortName,name,units_id,insert_date,update_date,contact) values (?,?,?,?,?,?,?)",undef, - $paramId, $shortName, $name , $units_code, $today_date, $today_date, $contactId) or die $dbh->errstr; - - # Check what we inserted did actually go in - my $x = $dbh->selectrow_array("select shortName from param.param where shortName = ?",undef,$shortName); - die "Insertion of $paramId did not work - problem with shortName $shortName\n" if (! defined $x); - - # Table 'grib' columns: param_id edition centre attribute_id attribute_value param_version - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,4, $discipline,0); - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,8, $pcategory,0); - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,5, $pnumber,0); - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,6, $type1,0) if ($type1 ne ""); - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,13,$type2,0) if ($type2 ne ""); - - # Either missing or has a value - if (! defined $scaledValue1 || $scaledValue1 ne "") { - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,9, $scaledValue1,0); - } - if (! defined $scaleFactor1 || $scaleFactor1 ne "") { - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,7, $scaleFactor1,0); - } - if (! defined $scaledValue2 || $scaledValue2 ne "") { - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,14,$scaledValue2,0); - } - if (! defined $scaleFactor2 || $scaleFactor2 ne "") { - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,15,$scaleFactor2,0); - } - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,11,$stat,0) if ($stat ne ""); - - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,46,$aero,0) if ($aero ne ""); - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,40,$constit,0) if ($constit ne ""); - - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,53,$is_chem,0) if ($is_chem ne ""); - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,54,$is_aero,0) if ($is_aero ne ""); - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,28,$typeGen,0) if ($typeGen ne ""); - - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,16,$localTV,0) if ($localTV ne ""); - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,57,$typeOfWLInt,0) if ($typeOfWLInt ne ""); - - if (! defined $scaleFactorWL1 || $scaleFactorWL1 ne "") { - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,58,$scaleFactorWL1,0); - } - if (! defined $scaledValueWL1 || $scaledValueWL1 ne "") { - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,59,$scaledValueWL1,0); - } - if (! defined $scaleFactorWL2 ||$scaleFactorWL2 ne "") { - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,60,$scaleFactorWL2,0); - } - if (! defined $scaledValueWL2 || $scaledValueWL2 ne "") { - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,61,$scaledValueWL2,0); - } - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,64,$sourceSink,0) if ($is_srcsink ne ""); - $dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,65,1,0) if ($is_srcsink eq "1"); - - # format is only GRIB2 hence grib1 entry=0 and grib2=1 - $dbh->do("insert into param_format(param_id,grib1,grib2) values (?,?,?)",undef,$paramId,0,1); - } -} # for each input line - -if ($WRITE_TO_FILES) { - print "Wrote output files: $PARAMID_FILENAME $SHORTNAME_FILENAME $NAME_FILENAME $UNITS_FILENAME $CFVARNAME_FILENAME\n"; - close(OUT_PARAMID) or die "$PARAMID_FILENAME: $!"; - close(OUT_SHORTNAME) or die "$SHORTNAME_FILENAME: $!"; - close(OUT_NAME) or die "$NAME_FILENAME: $!"; - close(OUT_UNITS) or die "$UNITS_FILENAME: $!"; - close(OUT_CFVARNAME) or die "$CFVARNAME_FILENAME: $!"; -} -if ($WRITE_TO_PARAMDB) { - print "Wrote to Parameter Database. Number of rows processed = $lcount\n"; -} - -# ------------------------------------------------------------------- -sub centre_as_str { - my $cc = shift; - return "WMO" if ($cc eq $centre_wmo); - return "ECMWF" if ($cc eq $centre_ecmwf); - return "Unknown"; -} -sub check_units { - my $u = shift; - my $unit_id = $dbh->selectrow_array("select id from units where name = ?",undef,$u); - return 0 if (!$unit_id); - return 1; -} - -sub get_db_units_code { - my $u = shift; - my $unit_id = $dbh->selectrow_array("select id from units where name = ?",undef,$u); - die "Error: Unit not found: '$u'\n" if (!$unit_id); - return $unit_id; -} - -sub write_out_file { - my $outfile = $_[0]; - my $name = $_[1]; - my $key = $_[2]; - - # Assuming every parameter definition has at least discipline, category and number - print $outfile "#$name\n"; - print $outfile "'$key' = {\n"; - print $outfile " discipline = $discipline ;\n"; - print $outfile " parameterCategory = $pcategory ;\n"; - print $outfile " parameterNumber = $pnumber ;\n"; - - # Optional keys - print $outfile " typeOfFirstFixedSurface = $type1 ;\n" if ($type1 ne ""); - print $outfile " typeOfSecondFixedSurface = $type2 ;\n" if ($type2 ne ""); - - $scaledValue1 = "missing()" if (! defined $scaledValue1); - $scaledValue2 = "missing()" if (! defined $scaledValue2); - $scaleFactor1 = "missing()" if (! defined $scaleFactor1); - $scaleFactor2 = "missing()" if (! defined $scaleFactor2); - - print $outfile " scaledValueOfFirstFixedSurface = $scaledValue1 ;\n" if ($scaledValue1 ne ""); - print $outfile " scaleFactorOfFirstFixedSurface = $scaleFactor1 ;\n" if ($scaleFactor1 ne ""); - print $outfile " scaledValueOfSecondFixedSurface = $scaledValue2 ;\n" if ($scaledValue2 ne ""); - print $outfile " scaleFactorOfSecondFixedSurface = $scaleFactor2 ;\n" if ($scaleFactor2 ne ""); - print $outfile " typeOfStatisticalProcessing = $stat ;\n" if ($stat ne ""); - - print $outfile " aerosolType = $aero ;\n" if ($aero ne ""); - print $outfile " constituentType = $constit ;\n" if ($constit ne ""); - if ($sourceSink eq "") { - print $outfile " is_aerosol = 1 ;\n" if ($aero ne ""); - print $outfile " is_chemical = 1 ;\n" if ($constit ne ""); - } else { - print $outfile " is_chemical_srcsink = 1 ;\n"; - print $outfile " sourceSinkChemicalPhysicalProcess = $sourceSink ;\n"; - } - print $outfile " typeOfGeneratingProcess = $typeGen ;\n" if ($typeGen ne ""); - print $outfile " localTablesVersion = $localTV ;\n" if ($localTV ne ""); - - print $outfile " typeOfWavelengthInterval = $typeOfWLInt ;\n" if ($typeOfWLInt ne ""); - print $outfile " scaleFactorOfFirstWavelength = $scaleFactorWL1 ;\n" if ($scaleFactorWL1 ne ""); - print $outfile " scaledValueOfFirstWavelength = $scaledValueWL1 ;\n" if ($scaledValueWL1 ne ""); - print $outfile " scaleFactorOfSecondWavelength = $scaleFactorWL2 ;\n" if ($scaleFactorWL2 ne ""); - print $outfile " scaledValueOfSecondWavelength = $scaledValueWL2 ;\n" if ($scaledValueWL2 ne ""); - - print $outfile "}\n"; -} - -sub check_first_row_column_names { - my $line = shift; # This is the first row - my @keys = split(/\t/, $line); - my $c = 0; - my $numkeys = scalar @keys; - my $numcols = scalar @columns; - die "Error: 1st row column titles wrong: Expected $numcols columns, got $numkeys.\nColumns should be:\n@columns\n" - if ($numkeys != $numcols); - for ( my $i = 0; $i < $numkeys; $i++ ) { - if ( $keys[$i] ne $columns[$i] ) { - die "Error: 1st row column titles wrong: check column ", $i+1, ". Expected '$columns[$i]', got '$keys[$i]'.\n"; - } - } - #if (@keys ~~ @columns) { - # print "[@keys] and [@columns] match\n"; - #} else { - # die "Error: must use these columns: @columns\n"; - #} -} - -sub create_or_append { - my $outfile = $_[0]; - my $fname = $_[1]; - - if (-f "$fname") { - open($outfile, ">>$fname") or die "Error: $fname: $!"; - } else { - open($outfile, ">$fname") or die "Error: $fname: $!"; - } -} - -sub is_integer { - my $val = shift; - return ($val =~ /^\d+$/); -} - -sub usage { - print <&1 + exit 1 +fi + +# Input list of paramId values +pids="$@" + +sample2=samples/GRIB2.tmpl +temp=$TMPDIR/temp.create_legacy_def.grib +defs=definitions/grib2 + +create_legacy_def() +{ + _name=$1 + _dir=$2 + _file=$3 + + _legacy=$(echo $_file | sed -e 's/\.def/.legacy.def/') + #echo "Doing |$dir| f=|$file| l=|$legacy|" + # First check the given name exists in the file + grep -q "^#$_name$" $_dir/$_file + if [ $? -eq 0 ]; then + _name="#$_name" + found=1 + # Copy the parameter definition from the file to its legacy version + echo "$_name" >> $_dir/$_legacy + sed -e "1,/^$_name$/d" -e '/#/,$d' $_dir/$_file | tr -d '\t' >> $_dir/$_legacy + fi +} + +create_legacy_defs() +{ + name="$1" + create_legacy_def "$name" $defs paramId.def + create_legacy_def "$name" $defs shortName.def + create_legacy_def "$name" $defs name.def + create_legacy_def "$name" $defs units.def + create_legacy_def "$name" $defs cfVarName.def +} + +# For each paramId, get its full name +count=0 +for pid in $pids; do + echo "Doing paramId=$pid ..." + set +e + grib_set -s paramId=$pid $sample2 $temp 2>/dev/null + status=$? + set -e + if [ $status -ne 0 ]; then + grib_set -s stepType=accum,paramId=$pid $sample2 $temp + fi + name=$(grib_get -p name $temp) + count=$((count+1)) + rm -f $temp + + create_legacy_defs "$name" +done + + +echo "Number of legacy parameters added: $count" +if [ $count -gt 0 ]; then + echo "Files updated. Check directory $defs" +fi +rm -f $temp diff --git a/definitions/grib1/cfName.def b/definitions/grib1/cfName.def index 8a565cc7a..17313406e 100644 --- a/definitions/grib1/cfName.def +++ b/definitions/grib1/cfName.def @@ -65,7 +65,7 @@ table2Version = 3 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'surface_roughness_length' = { table2Version = 3 ; indicatorOfParameter = 83 ; @@ -105,7 +105,7 @@ table2Version = 3 ; indicatorOfParameter = 123 ; } -#Albedo +#Forecast albedo 'surface_albedo' = { table2Version = 3 ; indicatorOfParameter = 84 ; @@ -181,7 +181,7 @@ table2Version = 2 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'surface_roughness_length' = { table2Version = 2 ; indicatorOfParameter = 83 ; @@ -221,7 +221,7 @@ table2Version = 2 ; indicatorOfParameter = 123 ; } -#Albedo +#Forecast albedo 'surface_albedo' = { table2Version = 2 ; indicatorOfParameter = 84 ; @@ -297,7 +297,7 @@ table2Version = 1 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'surface_roughness_length' = { table2Version = 1 ; indicatorOfParameter = 83 ; @@ -337,7 +337,7 @@ table2Version = 1 ; indicatorOfParameter = 123 ; } -#Albedo +#Forecast albedo 'surface_albedo' = { table2Version = 1 ; indicatorOfParameter = 84 ; diff --git a/definitions/grib1/cfVarName.def b/definitions/grib1/cfVarName.def index 889e7e113..e4b1aa07d 100644 --- a/definitions/grib1/cfVarName.def +++ b/definitions/grib1/cfVarName.def @@ -137,7 +137,7 @@ table2Version = 3 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'sr' = { table2Version = 3 ; indicatorOfParameter = 83 ; @@ -162,8 +162,8 @@ table2Version = 3 ; indicatorOfParameter = 10 ; } -#large scale precipitation -'p3062' = { +#Large-scale precipitation +'lsp' = { table2Version = 3 ; indicatorOfParameter = 62 ; } @@ -222,7 +222,7 @@ table2Version = 3 ; indicatorOfParameter = 76 ; } -#Albedo +#Forecast albedo 'al' = { table2Version = 3 ; indicatorOfParameter = 84 ; @@ -532,8 +532,8 @@ table2Version = 3 ; indicatorOfParameter = 98 ; } -#Snow melt -'p3099' = { +#Snowmelt +'snom' = { table2Version = 3 ; indicatorOfParameter = 99 ; } @@ -678,7 +678,7 @@ table2Version = 3 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'sf' = { table2Version = 3 ; indicatorOfParameter = 65 ; @@ -833,7 +833,7 @@ table2Version = 2 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'sr' = { table2Version = 2 ; indicatorOfParameter = 83 ; @@ -858,8 +858,8 @@ table2Version = 2 ; indicatorOfParameter = 10 ; } -#large scale precipitation -'p3062' = { +#Large-scale precipitation +'lsp' = { table2Version = 2 ; indicatorOfParameter = 62 ; } @@ -918,7 +918,7 @@ table2Version = 2 ; indicatorOfParameter = 76 ; } -#Albedo +#Forecast albedo 'al' = { table2Version = 2 ; indicatorOfParameter = 84 ; @@ -1213,8 +1213,8 @@ table2Version = 2 ; indicatorOfParameter = 98 ; } -#Snow melt -'p3099' = { +#Snowmelt +'snom' = { table2Version = 2 ; indicatorOfParameter = 99 ; } @@ -1359,7 +1359,7 @@ table2Version = 2 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'sf' = { table2Version = 2 ; indicatorOfParameter = 65 ; @@ -1514,7 +1514,7 @@ table2Version = 1 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'sr' = { table2Version = 1 ; indicatorOfParameter = 83 ; @@ -1539,8 +1539,8 @@ table2Version = 1 ; indicatorOfParameter = 10 ; } -#large scale precipitation -'p3062' = { +#Large-scale precipitation +'lsp' = { table2Version = 1 ; indicatorOfParameter = 62 ; } @@ -1599,7 +1599,7 @@ table2Version = 1 ; indicatorOfParameter = 76 ; } -#Albedo +#Forecast albedo 'al' = { table2Version = 1 ; indicatorOfParameter = 84 ; @@ -1894,8 +1894,8 @@ table2Version = 1 ; indicatorOfParameter = 98 ; } -#Snow melt -'p3099' = { +#Snowmelt +'snom' = { table2Version = 1 ; indicatorOfParameter = 99 ; } @@ -2040,7 +2040,7 @@ table2Version = 1 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'sf' = { table2Version = 1 ; indicatorOfParameter = 65 ; diff --git a/definitions/grib1/grid_definition_5.def b/definitions/grib1/grid_definition_5.def index 341da6b18..43781136e 100644 --- a/definitions/grib1/grid_definition_5.def +++ b/definitions/grib1/grid_definition_5.def @@ -23,7 +23,7 @@ alias Lo1 = longitudeOfFirstGridPoint; include "grib1/resolution_flags.def"; # LoV - orientation of the grid; i.e. the longitude value of the meridian which is parallel to the Y-axis -signed[3] orientationOfTheGrid ; +signed[3] orientationOfTheGrid : edition_specific, no_copy ; meta geography.orientationOfTheGridInDegrees scale(orientationOfTheGrid,oneConstant,grib1divider,truncateDegrees) : dump; alias LoV = orientationOfTheGrid ; diff --git a/definitions/grib1/grid_definition_lambert.def b/definitions/grib1/grid_definition_lambert.def index aca2b323d..5556c16ac 100644 --- a/definitions/grib1/grid_definition_lambert.def +++ b/definitions/grib1/grid_definition_lambert.def @@ -60,7 +60,7 @@ alias xFirst=longitudeOfFirstGridPointInDegrees; include "grib1/scanning_mode.def"; # Latin 1 - first latitude from the pole at which the secant cone cuts the sphere -signed[3] Latin1 : edition_specific; +signed[3] Latin1 : edition_specific, no_copy; meta geography.Latin1InDegrees scale(Latin1,oneConstant,grib1divider,truncateDegrees) : dump; alias firstLatitude=Latin1; alias firstLatitudeInDegrees=Latin1InDegrees; @@ -70,7 +70,7 @@ constant LaDInDegrees = Latin1InDegrees : dump; alias geography.LaDInDegrees=LaDInDegrees; # Latin 2 - second latitude from the pole at which the secant cone cuts the sphere -signed[3] Latin2 :edition_specific; +signed[3] Latin2 :edition_specific,no_copy; alias secondLatitude=Latin2; meta geography.Latin2InDegrees scale(Latin2,oneConstant,grib1divider,truncateDegrees) : dump; alias secondLatitudeInDegrees=Latin2InDegrees; diff --git a/definitions/grib1/grid_rotation.def b/definitions/grib1/grid_rotation.def index 05d49bd29..cd05657fb 100644 --- a/definitions/grib1/grid_rotation.def +++ b/definitions/grib1/grid_rotation.def @@ -1,10 +1,10 @@ # (C) Copyright 2005- ECMWF. -signed[3] latitudeOfSouthernPole : edition_specific; -meta geography.latitudeOfSouthernPoleInDegrees scale(latitudeOfSouthernPole ,oneConstant,grib1divider,truncateDegrees) : dump; +signed[3] latitudeOfSouthernPole : edition_specific, no_copy; +meta geography.latitudeOfSouthernPoleInDegrees scale(latitudeOfSouthernPole ,oneConstant,grib1divider,truncateDegrees): dump; -signed[3] longitudeOfSouthernPole : edition_specific ; -meta geography.longitudeOfSouthernPoleInDegrees scale(longitudeOfSouthernPole ,oneConstant,grib1divider,truncateDegrees) : dump; +signed[3] longitudeOfSouthernPole : edition_specific, no_copy; +meta geography.longitudeOfSouthernPoleInDegrees scale(longitudeOfSouthernPole ,oneConstant,grib1divider,truncateDegrees): dump; ibmfloat geography.angleOfRotationInDegrees : dump; diff --git a/definitions/grib1/localConcepts/ecmf/cfName.def b/definitions/grib1/localConcepts/ecmf/cfName.def index 205319839..9868daef7 100644 --- a/definitions/grib1/localConcepts/ecmf/cfName.def +++ b/definitions/grib1/localConcepts/ecmf/cfName.def @@ -494,27 +494,27 @@ table2Version = 190 ; indicatorOfParameter = 172 ; } -#Surface roughness +#Surface roughness (climatological) 'surface_roughness_length' = { table2Version = 128 ; indicatorOfParameter = 173 ; } -#Surface roughness +#Surface roughness (climatological) 'surface_roughness_length' = { table2Version = 160 ; indicatorOfParameter = 173 ; } -#Albedo +#Albedo (climatological) 'surface_albedo' = { table2Version = 128 ; indicatorOfParameter = 174 ; } -#Albedo +#Albedo (climatological) 'surface_albedo' = { table2Version = 160 ; indicatorOfParameter = 174 ; } -#Albedo +#Albedo (climatological) 'surface_albedo' = { table2Version = 190 ; indicatorOfParameter = 174 ; diff --git a/definitions/grib1/localConcepts/ecmf/cfVarName.def b/definitions/grib1/localConcepts/ecmf/cfVarName.def index 781ea67a0..d3eb5a4f0 100644 --- a/definitions/grib1/localConcepts/ecmf/cfVarName.def +++ b/definitions/grib1/localConcepts/ecmf/cfVarName.def @@ -124,22 +124,22 @@ table2Version = 128 ; indicatorOfParameter = 14 ; } -#UV visible albedo for direct radiation +#UV visible albedo for direct radiation (climatological) 'aluvp' = { table2Version = 128 ; indicatorOfParameter = 15 ; } -#UV visible albedo for diffuse radiation +#UV visible albedo for diffuse radiation (climatological) 'aluvd' = { table2Version = 128 ; indicatorOfParameter = 16 ; } -#Near IR albedo for direct radiation +#Near IR albedo for direct radiation (climatological) 'alnip' = { table2Version = 128 ; indicatorOfParameter = 17 ; } -#Near IR albedo for diffuse radiation +#Near IR albedo for diffuse radiation (climatological) 'alnid' = { table2Version = 128 ; indicatorOfParameter = 18 ; @@ -149,7 +149,7 @@ table2Version = 128 ; indicatorOfParameter = 19 ; } -#Clear sky surface photosynthetically active radiation +#Surface photosynthetically active radiation, clear sky 'parcs' = { table2Version = 128 ; indicatorOfParameter = 20 ; @@ -414,7 +414,7 @@ table2Version = 128 ; indicatorOfParameter = 73 ; } -#Standard deviation of filtered subgrid orography +#Standard deviation of filtered subgrid orography (climatological) 'sdfor' = { table2Version = 128 ; indicatorOfParameter = 74 ; @@ -1354,27 +1354,27 @@ table2Version = 190 ; indicatorOfParameter = 172 ; } -#Surface roughness +#Surface roughness (climatological) 'sr' = { table2Version = 128 ; indicatorOfParameter = 173 ; } -#Surface roughness +#Surface roughness (climatological) 'sr' = { table2Version = 160 ; indicatorOfParameter = 173 ; } -#Albedo +#Albedo (climatological) 'al' = { table2Version = 128 ; indicatorOfParameter = 174 ; } -#Albedo +#Albedo (climatological) 'al' = { table2Version = 160 ; indicatorOfParameter = 174 ; } -#Albedo +#Albedo (climatological) 'al' = { table2Version = 190 ; indicatorOfParameter = 174 ; @@ -1739,12 +1739,12 @@ table2Version = 128 ; indicatorOfParameter = 207 ; } -#Top net solar radiation, clear sky +#Top net short-wave (solar) radiation, clear sky 'tsrc' = { table2Version = 128 ; indicatorOfParameter = 208 ; } -#Top net thermal radiation, clear sky +#Top net long-wave (thermal) radiation, clear sky 'ttrc' = { table2Version = 128 ; indicatorOfParameter = 209 ; @@ -1759,7 +1759,7 @@ table2Version = 128 ; indicatorOfParameter = 211 ; } -#TOA incident solar radiation +#TOA incident short-wave (solar) radiation 'tisr' = { table2Version = 128 ; indicatorOfParameter = 212 ; @@ -1919,12 +1919,12 @@ table2Version = 160 ; indicatorOfParameter = 233 ; } -#Logarithm of surface roughness length for heat +#Logarithm of surface roughness length for heat (climatological) 'lsrh' = { table2Version = 128 ; indicatorOfParameter = 234 ; } -#Logarithm of surface roughness length for heat +#Logarithm of surface roughness length for heat (climatological) 'lsrh' = { table2Version = 160 ; indicatorOfParameter = 234 ; @@ -4024,32 +4024,32 @@ table2Version = 210 ; indicatorOfParameter = 120 ; } -#UV visible albedo for direct radiation, isotropic component +#UV visible albedo for direct radiation, isotropic component (climatological) 'aluvpi' = { table2Version = 210 ; indicatorOfParameter = 186 ; } -#UV visible albedo for direct radiation, volumetric component +#UV visible albedo for direct radiation, volumetric component (climatological) 'aluvpv' = { table2Version = 210 ; indicatorOfParameter = 187 ; } -#UV visible albedo for direct radiation, geometric component +#UV visible albedo for direct radiation, geometric component (climatological) 'aluvpg' = { table2Version = 210 ; indicatorOfParameter = 188 ; } -#Near IR albedo for direct radiation, isotropic component +#Near IR albedo for direct radiation, isotropic component (climatological) 'alnipi' = { table2Version = 210 ; indicatorOfParameter = 189 ; } -#Near IR albedo for direct radiation, volumetric component +#Near IR albedo for direct radiation, volumetric component (climatological) 'alnipv' = { table2Version = 210 ; indicatorOfParameter = 190 ; } -#Near IR albedo for direct radiation, geometric component +#Near IR albedo for direct radiation, geometric component (climatological) 'alnipg' = { table2Version = 210 ; indicatorOfParameter = 191 ; @@ -9884,7 +9884,7 @@ table2Version = 228 ; indicatorOfParameter = 21 ; } -#Clear-sky direct solar radiation at surface +#Surface direct short-wave radiation, clear sky 'cdir' = { table2Version = 228 ; indicatorOfParameter = 22 ; @@ -13699,133 +13699,133 @@ table2Version = 162 ; indicatorOfParameter = 58 ; } -#Vertical integral of kinetic energy -'p59.162' = { +#Total column vertically-integrated kinetic energy +'vike' = { table2Version = 162 ; indicatorOfParameter = 59 ; } -#Vertical integral of thermal energy -'p60.162' = { +#Total column vertically-integrated enthalpy +'vithe' = { table2Version = 162 ; indicatorOfParameter = 60 ; } -#Vertical integral of potential+internal energy -'p61.162' = { +#Total column vertically-integrated potential + internal energy +'vipie' = { table2Version = 162 ; indicatorOfParameter = 61 ; } #Vertical integral of potential+internal+latent energy -'p62.162' = { +'vipile' = { table2Version = 162 ; indicatorOfParameter = 62 ; } -#Vertical integral of total energy -'p63.162' = { +#Total column vertically-integrated total energy +'vitoe' = { table2Version = 162 ; indicatorOfParameter = 63 ; } #Vertical integral of energy conversion -'p64.162' = { +'viec' = { table2Version = 162 ; indicatorOfParameter = 64 ; } #Vertical integral of eastward mass flux -'p65.162' = { +'vimae' = { table2Version = 162 ; indicatorOfParameter = 65 ; } #Vertical integral of northward mass flux -'p66.162' = { +'viman' = { table2Version = 162 ; indicatorOfParameter = 66 ; } #Vertical integral of eastward kinetic energy flux -'p67.162' = { +'vikee' = { table2Version = 162 ; indicatorOfParameter = 67 ; } #Vertical integral of northward kinetic energy flux -'p68.162' = { +'viken' = { table2Version = 162 ; indicatorOfParameter = 68 ; } #Vertical integral of eastward heat flux -'p69.162' = { +'vithee' = { table2Version = 162 ; indicatorOfParameter = 69 ; } #Vertical integral of northward heat flux -'p70.162' = { +'vithen' = { table2Version = 162 ; indicatorOfParameter = 70 ; } #Vertical integral of eastward water vapour flux -'p71.162' = { +'viwve' = { table2Version = 162 ; indicatorOfParameter = 71 ; } #Vertical integral of northward water vapour flux -'p72.162' = { +'viwvn' = { table2Version = 162 ; indicatorOfParameter = 72 ; } #Vertical integral of eastward geopotential flux -'p73.162' = { +'vige' = { table2Version = 162 ; indicatorOfParameter = 73 ; } #Vertical integral of northward geopotential flux -'p74.162' = { +'vign' = { table2Version = 162 ; indicatorOfParameter = 74 ; } #Vertical integral of eastward total energy flux -'p75.162' = { +'vitoee' = { table2Version = 162 ; indicatorOfParameter = 75 ; } #Vertical integral of northward total energy flux -'p76.162' = { +'vitoen' = { table2Version = 162 ; indicatorOfParameter = 76 ; } #Vertical integral of eastward ozone flux -'p77.162' = { +'vioze' = { table2Version = 162 ; indicatorOfParameter = 77 ; } #Vertical integral of northward ozone flux -'p78.162' = { +'viozn' = { table2Version = 162 ; indicatorOfParameter = 78 ; } #Vertical integral of divergence of mass flux -'p81.162' = { +'vimad' = { table2Version = 162 ; indicatorOfParameter = 81 ; } #Vertical integral of divergence of kinetic energy flux -'p82.162' = { +'viked' = { table2Version = 162 ; indicatorOfParameter = 82 ; } #Vertical integral of divergence of thermal energy flux -'p83.162' = { +'vithed' = { table2Version = 162 ; indicatorOfParameter = 83 ; } -#Vertical integral of divergence of moisture flux -'p84.162' = { +#Vertically integrated moisture divergence flux +'viwvd' = { table2Version = 162 ; indicatorOfParameter = 84 ; } #Vertical integral of divergence of geopotential flux -'p85.162' = { +'vigd' = { table2Version = 162 ; indicatorOfParameter = 85 ; } #Vertical integral of divergence of total energy flux -'p86.162' = { +'vitoed' = { table2Version = 162 ; indicatorOfParameter = 86 ; } @@ -15344,11 +15344,6 @@ table2Version = 174 ; indicatorOfParameter = 8 ; } -#Sub-surface runoff -'ssro' = { - table2Version = 174 ; - indicatorOfParameter = 9 ; - } #Fraction of sea-ice in sea 'p31.174' = { table2Version = 174 ; @@ -17599,12 +17594,12 @@ table2Version = 228 ; indicatorOfParameter = 39 ; } -#Neutral wind at 10 m u-component +#U-component of neutral wind 'u10n' = { table2Version = 228 ; indicatorOfParameter = 131 ; } -#Neutral wind at 10 m v-component +#V-component of neutral wind 'v10n' = { table2Version = 228 ; indicatorOfParameter = 132 ; @@ -17619,7 +17614,7 @@ table2Version = 228 ; indicatorOfParameter = 141 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'sf' = { table2Version = 228 ; indicatorOfParameter = 144 ; diff --git a/definitions/grib1/localConcepts/ecmf/name.def b/definitions/grib1/localConcepts/ecmf/name.def index 8a6b5aa16..6cc48c520 100644 --- a/definitions/grib1/localConcepts/ecmf/name.def +++ b/definitions/grib1/localConcepts/ecmf/name.def @@ -124,23 +124,23 @@ table2Version = 128 ; indicatorOfParameter = 14 ; } -#UV visible albedo for direct radiation -'UV visible albedo for direct radiation' = { +#UV visible albedo for direct radiation (climatological) +'UV visible albedo for direct radiation (climatological)' = { table2Version = 128 ; indicatorOfParameter = 15 ; } -#UV visible albedo for diffuse radiation -'UV visible albedo for diffuse radiation' = { +#UV visible albedo for diffuse radiation (climatological) +'UV visible albedo for diffuse radiation (climatological)' = { table2Version = 128 ; indicatorOfParameter = 16 ; } -#Near IR albedo for direct radiation -'Near IR albedo for direct radiation' = { +#Near IR albedo for direct radiation (climatological) +'Near IR albedo for direct radiation (climatological)' = { table2Version = 128 ; indicatorOfParameter = 17 ; } -#Near IR albedo for diffuse radiation -'Near IR albedo for diffuse radiation' = { +#Near IR albedo for diffuse radiation (climatological) +'Near IR albedo for diffuse radiation (climatological)' = { table2Version = 128 ; indicatorOfParameter = 18 ; } @@ -149,8 +149,8 @@ table2Version = 128 ; indicatorOfParameter = 19 ; } -#Clear sky surface photosynthetically active radiation -'Clear sky surface photosynthetically active radiation' = { +#Surface photosynthetically active radiation, clear sky +'Surface photosynthetically active radiation, clear sky' = { table2Version = 128 ; indicatorOfParameter = 20 ; } @@ -414,8 +414,8 @@ table2Version = 128 ; indicatorOfParameter = 73 ; } -#Standard deviation of filtered subgrid orography -'Standard deviation of filtered subgrid orography' = { +#Standard deviation of filtered subgrid orography (climatological) +'Standard deviation of filtered subgrid orography (climatological)' = { table2Version = 128 ; indicatorOfParameter = 74 ; } @@ -1354,28 +1354,28 @@ table2Version = 190 ; indicatorOfParameter = 172 ; } -#Surface roughness -'Surface roughness' = { +#Surface roughness (climatological) +'Surface roughness (climatological)' = { table2Version = 128 ; indicatorOfParameter = 173 ; } -#Surface roughness -'Surface roughness' = { +#Surface roughness (climatological) +'Surface roughness (climatological)' = { table2Version = 160 ; indicatorOfParameter = 173 ; } -#Albedo -'Albedo' = { +#Albedo (climatological) +'Albedo (climatological)' = { table2Version = 128 ; indicatorOfParameter = 174 ; } -#Albedo -'Albedo' = { +#Albedo (climatological) +'Albedo (climatological)' = { table2Version = 160 ; indicatorOfParameter = 174 ; } -#Albedo -'Albedo' = { +#Albedo (climatological) +'Albedo (climatological)' = { table2Version = 190 ; indicatorOfParameter = 174 ; } @@ -1739,13 +1739,13 @@ table2Version = 128 ; indicatorOfParameter = 207 ; } -#Top net solar radiation, clear sky -'Top net solar radiation, clear sky' = { +#Top net short-wave (solar) radiation, clear sky +'Top net short-wave (solar) radiation, clear sky' = { table2Version = 128 ; indicatorOfParameter = 208 ; } -#Top net thermal radiation, clear sky -'Top net thermal radiation, clear sky' = { +#Top net long-wave (thermal) radiation, clear sky +'Top net long-wave (thermal) radiation, clear sky' = { table2Version = 128 ; indicatorOfParameter = 209 ; } @@ -1759,8 +1759,8 @@ table2Version = 128 ; indicatorOfParameter = 211 ; } -#TOA incident solar radiation -'TOA incident solar radiation' = { +#TOA incident short-wave (solar) radiation +'TOA incident short-wave (solar) radiation' = { table2Version = 128 ; indicatorOfParameter = 212 ; } @@ -1919,13 +1919,13 @@ table2Version = 160 ; indicatorOfParameter = 233 ; } -#Logarithm of surface roughness length for heat -'Logarithm of surface roughness length for heat' = { +#Logarithm of surface roughness length for heat (climatological) +'Logarithm of surface roughness length for heat (climatological)' = { table2Version = 128 ; indicatorOfParameter = 234 ; } -#Logarithm of surface roughness length for heat -'Logarithm of surface roughness length for heat' = { +#Logarithm of surface roughness length for heat (climatological) +'Logarithm of surface roughness length for heat (climatological)' = { table2Version = 160 ; indicatorOfParameter = 234 ; } @@ -4024,63 +4024,63 @@ table2Version = 210 ; indicatorOfParameter = 120 ; } -#UV visible albedo for direct radiation, isotropic component -'UV visible albedo for direct radiation, isotropic component ' = { +#UV visible albedo for direct radiation, isotropic component (climatological) +'UV visible albedo for direct radiation, isotropic component (climatological)' = { table2Version = 210 ; indicatorOfParameter = 186 ; } -#UV visible albedo for direct radiation, volumetric component -'UV visible albedo for direct radiation, volumetric component ' = { +#UV visible albedo for direct radiation, volumetric component (climatological) +'UV visible albedo for direct radiation, volumetric component (climatological)' = { table2Version = 210 ; indicatorOfParameter = 187 ; } -#UV visible albedo for direct radiation, geometric component -'UV visible albedo for direct radiation, geometric component ' = { +#UV visible albedo for direct radiation, geometric component (climatological) +'UV visible albedo for direct radiation, geometric component (climatological)' = { table2Version = 210 ; indicatorOfParameter = 188 ; } -#Near IR albedo for direct radiation, isotropic component -'Near IR albedo for direct radiation, isotropic component ' = { +#Near IR albedo for direct radiation, isotropic component (climatological) +'Near IR albedo for direct radiation, isotropic component (climatological)' = { table2Version = 210 ; indicatorOfParameter = 189 ; } -#Near IR albedo for direct radiation, volumetric component -'Near IR albedo for direct radiation, volumetric component' = { +#Near IR albedo for direct radiation, volumetric component (climatological) +'Near IR albedo for direct radiation, volumetric component (climatological)' = { table2Version = 210 ; indicatorOfParameter = 190 ; } -#Near IR albedo for direct radiation, geometric component -'Near IR albedo for direct radiation, geometric component ' = { +#Near IR albedo for direct radiation, geometric component (climatological) +'Near IR albedo for direct radiation, geometric component (climatological)' = { table2Version = 210 ; indicatorOfParameter = 191 ; } -#UV visible albedo for diffuse radiation, isotropic component -'UV visible albedo for diffuse radiation, isotropic component ' = { +#UV visible albedo for diffuse radiation, isotropic component +'UV visible albedo for diffuse radiation, isotropic component' = { table2Version = 210 ; indicatorOfParameter = 192 ; } -#UV visible albedo for diffuse radiation, volumetric component -'UV visible albedo for diffuse radiation, volumetric component ' = { +#UV visible albedo for diffuse radiation, volumetric component +'UV visible albedo for diffuse radiation, volumetric component' = { table2Version = 210 ; indicatorOfParameter = 193 ; } -#UV visible albedo for diffuse radiation, geometric component -'UV visible albedo for diffuse radiation, geometric component ' = { +#UV visible albedo for diffuse radiation, geometric component +'UV visible albedo for diffuse radiation, geometric component' = { table2Version = 210 ; indicatorOfParameter = 194 ; } -#Near IR albedo for diffuse radiation, isotropic component -'Near IR albedo for diffuse radiation, isotropic component ' = { +#Near IR albedo for diffuse radiation, isotropic component +'Near IR albedo for diffuse radiation, isotropic component' = { table2Version = 210 ; indicatorOfParameter = 195 ; } -#Near IR albedo for diffuse radiation, volumetric component -'Near IR albedo for diffuse radiation, volumetric component ' = { +#Near IR albedo for diffuse radiation, volumetric component +'Near IR albedo for diffuse radiation, volumetric component' = { table2Version = 210 ; indicatorOfParameter = 196 ; } -#Near IR albedo for diffuse radiation, geometric component -'Near IR albedo for diffuse radiation, geometric component ' = { +#Near IR albedo for diffuse radiation, geometric component +'Near IR albedo for diffuse radiation, geometric component' = { table2Version = 210 ; indicatorOfParameter = 197 ; } @@ -9884,8 +9884,8 @@ table2Version = 228 ; indicatorOfParameter = 21 ; } -#Clear-sky direct solar radiation at surface -'Clear-sky direct solar radiation at surface' = { +#Surface direct short-wave radiation, clear sky +'Surface direct short-wave radiation, clear sky' = { table2Version = 228 ; indicatorOfParameter = 22 ; } @@ -13699,18 +13699,18 @@ table2Version = 162 ; indicatorOfParameter = 58 ; } -#Vertical integral of kinetic energy -'Vertical integral of kinetic energy' = { +#Total column vertically-integrated kinetic energy +'Total column vertically-integrated kinetic energy' = { table2Version = 162 ; indicatorOfParameter = 59 ; } -#Vertical integral of thermal energy -'Vertical integral of thermal energy' = { +#Total column vertically-integrated enthalpy +'Total column vertically-integrated enthalpy' = { table2Version = 162 ; indicatorOfParameter = 60 ; } -#Vertical integral of potential+internal energy -'Vertical integral of potential+internal energy' = { +#Total column vertically-integrated potential + internal energy +'Total column vertically-integrated potential + internal energy' = { table2Version = 162 ; indicatorOfParameter = 61 ; } @@ -13719,8 +13719,8 @@ table2Version = 162 ; indicatorOfParameter = 62 ; } -#Vertical integral of total energy -'Vertical integral of total energy' = { +#Total column vertically-integrated total energy +'Total column vertically-integrated total energy' = { table2Version = 162 ; indicatorOfParameter = 63 ; } @@ -13814,8 +13814,8 @@ table2Version = 162 ; indicatorOfParameter = 83 ; } -#Vertical integral of divergence of moisture flux -'Vertical integral of divergence of moisture flux' = { +#Vertically integrated moisture divergence flux +'Vertically integrated moisture divergence flux' = { table2Version = 162 ; indicatorOfParameter = 84 ; } @@ -15344,11 +15344,6 @@ table2Version = 174 ; indicatorOfParameter = 8 ; } -#Sub-surface runoff -'Sub-surface runoff' = { - table2Version = 174 ; - indicatorOfParameter = 9 ; - } #Fraction of sea-ice in sea 'Fraction of sea-ice in sea' = { table2Version = 174 ; @@ -17599,13 +17594,13 @@ table2Version = 228 ; indicatorOfParameter = 39 ; } -#Neutral wind at 10 m u-component -'Neutral wind at 10 m u-component' = { +#U-component of neutral wind +'U-component of neutral wind' = { table2Version = 228 ; indicatorOfParameter = 131 ; } -#Neutral wind at 10 m v-component -'Neutral wind at 10 m v-component' = { +#V-component of neutral wind +'V-component of neutral wind' = { table2Version = 228 ; indicatorOfParameter = 132 ; } @@ -17619,8 +17614,8 @@ table2Version = 228 ; indicatorOfParameter = 141 ; } -#Snow Fall water equivalent -'Snow Fall water equivalent' = { +#Snowfall water equivalent +'Snowfall water equivalent' = { table2Version = 228 ; indicatorOfParameter = 144 ; } diff --git a/definitions/grib1/localConcepts/ecmf/paramId.def b/definitions/grib1/localConcepts/ecmf/paramId.def index 61e924963..3fea9d27b 100644 --- a/definitions/grib1/localConcepts/ecmf/paramId.def +++ b/definitions/grib1/localConcepts/ecmf/paramId.def @@ -124,22 +124,22 @@ table2Version = 128 ; indicatorOfParameter = 14 ; } -#UV visible albedo for direct radiation +#UV visible albedo for direct radiation (climatological) '15' = { table2Version = 128 ; indicatorOfParameter = 15 ; } -#UV visible albedo for diffuse radiation +#UV visible albedo for diffuse radiation (climatological) '16' = { table2Version = 128 ; indicatorOfParameter = 16 ; } -#Near IR albedo for direct radiation +#Near IR albedo for direct radiation (climatological) '17' = { table2Version = 128 ; indicatorOfParameter = 17 ; } -#Near IR albedo for diffuse radiation +#Near IR albedo for diffuse radiation (climatological) '18' = { table2Version = 128 ; indicatorOfParameter = 18 ; @@ -149,7 +149,7 @@ table2Version = 128 ; indicatorOfParameter = 19 ; } -#Clear sky surface photosynthetically active radiation +#Surface photosynthetically active radiation, clear sky '20' = { table2Version = 128 ; indicatorOfParameter = 20 ; @@ -414,7 +414,7 @@ table2Version = 128 ; indicatorOfParameter = 73 ; } -#Standard deviation of filtered subgrid orography +#Standard deviation of filtered subgrid orography (climatological) '74' = { table2Version = 128 ; indicatorOfParameter = 74 ; @@ -1354,27 +1354,27 @@ table2Version = 190 ; indicatorOfParameter = 172 ; } -#Surface roughness +#Surface roughness (climatological) '173' = { table2Version = 128 ; indicatorOfParameter = 173 ; } -#Surface roughness +#Surface roughness (climatological) '173' = { table2Version = 160 ; indicatorOfParameter = 173 ; } -#Albedo +#Albedo (climatological) '174' = { table2Version = 128 ; indicatorOfParameter = 174 ; } -#Albedo +#Albedo (climatological) '174' = { table2Version = 160 ; indicatorOfParameter = 174 ; } -#Albedo +#Albedo (climatological) '174' = { table2Version = 190 ; indicatorOfParameter = 174 ; @@ -1739,12 +1739,12 @@ table2Version = 128 ; indicatorOfParameter = 207 ; } -#Top net solar radiation, clear sky +#Top net short-wave (solar) radiation, clear sky '208' = { table2Version = 128 ; indicatorOfParameter = 208 ; } -#Top net thermal radiation, clear sky +#Top net long-wave (thermal) radiation, clear sky '209' = { table2Version = 128 ; indicatorOfParameter = 209 ; @@ -1759,7 +1759,7 @@ table2Version = 128 ; indicatorOfParameter = 211 ; } -#TOA incident solar radiation +#TOA incident short-wave (solar) radiation '212' = { table2Version = 128 ; indicatorOfParameter = 212 ; @@ -1919,12 +1919,12 @@ table2Version = 160 ; indicatorOfParameter = 233 ; } -#Logarithm of surface roughness length for heat +#Logarithm of surface roughness length for heat (climatological) '234' = { table2Version = 128 ; indicatorOfParameter = 234 ; } -#Logarithm of surface roughness length for heat +#Logarithm of surface roughness length for heat (climatological) '234' = { table2Version = 160 ; indicatorOfParameter = 234 ; @@ -4024,62 +4024,62 @@ table2Version = 210 ; indicatorOfParameter = 120 ; } -#UV visible albedo for direct radiation, isotropic component +#UV visible albedo for direct radiation, isotropic component (climatological) '210186' = { table2Version = 210 ; indicatorOfParameter = 186 ; } -#UV visible albedo for direct radiation, volumetric component +#UV visible albedo for direct radiation, volumetric component (climatological) '210187' = { table2Version = 210 ; indicatorOfParameter = 187 ; } -#UV visible albedo for direct radiation, geometric component +#UV visible albedo for direct radiation, geometric component (climatological) '210188' = { table2Version = 210 ; indicatorOfParameter = 188 ; } -#Near IR albedo for direct radiation, isotropic component +#Near IR albedo for direct radiation, isotropic component (climatological) '210189' = { table2Version = 210 ; indicatorOfParameter = 189 ; } -#Near IR albedo for direct radiation, volumetric component +#Near IR albedo for direct radiation, volumetric component (climatological) '210190' = { table2Version = 210 ; indicatorOfParameter = 190 ; } -#Near IR albedo for direct radiation, geometric component +#Near IR albedo for direct radiation, geometric component (climatological) '210191' = { table2Version = 210 ; indicatorOfParameter = 191 ; } -#UV visible albedo for diffuse radiation, isotropic component +#UV visible albedo for diffuse radiation, isotropic component '210192' = { table2Version = 210 ; indicatorOfParameter = 192 ; } -#UV visible albedo for diffuse radiation, volumetric component +#UV visible albedo for diffuse radiation, volumetric component '210193' = { table2Version = 210 ; indicatorOfParameter = 193 ; } -#UV visible albedo for diffuse radiation, geometric component +#UV visible albedo for diffuse radiation, geometric component '210194' = { table2Version = 210 ; indicatorOfParameter = 194 ; } -#Near IR albedo for diffuse radiation, isotropic component +#Near IR albedo for diffuse radiation, isotropic component '210195' = { table2Version = 210 ; indicatorOfParameter = 195 ; } -#Near IR albedo for diffuse radiation, volumetric component +#Near IR albedo for diffuse radiation, volumetric component '210196' = { table2Version = 210 ; indicatorOfParameter = 196 ; } -#Near IR albedo for diffuse radiation, geometric component +#Near IR albedo for diffuse radiation, geometric component '210197' = { table2Version = 210 ; indicatorOfParameter = 197 ; @@ -9884,7 +9884,7 @@ table2Version = 228 ; indicatorOfParameter = 21 ; } -#Clear-sky direct solar radiation at surface +#Surface direct short-wave radiation, clear sky '228022' = { table2Version = 228 ; indicatorOfParameter = 22 ; @@ -13699,17 +13699,17 @@ table2Version = 162 ; indicatorOfParameter = 58 ; } -#Vertical integral of kinetic energy +#Total column vertically-integrated kinetic energy '162059' = { table2Version = 162 ; indicatorOfParameter = 59 ; } -#Vertical integral of thermal energy +#Total column vertically-integrated enthalpy '162060' = { table2Version = 162 ; indicatorOfParameter = 60 ; } -#Vertical integral of potential+internal energy +#Total column vertically-integrated potential + internal energy '162061' = { table2Version = 162 ; indicatorOfParameter = 61 ; @@ -13719,7 +13719,7 @@ table2Version = 162 ; indicatorOfParameter = 62 ; } -#Vertical integral of total energy +#Total column vertically-integrated total energy '162063' = { table2Version = 162 ; indicatorOfParameter = 63 ; @@ -13814,7 +13814,7 @@ table2Version = 162 ; indicatorOfParameter = 83 ; } -#Vertical integral of divergence of moisture flux +#Vertically integrated moisture divergence flux '162084' = { table2Version = 162 ; indicatorOfParameter = 84 ; @@ -15344,11 +15344,6 @@ table2Version = 174 ; indicatorOfParameter = 8 ; } -#Sub-surface runoff -'174009' = { - table2Version = 174 ; - indicatorOfParameter = 9 ; - } #Fraction of sea-ice in sea '174031' = { table2Version = 174 ; @@ -17599,12 +17594,12 @@ table2Version = 228 ; indicatorOfParameter = 39 ; } -#Neutral wind at 10 m u-component +#U-component of neutral wind '228131' = { table2Version = 228 ; indicatorOfParameter = 131 ; } -#Neutral wind at 10 m v-component +#V-component of neutral wind '228132' = { table2Version = 228 ; indicatorOfParameter = 132 ; @@ -17619,7 +17614,7 @@ table2Version = 228 ; indicatorOfParameter = 141 ; } -#Snow Fall water equivalent +#Snowfall water equivalent '228144' = { table2Version = 228 ; indicatorOfParameter = 144 ; diff --git a/definitions/grib1/localConcepts/ecmf/shortName.def b/definitions/grib1/localConcepts/ecmf/shortName.def index a122c442e..4c399f5a0 100644 --- a/definitions/grib1/localConcepts/ecmf/shortName.def +++ b/definitions/grib1/localConcepts/ecmf/shortName.def @@ -124,22 +124,22 @@ table2Version = 128 ; indicatorOfParameter = 14 ; } -#UV visible albedo for direct radiation +#UV visible albedo for direct radiation (climatological) 'aluvp' = { table2Version = 128 ; indicatorOfParameter = 15 ; } -#UV visible albedo for diffuse radiation +#UV visible albedo for diffuse radiation (climatological) 'aluvd' = { table2Version = 128 ; indicatorOfParameter = 16 ; } -#Near IR albedo for direct radiation +#Near IR albedo for direct radiation (climatological) 'alnip' = { table2Version = 128 ; indicatorOfParameter = 17 ; } -#Near IR albedo for diffuse radiation +#Near IR albedo for diffuse radiation (climatological) 'alnid' = { table2Version = 128 ; indicatorOfParameter = 18 ; @@ -149,7 +149,7 @@ table2Version = 128 ; indicatorOfParameter = 19 ; } -#Clear sky surface photosynthetically active radiation +#Surface photosynthetically active radiation, clear sky 'parcs' = { table2Version = 128 ; indicatorOfParameter = 20 ; @@ -414,7 +414,7 @@ table2Version = 128 ; indicatorOfParameter = 73 ; } -#Standard deviation of filtered subgrid orography +#Standard deviation of filtered subgrid orography (climatological) 'sdfor' = { table2Version = 128 ; indicatorOfParameter = 74 ; @@ -1354,27 +1354,27 @@ table2Version = 190 ; indicatorOfParameter = 172 ; } -#Surface roughness +#Surface roughness (climatological) 'sr' = { table2Version = 128 ; indicatorOfParameter = 173 ; } -#Surface roughness +#Surface roughness (climatological) 'sr' = { table2Version = 160 ; indicatorOfParameter = 173 ; } -#Albedo +#Albedo (climatological) 'al' = { table2Version = 128 ; indicatorOfParameter = 174 ; } -#Albedo +#Albedo (climatological) 'al' = { table2Version = 160 ; indicatorOfParameter = 174 ; } -#Albedo +#Albedo (climatological) 'al' = { table2Version = 190 ; indicatorOfParameter = 174 ; @@ -1739,12 +1739,12 @@ table2Version = 128 ; indicatorOfParameter = 207 ; } -#Top net solar radiation, clear sky +#Top net short-wave (solar) radiation, clear sky 'tsrc' = { table2Version = 128 ; indicatorOfParameter = 208 ; } -#Top net thermal radiation, clear sky +#Top net long-wave (thermal) radiation, clear sky 'ttrc' = { table2Version = 128 ; indicatorOfParameter = 209 ; @@ -1759,7 +1759,7 @@ table2Version = 128 ; indicatorOfParameter = 211 ; } -#TOA incident solar radiation +#TOA incident short-wave (solar) radiation 'tisr' = { table2Version = 128 ; indicatorOfParameter = 212 ; @@ -1919,12 +1919,12 @@ table2Version = 160 ; indicatorOfParameter = 233 ; } -#Logarithm of surface roughness length for heat +#Logarithm of surface roughness length for heat (climatological) 'lsrh' = { table2Version = 128 ; indicatorOfParameter = 234 ; } -#Logarithm of surface roughness length for heat +#Logarithm of surface roughness length for heat (climatological) 'lsrh' = { table2Version = 160 ; indicatorOfParameter = 234 ; @@ -4024,62 +4024,62 @@ table2Version = 210 ; indicatorOfParameter = 120 ; } -#UV visible albedo for direct radiation, isotropic component +#UV visible albedo for direct radiation, isotropic component (climatological) 'aluvpi' = { table2Version = 210 ; indicatorOfParameter = 186 ; } -#UV visible albedo for direct radiation, volumetric component +#UV visible albedo for direct radiation, volumetric component (climatological) 'aluvpv' = { table2Version = 210 ; indicatorOfParameter = 187 ; } -#UV visible albedo for direct radiation, geometric component +#UV visible albedo for direct radiation, geometric component (climatological) 'aluvpg' = { table2Version = 210 ; indicatorOfParameter = 188 ; } -#Near IR albedo for direct radiation, isotropic component +#Near IR albedo for direct radiation, isotropic component (climatological) 'alnipi' = { table2Version = 210 ; indicatorOfParameter = 189 ; } -#Near IR albedo for direct radiation, volumetric component +#Near IR albedo for direct radiation, volumetric component (climatological) 'alnipv' = { table2Version = 210 ; indicatorOfParameter = 190 ; } -#Near IR albedo for direct radiation, geometric component +#Near IR albedo for direct radiation, geometric component (climatological) 'alnipg' = { table2Version = 210 ; indicatorOfParameter = 191 ; } -#UV visible albedo for diffuse radiation, isotropic component +#UV visible albedo for diffuse radiation, isotropic component 'aluvdi' = { table2Version = 210 ; indicatorOfParameter = 192 ; } -#UV visible albedo for diffuse radiation, volumetric component +#UV visible albedo for diffuse radiation, volumetric component 'aluvdv' = { table2Version = 210 ; indicatorOfParameter = 193 ; } -#UV visible albedo for diffuse radiation, geometric component +#UV visible albedo for diffuse radiation, geometric component 'aluvdg' = { table2Version = 210 ; indicatorOfParameter = 194 ; } -#Near IR albedo for diffuse radiation, isotropic component +#Near IR albedo for diffuse radiation, isotropic component 'alnidi' = { table2Version = 210 ; indicatorOfParameter = 195 ; } -#Near IR albedo for diffuse radiation, volumetric component +#Near IR albedo for diffuse radiation, volumetric component 'alnidv' = { table2Version = 210 ; indicatorOfParameter = 196 ; } -#Near IR albedo for diffuse radiation, geometric component +#Near IR albedo for diffuse radiation, geometric component 'alnidg' = { table2Version = 210 ; indicatorOfParameter = 197 ; @@ -9884,7 +9884,7 @@ table2Version = 228 ; indicatorOfParameter = 21 ; } -#Clear-sky direct solar radiation at surface +#Surface direct short-wave radiation, clear sky 'cdir' = { table2Version = 228 ; indicatorOfParameter = 22 ; @@ -13699,17 +13699,17 @@ table2Version = 162 ; indicatorOfParameter = 58 ; } -#Vertical integral of kinetic energy +#Total column vertically-integrated kinetic energy 'vike' = { table2Version = 162 ; indicatorOfParameter = 59 ; } -#Vertical integral of thermal energy +#Total column vertically-integrated enthalpy 'vithe' = { table2Version = 162 ; indicatorOfParameter = 60 ; } -#Vertical integral of potential+internal energy +#Total column vertically-integrated potential + internal energy 'vipie' = { table2Version = 162 ; indicatorOfParameter = 61 ; @@ -13719,7 +13719,7 @@ table2Version = 162 ; indicatorOfParameter = 62 ; } -#Vertical integral of total energy +#Total column vertically-integrated total energy 'vitoe' = { table2Version = 162 ; indicatorOfParameter = 63 ; @@ -13814,7 +13814,7 @@ table2Version = 162 ; indicatorOfParameter = 83 ; } -#Vertical integral of divergence of moisture flux +#Vertically integrated moisture divergence flux 'viwvd' = { table2Version = 162 ; indicatorOfParameter = 84 ; @@ -15344,11 +15344,6 @@ table2Version = 174 ; indicatorOfParameter = 8 ; } -#Sub-surface runoff -'ssro' = { - table2Version = 174 ; - indicatorOfParameter = 9 ; - } #Fraction of sea-ice in sea '~' = { table2Version = 174 ; @@ -17599,12 +17594,12 @@ table2Version = 228 ; indicatorOfParameter = 39 ; } -#Neutral wind at 10 m u-component +#U-component of neutral wind 'u10n' = { table2Version = 228 ; indicatorOfParameter = 131 ; } -#Neutral wind at 10 m v-component +#V-component of neutral wind 'v10n' = { table2Version = 228 ; indicatorOfParameter = 132 ; @@ -17619,7 +17614,7 @@ table2Version = 228 ; indicatorOfParameter = 141 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'sf' = { table2Version = 228 ; indicatorOfParameter = 144 ; diff --git a/definitions/grib1/localConcepts/ecmf/units.def b/definitions/grib1/localConcepts/ecmf/units.def index 1f3f6ad9d..4bf0f3db0 100644 --- a/definitions/grib1/localConcepts/ecmf/units.def +++ b/definitions/grib1/localConcepts/ecmf/units.def @@ -124,22 +124,22 @@ table2Version = 128 ; indicatorOfParameter = 14 ; } -#UV visible albedo for direct radiation +#UV visible albedo for direct radiation (climatological) '(0 - 1)' = { table2Version = 128 ; indicatorOfParameter = 15 ; } -#UV visible albedo for diffuse radiation +#UV visible albedo for diffuse radiation (climatological) '(0 - 1)' = { table2Version = 128 ; indicatorOfParameter = 16 ; } -#Near IR albedo for direct radiation +#Near IR albedo for direct radiation (climatological) '(0 - 1)' = { table2Version = 128 ; indicatorOfParameter = 17 ; } -#Near IR albedo for diffuse radiation +#Near IR albedo for diffuse radiation (climatological) '(0 - 1)' = { table2Version = 128 ; indicatorOfParameter = 18 ; @@ -149,7 +149,7 @@ table2Version = 128 ; indicatorOfParameter = 19 ; } -#Clear sky surface photosynthetically active radiation +#Surface photosynthetically active radiation, clear sky 'J m**-2' = { table2Version = 128 ; indicatorOfParameter = 20 ; @@ -195,12 +195,12 @@ indicatorOfParameter = 28 ; } #Type of low vegetation -'~' = { +'(code table 4.234)' = { table2Version = 128 ; indicatorOfParameter = 29 ; } #Type of high vegetation -'~' = { +'(code table 4.234)' = { table2Version = 128 ; indicatorOfParameter = 30 ; } @@ -414,7 +414,7 @@ table2Version = 128 ; indicatorOfParameter = 73 ; } -#Standard deviation of filtered subgrid orography +#Standard deviation of filtered subgrid orography (climatological) 'm' = { table2Version = 128 ; indicatorOfParameter = 74 ; @@ -1050,7 +1050,7 @@ indicatorOfParameter = 147 ; } #Charnock -'~' = { +'Numeric' = { table2Version = 128 ; indicatorOfParameter = 148 ; } @@ -1090,12 +1090,12 @@ indicatorOfParameter = 151 ; } #Logarithm of surface pressure -'~' = { +'Numeric' = { table2Version = 128 ; indicatorOfParameter = 152 ; } #Logarithm of surface pressure -'~' = { +'Numeric' = { table2Version = 160 ; indicatorOfParameter = 152 ; } @@ -1354,27 +1354,27 @@ table2Version = 190 ; indicatorOfParameter = 172 ; } -#Surface roughness +#Surface roughness (climatological) 'm' = { table2Version = 128 ; indicatorOfParameter = 173 ; } -#Surface roughness +#Surface roughness (climatological) 'm' = { table2Version = 160 ; indicatorOfParameter = 173 ; } -#Albedo +#Albedo (climatological) '(0 - 1)' = { table2Version = 128 ; indicatorOfParameter = 174 ; } -#Albedo +#Albedo (climatological) '(0 - 1)' = { table2Version = 160 ; indicatorOfParameter = 174 ; } -#Albedo +#Albedo (climatological) '(0 - 1)' = { table2Version = 190 ; indicatorOfParameter = 174 ; @@ -1739,12 +1739,12 @@ table2Version = 128 ; indicatorOfParameter = 207 ; } -#Top net solar radiation, clear sky +#Top net short-wave (solar) radiation, clear sky 'J m**-2' = { table2Version = 128 ; indicatorOfParameter = 208 ; } -#Top net thermal radiation, clear sky +#Top net long-wave (thermal) radiation, clear sky 'J m**-2' = { table2Version = 128 ; indicatorOfParameter = 209 ; @@ -1759,7 +1759,7 @@ table2Version = 128 ; indicatorOfParameter = 211 ; } -#TOA incident solar radiation +#TOA incident short-wave (solar) radiation 'J m**-2' = { table2Version = 128 ; indicatorOfParameter = 212 ; @@ -1919,13 +1919,13 @@ table2Version = 160 ; indicatorOfParameter = 233 ; } -#Logarithm of surface roughness length for heat -'~' = { +#Logarithm of surface roughness length for heat (climatological) +'Numeric' = { table2Version = 128 ; indicatorOfParameter = 234 ; } -#Logarithm of surface roughness length for heat -'~' = { +#Logarithm of surface roughness length for heat (climatological) +'Numeric' = { table2Version = 160 ; indicatorOfParameter = 234 ; } @@ -2005,12 +2005,12 @@ indicatorOfParameter = 244 ; } #Forecast logarithm of surface roughness for heat -'~' = { +'Numeric' = { table2Version = 128 ; indicatorOfParameter = 245 ; } #Forecast logarithm of surface roughness for heat -'~' = { +'Numeric' = { table2Version = 160 ; indicatorOfParameter = 245 ; } @@ -3380,12 +3380,12 @@ indicatorOfParameter = 98 ; } #Ratio of wave angular and frequency width -'dimensionless' = { +'Numeric' = { table2Version = 140 ; indicatorOfParameter = 99 ; } #Number of events in freak waves statistics -'dimensionless' = { +'Numeric' = { table2Version = 140 ; indicatorOfParameter = 100 ; } @@ -3535,7 +3535,7 @@ indicatorOfParameter = 129 ; } #Wave Spectral Skewness -'dimensionless' = { +'Numeric' = { table2Version = 140 ; indicatorOfParameter = 207 ; } @@ -3555,12 +3555,12 @@ indicatorOfParameter = 210 ; } #Normalized energy flux into waves -'dimensionless' = { +'Numeric' = { table2Version = 140 ; indicatorOfParameter = 211 ; } #Normalized energy flux into ocean -'dimensionless' = { +'Numeric' = { table2Version = 140 ; indicatorOfParameter = 212 ; } @@ -3570,7 +3570,7 @@ indicatorOfParameter = 213 ; } #Normalized stress into ocean -'dimensionless' = { +'Numeric' = { table2Version = 140 ; indicatorOfParameter = 214 ; } @@ -4024,62 +4024,62 @@ table2Version = 210 ; indicatorOfParameter = 120 ; } -#UV visible albedo for direct radiation, isotropic component +#UV visible albedo for direct radiation, isotropic component (climatological) '(0 - 1)' = { table2Version = 210 ; indicatorOfParameter = 186 ; } -#UV visible albedo for direct radiation, volumetric component +#UV visible albedo for direct radiation, volumetric component (climatological) '(0 - 1)' = { table2Version = 210 ; indicatorOfParameter = 187 ; } -#UV visible albedo for direct radiation, geometric component +#UV visible albedo for direct radiation, geometric component (climatological) '(0 - 1)' = { table2Version = 210 ; indicatorOfParameter = 188 ; } -#Near IR albedo for direct radiation, isotropic component +#Near IR albedo for direct radiation, isotropic component (climatological) '(0 - 1)' = { table2Version = 210 ; indicatorOfParameter = 189 ; } -#Near IR albedo for direct radiation, volumetric component +#Near IR albedo for direct radiation, volumetric component (climatological) '(0 - 1)' = { table2Version = 210 ; indicatorOfParameter = 190 ; } -#Near IR albedo for direct radiation, geometric component +#Near IR albedo for direct radiation, geometric component (climatological) '(0 - 1)' = { table2Version = 210 ; indicatorOfParameter = 191 ; } -#UV visible albedo for diffuse radiation, isotropic component +#UV visible albedo for diffuse radiation, isotropic component '(0 - 1)' = { table2Version = 210 ; indicatorOfParameter = 192 ; } -#UV visible albedo for diffuse radiation, volumetric component +#UV visible albedo for diffuse radiation, volumetric component '(0 - 1)' = { table2Version = 210 ; indicatorOfParameter = 193 ; } -#UV visible albedo for diffuse radiation, geometric component +#UV visible albedo for diffuse radiation, geometric component '(0 - 1)' = { table2Version = 210 ; indicatorOfParameter = 194 ; } -#Near IR albedo for diffuse radiation, isotropic component +#Near IR albedo for diffuse radiation, isotropic component '(0 - 1)' = { table2Version = 210 ; indicatorOfParameter = 195 ; } -#Near IR albedo for diffuse radiation, volumetric component +#Near IR albedo for diffuse radiation, volumetric component '(0 - 1)' = { table2Version = 210 ; indicatorOfParameter = 196 ; } -#Near IR albedo for diffuse radiation, geometric component +#Near IR albedo for diffuse radiation, geometric component '(0 - 1)' = { table2Version = 210 ; indicatorOfParameter = 197 ; @@ -9884,7 +9884,7 @@ table2Version = 228 ; indicatorOfParameter = 21 ; } -#Clear-sky direct solar radiation at surface +#Surface direct short-wave radiation, clear sky 'J m**-2' = { table2Version = 228 ; indicatorOfParameter = 22 ; @@ -13699,17 +13699,17 @@ table2Version = 162 ; indicatorOfParameter = 58 ; } -#Vertical integral of kinetic energy +#Total column vertically-integrated kinetic energy 'J m**-2' = { table2Version = 162 ; indicatorOfParameter = 59 ; } -#Vertical integral of thermal energy +#Total column vertically-integrated enthalpy 'J m**-2' = { table2Version = 162 ; indicatorOfParameter = 60 ; } -#Vertical integral of potential+internal energy +#Total column vertically-integrated potential + internal energy 'J m**-2' = { table2Version = 162 ; indicatorOfParameter = 61 ; @@ -13719,7 +13719,7 @@ table2Version = 162 ; indicatorOfParameter = 62 ; } -#Vertical integral of total energy +#Total column vertically-integrated total energy 'J m**-2' = { table2Version = 162 ; indicatorOfParameter = 63 ; @@ -13814,7 +13814,7 @@ table2Version = 162 ; indicatorOfParameter = 83 ; } -#Vertical integral of divergence of moisture flux +#Vertically integrated moisture divergence flux 'kg m**-2 s**-1' = { table2Version = 162 ; indicatorOfParameter = 84 ; @@ -15344,11 +15344,6 @@ table2Version = 174 ; indicatorOfParameter = 8 ; } -#Sub-surface runoff -'kg m**-2' = { - table2Version = 174 ; - indicatorOfParameter = 9 ; - } #Fraction of sea-ice in sea '(0 - 1)' = { table2Version = 174 ; @@ -17599,12 +17594,12 @@ table2Version = 228 ; indicatorOfParameter = 39 ; } -#Neutral wind at 10 m u-component +#U-component of neutral wind 'm s**-1' = { table2Version = 228 ; indicatorOfParameter = 131 ; } -#Neutral wind at 10 m v-component +#V-component of neutral wind 'm s**-1' = { table2Version = 228 ; indicatorOfParameter = 132 ; @@ -17619,7 +17614,7 @@ table2Version = 228 ; indicatorOfParameter = 141 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'kg m**-2' = { table2Version = 228 ; indicatorOfParameter = 144 ; diff --git a/definitions/grib1/localConcepts/rjtd/cfVarName.def b/definitions/grib1/localConcepts/rjtd/cfVarName.def index b236fc6c9..5b95ee846 100644 --- a/definitions/grib1/localConcepts/rjtd/cfVarName.def +++ b/definitions/grib1/localConcepts/rjtd/cfVarName.def @@ -141,7 +141,7 @@ table2Version = 200 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'sr' = { table2Version = 200 ; indicatorOfParameter = 83 ; @@ -285,7 +285,7 @@ table2Version = 200 ; indicatorOfParameter = 163 ; } -#Albedo +#Forecast albedo 'al' = { table2Version = 200 ; indicatorOfParameter = 84 ; @@ -785,7 +785,7 @@ table2Version = 200 ; indicatorOfParameter = 98 ; } -#Snow melt +#Snowmelt 'snom' = { table2Version = 200 ; indicatorOfParameter = 99 ; diff --git a/definitions/grib1/localConcepts/rjtd/name.def b/definitions/grib1/localConcepts/rjtd/name.def index 3bc132af3..50010a10d 100644 --- a/definitions/grib1/localConcepts/rjtd/name.def +++ b/definitions/grib1/localConcepts/rjtd/name.def @@ -141,8 +141,8 @@ table2Version = 200 ; indicatorOfParameter = 81 ; } -#Surface roughness -'Surface roughness' = { +#Surface roughness (climatological) +'Surface roughness (climatological)' = { table2Version = 200 ; indicatorOfParameter = 83 ; } @@ -285,8 +285,8 @@ table2Version = 200 ; indicatorOfParameter = 163 ; } -#Albedo -'Albedo' = { +#Forecast albedo +'Forecast albedo' = { table2Version = 200 ; indicatorOfParameter = 84 ; } @@ -665,13 +665,13 @@ table2Version = 200 ; indicatorOfParameter = 48 ; } -#U-component of current -'U-component of current ' = { +#U-component of current +'U-component of current' = { table2Version = 200 ; indicatorOfParameter = 49 ; } -#V-component of current -'V-component of current ' = { +#V-component of current +'V-component of current' = { table2Version = 200 ; indicatorOfParameter = 50 ; } @@ -785,8 +785,8 @@ table2Version = 200 ; indicatorOfParameter = 98 ; } -#Snow melt -'Snow melt' = { +#Snowmelt +'Snowmelt' = { table2Version = 200 ; indicatorOfParameter = 99 ; } diff --git a/definitions/grib1/localConcepts/rjtd/paramId.def b/definitions/grib1/localConcepts/rjtd/paramId.def index 7c7b321ac..589e86e05 100644 --- a/definitions/grib1/localConcepts/rjtd/paramId.def +++ b/definitions/grib1/localConcepts/rjtd/paramId.def @@ -141,7 +141,7 @@ table2Version = 200 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) '173' = { table2Version = 200 ; indicatorOfParameter = 83 ; @@ -285,7 +285,7 @@ table2Version = 200 ; indicatorOfParameter = 163 ; } -#Albedo +#Forecast albedo '260509' = { table2Version = 200 ; indicatorOfParameter = 84 ; @@ -665,12 +665,12 @@ table2Version = 200 ; indicatorOfParameter = 48 ; } -#U-component of current +#U-component of current '3049' = { table2Version = 200 ; indicatorOfParameter = 49 ; } -#V-component of current +#V-component of current '3050' = { table2Version = 200 ; indicatorOfParameter = 50 ; @@ -785,7 +785,7 @@ table2Version = 200 ; indicatorOfParameter = 98 ; } -#Snow melt +#Snowmelt '3099' = { table2Version = 200 ; indicatorOfParameter = 99 ; diff --git a/definitions/grib1/localConcepts/rjtd/shortName.def b/definitions/grib1/localConcepts/rjtd/shortName.def index 569c282a4..109414b94 100644 --- a/definitions/grib1/localConcepts/rjtd/shortName.def +++ b/definitions/grib1/localConcepts/rjtd/shortName.def @@ -141,7 +141,7 @@ table2Version = 200 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'sr' = { table2Version = 200 ; indicatorOfParameter = 83 ; @@ -285,7 +285,7 @@ table2Version = 200 ; indicatorOfParameter = 163 ; } -#Albedo +#Forecast albedo 'al' = { table2Version = 200 ; indicatorOfParameter = 84 ; @@ -665,12 +665,12 @@ table2Version = 200 ; indicatorOfParameter = 48 ; } -#U-component of current +#U-component of current 'ucurr' = { table2Version = 200 ; indicatorOfParameter = 49 ; } -#V-component of current +#V-component of current 'vcurr' = { table2Version = 200 ; indicatorOfParameter = 50 ; @@ -785,7 +785,7 @@ table2Version = 200 ; indicatorOfParameter = 98 ; } -#Snow melt +#Snowmelt 'snom' = { table2Version = 200 ; indicatorOfParameter = 99 ; diff --git a/definitions/grib1/localConcepts/rjtd/units.def b/definitions/grib1/localConcepts/rjtd/units.def index 902472026..93e7b0e56 100644 --- a/definitions/grib1/localConcepts/rjtd/units.def +++ b/definitions/grib1/localConcepts/rjtd/units.def @@ -141,7 +141,7 @@ table2Version = 200 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'm' = { table2Version = 200 ; indicatorOfParameter = 83 ; @@ -285,7 +285,7 @@ table2Version = 200 ; indicatorOfParameter = 163 ; } -#Albedo +#Forecast albedo '%' = { table2Version = 200 ; indicatorOfParameter = 84 ; @@ -665,12 +665,12 @@ table2Version = 200 ; indicatorOfParameter = 48 ; } -#U-component of current +#U-component of current 'm s**-1' = { table2Version = 200 ; indicatorOfParameter = 49 ; } -#V-component of current +#V-component of current 'm s**-1' = { table2Version = 200 ; indicatorOfParameter = 50 ; @@ -785,7 +785,7 @@ table2Version = 200 ; indicatorOfParameter = 98 ; } -#Snow melt +#Snowmelt 'kg m**-2' = { table2Version = 200 ; indicatorOfParameter = 99 ; diff --git a/definitions/grib1/name.def b/definitions/grib1/name.def index 6fadccdfd..8bda2a845 100644 --- a/definitions/grib1/name.def +++ b/definitions/grib1/name.def @@ -137,8 +137,8 @@ table2Version = 3 ; indicatorOfParameter = 81 ; } -#Surface roughness -'Surface roughness' = { +#Surface roughness (climatological) +'Surface roughness (climatological)' = { table2Version = 3 ; indicatorOfParameter = 83 ; } @@ -162,8 +162,8 @@ table2Version = 3 ; indicatorOfParameter = 10 ; } -#large scale precipitation -'large scale precipitation' = { +#Large-scale precipitation +'Large-scale precipitation' = { table2Version = 3 ; indicatorOfParameter = 62 ; } @@ -222,8 +222,8 @@ table2Version = 3 ; indicatorOfParameter = 76 ; } -#Albedo -'Albedo' = { +#Forecast albedo +'Forecast albedo' = { table2Version = 3 ; indicatorOfParameter = 84 ; } @@ -392,13 +392,13 @@ table2Version = 3 ; indicatorOfParameter = 48 ; } -#U-component of current -'U-component of current ' = { +#U-component of current +'U-component of current' = { table2Version = 3 ; indicatorOfParameter = 49 ; } -#V-component of current -'V-component of current ' = { +#V-component of current +'V-component of current' = { table2Version = 3 ; indicatorOfParameter = 50 ; } @@ -532,8 +532,8 @@ table2Version = 3 ; indicatorOfParameter = 98 ; } -#Snow melt -'Snow melt' = { +#Snowmelt +'Snowmelt' = { table2Version = 3 ; indicatorOfParameter = 99 ; } @@ -678,8 +678,8 @@ table2Version = 3 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent -'Snow Fall water equivalent' = { +#Snowfall water equivalent +'Snowfall water equivalent' = { table2Version = 3 ; indicatorOfParameter = 65 ; } @@ -833,8 +833,8 @@ table2Version = 2 ; indicatorOfParameter = 81 ; } -#Surface roughness -'Surface roughness' = { +#Surface roughness (climatological) +'Surface roughness (climatological)' = { table2Version = 2 ; indicatorOfParameter = 83 ; } @@ -858,8 +858,8 @@ table2Version = 2 ; indicatorOfParameter = 10 ; } -#large scale precipitation -'large scale precipitation' = { +#Large-scale precipitation +'Large-scale precipitation' = { table2Version = 2 ; indicatorOfParameter = 62 ; } @@ -918,8 +918,8 @@ table2Version = 2 ; indicatorOfParameter = 76 ; } -#Albedo -'Albedo' = { +#Forecast albedo +'Forecast albedo' = { table2Version = 2 ; indicatorOfParameter = 84 ; } @@ -1073,13 +1073,13 @@ table2Version = 2 ; indicatorOfParameter = 48 ; } -#U-component of current -'U-component of current ' = { +#U-component of current +'U-component of current' = { table2Version = 2 ; indicatorOfParameter = 49 ; } -#V-component of current -'V-component of current ' = { +#V-component of current +'V-component of current' = { table2Version = 2 ; indicatorOfParameter = 50 ; } @@ -1213,8 +1213,8 @@ table2Version = 2 ; indicatorOfParameter = 98 ; } -#Snow melt -'Snow melt' = { +#Snowmelt +'Snowmelt' = { table2Version = 2 ; indicatorOfParameter = 99 ; } @@ -1359,8 +1359,8 @@ table2Version = 2 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent -'Snow Fall water equivalent' = { +#Snowfall water equivalent +'Snowfall water equivalent' = { table2Version = 2 ; indicatorOfParameter = 65 ; } @@ -1514,8 +1514,8 @@ table2Version = 1 ; indicatorOfParameter = 81 ; } -#Surface roughness -'Surface roughness' = { +#Surface roughness (climatological) +'Surface roughness (climatological)' = { table2Version = 1 ; indicatorOfParameter = 83 ; } @@ -1539,8 +1539,8 @@ table2Version = 1 ; indicatorOfParameter = 10 ; } -#large scale precipitation -'large scale precipitation' = { +#Large-scale precipitation +'Large-scale precipitation' = { table2Version = 1 ; indicatorOfParameter = 62 ; } @@ -1599,8 +1599,8 @@ table2Version = 1 ; indicatorOfParameter = 76 ; } -#Albedo -'Albedo' = { +#Forecast albedo +'Forecast albedo' = { table2Version = 1 ; indicatorOfParameter = 84 ; } @@ -1754,13 +1754,13 @@ table2Version = 1 ; indicatorOfParameter = 48 ; } -#U-component of current -'U-component of current ' = { +#U-component of current +'U-component of current' = { table2Version = 1 ; indicatorOfParameter = 49 ; } -#V-component of current -'V-component of current ' = { +#V-component of current +'V-component of current' = { table2Version = 1 ; indicatorOfParameter = 50 ; } @@ -1894,8 +1894,8 @@ table2Version = 1 ; indicatorOfParameter = 98 ; } -#Snow melt -'Snow melt' = { +#Snowmelt +'Snowmelt' = { table2Version = 1 ; indicatorOfParameter = 99 ; } @@ -2040,8 +2040,8 @@ table2Version = 1 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent -'Snow Fall water equivalent' = { +#Snowfall water equivalent +'Snowfall water equivalent' = { table2Version = 1 ; indicatorOfParameter = 65 ; } diff --git a/definitions/grib1/paramId.def b/definitions/grib1/paramId.def index 6a4fe00a6..6c10f9258 100644 --- a/definitions/grib1/paramId.def +++ b/definitions/grib1/paramId.def @@ -137,7 +137,7 @@ table2Version = 3 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) '173' = { table2Version = 3 ; indicatorOfParameter = 83 ; @@ -162,7 +162,7 @@ table2Version = 3 ; indicatorOfParameter = 10 ; } -#large scale precipitation +#Large-scale precipitation '3062' = { table2Version = 3 ; indicatorOfParameter = 62 ; @@ -222,7 +222,7 @@ table2Version = 3 ; indicatorOfParameter = 76 ; } -#Albedo +#Forecast albedo '260509' = { table2Version = 3 ; indicatorOfParameter = 84 ; @@ -392,12 +392,12 @@ table2Version = 3 ; indicatorOfParameter = 48 ; } -#U-component of current +#U-component of current '3049' = { table2Version = 3 ; indicatorOfParameter = 49 ; } -#V-component of current +#V-component of current '3050' = { table2Version = 3 ; indicatorOfParameter = 50 ; @@ -532,7 +532,7 @@ table2Version = 3 ; indicatorOfParameter = 98 ; } -#Snow melt +#Snowmelt '3099' = { table2Version = 3 ; indicatorOfParameter = 99 ; @@ -678,7 +678,7 @@ table2Version = 3 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent +#Snowfall water equivalent '228144' = { table2Version = 3 ; indicatorOfParameter = 65 ; @@ -833,7 +833,7 @@ table2Version = 2 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) '173' = { table2Version = 2 ; indicatorOfParameter = 83 ; @@ -858,7 +858,7 @@ table2Version = 2 ; indicatorOfParameter = 10 ; } -#large scale precipitation +#Large-scale precipitation '3062' = { table2Version = 2 ; indicatorOfParameter = 62 ; @@ -918,7 +918,7 @@ table2Version = 2 ; indicatorOfParameter = 76 ; } -#Albedo +#Forecast albedo '260509' = { table2Version = 2 ; indicatorOfParameter = 84 ; @@ -1073,12 +1073,12 @@ table2Version = 2 ; indicatorOfParameter = 48 ; } -#U-component of current +#U-component of current '3049' = { table2Version = 2 ; indicatorOfParameter = 49 ; } -#V-component of current +#V-component of current '3050' = { table2Version = 2 ; indicatorOfParameter = 50 ; @@ -1213,7 +1213,7 @@ table2Version = 2 ; indicatorOfParameter = 98 ; } -#Snow melt +#Snowmelt '3099' = { table2Version = 2 ; indicatorOfParameter = 99 ; @@ -1359,7 +1359,7 @@ table2Version = 2 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent +#Snowfall water equivalent '228144' = { table2Version = 2 ; indicatorOfParameter = 65 ; @@ -1514,7 +1514,7 @@ table2Version = 1 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) '173' = { table2Version = 1 ; indicatorOfParameter = 83 ; @@ -1539,7 +1539,7 @@ table2Version = 1 ; indicatorOfParameter = 10 ; } -#large scale precipitation +#Large-scale precipitation '3062' = { table2Version = 1 ; indicatorOfParameter = 62 ; @@ -1599,7 +1599,7 @@ table2Version = 1 ; indicatorOfParameter = 76 ; } -#Albedo +#Forecast albedo '260509' = { table2Version = 1 ; indicatorOfParameter = 84 ; @@ -1754,12 +1754,12 @@ table2Version = 1 ; indicatorOfParameter = 48 ; } -#U-component of current +#U-component of current '3049' = { table2Version = 1 ; indicatorOfParameter = 49 ; } -#V-component of current +#V-component of current '3050' = { table2Version = 1 ; indicatorOfParameter = 50 ; @@ -1894,7 +1894,7 @@ table2Version = 1 ; indicatorOfParameter = 98 ; } -#Snow melt +#Snowmelt '3099' = { table2Version = 1 ; indicatorOfParameter = 99 ; @@ -2040,7 +2040,7 @@ table2Version = 1 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent +#Snowfall water equivalent '228144' = { table2Version = 1 ; indicatorOfParameter = 65 ; diff --git a/definitions/grib1/shortName.def b/definitions/grib1/shortName.def index dcec27a87..07bb584dd 100644 --- a/definitions/grib1/shortName.def +++ b/definitions/grib1/shortName.def @@ -137,7 +137,7 @@ table2Version = 3 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'sr' = { table2Version = 3 ; indicatorOfParameter = 83 ; @@ -162,7 +162,7 @@ table2Version = 3 ; indicatorOfParameter = 10 ; } -#large scale precipitation +#Large-scale precipitation 'lsp' = { table2Version = 3 ; indicatorOfParameter = 62 ; @@ -222,7 +222,7 @@ table2Version = 3 ; indicatorOfParameter = 76 ; } -#Albedo +#Forecast albedo 'al' = { table2Version = 3 ; indicatorOfParameter = 84 ; @@ -392,12 +392,12 @@ table2Version = 3 ; indicatorOfParameter = 48 ; } -#U-component of current +#U-component of current 'ucurr' = { table2Version = 3 ; indicatorOfParameter = 49 ; } -#V-component of current +#V-component of current 'vcurr' = { table2Version = 3 ; indicatorOfParameter = 50 ; @@ -532,7 +532,7 @@ table2Version = 3 ; indicatorOfParameter = 98 ; } -#Snow melt +#Snowmelt 'snom' = { table2Version = 3 ; indicatorOfParameter = 99 ; @@ -678,7 +678,7 @@ table2Version = 3 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'sf' = { table2Version = 3 ; indicatorOfParameter = 65 ; @@ -833,7 +833,7 @@ table2Version = 2 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'sr' = { table2Version = 2 ; indicatorOfParameter = 83 ; @@ -858,7 +858,7 @@ table2Version = 2 ; indicatorOfParameter = 10 ; } -#large scale precipitation +#Large-scale precipitation 'lsp' = { table2Version = 2 ; indicatorOfParameter = 62 ; @@ -918,7 +918,7 @@ table2Version = 2 ; indicatorOfParameter = 76 ; } -#Albedo +#Forecast albedo 'al' = { table2Version = 2 ; indicatorOfParameter = 84 ; @@ -1073,12 +1073,12 @@ table2Version = 2 ; indicatorOfParameter = 48 ; } -#U-component of current +#U-component of current 'ucurr' = { table2Version = 2 ; indicatorOfParameter = 49 ; } -#V-component of current +#V-component of current 'vcurr' = { table2Version = 2 ; indicatorOfParameter = 50 ; @@ -1213,7 +1213,7 @@ table2Version = 2 ; indicatorOfParameter = 98 ; } -#Snow melt +#Snowmelt 'snom' = { table2Version = 2 ; indicatorOfParameter = 99 ; @@ -1359,7 +1359,7 @@ table2Version = 2 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'sf' = { table2Version = 2 ; indicatorOfParameter = 65 ; @@ -1514,7 +1514,7 @@ table2Version = 1 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'sr' = { table2Version = 1 ; indicatorOfParameter = 83 ; @@ -1539,7 +1539,7 @@ table2Version = 1 ; indicatorOfParameter = 10 ; } -#large scale precipitation +#Large-scale precipitation 'lsp' = { table2Version = 1 ; indicatorOfParameter = 62 ; @@ -1599,7 +1599,7 @@ table2Version = 1 ; indicatorOfParameter = 76 ; } -#Albedo +#Forecast albedo 'al' = { table2Version = 1 ; indicatorOfParameter = 84 ; @@ -1754,12 +1754,12 @@ table2Version = 1 ; indicatorOfParameter = 48 ; } -#U-component of current +#U-component of current 'ucurr' = { table2Version = 1 ; indicatorOfParameter = 49 ; } -#V-component of current +#V-component of current 'vcurr' = { table2Version = 1 ; indicatorOfParameter = 50 ; @@ -1894,7 +1894,7 @@ table2Version = 1 ; indicatorOfParameter = 98 ; } -#Snow melt +#Snowmelt 'snom' = { table2Version = 1 ; indicatorOfParameter = 99 ; @@ -2040,7 +2040,7 @@ table2Version = 1 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'sf' = { table2Version = 1 ; indicatorOfParameter = 65 ; diff --git a/definitions/grib1/units.def b/definitions/grib1/units.def index fec7682c5..5c54afcd0 100644 --- a/definitions/grib1/units.def +++ b/definitions/grib1/units.def @@ -137,7 +137,7 @@ table2Version = 3 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'm' = { table2Version = 3 ; indicatorOfParameter = 83 ; @@ -162,7 +162,7 @@ table2Version = 3 ; indicatorOfParameter = 10 ; } -#large scale precipitation +#Large-scale precipitation 'kg m**-2' = { table2Version = 3 ; indicatorOfParameter = 62 ; @@ -222,7 +222,7 @@ table2Version = 3 ; indicatorOfParameter = 76 ; } -#Albedo +#Forecast albedo '%' = { table2Version = 3 ; indicatorOfParameter = 84 ; @@ -392,12 +392,12 @@ table2Version = 3 ; indicatorOfParameter = 48 ; } -#U-component of current +#U-component of current 'm s**-1' = { table2Version = 3 ; indicatorOfParameter = 49 ; } -#V-component of current +#V-component of current 'm s**-1' = { table2Version = 3 ; indicatorOfParameter = 50 ; @@ -532,7 +532,7 @@ table2Version = 3 ; indicatorOfParameter = 98 ; } -#Snow melt +#Snowmelt 'kg m**-2' = { table2Version = 3 ; indicatorOfParameter = 99 ; @@ -678,7 +678,7 @@ table2Version = 3 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'kg m**-2' = { table2Version = 3 ; indicatorOfParameter = 65 ; @@ -833,7 +833,7 @@ table2Version = 2 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'm' = { table2Version = 2 ; indicatorOfParameter = 83 ; @@ -858,7 +858,7 @@ table2Version = 2 ; indicatorOfParameter = 10 ; } -#large scale precipitation +#Large-scale precipitation 'kg m**-2' = { table2Version = 2 ; indicatorOfParameter = 62 ; @@ -918,7 +918,7 @@ table2Version = 2 ; indicatorOfParameter = 76 ; } -#Albedo +#Forecast albedo '%' = { table2Version = 2 ; indicatorOfParameter = 84 ; @@ -1073,12 +1073,12 @@ table2Version = 2 ; indicatorOfParameter = 48 ; } -#U-component of current +#U-component of current 'm s**-1' = { table2Version = 2 ; indicatorOfParameter = 49 ; } -#V-component of current +#V-component of current 'm s**-1' = { table2Version = 2 ; indicatorOfParameter = 50 ; @@ -1213,7 +1213,7 @@ table2Version = 2 ; indicatorOfParameter = 98 ; } -#Snow melt +#Snowmelt 'kg m**-2' = { table2Version = 2 ; indicatorOfParameter = 99 ; @@ -1359,7 +1359,7 @@ table2Version = 2 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'kg m**-2' = { table2Version = 2 ; indicatorOfParameter = 65 ; @@ -1514,7 +1514,7 @@ table2Version = 1 ; indicatorOfParameter = 81 ; } -#Surface roughness +#Surface roughness (climatological) 'm' = { table2Version = 1 ; indicatorOfParameter = 83 ; @@ -1539,7 +1539,7 @@ table2Version = 1 ; indicatorOfParameter = 10 ; } -#large scale precipitation +#Large-scale precipitation 'kg m**-2' = { table2Version = 1 ; indicatorOfParameter = 62 ; @@ -1599,7 +1599,7 @@ table2Version = 1 ; indicatorOfParameter = 76 ; } -#Albedo +#Forecast albedo '%' = { table2Version = 1 ; indicatorOfParameter = 84 ; @@ -1754,12 +1754,12 @@ table2Version = 1 ; indicatorOfParameter = 48 ; } -#U-component of current +#U-component of current 'm s**-1' = { table2Version = 1 ; indicatorOfParameter = 49 ; } -#V-component of current +#V-component of current 'm s**-1' = { table2Version = 1 ; indicatorOfParameter = 50 ; @@ -1894,7 +1894,7 @@ table2Version = 1 ; indicatorOfParameter = 98 ; } -#Snow melt +#Snowmelt 'kg m**-2' = { table2Version = 1 ; indicatorOfParameter = 99 ; @@ -2040,7 +2040,7 @@ table2Version = 1 ; indicatorOfParameter = 85 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'kg m**-2' = { table2Version = 1 ; indicatorOfParameter = 65 ; diff --git a/definitions/grib2/boot.def b/definitions/grib2/boot.def index c86ba9922..32f262bef 100644 --- a/definitions/grib2/boot.def +++ b/definitions/grib2/boot.def @@ -9,9 +9,9 @@ # This gets updated twice a year by WMO. # See https://community.wmo.int/activity-areas/wmo-codes/manual-codes/latest-version -constant tablesVersionLatestOfficial = 30 : edition_specific; +constant tablesVersionLatestOfficial = 31 : edition_specific; # If this is different from the official version, then it is the pre-operational version -constant tablesVersionLatest = 30 : edition_specific; +constant tablesVersionLatest = 31 : edition_specific; constant million = 1000000 : hidden; constant grib2divider = 1000000; @@ -31,14 +31,12 @@ include "grib2/section.0.def"; template core "grib2/sections.def"; -#if(!new()) -#{ - #lookup[4] endOfProduct(0); - #while(endOfProduct != `7777`) - #{ - #template core "grib2/sections.def"; - #lookup[4] endOfProduct(0); - #} +#if(!new()) { +# lookup[4] endOfProduct(0); +# while(endOfProduct != `7777`) { +# template core "grib2/sections.def"; +# lookup[4] endOfProduct(0); +# } #} template section_8 "grib2/section.8.def"; diff --git a/definitions/grib2/cfName.def b/definitions/grib2/cfName.def index 4a3e6b60b..c21d5b9ae 100644 --- a/definitions/grib2/cfName.def +++ b/definitions/grib2/cfName.def @@ -29,11 +29,19 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Surface roughness (climatological) +'surface_roughness_length' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfGeneratingProcess = 9 ; + } #Top net short-wave (solar) radiation 'toa_net_upward_shortwave_flux' = { discipline = 0 ; parameterCategory = 4 ; - parameterNumber = 1 ; + parameterNumber = 9 ; typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } @@ -142,7 +150,7 @@ constituentType = 11 ; is_chemical = 1 ; } -#Sea surface salinity +#Sea surface practical salinity 'sea_surface_salinity' = { discipline = 10 ; parameterCategory = 3 ; @@ -345,12 +353,6 @@ parameterNumber = 0 ; typeOfFirstFixedSurface = 1 ; } -#Surface roughness -'surface_roughness_length' = { - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 1 ; - } #Surface net short-wave (solar) radiation 'surface_net_downward_shortwave_flux' = { discipline = 0 ; @@ -375,7 +377,7 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } -#Albedo +#Forecast albedo 'surface_albedo' = { discipline = 0 ; parameterCategory = 19 ; diff --git a/definitions/grib2/cfVarName.def b/definitions/grib2/cfVarName.def index bb993680a..718e2f939 100644 --- a/definitions/grib2/cfVarName.def +++ b/definitions/grib2/cfVarName.def @@ -113,6 +113,14 @@ parameterCategory = 2 ; parameterNumber = 1 ; } +#Surface photosynthetically active radiation, clear sky +'parcs' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Unbalanced component of temperature 'uctp' = { discipline = 0 ; @@ -131,6 +139,30 @@ parameterCategory = 2 ; parameterNumber = 45 ; } +#Low vegetation cover +'cvl' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 53 ; + } +#High vegetation cover +'cvh' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 54 ; + } +#Type of low vegetation +'tvl' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 57 ; + } +#Type of high vegetation +'tvh' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 58 ; + } #Sea ice area fraction 'siconc' = { discipline = 10 ; @@ -166,6 +198,14 @@ typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; } +#Magnitude of turbulent surface stress +'magss' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 58 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Large-scale precipitation fraction 'lspf' = { discipline = 0 ; @@ -190,6 +230,25 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Leaf area index, low vegetation +'lai_lv' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 55 ; + } +#Leaf area index, high vegetation +'lai_hv' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 56 ; + } +#Standard deviation of filtered subgrid orography (climatological) +'sdfor' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 38 ; + typeOfGeneratingProcess = 9 ; + } #Specific rain water content 'crwc' = { discipline = 0 ; @@ -239,6 +298,12 @@ parameterNumber = 20 ; typeOfStatisticalProcessing = 1 ; } +#Charnock +'chnk' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 76 ; + } #Boundary layer height 'blh' = { discipline = 0 ; @@ -253,6 +318,14 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Surface roughness (climatological) +'sr' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfGeneratingProcess = 9 ; + } #Surface long-wave (thermal) radiation downwards 'strd' = { discipline = 0 ; @@ -265,7 +338,7 @@ 'tsr' = { discipline = 0 ; parameterCategory = 4 ; - parameterNumber = 1 ; + parameterNumber = 9 ; typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } @@ -314,7 +387,7 @@ parameterCategory = 14 ; parameterNumber = 1 ; } -#Top net solar radiation, clear sky +#Top net short-wave (solar) radiation, clear sky 'tsrc' = { discipline = 0 ; parameterCategory = 4 ; @@ -322,7 +395,7 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } -#Top net thermal radiation, clear sky +#Top net long-wave (thermal) radiation, clear sky 'ttrc' = { discipline = 0 ; parameterCategory = 5 ; @@ -346,7 +419,7 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#TOA incident solar radiation +#TOA incident short-wave (solar) radiation 'tisr' = { discipline = 0 ; parameterCategory = 4 ; @@ -354,6 +427,13 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } +#Vertically integrated moisture divergence +'vimd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + typeOfStatisticalProcessing = 1 ; + } #Instantaneous eastward turbulent surface stress 'iews' = { discipline = 0 ; @@ -382,12 +462,34 @@ parameterNumber = 79 ; typeOfFirstFixedSurface = 1 ; } +#Logarithm of surface roughness length for heat (climatological) +'lsrh' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 54 ; + typeOfFirstFixedSurface = 1 ; + typeOfGeneratingProcess = 9 ; + } #Temperature of snow layer 'tsn' = { discipline = 2 ; parameterCategory = 3 ; parameterNumber = 28 ; } +#Forecast surface roughness +'fsr' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + } +#Forecast logarithm of surface roughness for heat +'flsr' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 54 ; + typeOfFirstFixedSurface = 1 ; + } #Specific cloud liquid water content 'clwc' = { discipline = 0 ; @@ -406,7 +508,7 @@ parameterCategory = 6 ; parameterNumber = 32 ; } -#large scale precipitation +#Large-scale precipitation 'lsp' = { discipline = 0 ; parameterCategory = 1 ; @@ -542,6 +644,92 @@ scaleFactorOfLowerLimit = 0 ; probabilityType = 0 ; } +#Wave induced mean sea level correction +'weta' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 87 ; + } +#Ratio of wave angular and frequency width +'wraf' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 80 ; + } +#Number of events in freak waves statistics +'wnslc' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 89 ; + } +#U-component of surface momentum flux into ocean +'utauo' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 90 ; + typeOfFirstFixedSurface = 1 ; + } +#V-component of surface momentum flux into ocean +'vtauo' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 91 ; + typeOfFirstFixedSurface = 1 ; + } +#Wave turbulent energy flux into ocean +'wphio' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 92 ; + } +#Wave energy flux magnitude +'wefxm' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 78 ; + } +#Wave energy flux mean direction +'wefxd' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 79 ; + } +#Wave Spectral Skewness +'wss' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 77 ; + } +#Free convective velocity over the oceans +'wstar' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 81 ; + } +#Air density over the oceans +'rhoao' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 82 ; + } +#Normalized energy flux into waves +'phiaw' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 83 ; + } +#Normalized energy flux into ocean +'phioc' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 85 ; + } +#Normalized stress into ocean +'tauoc' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 84 ; + } #Mean sea water temperature in the upper 300 m 'mswt300m' = { discipline = 10 ; @@ -554,6 +742,14 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } +#Total column vertically-integrated water enthalpy +'viwe' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #2 metre specific humidity 'sh2' = { discipline = 0 ; @@ -612,6 +808,41 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } +#UV visible albedo for diffuse radiation (climatological) +'aluvd_p' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 55 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation (climatological) +'aluvp_p' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 56 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, geometric component (climatological) +'aluvpg_p' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 57 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, isotropic component (climatological) +'aluvpi_p' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 58 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, volumetric component (climatological) +'aluvpv_p' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 59 ; + typeOfGeneratingProcess = 9 ; + } #Ammonium aerosol mass mixing ratio 'aermr18' = { discipline = 0 ; @@ -660,6 +891,41 @@ aerosolType = 62033 ; is_aerosol = 1 ; } +#Near IR albedo for diffuse radiation (climatological) +'alnid_p' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 9 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation (climatological) +'alnip_p' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 10 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, geometric component (climatological) +'alnipg_p' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 11 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, isotropic component (climatological) +'alnipi_p' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 12 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, volumetric component (climatological) +'alnipv_p' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 13 ; + typeOfGeneratingProcess = 9 ; + } #Volcanic sulfur dioxide mass mixing ratio increment 'VSO2diff' = { discipline = 0 ; @@ -1946,6 +2212,14 @@ scaledValueOfFirstFixedSurface = 26315 ; scaleFactorOfFirstFixedSurface = 2 ; } +#Surface direct short-wave radiation, clear sky +'cdir' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #0 degrees C isothermal level (atm) 'deg0l' = { discipline = 0 ; @@ -2051,6 +2325,18 @@ parameterCategory = 6 ; parameterNumber = 27 ; } +#Height of zero-degree wet-bulb temperature +'hwbt0' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 44 ; + } +#Height of one-degree wet-bulb temperature +'hwbt1' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 45 ; + } #Instantaneous total lightning flash density 'litoti' = { discipline = 0 ; @@ -2175,6 +2461,14 @@ scaledValueOfSecondFixedSurface = 10 ; scaleFactorOfSecondFixedSurface = 1 ; } +#Total column supercooled liquid water +'tcslw' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 167 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Total column rain water 'tcrw' = { discipline = 0 ; @@ -2230,6 +2524,16 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 10 ; } +#Accumulated mass emission of methane from Wetlands +'acc_e_WLCH4' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 3 ; + constituentType = 2 ; + typeOfStatisticalProcessing = 1 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 10 ; + } #Convective precipitation 'cp' = { discipline = 0 ; @@ -2265,6 +2569,20 @@ parameterNumber = 77 ; typeOfFirstFixedSurface = 1 ; } +#Convective snowfall rate water equivalent +'csfr' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 55 ; + typeOfFirstFixedSurface = 1 ; + } +#Large scale snowfall rate water equivalent +'lssfr' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 56 ; + typeOfFirstFixedSurface = 1 ; + } #Mixed-layer CAPE in the lowest 50 hPa 'mlcape50' = { discipline = 0 ; @@ -2480,6 +2798,379 @@ parameterCategory = 0 ; parameterNumber = 37 ; } +#Forecast logarithm of surface roughness length for moisture +'flsrm' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 55 ; + typeOfFirstFixedSurface = 1 ; + } +#Surface runoff rate +'surfror' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + } +#Surface runoff +'surfro' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Sub-surface runoff rate +'ssurfror' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 52 ; + typeOfFirstFixedSurface = 1 ; + } +#Sub-surface runoff +'ssurfro' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 52 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Reflectance in 0.4 micron channel +'rfl04' = { + discipline = 3 ; + parameterCategory = 1 ; + parameterNumber = 30 ; + } +#Burned area +'fba' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 3 ; + } +#Burning area +'bia' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 20 ; + } +#Burnable area +'baa' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 21 ; + } +#Un-burnable area +'ubaa' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 22 ; + } +#Fuel load +'fuell' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 23 ; + } +#Combustion completeness +'combc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 24 ; + } +#Fuel moisture content +'fuelmc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 25 ; + } +#Time-integrated total column vertically-integrated eastward geopotential flux +'tvige' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 40 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward geopotential flux +'tvign' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 41 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of water geopotential flux +'tviwgd' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 42 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of geopotential flux +'tvigd' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 43 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward enthalpy flux +'tviee' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward enthalpy flux +'tvien' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 6 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward kinetic energy flux +'tvikee' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 9 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward kinetic energy flux +'tviken' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 10 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward total energy flux +'tvitee' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 11 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward total energy flux +'tviten' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 12 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of enthalpy flux +'tvied' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 13 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of kinetic energy flux +'tviked' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 16 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of total energy flux +'tvited' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 17 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of water enthalpy flux +'tviwed' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of mass flux +'tvimd' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 35 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward mass flux +'tvime' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 36 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward mass flux +'tvimn' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 37 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of water vapour flux +'tviwvd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 160 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of cloud liquid water flux +'tviclwd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 161 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of cloud ice water flux +'tviciwd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 162 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of rain flux +'tvird' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 163 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of snow flux +'tvisd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 164 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward water vapour flux +'tviwve' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 150 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward water vapour flux +'tviwvn' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 151 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward cloud liquid water flux +'tviclwe' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 152 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward cloud liquid water flux +'tviclwn' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 153 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward cloud ice water flux +'tviciwe' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 154 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward cloud ice water flux +'tviciwn' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 155 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward rain flux +'tvire' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 156 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward rain flux +'tvirn' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 157 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward snow flux +'tvise' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 158 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward snow flux +'tvisn' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 159 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Mean temperature tendency due to short-wave radiation 'mttswr' = { discipline = 0 ; @@ -2614,6 +3305,36 @@ typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; } +#Mean surface photosynthetically active radiation flux, clear sky +'msparfcs' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#Sunshine duration fraction +'sdf' = { + discipline = 0 ; + parameterCategory = 6 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + } +#Mean vertically integrated moisture divergence +'mvimd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + typeOfStatisticalProcessing = 0 ; + } +#Mean surface direct short-wave radiation flux, clear sky +'msdrswrfcs' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Time integral of surface latent heat sublimation flux 'tislhsf' = { discipline = 0 ; @@ -2836,6 +3557,14 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Total snowfall +'asnow' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 57 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #2 metre relative humidity 'r2' = { discipline = 0 ; @@ -3600,7 +4329,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#X-component of sea ice velocity +#Eastward sea ice velocity 'siue' = { discipline = 10 ; parameterCategory = 2 ; @@ -3612,7 +4341,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Y-component of sea ice velocity +#Northward sea ice velocity 'sivn' = { discipline = 10 ; parameterCategory = 2 ; @@ -3816,7 +4545,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Sea surface salinity +#Sea surface practical salinity 'sos' = { discipline = 10 ; parameterCategory = 3 ; @@ -4032,7 +4761,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Vertically-integrated sea water practical salinity in the upper 300 m +#Average sea water practical salinity in the upper 300 m 'sc300m' = { discipline = 10 ; parameterCategory = 4 ; @@ -4044,7 +4773,7 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } -#Vertically-integrated sea water practical salinity in the upper 700 m +#Average sea water practical salinity in the upper 700 m 'sc700m' = { discipline = 10 ; parameterCategory = 4 ; @@ -4056,7 +4785,7 @@ scaledValueOfSecondFixedSurface = 700 ; scaleFactorOfSecondFixedSurface = 0 ; } -#Total column sea water practical salinity +#Total column average sea water practical salinity 'scbtm' = { discipline = 10 ; parameterCategory = 4 ; @@ -4329,8 +5058,26 @@ typeOfSecondFixedSurface = 255 ; scaledValueOfFirstFixedSurface = 0 ; scaleFactorOfFirstFixedSurface = 0 ; - scaledValueOfSecondFixedSurface = missing() ; - scaleFactorOfSecondFixedSurface = missing() ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + } +#Sea surface height with inverse barometer correction +'zosib' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 20 ; + } +#Average sea water potential temperature in the upper 300m +'pt300m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; } #Sea water practical salinity 'so' = { @@ -4460,6 +5207,14 @@ typeOfFirstFixedSurface = 168 ; typeOfSecondFixedSurface = 168 ; } +#Sea water salinity +'salo' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 168 ; + typeOfSecondFixedSurface = 168 ; + } #Net short wave radiation rate at sea surface 'ssr_sea' = { discipline = 0 ; @@ -4606,7 +5361,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean X-component of sea ice velocity +#Time-mean eastward sea ice velocity 'avg_siue' = { discipline = 10 ; parameterCategory = 2 ; @@ -4619,7 +5374,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean Y-component of sea ice velocity +#Time-mean northward sea ice velocity 'avg_sivn' = { discipline = 10 ; parameterCategory = 2 ; @@ -4840,7 +5595,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean sea surface salinity +#Time-mean sea surface practical salinity 'avg_sos' = { discipline = 10 ; parameterCategory = 3 ; @@ -5074,7 +5829,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean vertically-integrated sea water practical salinity in the upper 300 m +#Time-mean average sea water practical salinity in the upper 300 m 'avg_sc300m' = { discipline = 10 ; parameterCategory = 4 ; @@ -5087,7 +5842,7 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } -#Time-mean vertically-integrated sea water practical salinity in the upper 700 m +#Time-mean average sea water practical salinity in the upper 700 m 'avg_sc700m' = { discipline = 10 ; parameterCategory = 4 ; @@ -5100,7 +5855,7 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } -#Time-mean total column sea water practical salinity +#Time-mean total column average sea water practical salinity 'avg_scbtm' = { discipline = 10 ; parameterCategory = 4 ; @@ -5399,6 +6154,19 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } +#Time-mean average sea water potential temperature in the upper 300m +'avg_pt300m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } #Time-mean sea water practical salinity 'avg_so' = { discipline = 10 ; @@ -5741,6 +6509,8 @@ discipline = 0 ; parameterCategory = 20 ; parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 255 ; } #Dry deposition velocity 'drydep_vel' = { @@ -5944,6 +6714,112 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 10 ; } +#Net ecosystem exchange flux +'neef' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + } +#Mean net ecosystem exchange flux +'mneef' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + typeOfStatisticalProcessing = 0 ; + } +#Accumulated net ecosystem exchange flux +'aneef' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + typeOfStatisticalProcessing = 1 ; + } +#Gross primary production flux +'gppf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + } +#Mean gross primary production flux +'mgppf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + typeOfStatisticalProcessing = 0 ; + } +#Accumulated gross primary production flux +'agppf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + typeOfStatisticalProcessing = 1 ; + } +#Ecosystem respiration flux +'erf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + } +#Mean ecosystem respiration flux +'merf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + typeOfStatisticalProcessing = 0 ; + } +#Accumulated ecosystem respiration flux +'aerf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + typeOfStatisticalProcessing = 1 ; + } +#Emission mass flux from bio fuel +'emi_mflx_biofuel' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 8 ; + } +#Emission mass flux from fossil fuel +'emi_mflx_fossilfuel' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 9 ; + } +#Emission mass flux from other +'emi_mflx_other' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 0 ; + } +#Emission mass flux from oceans +'emi_mflx_ocean' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 11 ; + } +#Accumulated wet deposition mass flux +'acc_wetdep_mflx' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 7 ; + typeOfStatisticalProcessing = 1 ; + } +#Accumulated dry deposition mass flux +'acc_drydep_mflx' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 6 ; + typeOfStatisticalProcessing = 1 ; + } #Aerosol number density 'aer_ndens' = { discipline = 0 ; @@ -5968,6 +6844,14 @@ parameterCategory = 2 ; parameterNumber = 0 ; } +#Snowmelt +'snom' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 41 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Mean zero-crossing wave period 'mp2' = { discipline = 10 ; @@ -6004,12 +6888,30 @@ parameterCategory = 0 ; parameterNumber = 5 ; } +#Mean direction of wind waves +'mdww' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 75 ; + } #Mean period of wind waves 'mpww' = { discipline = 10 ; parameterCategory = 0 ; parameterNumber = 6 ; } +#Mean direction of total swell +'mdts' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 74 ; + } +#2D wave spectra (single) +'d2fd' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 86 ; + } #Eastward sea water velocity 'uoe' = { discipline = 10 ; @@ -6024,6 +6926,76 @@ parameterNumber = 3 ; typeOfFirstFixedSurface = 160 ; } +#Skin reservoir content +'srcrea' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 50 ; + } +#Vertical integral of mass of atmosphere +'vima' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 39 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated kinetic energy +'vike' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated enthalpy +'vithe' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated potential + internal energy +'vipie' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of potential+internal+latent energy +'vipile' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated total energy +'vitoe' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of eastward heat flux +'vithee' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 19 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of northward heat flux +'vithen' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 20 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Vertical integral of eastward water vapour flux 'viwve' = { discipline = 0 ; @@ -6040,6 +7012,12 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Vertically integrated moisture divergence flux +'viwvd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + } #Surface runoff 'sro' = { discipline = 2 ; @@ -6190,6 +7168,48 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } +#Minimum vertical gradient of refractivity inside trapping layer +'dndzn' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 45 ; + } +#Mean vertical gradient of refractivity inside trapping layer +'dndza' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 44 ; + } +#Duct base height +'dctb' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 41 ; + } +#Trapping layer base height +'tplb' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 42 ; + } +#Trapping layer top height +'tplt' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 43 ; + } +#U-component of neutral wind +'u10n' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 56 ; + } +#V-component of neutral wind +'v10n' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 57 ; + } #100 metre U wind component 'u100' = { discipline = 0 ; @@ -6435,12 +7455,6 @@ parameterNumber = 0 ; typeOfFirstFixedSurface = 1 ; } -#Surface roughness -'sr' = { - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 1 ; - } #Surface net short-wave (solar) radiation 'ssr' = { discipline = 0 ; @@ -6627,12 +7641,6 @@ parameterCategory = 1 ; parameterNumber = 28 ; } -#Total snowfall -'asnow' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 29 ; - } #Precipitable water category 'pwcat' = { discipline = 0 ; @@ -6778,19 +7786,6 @@ parameterCategory = 1 ; parameterNumber = 54 ; } -#Convective snowfall rate water equivalent -'csrwe' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 55 ; - } -#Large scale snowfall rate water equivalent -'lssrwe' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 56 ; - typeOfFirstFixedSurface = 1 ; - } #Total snowfall rate 'tsrate' = { discipline = 0 ; @@ -7553,12 +8548,6 @@ parameterCategory = 0 ; parameterNumber = 8 ; } -#Volumetric soil moisture content -'soilw' = { - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 9 ; - } #Ground heat flux 'gflux' = { discipline = 2 ; @@ -7649,60 +8638,12 @@ parameterCategory = 0 ; parameterNumber = 27 ; } -#Upper layer soil temperature -'uplst' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 1 ; - } -#Upper layer soil moisture -'uplsm' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 2 ; - } -#Lower layer soil moisture -'lowlsm' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 3 ; - } -#Bottom layer soil temperature -'botlst' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 4 ; - } -#Liquid volumetric soil moisture (non-frozen) -'soill' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 5 ; - } #Number of soil layers in root zone 'rlyrs' = { discipline = 2 ; parameterCategory = 3 ; parameterNumber = 6 ; } -#Transpiration stress-onset (soil moisture) -'smref' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 7 ; - } -#Direct evaporation cease (soil moisture) -'smdry' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 8 ; - } -#Soil porosity -'poros' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 9 ; - } #Liquid volumetric soil moisture (non-frozen) 'liqvsm' = { discipline = 2 ; @@ -7883,7 +8824,7 @@ parameterCategory = 191 ; parameterNumber = 0 ; } -#Albedo +#Forecast albedo 'al' = { discipline = 0 ; parameterCategory = 19 ; @@ -8141,12 +9082,6 @@ parameterCategory = 2 ; parameterNumber = 7 ; } -#Snow melt -'snom' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 16 ; - } #Direction of swell waves 'swdir' = { discipline = 10 ; @@ -8262,7 +9197,7 @@ parameterCategory = 1 ; parameterNumber = 60 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'sf' = { discipline = 0 ; parameterCategory = 1 ; diff --git a/definitions/grib2/cfVarName.legacy.def b/definitions/grib2/cfVarName.legacy.def new file mode 100644 index 000000000..ab51bf25c --- /dev/null +++ b/definitions/grib2/cfVarName.legacy.def @@ -0,0 +1,54 @@ +#Volumetric soil moisture content +'soilw' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 9 ; + } +#Upper layer soil temperature +'uplst' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + } +#Upper layer soil moisture +'uplsm' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 2 ; + } +#Lower layer soil moisture +'lowlsm' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + } +#Bottom layer soil temperature +'botlst' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 4 ; + } +#Liquid volumetric soil moisture (non-frozen) +'soill' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + } +#Transpiration stress-onset (soil moisture) +'smref' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 7 ; + } +#Direct evaporation cease (soil moisture) +'smdry' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 8 ; + } +#Soil porosity +'poros' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 9 ; + } diff --git a/definitions/grib2/local.uerra.1.def b/definitions/grib2/local.uerra.1.def new file mode 100644 index 000000000..799877be5 --- /dev/null +++ b/definitions/grib2/local.uerra.1.def @@ -0,0 +1,7 @@ +# UERRA local section + +constant localDefinitionNumber=0; + +ksec1expver[4] experimentVersionNumber = "0002" : dump; +alias marsExpver = experimentVersionNumber ; + diff --git a/definitions/grib2/local/2.0.table b/definitions/grib2/local/2.0.table deleted file mode 100644 index 471911b5b..000000000 --- a/definitions/grib2/local/2.0.table +++ /dev/null @@ -1,96 +0,0 @@ -# Code table 2.0: Identification of centres for local section 2 -0 0 Absent -1 ammc Melbourne (WMC) -2 2 Melbourne (WMC) -4 rums Moscow (WMC) -5 5 Moscow (WMC) -7 kwbc US National Weather Service - NCEP (WMC) -8 8 US National Weather Service - NWSTG (WMC) -9 9 US National Weather Service - Other (WMC) -10 10 Cairo (RSMC/RAFC) -12 12 Dakar (RSMC/RAFC) -14 14 Nairobi (RSMC/RAFC) -16 16 Atananarivo (RSMC) -18 18 Tunis-Casablanca (RSMC) -20 20 Las Palmas (RAFC) -21 21 Algiers (RSMC) -22 22 Lagos (RSMC) -24 fapr Pretoria (RSMC) -26 26 Khabarovsk (RSMC) -28 28 New Delhi (RSMC/RAFC) -30 30 Novosibirsk (RSMC) -32 32 Tashkent (RSMC) -33 33 Jeddah (RSMC) -34 rjtd Japanese Meteorological Agency - Tokyo (RSMC) -36 36 Bankok -37 37 Ulan Bator -38 babj Beijing (RSMC) -40 rksl Seoul -41 sabm Buenos Aires (RSMC/RAFC) -43 43 Brasilia (RSMC/RAFC) -45 45 Santiago -46 sbsj Brasilian Space Agency - INPE -51 51 Miami (RSMC/RAFC) -52 52 National Hurricane Center, Miami -53 53 Canadian Meteorological Service - Montreal (RSMC) -54 cwao Canadian Meteorological Service - Montreal (RSMC) -55 55 San Francisco -57 57 U.S. Air Force - Global Weather Center -58 fnmo US Navy - Fleet Numerical Oceanography Center -59 59 NOAA Forecast Systems Lab, Boulder CO -60 60 National Center for Atmospheric Research (NCAR), Boulder, CO -64 64 Honolulu -65 65 Darwin (RSMC) -67 67 Melbourne (RSMC) -69 nzkl Wellington (RSMC/RAFC) -74 egrr U.K. Met Office - Exeter -76 76 Moscow (RSMC/RAFC) -78 edzw Offenbach (RSMC) -80 cnmc Rome (RSMC) -82 eswi Norrkoping -84 lfpw French Weather Service - Toulouse -85 lfpw French Weather Service - Toulouse -86 86 Helsinki -87 87 Belgrade -88 enmi Oslo -89 89 Prague -90 90 Episkopi -91 91 Ankara -92 92 Frankfurt/Main (RAFC) -93 93 London (WAFC) -94 ekmi Copenhagen -95 95 Rota -96 96 Athens -97 97 European Space Agency (ESA) -98 ecmf European Centre for Medium-Range Weather Forecasts -99 99 DeBilt, Netherlands -#100 to 109 Reserved for centres in Region I which are not in the list above -110 110 Hong-Kong -#111 to 133 Reserved for centres in Region II which are not in the list above -#134 to 153 Reserved for centres in Region I which are not listed above -#154 to 159 Reserved for centres in Region III which are not in the list above -160 160 US NOAA/NESDIS -# 161 to 185 Reserved for centres in Region IV which are not in the list above -# 186 to 198 Reserved for centres in Region I which are not listed above -# 199 to 209 Reserved for centres in Region V which are not in the list above -195 wiix Indonesia (NMC) -204 204 National Institute of Water and Atmospheric Research (NIWA - New Zealand) -210 210 Frascati (ESA/ESRIN) -211 211 Lannion -212 212 Lisboa -213 213 Reykjavik -214 lemm INM -215 lssw Zurich -216 216 Service ARGOS Toulouse -218 habp Budapest -224 lowm Austria -227 ebum Belgium (NMC) -233 eidb Dublin -235 ingv INGV -239 crfc CERFAX -246 ifmk IfM-Kiel -247 hadc Hadley Centre -250 cosmo COnsortium for Small scale MOdelling (COSMO) -251 251 Meteorological Cooperation on Operational NWP (MetCoOp) -254 eums EUMETSAT Operation Centre -1098 tigge TIGGE CENTRES diff --git a/definitions/grib2/localConcepts/ecmf/cfName.def b/definitions/grib2/localConcepts/ecmf/cfName.def index d9435fbee..f60b522c8 100644 --- a/definitions/grib2/localConcepts/ecmf/cfName.def +++ b/definitions/grib2/localConcepts/ecmf/cfName.def @@ -29,10 +29,12 @@ } #Convective precipitation 'lwe_thickness_of_convective_precipitation_amount' = { + localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 1 ; - parameterNumber = 10 ; - unitsFactor = 1000 ; + parameterNumber = 195 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; } #Snowfall 'lwe_thickness_of_snowfall_amount' = { @@ -58,11 +60,13 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } -#Albedo +#Albedo (climatological) 'surface_albedo' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 174 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } #Evaporation 'lwe_thickness_of_water_evaporation_amount' = { diff --git a/definitions/grib2/localConcepts/ecmf/cfName.legacy.def b/definitions/grib2/localConcepts/ecmf/cfName.legacy.def index 6ef97fd7f..102bbbc17 100644 --- a/definitions/grib2/localConcepts/ecmf/cfName.legacy.def +++ b/definitions/grib2/localConcepts/ecmf/cfName.legacy.def @@ -136,3 +136,9 @@ parameterCategory = 128 ; parameterNumber = 182 ; } +#Albedo (climatological) +'surface_albedo' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 174 ; +} diff --git a/definitions/grib2/localConcepts/ecmf/cfVarName.def b/definitions/grib2/localConcepts/ecmf/cfVarName.def index ba0d2e0fa..8c3514541 100644 --- a/definitions/grib2/localConcepts/ecmf/cfVarName.def +++ b/definitions/grib2/localConcepts/ecmf/cfVarName.def @@ -34,9 +34,12 @@ } #Sub-surface runoff 'ssro' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 9 ; + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 204 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; } #U component of divergent wind 'udvw' = { @@ -62,29 +65,37 @@ parameterCategory = 128 ; parameterNumber = 14 ; } -#UV visible albedo for direct radiation +#UV visible albedo for direct radiation (climatological) 'aluvp' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 15 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for diffuse radiation +#UV visible albedo for diffuse radiation (climatological) 'aluvd' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 16 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 192 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation +#Near IR albedo for direct radiation (climatological) 'alnip' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 17 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for diffuse radiation +#Near IR albedo for diffuse radiation (climatological) 'alnid' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 18 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 192 ; + typeOfGeneratingProcess = 9 ; } #Clear sky surface UV 'uvcs' = { @@ -92,12 +103,6 @@ parameterCategory = 128 ; parameterNumber = 19 ; } -#Clear sky surface photosynthetically active radiation -'parcs' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 20 ; - } #Reserved for future unbalanced components 'p24.128' = { discipline = 192 ; @@ -116,30 +121,6 @@ parameterCategory = 128 ; parameterNumber = 26 ; } -#Low vegetation cover -'cvl' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 27 ; - } -#High vegetation cover -'cvh' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 28 ; - } -#Type of low vegetation -'tvl' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 29 ; - } -#Type of high vegetation -'tvh' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 30 ; - } #Snow albedo 'asn' = { localTablesVersion = 1 ; @@ -219,12 +200,6 @@ parameterCategory = 128 ; parameterNumber = 46 ; } -#Magnitude of turbulent surface stress -'magss' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 48 ; - } #Maximum temperature at 2 metres in the last 24 hours 'mx2t24' = { discipline = 0 ; @@ -291,18 +266,6 @@ parameterCategory = 128 ; parameterNumber = 65 ; } -#Leaf area index, low vegetation -'lai_lv' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 66 ; - } -#Leaf area index, high vegetation -'lai_hv' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 67 ; - } #Minimum stomatal resistance, low vegetation 'msr_lv' = { discipline = 192 ; @@ -339,12 +302,6 @@ parameterCategory = 128 ; parameterNumber = 73 ; } -#Standard deviation of filtered subgrid orography -'sdfor' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 74 ; - } #Experimental product 'p80.128' = { discipline = 192 ; @@ -657,10 +614,12 @@ } #Convective precipitation 'cp' = { + localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 1 ; - parameterNumber = 10 ; - unitsFactor = 1000 ; + parameterNumber = 195 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; } #Snowfall 'sf' = { @@ -671,12 +630,6 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Charnock -'chnk' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 148 ; - } #Surface net radiation 'snr' = { discipline = 192 ; @@ -759,11 +712,13 @@ parameterCategory = 128 ; parameterNumber = 171 ; } -#Albedo +#Albedo (climatological) 'al' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 174 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } #Evaporation 'e' = { @@ -839,9 +794,10 @@ } #Skin reservoir content 'src' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 198 ; + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 205 ; } #Vegetation fraction 'veg' = { @@ -875,12 +831,6 @@ parameterCategory = 128 ; parameterNumber = 206 ; } -#Vertically integrated moisture divergence -'vimd' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 213 ; - } #Diabatic heating by radiation 'dhr' = { discipline = 192 ; @@ -981,12 +931,6 @@ parameterCategory = 128 ; parameterNumber = 233 ; } -#Logarithm of surface roughness length for heat -'lsrh' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 234 ; - } #Soil temperature level 4 'stl4' = { discipline = 192 ; @@ -1025,21 +969,10 @@ } #Forecast albedo 'fal' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 243 ; - } -#Forecast surface roughness -'fsr' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 244 ; - } -#Forecast logarithm of surface roughness for heat -'flsr' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 245 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 193 ; } #Accumulated ice water tendency 'aiw' = { @@ -2823,41 +2756,53 @@ parameterCategory = 210 ; parameterNumber = 179 ; } -#UV visible albedo for direct radiation, isotropic component +#UV visible albedo for direct radiation, isotropic component (climatological) 'aluvpi' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 186 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 195 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for direct radiation, volumetric component +#UV visible albedo for direct radiation, volumetric component (climatological) 'aluvpv' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 187 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 196 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for direct radiation, geometric component +#UV visible albedo for direct radiation, geometric component (climatological) 'aluvpg' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 188 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 194 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, isotropic component +#Near IR albedo for direct radiation, isotropic component (climatological) 'alnipi' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 189 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 195 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, volumetric component +#Near IR albedo for direct radiation, volumetric component (climatological) 'alnipv' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 190 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 196 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, geometric component +#Near IR albedo for direct radiation, geometric component (climatological) 'alnipg' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 191 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 194 ; + typeOfGeneratingProcess = 9 ; } #UV visible albedo for diffuse radiation, isotropic component 'aluvdi' = { @@ -13747,12 +13692,6 @@ parameterCategory = 228 ; parameterNumber = 21 ; } -#Clear-sky direct solar radiation at surface -'cdir' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 22 ; - } #Cloud base height 'cbh' = { discipline = 192 ; @@ -13813,18 +13752,6 @@ parameterCategory = 228 ; parameterNumber = 43 ; } -#Height of zero-degree wet-bulb temperature -'hwbt0' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 47 ; - } -#Height of one-degree wet-bulb temperature -'hwbt1' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 48 ; - } #GPP coefficient from Biogenic Flux Adjustment System 'gppbfas' = { localTablesVersion = 1 ; @@ -13839,51 +13766,6 @@ parameterCategory = 0 ; parameterNumber = 199 ; } -#Accumulated Carbon Dioxide Net Ecosystem Exchange -'aco2nee' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 192 ; - typeOfStatisticalProcessing = 1 ; - } -#Accumulated Carbon Dioxide Gross Primary Production -'aco2gpp' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 193 ; - typeOfStatisticalProcessing = 1 ; - } -#Accumulated Carbon Dioxide Ecosystem Respiration -'aco2rec' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 194 ; - typeOfStatisticalProcessing = 1 ; - } -#Flux of Carbon Dioxide Net Ecosystem Exchange -'fco2nee' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 195 ; - } -#Flux of Carbon Dioxide Gross Primary Production -'fco2gpp' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 197 ; - } -#Flux of Carbon Dioxide Ecosystem Respiration -'fco2rec' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 196 ; - } #Canopy cover fraction 'ccf' = { discipline = 192 ; @@ -14110,6 +13992,24 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 194 ; } +#Emission mass flux from soil +'emi_mflx_soil' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 195 ; + } +#Emission mass flux from wild animals +'emi_mflx_wildanim' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 196 ; + } #Aerosol negative fixer mass flux 'aer_negfix_mflx' = { localTablesVersion = 1 ; @@ -15894,8 +15794,8 @@ discipline = 10 ; parameterCategory = 0 ; parameterNumber = 3 ; - typeOfFirstFixedSurface = 101 ; productDefinitionTemplateNumber = 5 ; + typeOfFirstFixedSurface = 101 ; scaledValueOfLowerLimit = 6 ; scaleFactorOfLowerLimit = 0 ; probabilityType = 3 ; @@ -15905,8 +15805,8 @@ discipline = 10 ; parameterCategory = 0 ; parameterNumber = 3 ; - typeOfFirstFixedSurface = 101 ; productDefinitionTemplateNumber = 5 ; + typeOfFirstFixedSurface = 101 ; scaledValueOfLowerLimit = 8 ; scaleFactorOfLowerLimit = 0 ; probabilityType = 3 ; @@ -16649,24 +16549,12 @@ parameterCategory = 140 ; parameterNumber = 233 ; } -#Mean direction of wind waves -'mdww' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 235 ; - } #Significant height of total swell 'shts' = { discipline = 192 ; parameterCategory = 140 ; parameterNumber = 237 ; } -#Mean direction of total swell -'mdts' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 238 ; - } #Mean period of total swell 'mpts' = { discipline = 192 ; @@ -16739,12 +16627,6 @@ parameterCategory = 140 ; parameterNumber = 250 ; } -#2D wave spectra (single) -'d2fd' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 251 ; - } #Wave spectral kurtosis 'wsk' = { discipline = 192 ; @@ -17489,12 +17371,6 @@ parameterCategory = 160 ; parameterNumber = 184 ; } -#Skin reservoir content -'srcrea' = { - discipline = 192 ; - parameterCategory = 160 ; - parameterNumber = 198 ; - } #Percentage of vegetation 'vegrea' = { discipline = 192 ; @@ -17711,24 +17587,12 @@ parameterCategory = 162 ; parameterNumber = 51 ; } -#Vertical integral of mass of atmosphere -'vima' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 53 ; - } #Vertical integral of temperature 'vit' = { discipline = 192 ; parameterCategory = 162 ; parameterNumber = 54 ; } -#Vertical integral of water vapour -'viwv' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 55 ; - } #Vertical integral of cloud liquid water 'vilw' = { discipline = 192 ; @@ -17747,36 +17611,6 @@ parameterCategory = 162 ; parameterNumber = 58 ; } -#Vertical integral of kinetic energy -'vike' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 59 ; - } -#Vertical integral of thermal energy -'vithe' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 60 ; - } -#Vertical integral of potential+internal energy -'vipie' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 61 ; - } -#Vertical integral of potential+internal+latent energy -'vipile' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 62 ; - } -#Vertical integral of total energy -'vitoe' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 63 ; - } #Vertical integral of energy conversion 'viec' = { discipline = 192 ; @@ -17807,18 +17641,6 @@ parameterCategory = 162 ; parameterNumber = 68 ; } -#Vertical integral of eastward heat flux -'vithee' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 69 ; - } -#Vertical integral of northward heat flux -'vithen' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 70 ; - } #Vertical integral of eastward geopotential flux 'vige' = { discipline = 192 ; @@ -17873,12 +17695,6 @@ parameterCategory = 162 ; parameterNumber = 83 ; } -#Vertical integral of divergence of moisture flux -'viwvd' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 84 ; - } #Vertical integral of divergence of geopotential flux 'vigd' = { discipline = 192 ; @@ -19703,12 +19519,6 @@ parameterCategory = 174 ; parameterNumber = 6 ; } -#Sub-surface runoff -'ssro' = { - discipline = 192 ; - parameterCategory = 174 ; - parameterNumber = 9 ; - } #Fraction of sea-ice in sea 'p31.174' = { discipline = 192 ; @@ -22175,48 +21985,6 @@ parameterCategory = 228 ; parameterNumber = 6 ; } -#Minimum vertical gradient of refractivity inside trapping layer -'dndzn' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 15 ; - } -#Mean vertical gradient of refractivity inside trapping layer -'dndza' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 16 ; - } -#Duct base height -'dctb' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 17 ; - } -#Trapping layer base height -'tplb' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 18 ; - } -#Trapping layer top height -'tplt' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 19 ; - } -#Neutral wind at 10 m u-component -'u10n' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 131 ; - } -#Neutral wind at 10 m v-component -'v10n' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 132 ; - } #Surface temperature significance 'sts' = { discipline = 192 ; diff --git a/definitions/grib2/localConcepts/ecmf/cfVarName.legacy.def b/definitions/grib2/localConcepts/ecmf/cfVarName.legacy.def index 782e4fb08..d39e3fecd 100644 --- a/definitions/grib2/localConcepts/ecmf/cfVarName.legacy.def +++ b/definitions/grib2/localConcepts/ecmf/cfVarName.legacy.def @@ -616,3 +616,354 @@ parameterCategory = 228 ; parameterNumber = 28 ; } +#Forecast albedo +'fal' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 243 ; +} +#Forecast surface roughness +'fsr' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 244 ; +} +#Flux of Carbon Dioxide Net Ecosystem Exchange +'fco2nee' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 195 ; +} +#Accumulated Carbon Dioxide Net Ecosystem Exchange +'aco2nee' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 192 ; + typeOfStatisticalProcessing = 1 ; +} +#Flux of Carbon Dioxide Gross Primary Production +'fco2gpp' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 197 ; +} +#Accumulated Carbon Dioxide Gross Primary Production +'aco2gpp' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 193 ; + typeOfStatisticalProcessing = 1 ; +} +#Flux of Carbon Dioxide Ecosystem Respiration +'fco2rec' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 196 ; +} +#Accumulated Carbon Dioxide Ecosystem Respiration +'aco2rec' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 194 ; + typeOfStatisticalProcessing = 1 ; +} +#Albedo (climatological) +'al' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 174 ; +} +#UV visible albedo for direct radiation (climatological) +'aluvp' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 15 ; +} +#UV visible albedo for diffuse radiation (climatological) +'aluvd' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 16 ; +} +#Near IR albedo for direct radiation (climatological) +'alnip' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 17 ; +} +#Near IR albedo for diffuse radiation (climatological) +'alnid' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 18 ; +} +#Standard deviation of filtered subgrid orography (climatological) +'sdfor' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 74 ; +} +#Logarithm of surface roughness length for heat (climatological) +'lsrh' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 234 ; +} +#UV visible albedo for direct radiation, isotropic component (climatological) +'aluvpi' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 186 ; +} +#UV visible albedo for direct radiation, volumetric component (climatological) +'aluvpv' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 187 ; +} +#UV visible albedo for direct radiation, geometric component (climatological) +'aluvpg' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 188 ; +} +#Near IR albedo for direct radiation, isotropic component (climatological) +'alnipi' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 189 ; +} +#Near IR albedo for direct radiation, volumetric component (climatological) +'alnipv' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 190 ; +} +#Near IR albedo for direct radiation, geometric component (climatological) +'alnipg' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 191 ; +} +#Vertically integrated moisture divergence +'vimd' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 213 ; +} +#Vertically integrated moisture divergence flux +'viwvd' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 84 ; +} +#Forecast logarithm of surface roughness for heat +'flsr' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 245 ; +} +#U-component of neutral wind +'u10n' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 131 ; +} +#V-component of neutral wind +'v10n' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 132 ; +} +#Magnitude of turbulent surface stress +'magss' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 48 ; +} +#Vertical integral of mass of atmosphere +'vima' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 53 ; +} +#Height of zero-degree wet-bulb temperature +'hwbt0' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 47 ; +} +#Height of one-degree wet-bulb temperature +'hwbt1' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 48 ; +} +#Surface photosynthetically active radiation, clear sky +'parcs' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 20 ; +} +#Surface direct short-wave radiation, clear sky +'cdir' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 22 ; +} +#Duct base height +'dctb' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 17 ; +} +#Trapping layer base height +'tplb' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 18 ; +} +#Trapping layer top height +'tplt' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 19 ; +} +#Mean vertical gradient of refractivity inside trapping layer +'dndza' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 16 ; +} +#Minimum vertical gradient of refractivity inside trapping layer +'dndzn' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 15 ; +} +#Vertical integral of eastward heat flux +'vithee' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 69 ; +} +#Vertical integral of northward heat flux +'vithen' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 70 ; +} +#Vertical integral of potential+internal+latent energy +'vipile' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 62 ; +} +#Skin reservoir content +'src' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 198 ; +} +#Skin reservoir content +'srcrea' = { + discipline = 192 ; + parameterCategory = 160 ; + parameterNumber = 198 ; +} +#Sub-surface runoff +'ssro' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 9 ; +} +#Low vegetation cover +'cvl' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 27 ; +} +#High vegetation cover +'cvh' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 28 ; +} +#Leaf area index, low vegetation +'lai_lv' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 66 ; +} +#Leaf area index, high vegetation +'lai_hv' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 67 ; +} +#Type of low vegetation +'tvl' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 29 ; +} +#Type of high vegetation +'tvh' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 30 ; +} +#Mean direction of total swell +'mdts' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 238 ; +} +#Mean direction of wind waves +'mdww' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 235 ; +} +#Charnock +'chnk' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 148 ; +} +#2D wave spectra (single) +'d2fd' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 251 ; +} +#Vertical integral of thermal energy +'vithe' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 60 ; +} +#Vertical integral of potential+internal energy +'vipie' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 61 ; +} +#Vertical integral of kinetic energy +'vike' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 59 ; +} +#Vertical integral of total energy +'vitoe' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 63 ; +} diff --git a/definitions/grib2/localConcepts/ecmf/name.def b/definitions/grib2/localConcepts/ecmf/name.def index 31e0b0252..5fe5902e5 100644 --- a/definitions/grib2/localConcepts/ecmf/name.def +++ b/definitions/grib2/localConcepts/ecmf/name.def @@ -34,9 +34,12 @@ } #Sub-surface runoff 'Sub-surface runoff' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 9 ; + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 204 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; } #U component of divergent wind 'U component of divergent wind' = { @@ -62,29 +65,37 @@ parameterCategory = 128 ; parameterNumber = 14 ; } -#UV visible albedo for direct radiation -'UV visible albedo for direct radiation' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 15 ; +#UV visible albedo for direct radiation (climatological) +'UV visible albedo for direct radiation (climatological)' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for diffuse radiation -'UV visible albedo for diffuse radiation' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 16 ; +#UV visible albedo for diffuse radiation (climatological) +'UV visible albedo for diffuse radiation (climatological)' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 192 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation -'Near IR albedo for direct radiation' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 17 ; +#Near IR albedo for direct radiation (climatological) +'Near IR albedo for direct radiation (climatological)' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for diffuse radiation -'Near IR albedo for diffuse radiation' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 18 ; +#Near IR albedo for diffuse radiation (climatological) +'Near IR albedo for diffuse radiation (climatological)' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 192 ; + typeOfGeneratingProcess = 9 ; } #Clear sky surface UV 'Clear sky surface UV' = { @@ -92,12 +103,6 @@ parameterCategory = 128 ; parameterNumber = 19 ; } -#Clear sky surface photosynthetically active radiation -'Clear sky surface photosynthetically active radiation' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 20 ; - } #Reserved for future unbalanced components 'Reserved for future unbalanced components' = { discipline = 192 ; @@ -116,30 +121,6 @@ parameterCategory = 128 ; parameterNumber = 26 ; } -#Low vegetation cover -'Low vegetation cover' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 27 ; - } -#High vegetation cover -'High vegetation cover' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 28 ; - } -#Type of low vegetation -'Type of low vegetation' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 29 ; - } -#Type of high vegetation -'Type of high vegetation' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 30 ; - } #Snow albedo 'Snow albedo' = { localTablesVersion = 1 ; @@ -219,12 +200,6 @@ parameterCategory = 128 ; parameterNumber = 46 ; } -#Magnitude of turbulent surface stress -'Magnitude of turbulent surface stress' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 48 ; - } #Maximum temperature at 2 metres in the last 24 hours 'Maximum temperature at 2 metres in the last 24 hours' = { discipline = 0 ; @@ -291,18 +266,6 @@ parameterCategory = 128 ; parameterNumber = 65 ; } -#Leaf area index, low vegetation -'Leaf area index, low vegetation' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 66 ; - } -#Leaf area index, high vegetation -'Leaf area index, high vegetation' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 67 ; - } #Minimum stomatal resistance, low vegetation 'Minimum stomatal resistance, low vegetation' = { discipline = 192 ; @@ -339,12 +302,6 @@ parameterCategory = 128 ; parameterNumber = 73 ; } -#Standard deviation of filtered subgrid orography -'Standard deviation of filtered subgrid orography' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 74 ; - } #Experimental product 'Experimental product' = { discipline = 192 ; @@ -657,10 +614,12 @@ } #Convective precipitation 'Convective precipitation' = { + localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 1 ; - parameterNumber = 10 ; - unitsFactor = 1000 ; + parameterNumber = 195 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; } #Snowfall 'Snowfall' = { @@ -671,12 +630,6 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Charnock -'Charnock' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 148 ; - } #Surface net radiation 'Surface net radiation' = { discipline = 192 ; @@ -759,11 +712,13 @@ parameterCategory = 128 ; parameterNumber = 171 ; } -#Albedo -'Albedo' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 174 ; +#Albedo (climatological) +'Albedo (climatological)' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } #Evaporation 'Evaporation' = { @@ -839,9 +794,10 @@ } #Skin reservoir content 'Skin reservoir content' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 198 ; + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 205 ; } #Vegetation fraction 'Vegetation fraction' = { @@ -875,12 +831,6 @@ parameterCategory = 128 ; parameterNumber = 206 ; } -#Vertically integrated moisture divergence -'Vertically integrated moisture divergence' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 213 ; - } #Diabatic heating by radiation 'Diabatic heating by radiation' = { discipline = 192 ; @@ -981,12 +931,6 @@ parameterCategory = 128 ; parameterNumber = 233 ; } -#Logarithm of surface roughness length for heat -'Logarithm of surface roughness length for heat' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 234 ; - } #Soil temperature level 4 'Soil temperature level 4' = { discipline = 192 ; @@ -1025,21 +969,10 @@ } #Forecast albedo 'Forecast albedo' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 243 ; - } -#Forecast surface roughness -'Forecast surface roughness' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 244 ; - } -#Forecast logarithm of surface roughness for heat -'Forecast logarithm of surface roughness for heat' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 245 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 193 ; } #Accumulated ice water tendency 'Accumulated ice water tendency' = { @@ -2823,74 +2756,86 @@ parameterCategory = 210 ; parameterNumber = 179 ; } -#UV visible albedo for direct radiation, isotropic component -'UV visible albedo for direct radiation, isotropic component ' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 186 ; +#UV visible albedo for direct radiation, isotropic component (climatological) +'UV visible albedo for direct radiation, isotropic component (climatological)' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 195 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for direct radiation, volumetric component -'UV visible albedo for direct radiation, volumetric component ' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 187 ; +#UV visible albedo for direct radiation, volumetric component (climatological) +'UV visible albedo for direct radiation, volumetric component (climatological)' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 196 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for direct radiation, geometric component -'UV visible albedo for direct radiation, geometric component ' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 188 ; +#UV visible albedo for direct radiation, geometric component (climatological) +'UV visible albedo for direct radiation, geometric component (climatological)' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 194 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, isotropic component -'Near IR albedo for direct radiation, isotropic component ' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 189 ; +#Near IR albedo for direct radiation, isotropic component (climatological) +'Near IR albedo for direct radiation, isotropic component (climatological)' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 195 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, volumetric component -'Near IR albedo for direct radiation, volumetric component' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 190 ; +#Near IR albedo for direct radiation, volumetric component (climatological) +'Near IR albedo for direct radiation, volumetric component (climatological)' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 196 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, geometric component -'Near IR albedo for direct radiation, geometric component ' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 191 ; +#Near IR albedo for direct radiation, geometric component (climatological) +'Near IR albedo for direct radiation, geometric component (climatological)' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 194 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for diffuse radiation, isotropic component -'UV visible albedo for diffuse radiation, isotropic component ' = { +#UV visible albedo for diffuse radiation, isotropic component +'UV visible albedo for diffuse radiation, isotropic component' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 192 ; } -#UV visible albedo for diffuse radiation, volumetric component -'UV visible albedo for diffuse radiation, volumetric component ' = { +#UV visible albedo for diffuse radiation, volumetric component +'UV visible albedo for diffuse radiation, volumetric component' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 193 ; } -#UV visible albedo for diffuse radiation, geometric component -'UV visible albedo for diffuse radiation, geometric component ' = { +#UV visible albedo for diffuse radiation, geometric component +'UV visible albedo for diffuse radiation, geometric component' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 194 ; } -#Near IR albedo for diffuse radiation, isotropic component -'Near IR albedo for diffuse radiation, isotropic component ' = { +#Near IR albedo for diffuse radiation, isotropic component +'Near IR albedo for diffuse radiation, isotropic component' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 195 ; } -#Near IR albedo for diffuse radiation, volumetric component -'Near IR albedo for diffuse radiation, volumetric component ' = { +#Near IR albedo for diffuse radiation, volumetric component +'Near IR albedo for diffuse radiation, volumetric component' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 196 ; } -#Near IR albedo for diffuse radiation, geometric component -'Near IR albedo for diffuse radiation, geometric component ' = { +#Near IR albedo for diffuse radiation, geometric component +'Near IR albedo for diffuse radiation, geometric component' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 197 ; @@ -11051,8 +10996,8 @@ parameterCategory = 218 ; parameterNumber = 206 ; } -#Column integrated mass density of Anthropogenic volatile organic compounds -'Column integrated mass density of Anthropogenic volatile organic compounds ' = { +#Column integrated mass density of Anthropogenic volatile organic compounds +'Column integrated mass density of Anthropogenic volatile organic compounds' = { localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 20 ; @@ -11060,8 +11005,8 @@ constituentType = 65532 ; is_chemical = 1 ; } -#Column integrated mass density of Biomass burning volatile organic compounds -'Column integrated mass density of Biomass burning volatile organic compounds ' = { +#Column integrated mass density of Biomass burning volatile organic compounds +'Column integrated mass density of Biomass burning volatile organic compounds' = { localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 20 ; @@ -12389,8 +12334,8 @@ parameterCategory = 219 ; parameterNumber = 220 ; } -#Atmosphere emission mass flux of Anthropogenic volatile organic compounds -'Atmosphere emission mass flux of Anthropogenic volatile organic compounds ' = { +#Atmosphere emission mass flux of Anthropogenic volatile organic compounds +'Atmosphere emission mass flux of Anthropogenic volatile organic compounds' = { localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 20 ; @@ -12398,8 +12343,8 @@ constituentType = 65532 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Biomass burning volatile organic compounds -'Atmosphere emission mass flux of Biomass burning volatile organic compounds ' = { +#Atmosphere emission mass flux of Biomass burning volatile organic compounds +'Atmosphere emission mass flux of Biomass burning volatile organic compounds' = { localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 20 ; @@ -13643,8 +13588,8 @@ parameterCategory = 221 ; parameterNumber = 206 ; } -#Dry deposition velocity of Anthropogenic volatile organic compounds -'Dry deposition velocity of Anthropogenic volatile organic compounds ' = { +#Dry deposition velocity of Anthropogenic volatile organic compounds +'Dry deposition velocity of Anthropogenic volatile organic compounds' = { localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 20 ; @@ -13652,8 +13597,8 @@ constituentType = 65532 ; is_chemical = 1 ; } -#Dry deposition velocity of Biomass burning volatile organic compounds -'Dry deposition velocity of Biomass burning volatile organic compounds ' = { +#Dry deposition velocity of Biomass burning volatile organic compounds +'Dry deposition velocity of Biomass burning volatile organic compounds' = { localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 20 ; @@ -13711,8 +13656,8 @@ typeOfStatisticalProcessing = 1 ; is_chemical = 1 ; } -#Time-integrated wet deposition mass flux of Condensable gas type 1 -'Time-integrated wet deposition mass flux of Condensable gas type 1 ' = { +#Time-integrated wet deposition mass flux of Condensable gas type 1 +'Time-integrated wet deposition mass flux of Condensable gas type 1' = { localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 20 ; @@ -13721,8 +13666,8 @@ typeOfStatisticalProcessing = 1 ; is_chemical = 1 ; } -#Time-integrated wet deposition mass flux of Condensable gas type 2a -'Time-integrated wet deposition mass flux of Condensable gas type 2a ' = { +#Time-integrated wet deposition mass flux of Condensable gas type 2a +'Time-integrated wet deposition mass flux of Condensable gas type 2a' = { localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 20 ; @@ -13731,8 +13676,8 @@ typeOfStatisticalProcessing = 1 ; is_chemical = 1 ; } -#Time-integrated wet deposition mass flux of Condensable gas type 2b -'Time-integrated wet deposition mass flux of Condensable gas type 2b ' = { +#Time-integrated wet deposition mass flux of Condensable gas type 2b +'Time-integrated wet deposition mass flux of Condensable gas type 2b' = { localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 20 ; @@ -13747,12 +13692,6 @@ parameterCategory = 228 ; parameterNumber = 21 ; } -#Clear-sky direct solar radiation at surface -'Clear-sky direct solar radiation at surface' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 22 ; - } #Cloud base height 'Cloud base height' = { discipline = 192 ; @@ -13813,18 +13752,6 @@ parameterCategory = 228 ; parameterNumber = 43 ; } -#Height of zero-degree wet-bulb temperature -'Height of zero-degree wet-bulb temperature' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 47 ; - } -#Height of one-degree wet-bulb temperature -'Height of one-degree wet-bulb temperature' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 48 ; - } #GPP coefficient from Biogenic Flux Adjustment System 'GPP coefficient from Biogenic Flux Adjustment System' = { localTablesVersion = 1 ; @@ -13839,51 +13766,6 @@ parameterCategory = 0 ; parameterNumber = 199 ; } -#Accumulated Carbon Dioxide Net Ecosystem Exchange -'Accumulated Carbon Dioxide Net Ecosystem Exchange' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 192 ; - typeOfStatisticalProcessing = 1 ; - } -#Accumulated Carbon Dioxide Gross Primary Production -'Accumulated Carbon Dioxide Gross Primary Production' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 193 ; - typeOfStatisticalProcessing = 1 ; - } -#Accumulated Carbon Dioxide Ecosystem Respiration -'Accumulated Carbon Dioxide Ecosystem Respiration' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 194 ; - typeOfStatisticalProcessing = 1 ; - } -#Flux of Carbon Dioxide Net Ecosystem Exchange -'Flux of Carbon Dioxide Net Ecosystem Exchange' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 195 ; - } -#Flux of Carbon Dioxide Gross Primary Production -'Flux of Carbon Dioxide Gross Primary Production' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 197 ; - } -#Flux of Carbon Dioxide Ecosystem Respiration -'Flux of Carbon Dioxide Ecosystem Respiration' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 196 ; - } #Canopy cover fraction 'Canopy cover fraction' = { discipline = 192 ; @@ -14110,6 +13992,24 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 194 ; } +#Emission mass flux from soil +'Emission mass flux from soil' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 195 ; + } +#Emission mass flux from wild animals +'Emission mass flux from wild animals' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 196 ; + } #Aerosol negative fixer mass flux 'Aerosol negative fixer mass flux' = { localTablesVersion = 1 ; @@ -16649,24 +16549,12 @@ parameterCategory = 140 ; parameterNumber = 233 ; } -#Mean direction of wind waves -'Mean direction of wind waves' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 235 ; - } #Significant height of total swell 'Significant height of total swell' = { discipline = 192 ; parameterCategory = 140 ; parameterNumber = 237 ; } -#Mean direction of total swell -'Mean direction of total swell' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 238 ; - } #Mean period of total swell 'Mean period of total swell' = { discipline = 192 ; @@ -16739,12 +16627,6 @@ parameterCategory = 140 ; parameterNumber = 250 ; } -#2D wave spectra (single) -'2D wave spectra (single)' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 251 ; - } #Wave spectral kurtosis 'Wave spectral kurtosis' = { discipline = 192 ; @@ -17489,12 +17371,6 @@ parameterCategory = 160 ; parameterNumber = 184 ; } -#Skin reservoir content -'Skin reservoir content' = { - discipline = 192 ; - parameterCategory = 160 ; - parameterNumber = 198 ; - } #Percentage of vegetation 'Percentage of vegetation' = { discipline = 192 ; @@ -17711,24 +17587,12 @@ parameterCategory = 162 ; parameterNumber = 51 ; } -#Vertical integral of mass of atmosphere -'Vertical integral of mass of atmosphere' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 53 ; - } #Vertical integral of temperature 'Vertical integral of temperature' = { discipline = 192 ; parameterCategory = 162 ; parameterNumber = 54 ; } -#Vertical integral of water vapour -'Vertical integral of water vapour' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 55 ; - } #Vertical integral of cloud liquid water 'Vertical integral of cloud liquid water' = { discipline = 192 ; @@ -17747,36 +17611,6 @@ parameterCategory = 162 ; parameterNumber = 58 ; } -#Vertical integral of kinetic energy -'Vertical integral of kinetic energy' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 59 ; - } -#Vertical integral of thermal energy -'Vertical integral of thermal energy' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 60 ; - } -#Vertical integral of potential+internal energy -'Vertical integral of potential+internal energy' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 61 ; - } -#Vertical integral of potential+internal+latent energy -'Vertical integral of potential+internal+latent energy' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 62 ; - } -#Vertical integral of total energy -'Vertical integral of total energy' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 63 ; - } #Vertical integral of energy conversion 'Vertical integral of energy conversion' = { discipline = 192 ; @@ -17807,18 +17641,6 @@ parameterCategory = 162 ; parameterNumber = 68 ; } -#Vertical integral of eastward heat flux -'Vertical integral of eastward heat flux' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 69 ; - } -#Vertical integral of northward heat flux -'Vertical integral of northward heat flux' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 70 ; - } #Vertical integral of eastward geopotential flux 'Vertical integral of eastward geopotential flux' = { discipline = 192 ; @@ -17873,12 +17695,6 @@ parameterCategory = 162 ; parameterNumber = 83 ; } -#Vertical integral of divergence of moisture flux -'Vertical integral of divergence of moisture flux' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 84 ; - } #Vertical integral of divergence of geopotential flux 'Vertical integral of divergence of geopotential flux' = { discipline = 192 ; @@ -19703,12 +19519,6 @@ parameterCategory = 174 ; parameterNumber = 6 ; } -#Sub-surface runoff -'Sub-surface runoff' = { - discipline = 192 ; - parameterCategory = 174 ; - parameterNumber = 9 ; - } #Fraction of sea-ice in sea 'Fraction of sea-ice in sea' = { discipline = 192 ; @@ -22175,48 +21985,6 @@ parameterCategory = 228 ; parameterNumber = 6 ; } -#Minimum vertical gradient of refractivity inside trapping layer -'Minimum vertical gradient of refractivity inside trapping layer' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 15 ; - } -#Mean vertical gradient of refractivity inside trapping layer -'Mean vertical gradient of refractivity inside trapping layer' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 16 ; - } -#Duct base height -'Duct base height' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 17 ; - } -#Trapping layer base height -'Trapping layer base height' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 18 ; - } -#Trapping layer top height -'Trapping layer top height' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 19 ; - } -#Neutral wind at 10 m u-component -'Neutral wind at 10 m u-component' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 131 ; - } -#Neutral wind at 10 m v-component -'Neutral wind at 10 m v-component' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 132 ; - } #Surface temperature significance 'Surface temperature significance' = { discipline = 192 ; diff --git a/definitions/grib2/localConcepts/ecmf/name.legacy.def b/definitions/grib2/localConcepts/ecmf/name.legacy.def index c697ac4ac..5b086af82 100644 --- a/definitions/grib2/localConcepts/ecmf/name.legacy.def +++ b/definitions/grib2/localConcepts/ecmf/name.legacy.def @@ -616,3 +616,354 @@ parameterCategory = 228 ; parameterNumber = 28 ; } +#Forecast albedo +'Forecast albedo' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 243 ; +} +#Forecast surface roughness +'Forecast surface roughness' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 244 ; +} +#Flux of Carbon Dioxide Net Ecosystem Exchange +'Flux of Carbon Dioxide Net Ecosystem Exchange' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 195 ; +} +#Accumulated Carbon Dioxide Net Ecosystem Exchange +'Accumulated Carbon Dioxide Net Ecosystem Exchange' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 192 ; + typeOfStatisticalProcessing = 1 ; +} +#Flux of Carbon Dioxide Gross Primary Production +'Flux of Carbon Dioxide Gross Primary Production' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 197 ; +} +#Accumulated Carbon Dioxide Gross Primary Production +'Accumulated Carbon Dioxide Gross Primary Production' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 193 ; + typeOfStatisticalProcessing = 1 ; +} +#Flux of Carbon Dioxide Ecosystem Respiration +'Flux of Carbon Dioxide Ecosystem Respiration' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 196 ; +} +#Accumulated Carbon Dioxide Ecosystem Respiration +'Accumulated Carbon Dioxide Ecosystem Respiration' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 194 ; + typeOfStatisticalProcessing = 1 ; +} +#Albedo (climatological) +'Albedo (climatological)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 174 ; +} +#UV visible albedo for direct radiation (climatological) +'UV visible albedo for direct radiation (climatological)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 15 ; +} +#UV visible albedo for diffuse radiation (climatological) +'UV visible albedo for diffuse radiation (climatological)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 16 ; +} +#Near IR albedo for direct radiation (climatological) +'Near IR albedo for direct radiation (climatological)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 17 ; +} +#Near IR albedo for diffuse radiation (climatological) +'Near IR albedo for diffuse radiation (climatological)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 18 ; +} +#Standard deviation of filtered subgrid orography (climatological) +'Standard deviation of filtered subgrid orography (climatological)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 74 ; +} +#Logarithm of surface roughness length for heat (climatological) +'Logarithm of surface roughness length for heat (climatological)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 234 ; +} +#UV visible albedo for direct radiation, isotropic component (climatological) +'UV visible albedo for direct radiation, isotropic component (climatological)' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 186 ; +} +#UV visible albedo for direct radiation, volumetric component (climatological) +'UV visible albedo for direct radiation, volumetric component (climatological)' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 187 ; +} +#UV visible albedo for direct radiation, geometric component (climatological) +'UV visible albedo for direct radiation, geometric component (climatological)' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 188 ; +} +#Near IR albedo for direct radiation, isotropic component (climatological) +'Near IR albedo for direct radiation, isotropic component (climatological)' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 189 ; +} +#Near IR albedo for direct radiation, volumetric component (climatological) +'Near IR albedo for direct radiation, volumetric component (climatological)' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 190 ; +} +#Near IR albedo for direct radiation, geometric component (climatological) +'Near IR albedo for direct radiation, geometric component (climatological)' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 191 ; +} +#Vertically integrated moisture divergence +'Vertically integrated moisture divergence' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 213 ; +} +#Vertically integrated moisture divergence flux +'Vertically integrated moisture divergence flux' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 84 ; +} +#Forecast logarithm of surface roughness for heat +'Forecast logarithm of surface roughness for heat' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 245 ; +} +#U-component of neutral wind +'U-component of neutral wind' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 131 ; +} +#V-component of neutral wind +'V-component of neutral wind' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 132 ; +} +#Magnitude of turbulent surface stress +'Magnitude of turbulent surface stress' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 48 ; +} +#Vertical integral of mass of atmosphere +'Vertical integral of mass of atmosphere' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 53 ; +} +#Height of zero-degree wet-bulb temperature +'Height of zero-degree wet-bulb temperature' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 47 ; +} +#Height of one-degree wet-bulb temperature +'Height of one-degree wet-bulb temperature' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 48 ; +} +#Surface photosynthetically active radiation, clear sky +'Surface photosynthetically active radiation, clear sky' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 20 ; +} +#Surface direct short-wave radiation, clear sky +'Surface direct short-wave radiation, clear sky' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 22 ; +} +#Duct base height +'Duct base height' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 17 ; +} +#Trapping layer base height +'Trapping layer base height' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 18 ; +} +#Trapping layer top height +'Trapping layer top height' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 19 ; +} +#Mean vertical gradient of refractivity inside trapping layer +'Mean vertical gradient of refractivity inside trapping layer' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 16 ; +} +#Minimum vertical gradient of refractivity inside trapping layer +'Minimum vertical gradient of refractivity inside trapping layer' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 15 ; +} +#Vertical integral of eastward heat flux +'Vertical integral of eastward heat flux' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 69 ; +} +#Vertical integral of northward heat flux +'Vertical integral of northward heat flux' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 70 ; +} +#Vertical integral of potential+internal+latent energy +'Vertical integral of potential+internal+latent energy' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 62 ; +} +#Skin reservoir content +'Skin reservoir content' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 198 ; +} +#Skin reservoir content +'Skin reservoir content' = { + discipline = 192 ; + parameterCategory = 160 ; + parameterNumber = 198 ; +} +#Sub-surface runoff +'Sub-surface runoff' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 9 ; +} +#Low vegetation cover +'Low vegetation cover' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 27 ; +} +#High vegetation cover +'High vegetation cover' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 28 ; +} +#Leaf area index, low vegetation +'Leaf area index, low vegetation' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 66 ; +} +#Leaf area index, high vegetation +'Leaf area index, high vegetation' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 67 ; +} +#Type of low vegetation +'Type of low vegetation' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 29 ; +} +#Type of high vegetation +'Type of high vegetation' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 30 ; +} +#Mean direction of total swell +'Mean direction of total swell' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 238 ; +} +#Mean direction of wind waves +'Mean direction of wind waves' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 235 ; +} +#Charnock +'Charnock' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 148 ; +} +#2D wave spectra (single) +'2D wave spectra (single)' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 251 ; +} +#Vertical integral of thermal energy +'Vertical integral of thermal energy' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 60 ; +} +#Vertical integral of potential+internal energy +'Vertical integral of potential+internal energy' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 61 ; +} +#Vertical integral of kinetic energy +'Vertical integral of kinetic energy' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 59 ; +} +#Vertical integral of total energy +'Vertical integral of total energy' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 63 ; +} diff --git a/definitions/grib2/localConcepts/ecmf/paramId.def b/definitions/grib2/localConcepts/ecmf/paramId.def index c8e69dd65..56dba8702 100644 --- a/definitions/grib2/localConcepts/ecmf/paramId.def +++ b/definitions/grib2/localConcepts/ecmf/paramId.def @@ -34,9 +34,12 @@ } #Sub-surface runoff '9' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 9 ; + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 204 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; } #U component of divergent wind '11' = { @@ -62,29 +65,37 @@ parameterCategory = 128 ; parameterNumber = 14 ; } -#UV visible albedo for direct radiation +#UV visible albedo for direct radiation (climatological) '15' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 15 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for diffuse radiation +#UV visible albedo for diffuse radiation (climatological) '16' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 16 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 192 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation +#Near IR albedo for direct radiation (climatological) '17' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 17 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for diffuse radiation +#Near IR albedo for diffuse radiation (climatological) '18' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 18 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 192 ; + typeOfGeneratingProcess = 9 ; } #Clear sky surface UV '19' = { @@ -92,12 +103,6 @@ parameterCategory = 128 ; parameterNumber = 19 ; } -#Clear sky surface photosynthetically active radiation -'20' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 20 ; - } #Reserved for future unbalanced components '24' = { discipline = 192 ; @@ -116,30 +121,6 @@ parameterCategory = 128 ; parameterNumber = 26 ; } -#Low vegetation cover -'27' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 27 ; - } -#High vegetation cover -'28' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 28 ; - } -#Type of low vegetation -'29' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 29 ; - } -#Type of high vegetation -'30' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 30 ; - } #Snow albedo '32' = { localTablesVersion = 1 ; @@ -219,12 +200,6 @@ parameterCategory = 128 ; parameterNumber = 46 ; } -#Magnitude of turbulent surface stress -'48' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 48 ; - } #Maximum temperature at 2 metres in the last 24 hours '51' = { discipline = 0 ; @@ -291,18 +266,6 @@ parameterCategory = 128 ; parameterNumber = 65 ; } -#Leaf area index, low vegetation -'66' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 66 ; - } -#Leaf area index, high vegetation -'67' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 67 ; - } #Minimum stomatal resistance, low vegetation '68' = { discipline = 192 ; @@ -339,12 +302,6 @@ parameterCategory = 128 ; parameterNumber = 73 ; } -#Standard deviation of filtered subgrid orography -'74' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 74 ; - } #Experimental product '80' = { discipline = 192 ; @@ -657,10 +614,12 @@ } #Convective precipitation '143' = { + localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 1 ; - parameterNumber = 10 ; - unitsFactor = 1000 ; + parameterNumber = 195 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; } #Snowfall '144' = { @@ -671,12 +630,6 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Charnock -'148' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 148 ; - } #Surface net radiation '149' = { discipline = 192 ; @@ -759,11 +712,13 @@ parameterCategory = 128 ; parameterNumber = 171 ; } -#Albedo +#Albedo (climatological) '174' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 174 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } #Evaporation '182' = { @@ -839,9 +794,10 @@ } #Skin reservoir content '198' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 198 ; + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 205 ; } #Vegetation fraction '199' = { @@ -875,12 +831,6 @@ parameterCategory = 128 ; parameterNumber = 206 ; } -#Vertically integrated moisture divergence -'213' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 213 ; - } #Diabatic heating by radiation '214' = { discipline = 192 ; @@ -981,12 +931,6 @@ parameterCategory = 128 ; parameterNumber = 233 ; } -#Logarithm of surface roughness length for heat -'234' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 234 ; - } #Soil temperature level 4 '236' = { discipline = 192 ; @@ -1025,21 +969,10 @@ } #Forecast albedo '243' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 243 ; - } -#Forecast surface roughness -'244' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 244 ; - } -#Forecast logarithm of surface roughness for heat -'245' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 245 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 193 ; } #Accumulated ice water tendency '249' = { @@ -2823,73 +2756,85 @@ parameterCategory = 210 ; parameterNumber = 179 ; } -#UV visible albedo for direct radiation, isotropic component +#UV visible albedo for direct radiation, isotropic component (climatological) '210186' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 186 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 195 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for direct radiation, volumetric component +#UV visible albedo for direct radiation, volumetric component (climatological) '210187' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 187 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 196 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for direct radiation, geometric component +#UV visible albedo for direct radiation, geometric component (climatological) '210188' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 188 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 194 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, isotropic component +#Near IR albedo for direct radiation, isotropic component (climatological) '210189' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 189 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 195 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, volumetric component +#Near IR albedo for direct radiation, volumetric component (climatological) '210190' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 190 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 196 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, geometric component +#Near IR albedo for direct radiation, geometric component (climatological) '210191' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 191 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 194 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for diffuse radiation, isotropic component +#UV visible albedo for diffuse radiation, isotropic component '210192' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 192 ; } -#UV visible albedo for diffuse radiation, volumetric component +#UV visible albedo for diffuse radiation, volumetric component '210193' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 193 ; } -#UV visible albedo for diffuse radiation, geometric component +#UV visible albedo for diffuse radiation, geometric component '210194' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 194 ; } -#Near IR albedo for diffuse radiation, isotropic component +#Near IR albedo for diffuse radiation, isotropic component '210195' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 195 ; } -#Near IR albedo for diffuse radiation, volumetric component +#Near IR albedo for diffuse radiation, volumetric component '210196' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 196 ; } -#Near IR albedo for diffuse radiation, geometric component +#Near IR albedo for diffuse radiation, geometric component '210197' = { discipline = 192 ; parameterCategory = 210 ; @@ -11051,7 +10996,7 @@ parameterCategory = 218 ; parameterNumber = 206 ; } -#Column integrated mass density of Anthropogenic volatile organic compounds +#Column integrated mass density of Anthropogenic volatile organic compounds '218231' = { localTablesVersion = 1 ; discipline = 0 ; @@ -11060,7 +11005,7 @@ constituentType = 65532 ; is_chemical = 1 ; } -#Column integrated mass density of Biomass burning volatile organic compounds +#Column integrated mass density of Biomass burning volatile organic compounds '218232' = { localTablesVersion = 1 ; discipline = 0 ; @@ -12389,7 +12334,7 @@ parameterCategory = 219 ; parameterNumber = 220 ; } -#Atmosphere emission mass flux of Anthropogenic volatile organic compounds +#Atmosphere emission mass flux of Anthropogenic volatile organic compounds '219231' = { localTablesVersion = 1 ; discipline = 0 ; @@ -12398,7 +12343,7 @@ constituentType = 65532 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Biomass burning volatile organic compounds +#Atmosphere emission mass flux of Biomass burning volatile organic compounds '219232' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13643,7 +13588,7 @@ parameterCategory = 221 ; parameterNumber = 206 ; } -#Dry deposition velocity of Anthropogenic volatile organic compounds +#Dry deposition velocity of Anthropogenic volatile organic compounds '221231' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13652,7 +13597,7 @@ constituentType = 65532 ; is_chemical = 1 ; } -#Dry deposition velocity of Biomass burning volatile organic compounds +#Dry deposition velocity of Biomass burning volatile organic compounds '221232' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13711,7 +13656,7 @@ typeOfStatisticalProcessing = 1 ; is_chemical = 1 ; } -#Time-integrated wet deposition mass flux of Condensable gas type 1 +#Time-integrated wet deposition mass flux of Condensable gas type 1 '223186' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13721,7 +13666,7 @@ typeOfStatisticalProcessing = 1 ; is_chemical = 1 ; } -#Time-integrated wet deposition mass flux of Condensable gas type 2a +#Time-integrated wet deposition mass flux of Condensable gas type 2a '223187' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13731,7 +13676,7 @@ typeOfStatisticalProcessing = 1 ; is_chemical = 1 ; } -#Time-integrated wet deposition mass flux of Condensable gas type 2b +#Time-integrated wet deposition mass flux of Condensable gas type 2b '223188' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13747,12 +13692,6 @@ parameterCategory = 228 ; parameterNumber = 21 ; } -#Clear-sky direct solar radiation at surface -'228022' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 22 ; - } #Cloud base height '228023' = { discipline = 192 ; @@ -13813,18 +13752,6 @@ parameterCategory = 228 ; parameterNumber = 43 ; } -#Height of zero-degree wet-bulb temperature -'228047' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 47 ; - } -#Height of one-degree wet-bulb temperature -'228048' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 48 ; - } #GPP coefficient from Biogenic Flux Adjustment System '228078' = { localTablesVersion = 1 ; @@ -13839,51 +13766,6 @@ parameterCategory = 0 ; parameterNumber = 199 ; } -#Accumulated Carbon Dioxide Net Ecosystem Exchange -'228080' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 192 ; - typeOfStatisticalProcessing = 1 ; - } -#Accumulated Carbon Dioxide Gross Primary Production -'228081' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 193 ; - typeOfStatisticalProcessing = 1 ; - } -#Accumulated Carbon Dioxide Ecosystem Respiration -'228082' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 194 ; - typeOfStatisticalProcessing = 1 ; - } -#Flux of Carbon Dioxide Net Ecosystem Exchange -'228083' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 195 ; - } -#Flux of Carbon Dioxide Gross Primary Production -'228084' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 197 ; - } -#Flux of Carbon Dioxide Ecosystem Respiration -'228085' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 196 ; - } #Canopy cover fraction '228091' = { discipline = 192 ; @@ -14110,6 +13992,24 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 194 ; } +#Emission mass flux from soil +'442000' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 195 ; + } +#Emission mass flux from wild animals +'443000' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 196 ; + } #Aerosol negative fixer mass flux '451000' = { localTablesVersion = 1 ; @@ -16649,24 +16549,12 @@ parameterCategory = 140 ; parameterNumber = 233 ; } -#Mean direction of wind waves -'140235' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 235 ; - } #Significant height of total swell '140237' = { discipline = 192 ; parameterCategory = 140 ; parameterNumber = 237 ; } -#Mean direction of total swell -'140238' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 238 ; - } #Mean period of total swell '140239' = { discipline = 192 ; @@ -16739,12 +16627,6 @@ parameterCategory = 140 ; parameterNumber = 250 ; } -#2D wave spectra (single) -'140251' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 251 ; - } #Wave spectral kurtosis '140252' = { discipline = 192 ; @@ -17489,12 +17371,6 @@ parameterCategory = 160 ; parameterNumber = 184 ; } -#Skin reservoir content -'160198' = { - discipline = 192 ; - parameterCategory = 160 ; - parameterNumber = 198 ; - } #Percentage of vegetation '160199' = { discipline = 192 ; @@ -17711,24 +17587,12 @@ parameterCategory = 162 ; parameterNumber = 51 ; } -#Vertical integral of mass of atmosphere -'162053' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 53 ; - } #Vertical integral of temperature '162054' = { discipline = 192 ; parameterCategory = 162 ; parameterNumber = 54 ; } -#Vertical integral of water vapour -'162055' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 55 ; - } #Vertical integral of cloud liquid water '162056' = { discipline = 192 ; @@ -17747,36 +17611,6 @@ parameterCategory = 162 ; parameterNumber = 58 ; } -#Vertical integral of kinetic energy -'162059' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 59 ; - } -#Vertical integral of thermal energy -'162060' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 60 ; - } -#Vertical integral of potential+internal energy -'162061' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 61 ; - } -#Vertical integral of potential+internal+latent energy -'162062' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 62 ; - } -#Vertical integral of total energy -'162063' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 63 ; - } #Vertical integral of energy conversion '162064' = { discipline = 192 ; @@ -17807,18 +17641,6 @@ parameterCategory = 162 ; parameterNumber = 68 ; } -#Vertical integral of eastward heat flux -'162069' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 69 ; - } -#Vertical integral of northward heat flux -'162070' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 70 ; - } #Vertical integral of eastward geopotential flux '162073' = { discipline = 192 ; @@ -17873,12 +17695,6 @@ parameterCategory = 162 ; parameterNumber = 83 ; } -#Vertical integral of divergence of moisture flux -'162084' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 84 ; - } #Vertical integral of divergence of geopotential flux '162085' = { discipline = 192 ; @@ -19703,12 +19519,6 @@ parameterCategory = 174 ; parameterNumber = 6 ; } -#Sub-surface runoff -'174009' = { - discipline = 192 ; - parameterCategory = 174 ; - parameterNumber = 9 ; - } #Fraction of sea-ice in sea '174031' = { discipline = 192 ; @@ -22175,48 +21985,6 @@ parameterCategory = 228 ; parameterNumber = 6 ; } -#Minimum vertical gradient of refractivity inside trapping layer -'228015' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 15 ; - } -#Mean vertical gradient of refractivity inside trapping layer -'228016' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 16 ; - } -#Duct base height -'228017' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 17 ; - } -#Trapping layer base height -'228018' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 18 ; - } -#Trapping layer top height -'228019' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 19 ; - } -#Neutral wind at 10 m u-component -'228131' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 131 ; - } -#Neutral wind at 10 m v-component -'228132' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 132 ; - } #Surface temperature significance '234139' = { discipline = 192 ; diff --git a/definitions/grib2/localConcepts/ecmf/paramId.legacy.def b/definitions/grib2/localConcepts/ecmf/paramId.legacy.def index ade474512..5d59734a9 100644 --- a/definitions/grib2/localConcepts/ecmf/paramId.legacy.def +++ b/definitions/grib2/localConcepts/ecmf/paramId.legacy.def @@ -616,3 +616,354 @@ parameterCategory = 228 ; parameterNumber = 28 ; } +#Forecast albedo +'243' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 243 ; +} +#Forecast surface roughness +'244' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 244 ; +} +#Flux of Carbon Dioxide Net Ecosystem Exchange +'228083' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 195 ; +} +#Accumulated Carbon Dioxide Net Ecosystem Exchange +'228080' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 192 ; + typeOfStatisticalProcessing = 1 ; +} +#Flux of Carbon Dioxide Gross Primary Production +'228084' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 197 ; +} +#Accumulated Carbon Dioxide Gross Primary Production +'228081' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 193 ; + typeOfStatisticalProcessing = 1 ; +} +#Flux of Carbon Dioxide Ecosystem Respiration +'228085' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 196 ; +} +#Accumulated Carbon Dioxide Ecosystem Respiration +'228082' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 194 ; + typeOfStatisticalProcessing = 1 ; +} +#Albedo (climatological) +'174' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 174 ; +} +#UV visible albedo for direct radiation (climatological) +'15' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 15 ; +} +#UV visible albedo for diffuse radiation (climatological) +'16' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 16 ; +} +#Near IR albedo for direct radiation (climatological) +'17' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 17 ; +} +#Near IR albedo for diffuse radiation (climatological) +'18' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 18 ; +} +#Standard deviation of filtered subgrid orography (climatological) +'74' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 74 ; +} +#Logarithm of surface roughness length for heat (climatological) +'234' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 234 ; +} +#UV visible albedo for direct radiation, isotropic component (climatological) +'210186' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 186 ; +} +#UV visible albedo for direct radiation, volumetric component (climatological) +'210187' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 187 ; +} +#UV visible albedo for direct radiation, geometric component (climatological) +'210188' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 188 ; +} +#Near IR albedo for direct radiation, isotropic component (climatological) +'210189' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 189 ; +} +#Near IR albedo for direct radiation, volumetric component (climatological) +'210190' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 190 ; +} +#Near IR albedo for direct radiation, geometric component (climatological) +'210191' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 191 ; +} +#Vertically integrated moisture divergence +'213' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 213 ; +} +#Vertically integrated moisture divergence flux +'162084' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 84 ; +} +#Forecast logarithm of surface roughness for heat +'245' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 245 ; +} +#U-component of neutral wind +'228131' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 131 ; +} +#V-component of neutral wind +'228132' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 132 ; +} +#Magnitude of turbulent surface stress +'48' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 48 ; +} +#Vertical integral of mass of atmosphere +'162053' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 53 ; +} +#Height of zero-degree wet-bulb temperature +'228047' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 47 ; +} +#Height of one-degree wet-bulb temperature +'228048' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 48 ; +} +#Surface photosynthetically active radiation, clear sky +'20' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 20 ; +} +#Surface direct short-wave radiation, clear sky +'228022' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 22 ; +} +#Duct base height +'228017' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 17 ; +} +#Trapping layer base height +'228018' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 18 ; +} +#Trapping layer top height +'228019' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 19 ; +} +#Mean vertical gradient of refractivity inside trapping layer +'228016' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 16 ; +} +#Minimum vertical gradient of refractivity inside trapping layer +'228015' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 15 ; +} +#Vertical integral of eastward heat flux +'162069' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 69 ; +} +#Vertical integral of northward heat flux +'162070' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 70 ; +} +#Vertical integral of potential+internal+latent energy +'162062' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 62 ; +} +#Skin reservoir content +'198' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 198 ; +} +#Skin reservoir content +'160198' = { + discipline = 192 ; + parameterCategory = 160 ; + parameterNumber = 198 ; +} +#Sub-surface runoff +'9' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 9 ; +} +#Low vegetation cover +'27' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 27 ; +} +#High vegetation cover +'28' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 28 ; +} +#Leaf area index, low vegetation +'66' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 66 ; +} +#Leaf area index, high vegetation +'67' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 67 ; +} +#Type of low vegetation +'29' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 29 ; +} +#Type of high vegetation +'30' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 30 ; +} +#Mean direction of total swell +'140238' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 238 ; +} +#Mean direction of wind waves +'140235' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 235 ; +} +#Charnock +'148' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 148 ; +} +#2D wave spectra (single) +'140251' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 251 ; +} +#Vertical integral of thermal energy +'162060' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 60 ; +} +#Vertical integral of potential+internal energy +'162061' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 61 ; +} +#Vertical integral of kinetic energy +'162059' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 59 ; +} +#Vertical integral of total energy +'162063' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 63 ; +} diff --git a/definitions/grib2/localConcepts/ecmf/shortName.def b/definitions/grib2/localConcepts/ecmf/shortName.def index 95612eac9..307bdc4cf 100644 --- a/definitions/grib2/localConcepts/ecmf/shortName.def +++ b/definitions/grib2/localConcepts/ecmf/shortName.def @@ -34,9 +34,12 @@ } #Sub-surface runoff 'ssro' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 9 ; + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 204 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; } #U component of divergent wind 'udvw' = { @@ -62,29 +65,37 @@ parameterCategory = 128 ; parameterNumber = 14 ; } -#UV visible albedo for direct radiation +#UV visible albedo for direct radiation (climatological) 'aluvp' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 15 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for diffuse radiation +#UV visible albedo for diffuse radiation (climatological) 'aluvd' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 16 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 192 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation +#Near IR albedo for direct radiation (climatological) 'alnip' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 17 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for diffuse radiation +#Near IR albedo for diffuse radiation (climatological) 'alnid' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 18 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 192 ; + typeOfGeneratingProcess = 9 ; } #Clear sky surface UV 'uvcs' = { @@ -92,12 +103,6 @@ parameterCategory = 128 ; parameterNumber = 19 ; } -#Clear sky surface photosynthetically active radiation -'parcs' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 20 ; - } #Reserved for future unbalanced components '~' = { discipline = 192 ; @@ -116,30 +121,6 @@ parameterCategory = 128 ; parameterNumber = 26 ; } -#Low vegetation cover -'cvl' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 27 ; - } -#High vegetation cover -'cvh' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 28 ; - } -#Type of low vegetation -'tvl' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 29 ; - } -#Type of high vegetation -'tvh' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 30 ; - } #Snow albedo 'asn' = { localTablesVersion = 1 ; @@ -219,12 +200,6 @@ parameterCategory = 128 ; parameterNumber = 46 ; } -#Magnitude of turbulent surface stress -'magss' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 48 ; - } #Maximum temperature at 2 metres in the last 24 hours 'mx2t24' = { discipline = 0 ; @@ -291,18 +266,6 @@ parameterCategory = 128 ; parameterNumber = 65 ; } -#Leaf area index, low vegetation -'lai_lv' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 66 ; - } -#Leaf area index, high vegetation -'lai_hv' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 67 ; - } #Minimum stomatal resistance, low vegetation 'msr_lv' = { discipline = 192 ; @@ -339,12 +302,6 @@ parameterCategory = 128 ; parameterNumber = 73 ; } -#Standard deviation of filtered subgrid orography -'sdfor' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 74 ; - } #Experimental product '~' = { discipline = 192 ; @@ -657,10 +614,12 @@ } #Convective precipitation 'cp' = { + localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 1 ; - parameterNumber = 10 ; - unitsFactor = 1000 ; + parameterNumber = 195 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; } #Snowfall 'sf' = { @@ -671,12 +630,6 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Charnock -'chnk' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 148 ; - } #Surface net radiation 'snr' = { discipline = 192 ; @@ -759,11 +712,13 @@ parameterCategory = 128 ; parameterNumber = 171 ; } -#Albedo +#Albedo (climatological) 'al' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 174 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } #Evaporation 'e' = { @@ -839,9 +794,10 @@ } #Skin reservoir content 'src' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 198 ; + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 205 ; } #Vegetation fraction 'veg' = { @@ -875,12 +831,6 @@ parameterCategory = 128 ; parameterNumber = 206 ; } -#Vertically integrated moisture divergence -'vimd' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 213 ; - } #Diabatic heating by radiation 'dhr' = { discipline = 192 ; @@ -981,12 +931,6 @@ parameterCategory = 128 ; parameterNumber = 233 ; } -#Logarithm of surface roughness length for heat -'lsrh' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 234 ; - } #Soil temperature level 4 'stl4' = { discipline = 192 ; @@ -1025,21 +969,10 @@ } #Forecast albedo 'fal' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 243 ; - } -#Forecast surface roughness -'fsr' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 244 ; - } -#Forecast logarithm of surface roughness for heat -'flsr' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 245 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 193 ; } #Accumulated ice water tendency 'aiw' = { @@ -2823,73 +2756,85 @@ parameterCategory = 210 ; parameterNumber = 179 ; } -#UV visible albedo for direct radiation, isotropic component +#UV visible albedo for direct radiation, isotropic component (climatological) 'aluvpi' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 186 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 195 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for direct radiation, volumetric component +#UV visible albedo for direct radiation, volumetric component (climatological) 'aluvpv' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 187 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 196 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for direct radiation, geometric component +#UV visible albedo for direct radiation, geometric component (climatological) 'aluvpg' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 188 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 194 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, isotropic component +#Near IR albedo for direct radiation, isotropic component (climatological) 'alnipi' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 189 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 195 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, volumetric component +#Near IR albedo for direct radiation, volumetric component (climatological) 'alnipv' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 190 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 196 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, geometric component +#Near IR albedo for direct radiation, geometric component (climatological) 'alnipg' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 191 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 194 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for diffuse radiation, isotropic component +#UV visible albedo for diffuse radiation, isotropic component 'aluvdi' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 192 ; } -#UV visible albedo for diffuse radiation, volumetric component +#UV visible albedo for diffuse radiation, volumetric component 'aluvdv' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 193 ; } -#UV visible albedo for diffuse radiation, geometric component +#UV visible albedo for diffuse radiation, geometric component 'aluvdg' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 194 ; } -#Near IR albedo for diffuse radiation, isotropic component +#Near IR albedo for diffuse radiation, isotropic component 'alnidi' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 195 ; } -#Near IR albedo for diffuse radiation, volumetric component +#Near IR albedo for diffuse radiation, volumetric component 'alnidv' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 196 ; } -#Near IR albedo for diffuse radiation, geometric component +#Near IR albedo for diffuse radiation, geometric component 'alnidg' = { discipline = 192 ; parameterCategory = 210 ; @@ -11051,7 +10996,7 @@ parameterCategory = 218 ; parameterNumber = 206 ; } -#Column integrated mass density of Anthropogenic volatile organic compounds +#Column integrated mass density of Anthropogenic volatile organic compounds 'tc_VOCA' = { localTablesVersion = 1 ; discipline = 0 ; @@ -11060,7 +11005,7 @@ constituentType = 65532 ; is_chemical = 1 ; } -#Column integrated mass density of Biomass burning volatile organic compounds +#Column integrated mass density of Biomass burning volatile organic compounds 'tc_VOCBB' = { localTablesVersion = 1 ; discipline = 0 ; @@ -12389,7 +12334,7 @@ parameterCategory = 219 ; parameterNumber = 220 ; } -#Atmosphere emission mass flux of Anthropogenic volatile organic compounds +#Atmosphere emission mass flux of Anthropogenic volatile organic compounds 'e_VOCA' = { localTablesVersion = 1 ; discipline = 0 ; @@ -12398,7 +12343,7 @@ constituentType = 65532 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Biomass burning volatile organic compounds +#Atmosphere emission mass flux of Biomass burning volatile organic compounds 'e_VOCBB' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13643,7 +13588,7 @@ parameterCategory = 221 ; parameterNumber = 206 ; } -#Dry deposition velocity of Anthropogenic volatile organic compounds +#Dry deposition velocity of Anthropogenic volatile organic compounds 'dv_VOCA' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13652,7 +13597,7 @@ constituentType = 65532 ; is_chemical = 1 ; } -#Dry deposition velocity of Biomass burning volatile organic compounds +#Dry deposition velocity of Biomass burning volatile organic compounds 'dv_VOCBB' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13711,7 +13656,7 @@ typeOfStatisticalProcessing = 1 ; is_chemical = 1 ; } -#Time-integrated wet deposition mass flux of Condensable gas type 1 +#Time-integrated wet deposition mass flux of Condensable gas type 1 'acc_wet_depm_SOG1' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13721,7 +13666,7 @@ typeOfStatisticalProcessing = 1 ; is_chemical = 1 ; } -#Time-integrated wet deposition mass flux of Condensable gas type 2a +#Time-integrated wet deposition mass flux of Condensable gas type 2a 'acc_wet_depm_SOG2A' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13731,7 +13676,7 @@ typeOfStatisticalProcessing = 1 ; is_chemical = 1 ; } -#Time-integrated wet deposition mass flux of Condensable gas type 2b +#Time-integrated wet deposition mass flux of Condensable gas type 2b 'acc_wet_depm_SOG2B' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13747,12 +13692,6 @@ parameterCategory = 228 ; parameterNumber = 21 ; } -#Clear-sky direct solar radiation at surface -'cdir' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 22 ; - } #Cloud base height 'cbh' = { discipline = 192 ; @@ -13813,18 +13752,6 @@ parameterCategory = 228 ; parameterNumber = 43 ; } -#Height of zero-degree wet-bulb temperature -'hwbt0' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 47 ; - } -#Height of one-degree wet-bulb temperature -'hwbt1' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 48 ; - } #GPP coefficient from Biogenic Flux Adjustment System 'gppbfas' = { localTablesVersion = 1 ; @@ -13839,51 +13766,6 @@ parameterCategory = 0 ; parameterNumber = 199 ; } -#Accumulated Carbon Dioxide Net Ecosystem Exchange -'aco2nee' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 192 ; - typeOfStatisticalProcessing = 1 ; - } -#Accumulated Carbon Dioxide Gross Primary Production -'aco2gpp' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 193 ; - typeOfStatisticalProcessing = 1 ; - } -#Accumulated Carbon Dioxide Ecosystem Respiration -'aco2rec' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 194 ; - typeOfStatisticalProcessing = 1 ; - } -#Flux of Carbon Dioxide Net Ecosystem Exchange -'fco2nee' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 195 ; - } -#Flux of Carbon Dioxide Gross Primary Production -'fco2gpp' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 197 ; - } -#Flux of Carbon Dioxide Ecosystem Respiration -'fco2rec' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 196 ; - } #Canopy cover fraction 'ccf' = { discipline = 192 ; @@ -14110,6 +13992,24 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 194 ; } +#Emission mass flux from soil +'emi_mflx_soil' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 195 ; + } +#Emission mass flux from wild animals +'emi_mflx_wildanim' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 196 ; + } #Aerosol negative fixer mass flux 'aer_negfix_mflx' = { localTablesVersion = 1 ; @@ -16649,24 +16549,12 @@ parameterCategory = 140 ; parameterNumber = 233 ; } -#Mean direction of wind waves -'mdww' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 235 ; - } #Significant height of total swell 'shts' = { discipline = 192 ; parameterCategory = 140 ; parameterNumber = 237 ; } -#Mean direction of total swell -'mdts' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 238 ; - } #Mean period of total swell 'mpts' = { discipline = 192 ; @@ -16739,12 +16627,6 @@ parameterCategory = 140 ; parameterNumber = 250 ; } -#2D wave spectra (single) -'2dfd' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 251 ; - } #Wave spectral kurtosis 'wsk' = { discipline = 192 ; @@ -17489,12 +17371,6 @@ parameterCategory = 160 ; parameterNumber = 184 ; } -#Skin reservoir content -'srcrea' = { - discipline = 192 ; - parameterCategory = 160 ; - parameterNumber = 198 ; - } #Percentage of vegetation 'vegrea' = { discipline = 192 ; @@ -17711,24 +17587,12 @@ parameterCategory = 162 ; parameterNumber = 51 ; } -#Vertical integral of mass of atmosphere -'vima' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 53 ; - } #Vertical integral of temperature 'vit' = { discipline = 192 ; parameterCategory = 162 ; parameterNumber = 54 ; } -#Vertical integral of water vapour -'viwv' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 55 ; - } #Vertical integral of cloud liquid water 'vilw' = { discipline = 192 ; @@ -17747,36 +17611,6 @@ parameterCategory = 162 ; parameterNumber = 58 ; } -#Vertical integral of kinetic energy -'vike' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 59 ; - } -#Vertical integral of thermal energy -'vithe' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 60 ; - } -#Vertical integral of potential+internal energy -'vipie' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 61 ; - } -#Vertical integral of potential+internal+latent energy -'vipile' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 62 ; - } -#Vertical integral of total energy -'vitoe' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 63 ; - } #Vertical integral of energy conversion 'viec' = { discipline = 192 ; @@ -17807,18 +17641,6 @@ parameterCategory = 162 ; parameterNumber = 68 ; } -#Vertical integral of eastward heat flux -'vithee' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 69 ; - } -#Vertical integral of northward heat flux -'vithen' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 70 ; - } #Vertical integral of eastward geopotential flux 'vige' = { discipline = 192 ; @@ -17873,12 +17695,6 @@ parameterCategory = 162 ; parameterNumber = 83 ; } -#Vertical integral of divergence of moisture flux -'viwvd' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 84 ; - } #Vertical integral of divergence of geopotential flux 'vigd' = { discipline = 192 ; @@ -19703,12 +19519,6 @@ parameterCategory = 174 ; parameterNumber = 6 ; } -#Sub-surface runoff -'ssro' = { - discipline = 192 ; - parameterCategory = 174 ; - parameterNumber = 9 ; - } #Fraction of sea-ice in sea '~' = { discipline = 192 ; @@ -22175,48 +21985,6 @@ parameterCategory = 228 ; parameterNumber = 6 ; } -#Minimum vertical gradient of refractivity inside trapping layer -'dndzn' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 15 ; - } -#Mean vertical gradient of refractivity inside trapping layer -'dndza' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 16 ; - } -#Duct base height -'dctb' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 17 ; - } -#Trapping layer base height -'tplb' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 18 ; - } -#Trapping layer top height -'tplt' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 19 ; - } -#Neutral wind at 10 m u-component -'u10n' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 131 ; - } -#Neutral wind at 10 m v-component -'v10n' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 132 ; - } #Surface temperature significance 'sts' = { discipline = 192 ; diff --git a/definitions/grib2/localConcepts/ecmf/shortName.legacy.def b/definitions/grib2/localConcepts/ecmf/shortName.legacy.def index cbc86ac1a..57dc9cc4c 100644 --- a/definitions/grib2/localConcepts/ecmf/shortName.legacy.def +++ b/definitions/grib2/localConcepts/ecmf/shortName.legacy.def @@ -616,3 +616,354 @@ parameterCategory = 228 ; parameterNumber = 28 ; } +#Forecast albedo +'fal' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 243 ; +} +#Forecast surface roughness +'fsr' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 244 ; +} +#Flux of Carbon Dioxide Net Ecosystem Exchange +'fco2nee' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 195 ; +} +#Accumulated Carbon Dioxide Net Ecosystem Exchange +'aco2nee' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 192 ; + typeOfStatisticalProcessing = 1 ; +} +#Flux of Carbon Dioxide Gross Primary Production +'fco2gpp' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 197 ; +} +#Accumulated Carbon Dioxide Gross Primary Production +'aco2gpp' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 193 ; + typeOfStatisticalProcessing = 1 ; +} +#Flux of Carbon Dioxide Ecosystem Respiration +'fco2rec' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 196 ; +} +#Accumulated Carbon Dioxide Ecosystem Respiration +'aco2rec' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 194 ; + typeOfStatisticalProcessing = 1 ; +} +#Albedo (climatological) +'al' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 174 ; +} +#UV visible albedo for direct radiation (climatological) +'aluvp' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 15 ; +} +#UV visible albedo for diffuse radiation (climatological) +'aluvd' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 16 ; +} +#Near IR albedo for direct radiation (climatological) +'alnip' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 17 ; +} +#Near IR albedo for diffuse radiation (climatological) +'alnid' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 18 ; +} +#Standard deviation of filtered subgrid orography (climatological) +'sdfor' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 74 ; +} +#Logarithm of surface roughness length for heat (climatological) +'lsrh' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 234 ; +} +#UV visible albedo for direct radiation, isotropic component (climatological) +'aluvpi' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 186 ; +} +#UV visible albedo for direct radiation, volumetric component (climatological) +'aluvpv' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 187 ; +} +#UV visible albedo for direct radiation, geometric component (climatological) +'aluvpg' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 188 ; +} +#Near IR albedo for direct radiation, isotropic component (climatological) +'alnipi' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 189 ; +} +#Near IR albedo for direct radiation, volumetric component (climatological) +'alnipv' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 190 ; +} +#Near IR albedo for direct radiation, geometric component (climatological) +'alnipg' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 191 ; +} +#Vertically integrated moisture divergence +'vimd' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 213 ; +} +#Vertically integrated moisture divergence flux +'viwvd' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 84 ; +} +#Forecast logarithm of surface roughness for heat +'flsr' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 245 ; +} +#U-component of neutral wind +'u10n' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 131 ; +} +#V-component of neutral wind +'v10n' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 132 ; +} +#Magnitude of turbulent surface stress +'magss' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 48 ; +} +#Vertical integral of mass of atmosphere +'vima' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 53 ; +} +#Height of zero-degree wet-bulb temperature +'hwbt0' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 47 ; +} +#Height of one-degree wet-bulb temperature +'hwbt1' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 48 ; +} +#Surface photosynthetically active radiation, clear sky +'parcs' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 20 ; +} +#Surface direct short-wave radiation, clear sky +'cdir' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 22 ; +} +#Duct base height +'dctb' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 17 ; +} +#Trapping layer base height +'tplb' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 18 ; +} +#Trapping layer top height +'tplt' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 19 ; +} +#Mean vertical gradient of refractivity inside trapping layer +'dndza' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 16 ; +} +#Minimum vertical gradient of refractivity inside trapping layer +'dndzn' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 15 ; +} +#Vertical integral of eastward heat flux +'vithee' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 69 ; +} +#Vertical integral of northward heat flux +'vithen' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 70 ; +} +#Vertical integral of potential+internal+latent energy +'vipile' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 62 ; +} +#Skin reservoir content +'src' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 198 ; +} +#Skin reservoir content +'srcrea' = { + discipline = 192 ; + parameterCategory = 160 ; + parameterNumber = 198 ; +} +#Sub-surface runoff +'ssro' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 9 ; +} +#Low vegetation cover +'cvl' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 27 ; +} +#High vegetation cover +'cvh' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 28 ; +} +#Leaf area index, low vegetation +'lai_lv' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 66 ; +} +#Leaf area index, high vegetation +'lai_hv' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 67 ; +} +#Type of low vegetation +'tvl' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 29 ; +} +#Type of high vegetation +'tvh' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 30 ; +} +#Mean direction of total swell +'mdts' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 238 ; +} +#Mean direction of wind waves +'mdww' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 235 ; +} +#Charnock +'chnk' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 148 ; +} +#2D wave spectra (single) +'2dfd' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 251 ; +} +#Vertical integral of thermal energy +'vithe' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 60 ; +} +#Vertical integral of potential+internal energy +'vipie' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 61 ; +} +#Vertical integral of kinetic energy +'vike' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 59 ; +} +#Vertical integral of total energy +'vitoe' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 63 ; +} diff --git a/definitions/grib2/localConcepts/ecmf/units.def b/definitions/grib2/localConcepts/ecmf/units.def index f4c9645c4..2ef819f22 100644 --- a/definitions/grib2/localConcepts/ecmf/units.def +++ b/definitions/grib2/localConcepts/ecmf/units.def @@ -34,9 +34,12 @@ } #Sub-surface runoff 'm' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 9 ; + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 204 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; } #U component of divergent wind 'm s**-1' = { @@ -62,29 +65,37 @@ parameterCategory = 128 ; parameterNumber = 14 ; } -#UV visible albedo for direct radiation +#UV visible albedo for direct radiation (climatological) '(0 - 1)' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 15 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for diffuse radiation +#UV visible albedo for diffuse radiation (climatological) '(0 - 1)' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 16 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 192 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation +#Near IR albedo for direct radiation (climatological) '(0 - 1)' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 17 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for diffuse radiation +#Near IR albedo for diffuse radiation (climatological) '(0 - 1)' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 18 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 192 ; + typeOfGeneratingProcess = 9 ; } #Clear sky surface UV 'J m**-2' = { @@ -92,12 +103,6 @@ parameterCategory = 128 ; parameterNumber = 19 ; } -#Clear sky surface photosynthetically active radiation -'J m**-2' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 20 ; - } #Reserved for future unbalanced components '~' = { discipline = 192 ; @@ -116,30 +121,6 @@ parameterCategory = 128 ; parameterNumber = 26 ; } -#Low vegetation cover -'(0 - 1)' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 27 ; - } -#High vegetation cover -'(0 - 1)' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 28 ; - } -#Type of low vegetation -'~' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 29 ; - } -#Type of high vegetation -'~' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 30 ; - } #Snow albedo '(0 - 1)' = { localTablesVersion = 1 ; @@ -219,12 +200,6 @@ parameterCategory = 128 ; parameterNumber = 46 ; } -#Magnitude of turbulent surface stress -'N m**-2 s' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 48 ; - } #Maximum temperature at 2 metres in the last 24 hours 'K' = { discipline = 0 ; @@ -291,18 +266,6 @@ parameterCategory = 128 ; parameterNumber = 65 ; } -#Leaf area index, low vegetation -'m**2 m**-2' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 66 ; - } -#Leaf area index, high vegetation -'m**2 m**-2' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 67 ; - } #Minimum stomatal resistance, low vegetation 's m**-1' = { discipline = 192 ; @@ -339,12 +302,6 @@ parameterCategory = 128 ; parameterNumber = 73 ; } -#Standard deviation of filtered subgrid orography -'m' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 74 ; - } #Experimental product '~' = { discipline = 192 ; @@ -657,10 +614,12 @@ } #Convective precipitation 'm' = { + localTablesVersion = 1 ; discipline = 0 ; parameterCategory = 1 ; - parameterNumber = 10 ; - unitsFactor = 1000 ; + parameterNumber = 195 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; } #Snowfall 'm of water equivalent' = { @@ -671,12 +630,6 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#Charnock -'~' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 148 ; - } #Surface net radiation 'J m**-2' = { discipline = 192 ; @@ -690,7 +643,7 @@ parameterNumber = 150 ; } #Logarithm of surface pressure -'~' = { +'Numeric' = { discipline = 0 ; parameterCategory = 3 ; parameterNumber = 25 ; @@ -759,11 +712,13 @@ parameterCategory = 128 ; parameterNumber = 171 ; } -#Albedo +#Albedo (climatological) '(0 - 1)' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 174 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 193 ; + typeOfGeneratingProcess = 9 ; } #Evaporation 'm of water equivalent' = { @@ -839,9 +794,10 @@ } #Skin reservoir content 'm of water equivalent' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 198 ; + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 205 ; } #Vegetation fraction '(0 - 1)' = { @@ -875,12 +831,6 @@ parameterCategory = 128 ; parameterNumber = 206 ; } -#Vertically integrated moisture divergence -'kg m**-2' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 213 ; - } #Diabatic heating by radiation 'K' = { discipline = 192 ; @@ -981,12 +931,6 @@ parameterCategory = 128 ; parameterNumber = 233 ; } -#Logarithm of surface roughness length for heat -'~' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 234 ; - } #Soil temperature level 4 'K' = { discipline = 192 ; @@ -1025,21 +969,10 @@ } #Forecast albedo '(0 - 1)' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 243 ; - } -#Forecast surface roughness -'m' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 244 ; - } -#Forecast logarithm of surface roughness for heat -'~' = { - discipline = 192 ; - parameterCategory = 128 ; - parameterNumber = 245 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 193 ; } #Accumulated ice water tendency '(-1 to 1)' = { @@ -2823,73 +2756,85 @@ parameterCategory = 210 ; parameterNumber = 179 ; } -#UV visible albedo for direct radiation, isotropic component +#UV visible albedo for direct radiation, isotropic component (climatological) '(0 - 1)' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 186 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 195 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for direct radiation, volumetric component +#UV visible albedo for direct radiation, volumetric component (climatological) '(0 - 1)' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 187 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 196 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for direct radiation, geometric component +#UV visible albedo for direct radiation, geometric component (climatological) '(0 - 1)' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 188 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 194 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, isotropic component +#Near IR albedo for direct radiation, isotropic component (climatological) '(0 - 1)' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 189 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 195 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, volumetric component +#Near IR albedo for direct radiation, volumetric component (climatological) '(0 - 1)' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 190 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 196 ; + typeOfGeneratingProcess = 9 ; } -#Near IR albedo for direct radiation, geometric component +#Near IR albedo for direct radiation, geometric component (climatological) '(0 - 1)' = { - discipline = 192 ; - parameterCategory = 210 ; - parameterNumber = 191 ; + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 194 ; + typeOfGeneratingProcess = 9 ; } -#UV visible albedo for diffuse radiation, isotropic component +#UV visible albedo for diffuse radiation, isotropic component '(0 - 1)' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 192 ; } -#UV visible albedo for diffuse radiation, volumetric component +#UV visible albedo for diffuse radiation, volumetric component '(0 - 1)' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 193 ; } -#UV visible albedo for diffuse radiation, geometric component +#UV visible albedo for diffuse radiation, geometric component '(0 - 1)' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 194 ; } -#Near IR albedo for diffuse radiation, isotropic component +#Near IR albedo for diffuse radiation, isotropic component '(0 - 1)' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 195 ; } -#Near IR albedo for diffuse radiation, volumetric component +#Near IR albedo for diffuse radiation, volumetric component '(0 - 1)' = { discipline = 192 ; parameterCategory = 210 ; parameterNumber = 196 ; } -#Near IR albedo for diffuse radiation, geometric component +#Near IR albedo for diffuse radiation, geometric component '(0 - 1)' = { discipline = 192 ; parameterCategory = 210 ; @@ -11051,7 +10996,7 @@ parameterCategory = 218 ; parameterNumber = 206 ; } -#Column integrated mass density of Anthropogenic volatile organic compounds +#Column integrated mass density of Anthropogenic volatile organic compounds 'kg m**-2' = { localTablesVersion = 1 ; discipline = 0 ; @@ -11060,7 +11005,7 @@ constituentType = 65532 ; is_chemical = 1 ; } -#Column integrated mass density of Biomass burning volatile organic compounds +#Column integrated mass density of Biomass burning volatile organic compounds 'kg m**-2' = { localTablesVersion = 1 ; discipline = 0 ; @@ -12389,7 +12334,7 @@ parameterCategory = 219 ; parameterNumber = 220 ; } -#Atmosphere emission mass flux of Anthropogenic volatile organic compounds +#Atmosphere emission mass flux of Anthropogenic volatile organic compounds 'kg m**-2 s**-1' = { localTablesVersion = 1 ; discipline = 0 ; @@ -12398,7 +12343,7 @@ constituentType = 65532 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Biomass burning volatile organic compounds +#Atmosphere emission mass flux of Biomass burning volatile organic compounds 'kg m**-2 s**-1' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13643,7 +13588,7 @@ parameterCategory = 221 ; parameterNumber = 206 ; } -#Dry deposition velocity of Anthropogenic volatile organic compounds +#Dry deposition velocity of Anthropogenic volatile organic compounds 'm s**-1' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13652,7 +13597,7 @@ constituentType = 65532 ; is_chemical = 1 ; } -#Dry deposition velocity of Biomass burning volatile organic compounds +#Dry deposition velocity of Biomass burning volatile organic compounds 'm s**-1' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13711,7 +13656,7 @@ typeOfStatisticalProcessing = 1 ; is_chemical = 1 ; } -#Time-integrated wet deposition mass flux of Condensable gas type 1 +#Time-integrated wet deposition mass flux of Condensable gas type 1 'kg m**-2' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13721,7 +13666,7 @@ typeOfStatisticalProcessing = 1 ; is_chemical = 1 ; } -#Time-integrated wet deposition mass flux of Condensable gas type 2a +#Time-integrated wet deposition mass flux of Condensable gas type 2a 'kg m**-2' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13731,7 +13676,7 @@ typeOfStatisticalProcessing = 1 ; is_chemical = 1 ; } -#Time-integrated wet deposition mass flux of Condensable gas type 2b +#Time-integrated wet deposition mass flux of Condensable gas type 2b 'kg m**-2' = { localTablesVersion = 1 ; discipline = 0 ; @@ -13747,12 +13692,6 @@ parameterCategory = 228 ; parameterNumber = 21 ; } -#Clear-sky direct solar radiation at surface -'J m**-2' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 22 ; - } #Cloud base height 'm' = { discipline = 192 ; @@ -13813,18 +13752,6 @@ parameterCategory = 228 ; parameterNumber = 43 ; } -#Height of zero-degree wet-bulb temperature -'m' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 47 ; - } -#Height of one-degree wet-bulb temperature -'m' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 48 ; - } #GPP coefficient from Biogenic Flux Adjustment System 'dimensionless' = { localTablesVersion = 1 ; @@ -13839,51 +13766,6 @@ parameterCategory = 0 ; parameterNumber = 199 ; } -#Accumulated Carbon Dioxide Net Ecosystem Exchange -'kg m**-2' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 192 ; - typeOfStatisticalProcessing = 1 ; - } -#Accumulated Carbon Dioxide Gross Primary Production -'kg m**-2' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 193 ; - typeOfStatisticalProcessing = 1 ; - } -#Accumulated Carbon Dioxide Ecosystem Respiration -'kg m**-2' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 194 ; - typeOfStatisticalProcessing = 1 ; - } -#Flux of Carbon Dioxide Net Ecosystem Exchange -'kg m**-2 s**-1' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 195 ; - } -#Flux of Carbon Dioxide Gross Primary Production -'kg m**-2 s**-1' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 197 ; - } -#Flux of Carbon Dioxide Ecosystem Respiration -'kg m**-2 s**-1' = { - localTablesVersion = 1 ; - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 196 ; - } #Canopy cover fraction '(0 - 1)' = { discipline = 192 ; @@ -14110,6 +13992,24 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 194 ; } +#Emission mass flux from soil +'kg m**-2 s**-1' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 195 ; + } +#Emission mass flux from wild animals +'kg m**-2 s**-1' = { + localTablesVersion = 1 ; + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 196 ; + } #Aerosol negative fixer mass flux 'kg m**-2 s**-1' = { localTablesVersion = 1 ; @@ -16649,24 +16549,12 @@ parameterCategory = 140 ; parameterNumber = 233 ; } -#Mean direction of wind waves -'degrees' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 235 ; - } #Significant height of total swell 'm' = { discipline = 192 ; parameterCategory = 140 ; parameterNumber = 237 ; } -#Mean direction of total swell -'degrees' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 238 ; - } #Mean period of total swell 's' = { discipline = 192 ; @@ -16739,12 +16627,6 @@ parameterCategory = 140 ; parameterNumber = 250 ; } -#2D wave spectra (single) -'m**2 s radian**-1' = { - discipline = 192 ; - parameterCategory = 140 ; - parameterNumber = 251 ; - } #Wave spectral kurtosis 'dimensionless' = { discipline = 192 ; @@ -17489,12 +17371,6 @@ parameterCategory = 160 ; parameterNumber = 184 ; } -#Skin reservoir content -'kg m**-2' = { - discipline = 192 ; - parameterCategory = 160 ; - parameterNumber = 198 ; - } #Percentage of vegetation '%' = { discipline = 192 ; @@ -17711,24 +17587,12 @@ parameterCategory = 162 ; parameterNumber = 51 ; } -#Vertical integral of mass of atmosphere -'kg m**-2' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 53 ; - } #Vertical integral of temperature 'K kg m**-2' = { discipline = 192 ; parameterCategory = 162 ; parameterNumber = 54 ; } -#Vertical integral of water vapour -'kg m**-2' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 55 ; - } #Vertical integral of cloud liquid water 'kg m**-2' = { discipline = 192 ; @@ -17747,36 +17611,6 @@ parameterCategory = 162 ; parameterNumber = 58 ; } -#Vertical integral of kinetic energy -'J m**-2' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 59 ; - } -#Vertical integral of thermal energy -'J m**-2' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 60 ; - } -#Vertical integral of potential+internal energy -'J m**-2' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 61 ; - } -#Vertical integral of potential+internal+latent energy -'J m**-2' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 62 ; - } -#Vertical integral of total energy -'J m**-2' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 63 ; - } #Vertical integral of energy conversion 'W m**-2' = { discipline = 192 ; @@ -17807,18 +17641,6 @@ parameterCategory = 162 ; parameterNumber = 68 ; } -#Vertical integral of eastward heat flux -'W m**-1' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 69 ; - } -#Vertical integral of northward heat flux -'W m**-1' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 70 ; - } #Vertical integral of eastward geopotential flux 'W m**-1' = { discipline = 192 ; @@ -17873,12 +17695,6 @@ parameterCategory = 162 ; parameterNumber = 83 ; } -#Vertical integral of divergence of moisture flux -'kg m**-2 s**-1' = { - discipline = 192 ; - parameterCategory = 162 ; - parameterNumber = 84 ; - } #Vertical integral of divergence of geopotential flux 'W m**-2' = { discipline = 192 ; @@ -19703,12 +19519,6 @@ parameterCategory = 174 ; parameterNumber = 6 ; } -#Sub-surface runoff -'kg m**-2' = { - discipline = 192 ; - parameterCategory = 174 ; - parameterNumber = 9 ; - } #Fraction of sea-ice in sea '(0 - 1)' = { discipline = 192 ; @@ -22175,48 +21985,6 @@ parameterCategory = 228 ; parameterNumber = 6 ; } -#Minimum vertical gradient of refractivity inside trapping layer -'m**-1' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 15 ; - } -#Mean vertical gradient of refractivity inside trapping layer -'m**-1' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 16 ; - } -#Duct base height -'m' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 17 ; - } -#Trapping layer base height -'m' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 18 ; - } -#Trapping layer top height -'m' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 19 ; - } -#Neutral wind at 10 m u-component -'m s**-1' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 131 ; - } -#Neutral wind at 10 m v-component -'m s**-1' = { - discipline = 192 ; - parameterCategory = 228 ; - parameterNumber = 132 ; - } #Surface temperature significance '%' = { discipline = 192 ; diff --git a/definitions/grib2/localConcepts/ecmf/units.legacy.def b/definitions/grib2/localConcepts/ecmf/units.legacy.def index e9138419d..205fa02fb 100644 --- a/definitions/grib2/localConcepts/ecmf/units.legacy.def +++ b/definitions/grib2/localConcepts/ecmf/units.legacy.def @@ -616,3 +616,354 @@ parameterCategory = 228 ; parameterNumber = 28 ; } +#Forecast albedo +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 243 ; +} +#Forecast surface roughness +'m' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 244 ; +} +#Flux of Carbon Dioxide Net Ecosystem Exchange +'kg m**-2 s**-1' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 195 ; +} +#Accumulated Carbon Dioxide Net Ecosystem Exchange +'kg m**-2' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 192 ; + typeOfStatisticalProcessing = 1 ; +} +#Flux of Carbon Dioxide Gross Primary Production +'kg m**-2 s**-1' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 197 ; +} +#Accumulated Carbon Dioxide Gross Primary Production +'kg m**-2' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 193 ; + typeOfStatisticalProcessing = 1 ; +} +#Flux of Carbon Dioxide Ecosystem Respiration +'kg m**-2 s**-1' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 196 ; +} +#Accumulated Carbon Dioxide Ecosystem Respiration +'kg m**-2' = { + localTablesVersion = 1 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 194 ; + typeOfStatisticalProcessing = 1 ; +} +#Albedo (climatological) +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 174 ; +} +#UV visible albedo for direct radiation (climatological) +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 15 ; +} +#UV visible albedo for diffuse radiation (climatological) +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 16 ; +} +#Near IR albedo for direct radiation (climatological) +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 17 ; +} +#Near IR albedo for diffuse radiation (climatological) +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 18 ; +} +#Standard deviation of filtered subgrid orography (climatological) +'m' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 74 ; +} +#Logarithm of surface roughness length for heat (climatological) +'~' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 234 ; +} +#UV visible albedo for direct radiation, isotropic component (climatological) +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 186 ; +} +#UV visible albedo for direct radiation, volumetric component (climatological) +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 187 ; +} +#UV visible albedo for direct radiation, geometric component (climatological) +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 188 ; +} +#Near IR albedo for direct radiation, isotropic component (climatological) +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 189 ; +} +#Near IR albedo for direct radiation, volumetric component (climatological) +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 190 ; +} +#Near IR albedo for direct radiation, geometric component (climatological) +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 210 ; + parameterNumber = 191 ; +} +#Vertically integrated moisture divergence +'kg m**-2' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 213 ; +} +#Vertically integrated moisture divergence flux +'kg m**-2 s**-1' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 84 ; +} +#Forecast logarithm of surface roughness for heat +'Numeric' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 245 ; +} +#U-component of neutral wind +'m s**-1' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 131 ; +} +#V-component of neutral wind +'m s**-1' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 132 ; +} +#Magnitude of turbulent surface stress +'N m**-2 s' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 48 ; +} +#Vertical integral of mass of atmosphere +'kg m**-2' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 53 ; +} +#Height of zero-degree wet-bulb temperature +'m' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 47 ; +} +#Height of one-degree wet-bulb temperature +'m' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 48 ; +} +#Surface photosynthetically active radiation, clear sky +'J m**-2' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 20 ; +} +#Surface direct short-wave radiation, clear sky +'J m**-2' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 22 ; +} +#Duct base height +'m' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 17 ; +} +#Trapping layer base height +'m' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 18 ; +} +#Trapping layer top height +'m' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 19 ; +} +#Mean vertical gradient of refractivity inside trapping layer +'m**-1' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 16 ; +} +#Minimum vertical gradient of refractivity inside trapping layer +'m**-1' = { + discipline = 192 ; + parameterCategory = 228 ; + parameterNumber = 15 ; +} +#Vertical integral of eastward heat flux +'W m**-1' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 69 ; +} +#Vertical integral of northward heat flux +'W m**-1' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 70 ; +} +#Vertical integral of potential+internal+latent energy +'J m**-2' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 62 ; +} +#Skin reservoir content +'m of water equivalent' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 198 ; +} +#Skin reservoir content +'kg m**-2' = { + discipline = 192 ; + parameterCategory = 160 ; + parameterNumber = 198 ; +} +#Sub-surface runoff +'m' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 9 ; +} +#Low vegetation cover +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 27 ; +} +#High vegetation cover +'(0 - 1)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 28 ; +} +#Leaf area index, low vegetation +'m**2 m**-2' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 66 ; +} +#Leaf area index, high vegetation +'m**2 m**-2' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 67 ; +} +#Type of low vegetation +'(code table 4.234)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 29 ; +} +#Type of high vegetation +'(code table 4.234)' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 30 ; +} +#Mean direction of total swell +'degrees' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 238 ; +} +#Mean direction of wind waves +'degrees' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 235 ; +} +#Charnock +'Numeric' = { + discipline = 192 ; + parameterCategory = 128 ; + parameterNumber = 148 ; +} +#2D wave spectra (single) +'m**2 s radian**-1' = { + discipline = 192 ; + parameterCategory = 140 ; + parameterNumber = 251 ; +} +#Vertical integral of thermal energy +'J m**-2' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 60 ; +} +#Vertical integral of potential+internal energy +'J m**-2' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 61 ; +} +#Vertical integral of kinetic energy +'J m**-2' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 59 ; +} +#Vertical integral of total energy +'J m**-2' = { + discipline = 192 ; + parameterCategory = 162 ; + parameterNumber = 63 ; +} diff --git a/definitions/grib2/localConcepts/era6/name.def b/definitions/grib2/localConcepts/era6/name.def new file mode 100644 index 000000000..7a0ddd401 --- /dev/null +++ b/definitions/grib2/localConcepts/era6/name.def @@ -0,0 +1,123 @@ +# Automatically generated by ./create_def.pl, do not edit +#Accumulated Carbon Dioxide Net Ecosystem Exchange +'Accumulated Carbon Dioxide Net Ecosystem Exchange' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Accumulated Carbon Dioxide Gross Primary Production +'Accumulated Carbon Dioxide Gross Primary Production' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Accumulated Carbon Dioxide Ecosystem Respiration +'Accumulated Carbon Dioxide Ecosystem Respiration' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Flux of Carbon Dioxide Net Ecosystem Exchange +'Flux of Carbon Dioxide Net Ecosystem Exchange' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + constituentType = 3 ; + is_chemical = 1 ; + } +#Flux of Carbon Dioxide Gross Primary Production +'Flux of Carbon Dioxide Gross Primary Production' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + constituentType = 3 ; + is_chemical = 1 ; + } +#Flux of Carbon Dioxide Ecosystem Respiration +'Flux of Carbon Dioxide Ecosystem Respiration' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + constituentType = 3 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated eastward ozone flux +'Time integrated, vertically integrated eastward ozone flux' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 78 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated northward ozone flux +'Time integrated, vertically integrated northward ozone flux' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 79 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated divergence of ozone flux +'Time integrated, vertically integrated divergence of ozone flux' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 80 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated net source of ozone +'Time integrated, vertically integrated net source of ozone' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 81 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Mean carbon dioxide net ecosystem exchange flux +'Mean carbon dioxide net ecosystem exchange flux' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 0 ; + is_chemical = 1 ; + } +#Mean carbon dioxide gross primary production flux +'Mean carbon dioxide gross primary production flux' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 0 ; + is_chemical = 1 ; + } +#Mean carbon dioxide ecosystem respiration flux +'Mean carbon dioxide ecosystem respiration flux' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 0 ; + is_chemical = 1 ; +} diff --git a/definitions/grib2/localConcepts/era6/paramId.def b/definitions/grib2/localConcepts/era6/paramId.def new file mode 100644 index 000000000..d8bafd40e --- /dev/null +++ b/definitions/grib2/localConcepts/era6/paramId.def @@ -0,0 +1,123 @@ +# Automatically generated by ./create_def.pl, do not edit +#Accumulated Carbon Dioxide Net Ecosystem Exchange +'228080' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Accumulated Carbon Dioxide Gross Primary Production +'228081' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Accumulated Carbon Dioxide Ecosystem Respiration +'228082' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Flux of Carbon Dioxide Net Ecosystem Exchange +'228083' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + constituentType = 3 ; + is_chemical = 1 ; + } +#Flux of Carbon Dioxide Gross Primary Production +'228084' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + constituentType = 3 ; + is_chemical = 1 ; + } +#Flux of Carbon Dioxide Ecosystem Respiration +'228085' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + constituentType = 3 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated eastward ozone flux +'233032' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 78 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated northward ozone flux +'233033' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 79 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated divergence of ozone flux +'233034' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 80 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated net source of ozone +'233035' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 81 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Mean carbon dioxide net ecosystem exchange flux +'235062' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 0 ; + is_chemical = 1 ; + } +#Mean carbon dioxide gross primary production flux +'235063' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 0 ; + is_chemical = 1 ; + } +#Mean carbon dioxide ecosystem respiration flux +'235064' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 0 ; + is_chemical = 1 ; +} diff --git a/definitions/grib2/localConcepts/era6/shortName.def b/definitions/grib2/localConcepts/era6/shortName.def new file mode 100644 index 000000000..fb08d337b --- /dev/null +++ b/definitions/grib2/localConcepts/era6/shortName.def @@ -0,0 +1,123 @@ +# Automatically generated by ./create_def.pl, do not edit +#Accumulated Carbon Dioxide Net Ecosystem Exchange +'aco2nee' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Accumulated Carbon Dioxide Gross Primary Production +'aco2gpp' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Accumulated Carbon Dioxide Ecosystem Respiration +'aco2rec' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Flux of Carbon Dioxide Net Ecosystem Exchange +'fco2nee' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + constituentType = 3 ; + is_chemical = 1 ; + } +#Flux of Carbon Dioxide Gross Primary Production +'fco2gpp' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + constituentType = 3 ; + is_chemical = 1 ; + } +#Flux of Carbon Dioxide Ecosystem Respiration +'fco2rec' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + constituentType = 3 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated eastward ozone flux +'tvioze' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 78 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated northward ozone flux +'tviozn' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 79 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated divergence of ozone flux +'tviozd' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 80 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated net source of ozone +'tvions' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 81 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Mean carbon dioxide net ecosystem exchange flux +'mcdneef' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 0 ; + is_chemical = 1 ; + } +#Mean carbon dioxide gross primary production flux +'mcdgppf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 0 ; + is_chemical = 1 ; + } +#Mean carbon dioxide ecosystem respiration flux +'mcderf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 0 ; + is_chemical = 1 ; +} diff --git a/definitions/grib2/localConcepts/era6/units.def b/definitions/grib2/localConcepts/era6/units.def new file mode 100644 index 000000000..299d44782 --- /dev/null +++ b/definitions/grib2/localConcepts/era6/units.def @@ -0,0 +1,123 @@ +# Automatically generated by ./create_def.pl, do not edit +#Accumulated Carbon Dioxide Net Ecosystem Exchange +'kg m**-2' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Accumulated Carbon Dioxide Gross Primary Production +'kg m**-2' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Accumulated Carbon Dioxide Ecosystem Respiration +'kg m**-2' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Flux of Carbon Dioxide Net Ecosystem Exchange +'kg m**-2 s**-1' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + constituentType = 3 ; + is_chemical = 1 ; + } +#Flux of Carbon Dioxide Gross Primary Production +'kg m**-2 s**-1' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + constituentType = 3 ; + is_chemical = 1 ; + } +#Flux of Carbon Dioxide Ecosystem Respiration +'kg m**-2 s**-1' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + constituentType = 3 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated eastward ozone flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 78 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated northward ozone flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 79 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated divergence of ozone flux +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 80 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Time integrated, vertically integrated net source of ozone +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 81 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + constituentType = 0 ; + typeOfStatisticalProcessing = 1 ; + is_chemical = 1 ; + } +#Mean carbon dioxide net ecosystem exchange flux +'kg m**-2 s**-1' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 0 ; + is_chemical = 1 ; + } +#Mean carbon dioxide gross primary production flux +'kg m**-2 s**-1' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 0 ; + is_chemical = 1 ; + } +#Mean carbon dioxide ecosystem respiration flux +'kg m**-2 s**-1' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + constituentType = 3 ; + typeOfStatisticalProcessing = 0 ; + is_chemical = 1 ; +} diff --git a/definitions/grib2/localConcepts/kwbc/name.def b/definitions/grib2/localConcepts/kwbc/name.def index 3afad81b8..2f6a1c3be 100644 --- a/definitions/grib2/localConcepts/kwbc/name.def +++ b/definitions/grib2/localConcepts/kwbc/name.def @@ -173,8 +173,8 @@ parameterCategory = 4 ; parameterNumber = 193 ; } -#UV index -'UV index ' = { +#UV index +'UV index' = { discipline = 0 ; parameterCategory = 7 ; parameterNumber = 196 ; diff --git a/definitions/grib2/localConcepts/kwbc/paramId.def b/definitions/grib2/localConcepts/kwbc/paramId.def index 02115d105..8add9d28a 100644 --- a/definitions/grib2/localConcepts/kwbc/paramId.def +++ b/definitions/grib2/localConcepts/kwbc/paramId.def @@ -173,7 +173,7 @@ parameterCategory = 4 ; parameterNumber = 193 ; } -#UV index +#UV index '260094' = { discipline = 0 ; parameterCategory = 7 ; diff --git a/definitions/grib2/localConcepts/kwbc/shortName.def b/definitions/grib2/localConcepts/kwbc/shortName.def index 5e9f0732c..9c925f00e 100644 --- a/definitions/grib2/localConcepts/kwbc/shortName.def +++ b/definitions/grib2/localConcepts/kwbc/shortName.def @@ -173,7 +173,7 @@ parameterCategory = 4 ; parameterNumber = 193 ; } -#UV index +#UV index 'uvi' = { discipline = 0 ; parameterCategory = 7 ; diff --git a/definitions/grib2/localConcepts/kwbc/units.def b/definitions/grib2/localConcepts/kwbc/units.def index e322ed2ad..fbfbcc739 100644 --- a/definitions/grib2/localConcepts/kwbc/units.def +++ b/definitions/grib2/localConcepts/kwbc/units.def @@ -173,7 +173,7 @@ parameterCategory = 4 ; parameterNumber = 193 ; } -#UV index +#UV index 'Numeric' = { discipline = 0 ; parameterCategory = 7 ; @@ -1590,7 +1590,7 @@ parameterNumber = 196 ; } #Ocean Heat Content -'Jm-2' = { +'J m**-2' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 197 ; diff --git a/definitions/grib2/localConcepts/uerra/cfName.def b/definitions/grib2/localConcepts/uerra/cfName.def index da6158130..af74be9c9 100644 --- a/definitions/grib2/localConcepts/uerra/cfName.def +++ b/definitions/grib2/localConcepts/uerra/cfName.def @@ -1,4 +1,19 @@ # Automatically generated by ./create_def.pl, do not edit +#Surface roughness (climatological) +'surface_roughness_length' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + } +#Top net short-wave (solar) radiation +'toa_net_upward_shortwave_flux' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Sea-ice thickness 'sea_ice_thickness' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/uerra/cfVarName.def b/definitions/grib2/localConcepts/uerra/cfVarName.def index 997197396..d18461817 100644 --- a/definitions/grib2/localConcepts/uerra/cfVarName.def +++ b/definitions/grib2/localConcepts/uerra/cfVarName.def @@ -61,6 +61,21 @@ scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; } +#Surface roughness (climatological) +'sr' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + } +#Top net short-wave (solar) radiation +'tsr' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Maximum temperature at 2 metres since previous post-processing 'mx2t' = { discipline = 0 ; @@ -186,6 +201,12 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } +#Snowmelt +'snom' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 16 ; + } #Sea-ice thickness 'sithick' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/uerra/name.def b/definitions/grib2/localConcepts/uerra/name.def index 4075202ba..330d3e841 100644 --- a/definitions/grib2/localConcepts/uerra/name.def +++ b/definitions/grib2/localConcepts/uerra/name.def @@ -61,6 +61,21 @@ scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; } +#Surface roughness (climatological) +'Surface roughness (climatological)' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + } +#Top net short-wave (solar) radiation +'Top net short-wave (solar) radiation' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Maximum temperature at 2 metres since previous post-processing 'Maximum temperature at 2 metres since previous post-processing' = { discipline = 0 ; @@ -186,6 +201,12 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } +#Snowmelt +'Snowmelt' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 16 ; + } #Sea-ice thickness 'Sea-ice thickness' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/uerra/paramId.def b/definitions/grib2/localConcepts/uerra/paramId.def index deae813b8..7e4f5941e 100644 --- a/definitions/grib2/localConcepts/uerra/paramId.def +++ b/definitions/grib2/localConcepts/uerra/paramId.def @@ -61,6 +61,21 @@ scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; } +#Surface roughness (climatological) +'173' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + } +#Top net short-wave (solar) radiation +'178' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Maximum temperature at 2 metres since previous post-processing '201' = { discipline = 0 ; @@ -186,6 +201,12 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } +#Snowmelt +'3099' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 16 ; + } #Sea-ice thickness '174098' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/uerra/shortName.def b/definitions/grib2/localConcepts/uerra/shortName.def index 735a053df..95eed7a09 100644 --- a/definitions/grib2/localConcepts/uerra/shortName.def +++ b/definitions/grib2/localConcepts/uerra/shortName.def @@ -61,6 +61,21 @@ scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; } +#Surface roughness (climatological) +'sr' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + } +#Top net short-wave (solar) radiation +'tsr' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Maximum temperature at 2 metres since previous post-processing 'mx2t' = { discipline = 0 ; @@ -186,6 +201,12 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } +#Snowmelt +'snom' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 16 ; + } #Sea-ice thickness 'sithick' = { discipline = 10 ; diff --git a/definitions/grib2/localConcepts/uerra/units.def b/definitions/grib2/localConcepts/uerra/units.def index 4396e0933..2766aadab 100644 --- a/definitions/grib2/localConcepts/uerra/units.def +++ b/definitions/grib2/localConcepts/uerra/units.def @@ -61,6 +61,21 @@ scaledValueOfFirstFixedSurface = 15 ; scaleFactorOfFirstFixedSurface = 1 ; } +#Surface roughness (climatological) +'m' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + } +#Top net short-wave (solar) radiation +'J m**-2' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Maximum temperature at 2 metres since previous post-processing 'K' = { discipline = 0 ; @@ -186,6 +201,12 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } +#Snowmelt +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 16 ; + } #Sea-ice thickness 'm' = { discipline = 10 ; diff --git a/definitions/grib2/name.def b/definitions/grib2/name.def index 3c6d23577..563d05ebc 100644 --- a/definitions/grib2/name.def +++ b/definitions/grib2/name.def @@ -113,6 +113,14 @@ parameterCategory = 2 ; parameterNumber = 1 ; } +#Surface photosynthetically active radiation, clear sky +'Surface photosynthetically active radiation, clear sky' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Unbalanced component of temperature 'Unbalanced component of temperature' = { discipline = 0 ; @@ -131,6 +139,30 @@ parameterCategory = 2 ; parameterNumber = 45 ; } +#Low vegetation cover +'Low vegetation cover' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 53 ; + } +#High vegetation cover +'High vegetation cover' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 54 ; + } +#Type of low vegetation +'Type of low vegetation' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 57 ; + } +#Type of high vegetation +'Type of high vegetation' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 58 ; + } #Sea ice area fraction 'Sea ice area fraction' = { discipline = 10 ; @@ -166,6 +198,14 @@ typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; } +#Magnitude of turbulent surface stress +'Magnitude of turbulent surface stress' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 58 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Large-scale precipitation fraction 'Large-scale precipitation fraction' = { discipline = 0 ; @@ -190,6 +230,25 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Leaf area index, low vegetation +'Leaf area index, low vegetation' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 55 ; + } +#Leaf area index, high vegetation +'Leaf area index, high vegetation' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 56 ; + } +#Standard deviation of filtered subgrid orography (climatological) +'Standard deviation of filtered subgrid orography (climatological)' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 38 ; + typeOfGeneratingProcess = 9 ; + } #Specific rain water content 'Specific rain water content' = { discipline = 0 ; @@ -239,6 +298,12 @@ parameterNumber = 20 ; typeOfStatisticalProcessing = 1 ; } +#Charnock +'Charnock' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 76 ; + } #Boundary layer height 'Boundary layer height' = { discipline = 0 ; @@ -253,6 +318,14 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Surface roughness (climatological) +'Surface roughness (climatological)' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfGeneratingProcess = 9 ; + } #Surface long-wave (thermal) radiation downwards 'Surface long-wave (thermal) radiation downwards' = { discipline = 0 ; @@ -265,7 +338,7 @@ 'Top net short-wave (solar) radiation' = { discipline = 0 ; parameterCategory = 4 ; - parameterNumber = 1 ; + parameterNumber = 9 ; typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } @@ -314,16 +387,16 @@ parameterCategory = 14 ; parameterNumber = 1 ; } -#Top net solar radiation, clear sky -'Top net solar radiation, clear sky' = { +#Top net short-wave (solar) radiation, clear sky +'Top net short-wave (solar) radiation, clear sky' = { discipline = 0 ; parameterCategory = 4 ; parameterNumber = 11 ; typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } -#Top net thermal radiation, clear sky -'Top net thermal radiation, clear sky' = { +#Top net long-wave (thermal) radiation, clear sky +'Top net long-wave (thermal) radiation, clear sky' = { discipline = 0 ; parameterCategory = 5 ; parameterNumber = 6 ; @@ -346,14 +419,21 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#TOA incident solar radiation -'TOA incident solar radiation' = { +#TOA incident short-wave (solar) radiation +'TOA incident short-wave (solar) radiation' = { discipline = 0 ; parameterCategory = 4 ; parameterNumber = 7 ; typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } +#Vertically integrated moisture divergence +'Vertically integrated moisture divergence' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + typeOfStatisticalProcessing = 1 ; + } #Instantaneous eastward turbulent surface stress 'Instantaneous eastward turbulent surface stress' = { discipline = 0 ; @@ -382,12 +462,34 @@ parameterNumber = 79 ; typeOfFirstFixedSurface = 1 ; } +#Logarithm of surface roughness length for heat (climatological) +'Logarithm of surface roughness length for heat (climatological)' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 54 ; + typeOfFirstFixedSurface = 1 ; + typeOfGeneratingProcess = 9 ; + } #Temperature of snow layer 'Temperature of snow layer' = { discipline = 2 ; parameterCategory = 3 ; parameterNumber = 28 ; } +#Forecast surface roughness +'Forecast surface roughness' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + } +#Forecast logarithm of surface roughness for heat +'Forecast logarithm of surface roughness for heat' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 54 ; + typeOfFirstFixedSurface = 1 ; + } #Specific cloud liquid water content 'Specific cloud liquid water content' = { discipline = 0 ; @@ -406,8 +508,8 @@ parameterCategory = 6 ; parameterNumber = 32 ; } -#large scale precipitation -'large scale precipitation' = { +#Large-scale precipitation +'Large-scale precipitation' = { discipline = 0 ; parameterCategory = 1 ; parameterNumber = 54 ; @@ -542,6 +644,92 @@ scaleFactorOfLowerLimit = 0 ; probabilityType = 0 ; } +#Wave induced mean sea level correction +'Wave induced mean sea level correction' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 87 ; + } +#Ratio of wave angular and frequency width +'Ratio of wave angular and frequency width' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 80 ; + } +#Number of events in freak waves statistics +'Number of events in freak waves statistics' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 89 ; + } +#U-component of surface momentum flux into ocean +'U-component of surface momentum flux into ocean' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 90 ; + typeOfFirstFixedSurface = 1 ; + } +#V-component of surface momentum flux into ocean +'V-component of surface momentum flux into ocean' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 91 ; + typeOfFirstFixedSurface = 1 ; + } +#Wave turbulent energy flux into ocean +'Wave turbulent energy flux into ocean' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 92 ; + } +#Wave energy flux magnitude +'Wave energy flux magnitude' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 78 ; + } +#Wave energy flux mean direction +'Wave energy flux mean direction' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 79 ; + } +#Wave Spectral Skewness +'Wave Spectral Skewness' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 77 ; + } +#Free convective velocity over the oceans +'Free convective velocity over the oceans' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 81 ; + } +#Air density over the oceans +'Air density over the oceans' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 82 ; + } +#Normalized energy flux into waves +'Normalized energy flux into waves' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 83 ; + } +#Normalized energy flux into ocean +'Normalized energy flux into ocean' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 85 ; + } +#Normalized stress into ocean +'Normalized stress into ocean' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 84 ; + } #Mean sea water temperature in the upper 300 m 'Mean sea water temperature in the upper 300 m' = { discipline = 10 ; @@ -554,6 +742,14 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } +#Total column vertically-integrated water enthalpy +'Total column vertically-integrated water enthalpy' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #2 metre specific humidity '2 metre specific humidity' = { discipline = 0 ; @@ -612,6 +808,41 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } +#UV visible albedo for diffuse radiation (climatological) +'UV visible albedo for diffuse radiation (climatological)' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 55 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation (climatological) +'UV visible albedo for direct radiation (climatological)' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 56 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, geometric component (climatological) +'UV visible albedo for direct radiation, geometric component (climatological)' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 57 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, isotropic component (climatological) +'UV visible albedo for direct radiation, isotropic component (climatological)' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 58 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, volumetric component (climatological) +'UV visible albedo for direct radiation, volumetric component (climatological)' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 59 ; + typeOfGeneratingProcess = 9 ; + } #Ammonium aerosol mass mixing ratio 'Ammonium aerosol mass mixing ratio' = { discipline = 0 ; @@ -660,6 +891,41 @@ aerosolType = 62033 ; is_aerosol = 1 ; } +#Near IR albedo for diffuse radiation (climatological) +'Near IR albedo for diffuse radiation (climatological)' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 9 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation (climatological) +'Near IR albedo for direct radiation (climatological)' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 10 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, geometric component (climatological) +'Near IR albedo for direct radiation, geometric component (climatological)' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 11 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, isotropic component (climatological) +'Near IR albedo for direct radiation, isotropic component (climatological)' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 12 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, volumetric component (climatological) +'Near IR albedo for direct radiation, volumetric component (climatological)' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 13 ; + typeOfGeneratingProcess = 9 ; + } #Volcanic sulfur dioxide mass mixing ratio increment 'Volcanic sulfur dioxide mass mixing ratio increment' = { discipline = 0 ; @@ -920,8 +1186,8 @@ constituentType = 60057 ; is_chemical = 1 ; } -#Column integrated mass density of Volcanic sulfur dioxide -'Column integrated mass density of Volcanic sulfur dioxide ' = { +#Column integrated mass density of Volcanic sulfur dioxide +'Column integrated mass density of Volcanic sulfur dioxide' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 1 ; @@ -929,80 +1195,80 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } -#Column integrated mass density of Aromatic peroxy radical -'Column integrated mass density of Aromatic peroxy radical ' = { +#Column integrated mass density of Aromatic peroxy radical +'Column integrated mass density of Aromatic peroxy radical' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 1 ; constituentType = 60029 ; is_chemical = 1 ; } -#Column integrated mass density of Ethyne -'Column integrated mass density of Ethyne ' = { +#Column integrated mass density of Ethyne +'Column integrated mass density of Ethyne' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 1 ; constituentType = 10010 ; is_chemical = 1 ; } -#Column integrated mass density of Acetonitrile -'Column integrated mass density of Acetonitrile ' = { +#Column integrated mass density of Acetonitrile +'Column integrated mass density of Acetonitrile' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 1 ; constituentType = 10007 ; is_chemical = 1 ; } -#Column integrated mass density of Methyl peroxy nitrate -'Column integrated mass density of Methyl peroxy nitrate ' = { +#Column integrated mass density of Methyl peroxy nitrate +'Column integrated mass density of Methyl peroxy nitrate' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 1 ; constituentType = 10055 ; is_chemical = 1 ; } -#Column integrated mass density of Hydrogen cyanide -'Column integrated mass density of Hydrogen cyanide ' = { +#Column integrated mass density of Hydrogen cyanide +'Column integrated mass density of Hydrogen cyanide' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 1 ; constituentType = 10006 ; is_chemical = 1 ; } -#Column integrated mass density of Hydroperoxy aldehydes type 1 -'Column integrated mass density of Hydroperoxy aldehydes type 1 ' = { +#Column integrated mass density of Hydroperoxy aldehydes type 1 +'Column integrated mass density of Hydroperoxy aldehydes type 1' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 1 ; constituentType = 60058 ; is_chemical = 1 ; } -#Column integrated mass density of Hydroperoxy aldehydes type 2 -'Column integrated mass density of Hydroperoxy aldehydes type 2 ' = { +#Column integrated mass density of Hydroperoxy aldehydes type 2 +'Column integrated mass density of Hydroperoxy aldehydes type 2' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 1 ; constituentType = 60059 ; is_chemical = 1 ; } -#Column integrated mass density of Isoprene peroxy type B -'Column integrated mass density of Isoprene peroxy type B ' = { +#Column integrated mass density of Isoprene peroxy type B +'Column integrated mass density of Isoprene peroxy type B' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 1 ; constituentType = 60056 ; is_chemical = 1 ; } -#Column integrated mass density of Isoprene peroxy type D -'Column integrated mass density of Isoprene peroxy type D ' = { +#Column integrated mass density of Isoprene peroxy type D +'Column integrated mass density of Isoprene peroxy type D' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 1 ; constituentType = 60057 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Volcanic sulfur dioxide -'Atmosphere emission mass flux of Volcanic sulfur dioxide ' = { +#Atmosphere emission mass flux of Volcanic sulfur dioxide +'Atmosphere emission mass flux of Volcanic sulfur dioxide' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 3 ; @@ -1010,80 +1276,80 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } -#Atmosphere emission mass flux of Aromatic peroxy radical -'Atmosphere emission mass flux of Aromatic peroxy radical ' = { +#Atmosphere emission mass flux of Aromatic peroxy radical +'Atmosphere emission mass flux of Aromatic peroxy radical' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 3 ; constituentType = 60029 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Ethyne -'Atmosphere emission mass flux of Ethyne ' = { +#Atmosphere emission mass flux of Ethyne +'Atmosphere emission mass flux of Ethyne' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 3 ; constituentType = 10010 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Acetonitrile -'Atmosphere emission mass flux of Acetonitrile ' = { +#Atmosphere emission mass flux of Acetonitrile +'Atmosphere emission mass flux of Acetonitrile' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 3 ; constituentType = 10007 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Methyl peroxy nitrate -'Atmosphere emission mass flux of Methyl peroxy nitrate ' = { +#Atmosphere emission mass flux of Methyl peroxy nitrate +'Atmosphere emission mass flux of Methyl peroxy nitrate' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 3 ; constituentType = 10055 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Hydrogen cyanide -'Atmosphere emission mass flux of Hydrogen cyanide ' = { +#Atmosphere emission mass flux of Hydrogen cyanide +'Atmosphere emission mass flux of Hydrogen cyanide' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 3 ; constituentType = 10006 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Hydroperoxy aldehydes type 1 -'Atmosphere emission mass flux of Hydroperoxy aldehydes type 1 ' = { +#Atmosphere emission mass flux of Hydroperoxy aldehydes type 1 +'Atmosphere emission mass flux of Hydroperoxy aldehydes type 1' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 3 ; constituentType = 60058 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Hydroperoxy aldehydes type 2 -'Atmosphere emission mass flux of Hydroperoxy aldehydes type 2 ' = { +#Atmosphere emission mass flux of Hydroperoxy aldehydes type 2 +'Atmosphere emission mass flux of Hydroperoxy aldehydes type 2' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 3 ; constituentType = 60059 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Isoprene peroxy type B -'Atmosphere emission mass flux of Isoprene peroxy type B ' = { +#Atmosphere emission mass flux of Isoprene peroxy type B +'Atmosphere emission mass flux of Isoprene peroxy type B' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 3 ; constituentType = 60056 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Isoprene peroxy type D -'Atmosphere emission mass flux of Isoprene peroxy type D ' = { +#Atmosphere emission mass flux of Isoprene peroxy type D +'Atmosphere emission mass flux of Isoprene peroxy type D' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 3 ; constituentType = 60057 ; is_chemical = 1 ; } -#Dry deposition velocity of Volcanic sulfur dioxide -'Dry deposition velocity of Volcanic sulfur dioxide ' = { +#Dry deposition velocity of Volcanic sulfur dioxide +'Dry deposition velocity of Volcanic sulfur dioxide' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 15 ; @@ -1091,72 +1357,72 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } -#Dry deposition velocity of Aromatic peroxy radical -'Dry deposition velocity of Aromatic peroxy radical ' = { +#Dry deposition velocity of Aromatic peroxy radical +'Dry deposition velocity of Aromatic peroxy radical' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 15 ; constituentType = 60029 ; is_chemical = 1 ; } -#Dry deposition velocity of Ethyne -'Dry deposition velocity of Ethyne ' = { +#Dry deposition velocity of Ethyne +'Dry deposition velocity of Ethyne' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 15 ; constituentType = 10010 ; is_chemical = 1 ; } -#Dry deposition velocity of Acetonitrile -'Dry deposition velocity of Acetonitrile ' = { +#Dry deposition velocity of Acetonitrile +'Dry deposition velocity of Acetonitrile' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 15 ; constituentType = 10007 ; is_chemical = 1 ; } -#Dry deposition velocity of Methyl peroxy nitrate -'Dry deposition velocity of Methyl peroxy nitrate ' = { +#Dry deposition velocity of Methyl peroxy nitrate +'Dry deposition velocity of Methyl peroxy nitrate' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 15 ; constituentType = 10055 ; is_chemical = 1 ; } -#Dry deposition velocity of Hydrogen cyanide -'Dry deposition velocity of Hydrogen cyanide ' = { +#Dry deposition velocity of Hydrogen cyanide +'Dry deposition velocity of Hydrogen cyanide' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 15 ; constituentType = 10006 ; is_chemical = 1 ; } -#Dry deposition velocity of Hydroperoxy aldehydes type 1 -'Dry deposition velocity of Hydroperoxy aldehydes type 1 ' = { +#Dry deposition velocity of Hydroperoxy aldehydes type 1 +'Dry deposition velocity of Hydroperoxy aldehydes type 1' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 15 ; constituentType = 60058 ; is_chemical = 1 ; } -#Dry deposition velocity of Hydroperoxy aldehydes type 2 -'Dry deposition velocity of Hydroperoxy aldehydes type 2 ' = { +#Dry deposition velocity of Hydroperoxy aldehydes type 2 +'Dry deposition velocity of Hydroperoxy aldehydes type 2' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 15 ; constituentType = 60059 ; is_chemical = 1 ; } -#Dry deposition velocity of Isoprene peroxy type B -'Dry deposition velocity of Isoprene peroxy type B ' = { +#Dry deposition velocity of Isoprene peroxy type B +'Dry deposition velocity of Isoprene peroxy type B' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 15 ; constituentType = 60056 ; is_chemical = 1 ; } -#Dry deposition velocity of Isoprene peroxy type D -'Dry deposition velocity of Isoprene peroxy type D ' = { +#Dry deposition velocity of Isoprene peroxy type D +'Dry deposition velocity of Isoprene peroxy type D' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 15 ; @@ -1946,6 +2212,14 @@ scaledValueOfFirstFixedSurface = 26315 ; scaleFactorOfFirstFixedSurface = 2 ; } +#Surface direct short-wave radiation, clear sky +'Surface direct short-wave radiation, clear sky' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #0 degrees C isothermal level (atm) '0 degrees C isothermal level (atm)' = { discipline = 0 ; @@ -2051,6 +2325,18 @@ parameterCategory = 6 ; parameterNumber = 27 ; } +#Height of zero-degree wet-bulb temperature +'Height of zero-degree wet-bulb temperature' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 44 ; + } +#Height of one-degree wet-bulb temperature +'Height of one-degree wet-bulb temperature' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 45 ; + } #Instantaneous total lightning flash density 'Instantaneous total lightning flash density' = { discipline = 0 ; @@ -2175,6 +2461,14 @@ scaledValueOfSecondFixedSurface = 10 ; scaleFactorOfSecondFixedSurface = 1 ; } +#Total column supercooled liquid water +'Total column supercooled liquid water' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 167 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Total column rain water 'Total column rain water' = { discipline = 0 ; @@ -2230,6 +2524,16 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 10 ; } +#Accumulated mass emission of methane from Wetlands +'Accumulated mass emission of methane from Wetlands' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 3 ; + constituentType = 2 ; + typeOfStatisticalProcessing = 1 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 10 ; + } #Convective precipitation 'Convective precipitation' = { discipline = 0 ; @@ -2265,6 +2569,20 @@ parameterNumber = 77 ; typeOfFirstFixedSurface = 1 ; } +#Convective snowfall rate water equivalent +'Convective snowfall rate water equivalent' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 55 ; + typeOfFirstFixedSurface = 1 ; + } +#Large scale snowfall rate water equivalent +'Large scale snowfall rate water equivalent' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 56 ; + typeOfFirstFixedSurface = 1 ; + } #Mixed-layer CAPE in the lowest 50 hPa 'Mixed-layer CAPE in the lowest 50 hPa' = { discipline = 0 ; @@ -2480,6 +2798,379 @@ parameterCategory = 0 ; parameterNumber = 37 ; } +#Forecast logarithm of surface roughness length for moisture +'Forecast logarithm of surface roughness length for moisture' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 55 ; + typeOfFirstFixedSurface = 1 ; + } +#Surface runoff rate +'Surface runoff rate' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + } +#Surface runoff +'Surface runoff' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Sub-surface runoff rate +'Sub-surface runoff rate' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 52 ; + typeOfFirstFixedSurface = 1 ; + } +#Sub-surface runoff +'Sub-surface runoff' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 52 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Reflectance in 0.4 micron channel +'Reflectance in 0.4 micron channel' = { + discipline = 3 ; + parameterCategory = 1 ; + parameterNumber = 30 ; + } +#Burned area +'Burned area' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 3 ; + } +#Burning area +'Burning area' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 20 ; + } +#Burnable area +'Burnable area' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 21 ; + } +#Un-burnable area +'Un-burnable area' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 22 ; + } +#Fuel load +'Fuel load' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 23 ; + } +#Combustion completeness +'Combustion completeness' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 24 ; + } +#Fuel moisture content +'Fuel moisture content' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 25 ; + } +#Time-integrated total column vertically-integrated eastward geopotential flux +'Time-integrated total column vertically-integrated eastward geopotential flux' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 40 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward geopotential flux +'Time-integrated total column vertically-integrated northward geopotential flux' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 41 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of water geopotential flux +'Time-integrated total column vertically-integrated divergence of water geopotential flux' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 42 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of geopotential flux +'Time-integrated total column vertically-integrated divergence of geopotential flux' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 43 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward enthalpy flux +'Time-integrated total column vertically-integrated eastward enthalpy flux' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward enthalpy flux +'Time-integrated total column vertically-integrated northward enthalpy flux' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 6 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward kinetic energy flux +'Time-integrated total column vertically-integrated eastward kinetic energy flux' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 9 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward kinetic energy flux +'Time-integrated total column vertically-integrated northward kinetic energy flux' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 10 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward total energy flux +'Time-integrated total column vertically-integrated eastward total energy flux' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 11 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward total energy flux +'Time-integrated total column vertically-integrated northward total energy flux' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 12 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of enthalpy flux +'Time-integrated total column vertically-integrated divergence of enthalpy flux' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 13 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of kinetic energy flux +'Time-integrated total column vertically-integrated divergence of kinetic energy flux' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 16 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of total energy flux +'Time-integrated total column vertically-integrated divergence of total energy flux' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 17 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of water enthalpy flux +'Time-integrated total column vertically-integrated divergence of water enthalpy flux' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of mass flux +'Time integrated, vertically integrated divergence of mass flux' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 35 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward mass flux +'Time integrated, vertically integrated eastward mass flux' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 36 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward mass flux +'Time integrated, vertically integrated northward mass flux' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 37 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of water vapour flux +'Time integrated, vertically integrated divergence of water vapour flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 160 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of cloud liquid water flux +'Time integrated, vertically integrated divergence of cloud liquid water flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 161 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of cloud ice water flux +'Time integrated, vertically integrated divergence of cloud ice water flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 162 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of rain flux +'Time integrated, vertically integrated divergence of rain flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 163 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of snow flux +'Time integrated, vertically integrated divergence of snow flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 164 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward water vapour flux +'Time integrated, vertically integrated eastward water vapour flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 150 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward water vapour flux +'Time integrated, vertically integrated northward water vapour flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 151 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward cloud liquid water flux +'Time integrated, vertically integrated eastward cloud liquid water flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 152 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward cloud liquid water flux +'Time integrated, vertically integrated northward cloud liquid water flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 153 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward cloud ice water flux +'Time integrated, vertically integrated eastward cloud ice water flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 154 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward cloud ice water flux +'Time integrated, vertically integrated northward cloud ice water flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 155 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward rain flux +'Time integrated, vertically integrated eastward rain flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 156 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward rain flux +'Time integrated, vertically integrated northward rain flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 157 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward snow flux +'Time integrated, vertically integrated eastward snow flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 158 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward snow flux +'Time integrated, vertically integrated northward snow flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 159 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Mean temperature tendency due to short-wave radiation 'Mean temperature tendency due to short-wave radiation' = { discipline = 0 ; @@ -2614,6 +3305,36 @@ typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; } +#Mean surface photosynthetically active radiation flux, clear sky +'Mean surface photosynthetically active radiation flux, clear sky' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#Sunshine duration fraction +'Sunshine duration fraction' = { + discipline = 0 ; + parameterCategory = 6 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + } +#Mean vertically integrated moisture divergence +'Mean vertically integrated moisture divergence' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + typeOfStatisticalProcessing = 0 ; + } +#Mean surface direct short-wave radiation flux, clear sky +'Mean surface direct short-wave radiation flux, clear sky' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Time integral of surface latent heat sublimation flux 'Time integral of surface latent heat sublimation flux' = { discipline = 0 ; @@ -2836,6 +3557,14 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Total snowfall +'Total snowfall' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 57 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #2 metre relative humidity '2 metre relative humidity' = { discipline = 0 ; @@ -3600,8 +4329,8 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#X-component of sea ice velocity -'X-component of sea ice velocity' = { +#Eastward sea ice velocity +'Eastward sea ice velocity' = { discipline = 10 ; parameterCategory = 2 ; parameterNumber = 4 ; @@ -3612,8 +4341,8 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Y-component of sea ice velocity -'Y-component of sea ice velocity' = { +#Northward sea ice velocity +'Northward sea ice velocity' = { discipline = 10 ; parameterCategory = 2 ; parameterNumber = 5 ; @@ -3816,8 +4545,8 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Sea surface salinity -'Sea surface salinity' = { +#Sea surface practical salinity +'Sea surface practical salinity' = { discipline = 10 ; parameterCategory = 3 ; parameterNumber = 3 ; @@ -4032,8 +4761,8 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Vertically-integrated sea water practical salinity in the upper 300 m -'Vertically-integrated sea water practical salinity in the upper 300 m' = { +#Average sea water practical salinity in the upper 300 m +'Average sea water practical salinity in the upper 300 m' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -4044,8 +4773,8 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } -#Vertically-integrated sea water practical salinity in the upper 700 m -'Vertically-integrated sea water practical salinity in the upper 700 m' = { +#Average sea water practical salinity in the upper 700 m +'Average sea water practical salinity in the upper 700 m' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -4056,8 +4785,8 @@ scaledValueOfSecondFixedSurface = 700 ; scaleFactorOfSecondFixedSurface = 0 ; } -#Total column sea water practical salinity -'Total column sea water practical salinity' = { +#Total column average sea water practical salinity +'Total column average sea water practical salinity' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -4332,6 +5061,24 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } +#Sea surface height with inverse barometer correction +'Sea surface height with inverse barometer correction' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 20 ; + } +#Average sea water potential temperature in the upper 300m +'Average sea water potential temperature in the upper 300m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + } #Sea water practical salinity 'Sea water practical salinity' = { discipline = 10 ; @@ -4460,6 +5207,14 @@ typeOfFirstFixedSurface = 168 ; typeOfSecondFixedSurface = 168 ; } +#Sea water salinity +'Sea water salinity' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 168 ; + typeOfSecondFixedSurface = 168 ; + } #Net short wave radiation rate at sea surface 'Net short wave radiation rate at sea surface' = { discipline = 0 ; @@ -4606,8 +5361,8 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean X-component of sea ice velocity -'Time-mean X-component of sea ice velocity' = { +#Time-mean eastward sea ice velocity +'Time-mean eastward sea ice velocity' = { discipline = 10 ; parameterCategory = 2 ; parameterNumber = 4 ; @@ -4619,8 +5374,8 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean Y-component of sea ice velocity -'Time-mean Y-component of sea ice velocity' = { +#Time-mean northward sea ice velocity +'Time-mean northward sea ice velocity' = { discipline = 10 ; parameterCategory = 2 ; parameterNumber = 5 ; @@ -4840,8 +5595,8 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean sea surface salinity -'Time-mean sea surface salinity' = { +#Time-mean sea surface practical salinity +'Time-mean sea surface practical salinity' = { discipline = 10 ; parameterCategory = 3 ; parameterNumber = 3 ; @@ -5074,8 +5829,8 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean vertically-integrated sea water practical salinity in the upper 300 m -'Time-mean vertically-integrated sea water practical salinity in the upper 300 m' = { +#Time-mean average sea water practical salinity in the upper 300 m +'Time-mean average sea water practical salinity in the upper 300 m' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -5087,8 +5842,8 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } -#Time-mean vertically-integrated sea water practical salinity in the upper 700 m -'Time-mean vertically-integrated sea water practical salinity in the upper 700 m' = { +#Time-mean average sea water practical salinity in the upper 700 m +'Time-mean average sea water practical salinity in the upper 700 m' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -5100,8 +5855,8 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } -#Time-mean total column sea water practical salinity -'Time-mean total column sea water practical salinity' = { +#Time-mean total column average sea water practical salinity +'Time-mean total column average sea water practical salinity' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -5399,6 +6154,19 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } +#Time-mean average sea water potential temperature in the upper 300m +'Time-mean average sea water potential temperature in the upper 300m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } #Time-mean sea water practical salinity 'Time-mean sea water practical salinity' = { discipline = 10 ; @@ -5741,6 +6509,8 @@ discipline = 0 ; parameterCategory = 20 ; parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 255 ; } #Dry deposition velocity 'Dry deposition velocity' = { @@ -5944,6 +6714,112 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 10 ; } +#Net ecosystem exchange flux +'Net ecosystem exchange flux' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + } +#Mean net ecosystem exchange flux +'Mean net ecosystem exchange flux' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + typeOfStatisticalProcessing = 0 ; + } +#Accumulated net ecosystem exchange flux +'Accumulated net ecosystem exchange flux' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + typeOfStatisticalProcessing = 1 ; + } +#Gross primary production flux +'Gross primary production flux' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + } +#Mean gross primary production flux +'Mean gross primary production flux' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + typeOfStatisticalProcessing = 0 ; + } +#Accumulated gross primary production flux +'Accumulated gross primary production flux' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + typeOfStatisticalProcessing = 1 ; + } +#Ecosystem respiration flux +'Ecosystem respiration flux' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + } +#Mean ecosystem respiration flux +'Mean ecosystem respiration flux' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + typeOfStatisticalProcessing = 0 ; + } +#Accumulated ecosystem respiration flux +'Accumulated ecosystem respiration flux' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + typeOfStatisticalProcessing = 1 ; + } +#Emission mass flux from bio fuel +'Emission mass flux from bio fuel' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 8 ; + } +#Emission mass flux from fossil fuel +'Emission mass flux from fossil fuel' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 9 ; + } +#Emission mass flux from other +'Emission mass flux from other' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 0 ; + } +#Emission mass flux from oceans +'Emission mass flux from oceans' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 11 ; + } +#Accumulated wet deposition mass flux +'Accumulated wet deposition mass flux' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 7 ; + typeOfStatisticalProcessing = 1 ; + } +#Accumulated dry deposition mass flux +'Accumulated dry deposition mass flux' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 6 ; + typeOfStatisticalProcessing = 1 ; + } #Aerosol number density 'Aerosol number density' = { discipline = 0 ; @@ -5968,6 +6844,14 @@ parameterCategory = 2 ; parameterNumber = 0 ; } +#Snowmelt +'Snowmelt' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 41 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Mean zero-crossing wave period 'Mean zero-crossing wave period' = { discipline = 10 ; @@ -6004,12 +6888,30 @@ parameterCategory = 0 ; parameterNumber = 5 ; } +#Mean direction of wind waves +'Mean direction of wind waves' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 75 ; + } #Mean period of wind waves 'Mean period of wind waves' = { discipline = 10 ; parameterCategory = 0 ; parameterNumber = 6 ; } +#Mean direction of total swell +'Mean direction of total swell' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 74 ; + } +#2D wave spectra (single) +'2D wave spectra (single)' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 86 ; + } #Eastward sea water velocity 'Eastward sea water velocity' = { discipline = 10 ; @@ -6024,6 +6926,76 @@ parameterNumber = 3 ; typeOfFirstFixedSurface = 160 ; } +#Skin reservoir content +'Skin reservoir content' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 50 ; + } +#Vertical integral of mass of atmosphere +'Vertical integral of mass of atmosphere' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 39 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated kinetic energy +'Total column vertically-integrated kinetic energy' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated enthalpy +'Total column vertically-integrated enthalpy' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated potential + internal energy +'Total column vertically-integrated potential + internal energy' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of potential+internal+latent energy +'Vertical integral of potential+internal+latent energy' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated total energy +'Total column vertically-integrated total energy' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of eastward heat flux +'Vertical integral of eastward heat flux' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 19 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of northward heat flux +'Vertical integral of northward heat flux' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 20 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Vertical integral of eastward water vapour flux 'Vertical integral of eastward water vapour flux' = { discipline = 0 ; @@ -6040,6 +7012,12 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Vertically integrated moisture divergence flux +'Vertically integrated moisture divergence flux' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + } #Surface runoff 'Surface runoff' = { discipline = 2 ; @@ -6190,6 +7168,48 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } +#Minimum vertical gradient of refractivity inside trapping layer +'Minimum vertical gradient of refractivity inside trapping layer' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 45 ; + } +#Mean vertical gradient of refractivity inside trapping layer +'Mean vertical gradient of refractivity inside trapping layer' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 44 ; + } +#Duct base height +'Duct base height' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 41 ; + } +#Trapping layer base height +'Trapping layer base height' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 42 ; + } +#Trapping layer top height +'Trapping layer top height' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 43 ; + } +#U-component of neutral wind +'U-component of neutral wind' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 56 ; + } +#V-component of neutral wind +'V-component of neutral wind' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 57 ; + } #100 metre U wind component '100 metre U wind component' = { discipline = 0 ; @@ -6435,12 +7455,6 @@ parameterNumber = 0 ; typeOfFirstFixedSurface = 1 ; } -#Surface roughness -'Surface roughness' = { - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 1 ; - } #Surface net short-wave (solar) radiation 'Surface net short-wave (solar) radiation' = { discipline = 0 ; @@ -6627,12 +7641,6 @@ parameterCategory = 1 ; parameterNumber = 28 ; } -#Total snowfall -'Total snowfall' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 29 ; - } #Precipitable water category 'Precipitable water category' = { discipline = 0 ; @@ -6778,19 +7786,6 @@ parameterCategory = 1 ; parameterNumber = 54 ; } -#Convective snowfall rate water equivalent -'Convective snowfall rate water equivalent' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 55 ; - } -#Large scale snowfall rate water equivalent -'Large scale snowfall rate water equivalent' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 56 ; - typeOfFirstFixedSurface = 1 ; - } #Total snowfall rate 'Total snowfall rate' = { discipline = 0 ; @@ -7019,8 +8014,8 @@ parameterCategory = 4 ; parameterNumber = 50 ; } -#UV index -'UV index ' = { +#UV index +'UV index' = { discipline = 0 ; parameterCategory = 4 ; parameterNumber = 51 ; @@ -7553,12 +8548,6 @@ parameterCategory = 0 ; parameterNumber = 8 ; } -#Volumetric soil moisture content -'Volumetric soil moisture content' = { - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 9 ; - } #Ground heat flux 'Ground heat flux' = { discipline = 2 ; @@ -7649,60 +8638,12 @@ parameterCategory = 0 ; parameterNumber = 27 ; } -#Upper layer soil temperature -'Upper layer soil temperature' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 1 ; - } -#Upper layer soil moisture -'Upper layer soil moisture' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 2 ; - } -#Lower layer soil moisture -'Lower layer soil moisture' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 3 ; - } -#Bottom layer soil temperature -'Bottom layer soil temperature' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 4 ; - } -#Liquid volumetric soil moisture (non-frozen) -'Liquid volumetric soil moisture (non-frozen)' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 5 ; - } #Number of soil layers in root zone 'Number of soil layers in root zone' = { discipline = 2 ; parameterCategory = 3 ; parameterNumber = 6 ; } -#Transpiration stress-onset (soil moisture) -'Transpiration stress-onset (soil moisture)' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 7 ; - } -#Direct evaporation cease (soil moisture) -'Direct evaporation cease (soil moisture)' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 8 ; - } -#Soil porosity -'Soil porosity' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 9 ; - } #Liquid volumetric soil moisture (non-frozen) 'Liquid volumetric soil moisture (non-frozen)' = { discipline = 2 ; @@ -7775,8 +8716,8 @@ parameterCategory = 1 ; parameterNumber = 3 ; } -#Estimated u component of wind -'Estimated u component of wind ' = { +#Estimated u component of wind +'Estimated u component of wind' = { discipline = 3 ; parameterCategory = 1 ; parameterNumber = 4 ; @@ -7883,8 +8824,8 @@ parameterCategory = 191 ; parameterNumber = 0 ; } -#Albedo -'Albedo' = { +#Forecast albedo +'Forecast albedo' = { discipline = 0 ; parameterCategory = 19 ; parameterNumber = 1 ; @@ -8039,14 +8980,14 @@ parameterCategory = 2 ; parameterNumber = 16 ; } -#U-component of current -'U-component of current ' = { +#U-component of current +'U-component of current' = { discipline = 10 ; parameterCategory = 1 ; parameterNumber = 2 ; } -#V-component of current -'V-component of current ' = { +#V-component of current +'V-component of current' = { discipline = 10 ; parameterCategory = 1 ; parameterNumber = 3 ; @@ -8141,12 +9082,6 @@ parameterCategory = 2 ; parameterNumber = 7 ; } -#Snow melt -'Snow melt' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 16 ; - } #Direction of swell waves 'Direction of swell waves' = { discipline = 10 ; @@ -8262,8 +9197,8 @@ parameterCategory = 1 ; parameterNumber = 60 ; } -#Snow Fall water equivalent -'Snow Fall water equivalent' = { +#Snowfall water equivalent +'Snowfall water equivalent' = { discipline = 0 ; parameterCategory = 1 ; parameterNumber = 53 ; diff --git a/definitions/grib2/name.legacy.def b/definitions/grib2/name.legacy.def new file mode 100644 index 000000000..d0329b676 --- /dev/null +++ b/definitions/grib2/name.legacy.def @@ -0,0 +1,54 @@ +#Volumetric soil moisture content +'Volumetric soil moisture content' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 9 ; + } +#Upper layer soil temperature +'Upper layer soil temperature' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + } +#Upper layer soil moisture +'Upper layer soil moisture' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 2 ; + } +#Lower layer soil moisture +'Lower layer soil moisture' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + } +#Bottom layer soil temperature +'Bottom layer soil temperature' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 4 ; + } +#Liquid volumetric soil moisture (non-frozen) +'Liquid volumetric soil moisture (non-frozen)' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + } +#Transpiration stress-onset (soil moisture) +'Transpiration stress-onset (soil moisture)' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 7 ; + } +#Direct evaporation cease (soil moisture) +'Direct evaporation cease (soil moisture)' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 8 ; + } +#Soil porosity +'Soil porosity' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 9 ; + } diff --git a/definitions/grib2/paramId.def b/definitions/grib2/paramId.def index 6965f3ad0..8a7b40e99 100644 --- a/definitions/grib2/paramId.def +++ b/definitions/grib2/paramId.def @@ -113,6 +113,14 @@ parameterCategory = 2 ; parameterNumber = 1 ; } +#Surface photosynthetically active radiation, clear sky +'20' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Unbalanced component of temperature '21' = { discipline = 0 ; @@ -131,6 +139,30 @@ parameterCategory = 2 ; parameterNumber = 45 ; } +#Low vegetation cover +'27' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 53 ; + } +#High vegetation cover +'28' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 54 ; + } +#Type of low vegetation +'29' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 57 ; + } +#Type of high vegetation +'30' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 58 ; + } #Sea ice area fraction '31' = { discipline = 10 ; @@ -166,6 +198,14 @@ typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; } +#Magnitude of turbulent surface stress +'48' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 58 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Large-scale precipitation fraction '50' = { discipline = 0 ; @@ -190,6 +230,25 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Leaf area index, low vegetation +'66' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 55 ; + } +#Leaf area index, high vegetation +'67' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 56 ; + } +#Standard deviation of filtered subgrid orography (climatological) +'74' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 38 ; + typeOfGeneratingProcess = 9 ; + } #Specific rain water content '75' = { discipline = 0 ; @@ -239,6 +298,12 @@ parameterNumber = 20 ; typeOfStatisticalProcessing = 1 ; } +#Charnock +'148' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 76 ; + } #Boundary layer height '159' = { discipline = 0 ; @@ -253,6 +318,14 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Surface roughness (climatological) +'173' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfGeneratingProcess = 9 ; + } #Surface long-wave (thermal) radiation downwards '175' = { discipline = 0 ; @@ -265,7 +338,7 @@ '178' = { discipline = 0 ; parameterCategory = 4 ; - parameterNumber = 1 ; + parameterNumber = 9 ; typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } @@ -314,7 +387,7 @@ parameterCategory = 14 ; parameterNumber = 1 ; } -#Top net solar radiation, clear sky +#Top net short-wave (solar) radiation, clear sky '208' = { discipline = 0 ; parameterCategory = 4 ; @@ -322,7 +395,7 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } -#Top net thermal radiation, clear sky +#Top net long-wave (thermal) radiation, clear sky '209' = { discipline = 0 ; parameterCategory = 5 ; @@ -346,7 +419,7 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#TOA incident solar radiation +#TOA incident short-wave (solar) radiation '212' = { discipline = 0 ; parameterCategory = 4 ; @@ -354,6 +427,13 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } +#Vertically integrated moisture divergence +'213' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + typeOfStatisticalProcessing = 1 ; + } #Instantaneous eastward turbulent surface stress '229' = { discipline = 0 ; @@ -382,12 +462,34 @@ parameterNumber = 79 ; typeOfFirstFixedSurface = 1 ; } +#Logarithm of surface roughness length for heat (climatological) +'234' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 54 ; + typeOfFirstFixedSurface = 1 ; + typeOfGeneratingProcess = 9 ; + } #Temperature of snow layer '238' = { discipline = 2 ; parameterCategory = 3 ; parameterNumber = 28 ; } +#Forecast surface roughness +'244' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + } +#Forecast logarithm of surface roughness for heat +'245' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 54 ; + typeOfFirstFixedSurface = 1 ; + } #Specific cloud liquid water content '246' = { discipline = 0 ; @@ -406,7 +508,7 @@ parameterCategory = 6 ; parameterNumber = 32 ; } -#large scale precipitation +#Large-scale precipitation '3062' = { discipline = 0 ; parameterCategory = 1 ; @@ -542,6 +644,92 @@ scaleFactorOfLowerLimit = 0 ; probabilityType = 0 ; } +#Wave induced mean sea level correction +'140098' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 87 ; + } +#Ratio of wave angular and frequency width +'140099' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 80 ; + } +#Number of events in freak waves statistics +'140100' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 89 ; + } +#U-component of surface momentum flux into ocean +'140103' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 90 ; + typeOfFirstFixedSurface = 1 ; + } +#V-component of surface momentum flux into ocean +'140104' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 91 ; + typeOfFirstFixedSurface = 1 ; + } +#Wave turbulent energy flux into ocean +'140105' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 92 ; + } +#Wave energy flux magnitude +'140112' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 78 ; + } +#Wave energy flux mean direction +'140113' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 79 ; + } +#Wave Spectral Skewness +'140207' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 77 ; + } +#Free convective velocity over the oceans +'140208' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 81 ; + } +#Air density over the oceans +'140209' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 82 ; + } +#Normalized energy flux into waves +'140211' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 83 ; + } +#Normalized energy flux into ocean +'140212' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 85 ; + } +#Normalized stress into ocean +'140214' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 84 ; + } #Mean sea water temperature in the upper 300 m '151127' = { discipline = 10 ; @@ -554,6 +742,14 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } +#Total column vertically-integrated water enthalpy +'162093' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #2 metre specific humidity '174096' = { discipline = 0 ; @@ -612,6 +808,41 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } +#UV visible albedo for diffuse radiation (climatological) +'210198' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 55 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation (climatological) +'210199' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 56 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, geometric component (climatological) +'210200' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 57 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, isotropic component (climatological) +'210201' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 58 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, volumetric component (climatological) +'210202' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 59 ; + typeOfGeneratingProcess = 9 ; + } #Ammonium aerosol mass mixing ratio '210249' = { discipline = 0 ; @@ -660,6 +891,41 @@ aerosolType = 62033 ; is_aerosol = 1 ; } +#Near IR albedo for diffuse radiation (climatological) +'210260' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 9 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation (climatological) +'210261' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 10 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, geometric component (climatological) +'210262' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 11 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, isotropic component (climatological) +'210263' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 12 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, volumetric component (climatological) +'210264' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 13 ; + typeOfGeneratingProcess = 9 ; + } #Volcanic sulfur dioxide mass mixing ratio increment '211170' = { discipline = 0 ; @@ -920,7 +1186,7 @@ constituentType = 60057 ; is_chemical = 1 ; } -#Column integrated mass density of Volcanic sulfur dioxide +#Column integrated mass density of Volcanic sulfur dioxide '218221' = { discipline = 0 ; parameterCategory = 20 ; @@ -929,7 +1195,7 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } -#Column integrated mass density of Aromatic peroxy radical +#Column integrated mass density of Aromatic peroxy radical '218222' = { discipline = 0 ; parameterCategory = 20 ; @@ -937,7 +1203,7 @@ constituentType = 60029 ; is_chemical = 1 ; } -#Column integrated mass density of Ethyne +#Column integrated mass density of Ethyne '218223' = { discipline = 0 ; parameterCategory = 20 ; @@ -945,7 +1211,7 @@ constituentType = 10010 ; is_chemical = 1 ; } -#Column integrated mass density of Acetonitrile +#Column integrated mass density of Acetonitrile '218224' = { discipline = 0 ; parameterCategory = 20 ; @@ -953,7 +1219,7 @@ constituentType = 10007 ; is_chemical = 1 ; } -#Column integrated mass density of Methyl peroxy nitrate +#Column integrated mass density of Methyl peroxy nitrate '218225' = { discipline = 0 ; parameterCategory = 20 ; @@ -961,7 +1227,7 @@ constituentType = 10055 ; is_chemical = 1 ; } -#Column integrated mass density of Hydrogen cyanide +#Column integrated mass density of Hydrogen cyanide '218226' = { discipline = 0 ; parameterCategory = 20 ; @@ -969,7 +1235,7 @@ constituentType = 10006 ; is_chemical = 1 ; } -#Column integrated mass density of Hydroperoxy aldehydes type 1 +#Column integrated mass density of Hydroperoxy aldehydes type 1 '218227' = { discipline = 0 ; parameterCategory = 20 ; @@ -977,7 +1243,7 @@ constituentType = 60058 ; is_chemical = 1 ; } -#Column integrated mass density of Hydroperoxy aldehydes type 2 +#Column integrated mass density of Hydroperoxy aldehydes type 2 '218228' = { discipline = 0 ; parameterCategory = 20 ; @@ -985,7 +1251,7 @@ constituentType = 60059 ; is_chemical = 1 ; } -#Column integrated mass density of Isoprene peroxy type B +#Column integrated mass density of Isoprene peroxy type B '218229' = { discipline = 0 ; parameterCategory = 20 ; @@ -993,7 +1259,7 @@ constituentType = 60056 ; is_chemical = 1 ; } -#Column integrated mass density of Isoprene peroxy type D +#Column integrated mass density of Isoprene peroxy type D '218230' = { discipline = 0 ; parameterCategory = 20 ; @@ -1001,7 +1267,7 @@ constituentType = 60057 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Volcanic sulfur dioxide +#Atmosphere emission mass flux of Volcanic sulfur dioxide '219221' = { discipline = 0 ; parameterCategory = 20 ; @@ -1010,7 +1276,7 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } -#Atmosphere emission mass flux of Aromatic peroxy radical +#Atmosphere emission mass flux of Aromatic peroxy radical '219222' = { discipline = 0 ; parameterCategory = 20 ; @@ -1018,7 +1284,7 @@ constituentType = 60029 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Ethyne +#Atmosphere emission mass flux of Ethyne '219223' = { discipline = 0 ; parameterCategory = 20 ; @@ -1026,7 +1292,7 @@ constituentType = 10010 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Acetonitrile +#Atmosphere emission mass flux of Acetonitrile '219224' = { discipline = 0 ; parameterCategory = 20 ; @@ -1034,7 +1300,7 @@ constituentType = 10007 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Methyl peroxy nitrate +#Atmosphere emission mass flux of Methyl peroxy nitrate '219225' = { discipline = 0 ; parameterCategory = 20 ; @@ -1042,7 +1308,7 @@ constituentType = 10055 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Hydrogen cyanide +#Atmosphere emission mass flux of Hydrogen cyanide '219226' = { discipline = 0 ; parameterCategory = 20 ; @@ -1050,7 +1316,7 @@ constituentType = 10006 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Hydroperoxy aldehydes type 1 +#Atmosphere emission mass flux of Hydroperoxy aldehydes type 1 '219227' = { discipline = 0 ; parameterCategory = 20 ; @@ -1058,7 +1324,7 @@ constituentType = 60058 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Hydroperoxy aldehydes type 2 +#Atmosphere emission mass flux of Hydroperoxy aldehydes type 2 '219228' = { discipline = 0 ; parameterCategory = 20 ; @@ -1066,7 +1332,7 @@ constituentType = 60059 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Isoprene peroxy type B +#Atmosphere emission mass flux of Isoprene peroxy type B '219229' = { discipline = 0 ; parameterCategory = 20 ; @@ -1074,7 +1340,7 @@ constituentType = 60056 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Isoprene peroxy type D +#Atmosphere emission mass flux of Isoprene peroxy type D '219230' = { discipline = 0 ; parameterCategory = 20 ; @@ -1082,7 +1348,7 @@ constituentType = 60057 ; is_chemical = 1 ; } -#Dry deposition velocity of Volcanic sulfur dioxide +#Dry deposition velocity of Volcanic sulfur dioxide '221221' = { discipline = 0 ; parameterCategory = 20 ; @@ -1091,7 +1357,7 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } -#Dry deposition velocity of Aromatic peroxy radical +#Dry deposition velocity of Aromatic peroxy radical '221222' = { discipline = 0 ; parameterCategory = 20 ; @@ -1099,7 +1365,7 @@ constituentType = 60029 ; is_chemical = 1 ; } -#Dry deposition velocity of Ethyne +#Dry deposition velocity of Ethyne '221223' = { discipline = 0 ; parameterCategory = 20 ; @@ -1107,7 +1373,7 @@ constituentType = 10010 ; is_chemical = 1 ; } -#Dry deposition velocity of Acetonitrile +#Dry deposition velocity of Acetonitrile '221224' = { discipline = 0 ; parameterCategory = 20 ; @@ -1115,7 +1381,7 @@ constituentType = 10007 ; is_chemical = 1 ; } -#Dry deposition velocity of Methyl peroxy nitrate +#Dry deposition velocity of Methyl peroxy nitrate '221225' = { discipline = 0 ; parameterCategory = 20 ; @@ -1123,7 +1389,7 @@ constituentType = 10055 ; is_chemical = 1 ; } -#Dry deposition velocity of Hydrogen cyanide +#Dry deposition velocity of Hydrogen cyanide '221226' = { discipline = 0 ; parameterCategory = 20 ; @@ -1131,7 +1397,7 @@ constituentType = 10006 ; is_chemical = 1 ; } -#Dry deposition velocity of Hydroperoxy aldehydes type 1 +#Dry deposition velocity of Hydroperoxy aldehydes type 1 '221227' = { discipline = 0 ; parameterCategory = 20 ; @@ -1139,7 +1405,7 @@ constituentType = 60058 ; is_chemical = 1 ; } -#Dry deposition velocity of Hydroperoxy aldehydes type 2 +#Dry deposition velocity of Hydroperoxy aldehydes type 2 '221228' = { discipline = 0 ; parameterCategory = 20 ; @@ -1147,7 +1413,7 @@ constituentType = 60059 ; is_chemical = 1 ; } -#Dry deposition velocity of Isoprene peroxy type B +#Dry deposition velocity of Isoprene peroxy type B '221229' = { discipline = 0 ; parameterCategory = 20 ; @@ -1155,7 +1421,7 @@ constituentType = 60056 ; is_chemical = 1 ; } -#Dry deposition velocity of Isoprene peroxy type D +#Dry deposition velocity of Isoprene peroxy type D '221230' = { discipline = 0 ; parameterCategory = 20 ; @@ -1946,6 +2212,14 @@ scaledValueOfFirstFixedSurface = 26315 ; scaleFactorOfFirstFixedSurface = 2 ; } +#Surface direct short-wave radiation, clear sky +'228022' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #0 degrees C isothermal level (atm) '228024' = { discipline = 0 ; @@ -2051,6 +2325,18 @@ parameterCategory = 6 ; parameterNumber = 27 ; } +#Height of zero-degree wet-bulb temperature +'228047' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 44 ; + } +#Height of one-degree wet-bulb temperature +'228048' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 45 ; + } #Instantaneous total lightning flash density '228050' = { discipline = 0 ; @@ -2175,6 +2461,14 @@ scaledValueOfSecondFixedSurface = 10 ; scaleFactorOfSecondFixedSurface = 1 ; } +#Total column supercooled liquid water +'228088' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 167 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Total column rain water '228089' = { discipline = 0 ; @@ -2230,6 +2524,16 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 10 ; } +#Accumulated mass emission of methane from Wetlands +'228109' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 3 ; + constituentType = 2 ; + typeOfStatisticalProcessing = 1 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 10 ; + } #Convective precipitation '228143' = { discipline = 0 ; @@ -2265,6 +2569,20 @@ parameterNumber = 77 ; typeOfFirstFixedSurface = 1 ; } +#Convective snowfall rate water equivalent +'228220' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 55 ; + typeOfFirstFixedSurface = 1 ; + } +#Large scale snowfall rate water equivalent +'228221' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 56 ; + typeOfFirstFixedSurface = 1 ; + } #Mixed-layer CAPE in the lowest 50 hPa '228231' = { discipline = 0 ; @@ -2480,6 +2798,379 @@ parameterCategory = 0 ; parameterNumber = 37 ; } +#Forecast logarithm of surface roughness length for moisture +'231008' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 55 ; + typeOfFirstFixedSurface = 1 ; + } +#Surface runoff rate +'231009' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + } +#Surface runoff +'231010' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Sub-surface runoff rate +'231011' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 52 ; + typeOfFirstFixedSurface = 1 ; + } +#Sub-surface runoff +'231012' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 52 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Reflectance in 0.4 micron channel +'231013' = { + discipline = 3 ; + parameterCategory = 1 ; + parameterNumber = 30 ; + } +#Burned area +'232000' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 3 ; + } +#Burning area +'232001' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 20 ; + } +#Burnable area +'232002' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 21 ; + } +#Un-burnable area +'232003' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 22 ; + } +#Fuel load +'232004' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 23 ; + } +#Combustion completeness +'232005' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 24 ; + } +#Fuel moisture content +'232006' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 25 ; + } +#Time-integrated total column vertically-integrated eastward geopotential flux +'233000' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 40 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward geopotential flux +'233001' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 41 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of water geopotential flux +'233002' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 42 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of geopotential flux +'233003' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 43 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward enthalpy flux +'233004' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward enthalpy flux +'233005' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 6 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward kinetic energy flux +'233006' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 9 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward kinetic energy flux +'233007' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 10 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward total energy flux +'233008' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 11 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward total energy flux +'233009' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 12 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of enthalpy flux +'233010' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 13 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of kinetic energy flux +'233011' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 16 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of total energy flux +'233012' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 17 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of water enthalpy flux +'233013' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of mass flux +'233014' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 35 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward mass flux +'233015' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 36 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward mass flux +'233016' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 37 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of water vapour flux +'233017' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 160 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of cloud liquid water flux +'233018' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 161 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of cloud ice water flux +'233019' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 162 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of rain flux +'233020' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 163 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of snow flux +'233021' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 164 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward water vapour flux +'233022' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 150 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward water vapour flux +'233023' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 151 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward cloud liquid water flux +'233024' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 152 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward cloud liquid water flux +'233025' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 153 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward cloud ice water flux +'233026' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 154 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward cloud ice water flux +'233027' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 155 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward rain flux +'233028' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 156 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward rain flux +'233029' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 157 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward snow flux +'233030' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 158 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward snow flux +'233031' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 159 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Mean temperature tendency due to short-wave radiation '235001' = { discipline = 0 ; @@ -2614,6 +3305,36 @@ typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; } +#Mean surface photosynthetically active radiation flux, clear sky +'235022' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#Sunshine duration fraction +'235044' = { + discipline = 0 ; + parameterCategory = 6 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + } +#Mean vertically integrated moisture divergence +'235054' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + typeOfStatisticalProcessing = 0 ; + } +#Mean surface direct short-wave radiation flux, clear sky +'235059' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Time integral of surface latent heat sublimation flux '235071' = { discipline = 0 ; @@ -2836,6 +3557,14 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Total snowfall +'260025' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 57 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #2 metre relative humidity '260242' = { discipline = 0 ; @@ -3600,7 +4329,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#X-component of sea ice velocity +#Eastward sea ice velocity '262003' = { discipline = 10 ; parameterCategory = 2 ; @@ -3612,7 +4341,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Y-component of sea ice velocity +#Northward sea ice velocity '262004' = { discipline = 10 ; parameterCategory = 2 ; @@ -3816,7 +4545,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Sea surface salinity +#Sea surface practical salinity '262100' = { discipline = 10 ; parameterCategory = 3 ; @@ -4032,7 +4761,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Vertically-integrated sea water practical salinity in the upper 300 m +#Average sea water practical salinity in the upper 300 m '262118' = { discipline = 10 ; parameterCategory = 4 ; @@ -4044,7 +4773,7 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } -#Vertically-integrated sea water practical salinity in the upper 700 m +#Average sea water practical salinity in the upper 700 m '262119' = { discipline = 10 ; parameterCategory = 4 ; @@ -4056,7 +4785,7 @@ scaledValueOfSecondFixedSurface = 700 ; scaleFactorOfSecondFixedSurface = 0 ; } -#Total column sea water practical salinity +#Total column average sea water practical salinity '262120' = { discipline = 10 ; parameterCategory = 4 ; @@ -4329,8 +5058,26 @@ typeOfSecondFixedSurface = 255 ; scaledValueOfFirstFixedSurface = 0 ; scaleFactorOfFirstFixedSurface = 0 ; - scaledValueOfSecondFixedSurface = missing() ; - scaleFactorOfSecondFixedSurface = missing() ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + } +#Sea surface height with inverse barometer correction +'262143' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 20 ; + } +#Average sea water potential temperature in the upper 300m +'262144' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; } #Sea water practical salinity '262500' = { @@ -4460,6 +5207,14 @@ typeOfFirstFixedSurface = 168 ; typeOfSecondFixedSurface = 168 ; } +#Sea water salinity +'262516' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 168 ; + typeOfSecondFixedSurface = 168 ; + } #Net short wave radiation rate at sea surface '262900' = { discipline = 0 ; @@ -4606,7 +5361,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean X-component of sea ice velocity +#Time-mean eastward sea ice velocity '263003' = { discipline = 10 ; parameterCategory = 2 ; @@ -4619,7 +5374,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean Y-component of sea ice velocity +#Time-mean northward sea ice velocity '263004' = { discipline = 10 ; parameterCategory = 2 ; @@ -4840,7 +5595,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean sea surface salinity +#Time-mean sea surface practical salinity '263100' = { discipline = 10 ; parameterCategory = 3 ; @@ -5074,7 +5829,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean vertically-integrated sea water practical salinity in the upper 300 m +#Time-mean average sea water practical salinity in the upper 300 m '263118' = { discipline = 10 ; parameterCategory = 4 ; @@ -5087,7 +5842,7 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } -#Time-mean vertically-integrated sea water practical salinity in the upper 700 m +#Time-mean average sea water practical salinity in the upper 700 m '263119' = { discipline = 10 ; parameterCategory = 4 ; @@ -5100,7 +5855,7 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } -#Time-mean total column sea water practical salinity +#Time-mean total column average sea water practical salinity '263120' = { discipline = 10 ; parameterCategory = 4 ; @@ -5399,6 +6154,19 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } +#Time-mean average sea water potential temperature in the upper 300m +'263144' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } #Time-mean sea water practical salinity '263500' = { discipline = 10 ; @@ -5741,6 +6509,8 @@ discipline = 0 ; parameterCategory = 20 ; parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 255 ; } #Dry deposition velocity '404000' = { @@ -5944,6 +6714,112 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 10 ; } +#Net ecosystem exchange flux +'435000' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + } +#Mean net ecosystem exchange flux +'435001' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + typeOfStatisticalProcessing = 0 ; + } +#Accumulated net ecosystem exchange flux +'435002' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + typeOfStatisticalProcessing = 1 ; + } +#Gross primary production flux +'436000' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + } +#Mean gross primary production flux +'436001' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + typeOfStatisticalProcessing = 0 ; + } +#Accumulated gross primary production flux +'436002' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + typeOfStatisticalProcessing = 1 ; + } +#Ecosystem respiration flux +'437000' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + } +#Mean ecosystem respiration flux +'437001' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + typeOfStatisticalProcessing = 0 ; + } +#Accumulated ecosystem respiration flux +'437002' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + typeOfStatisticalProcessing = 1 ; + } +#Emission mass flux from bio fuel +'438000' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 8 ; + } +#Emission mass flux from fossil fuel +'439000' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 9 ; + } +#Emission mass flux from other +'440000' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 0 ; + } +#Emission mass flux from oceans +'441000' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 11 ; + } +#Accumulated wet deposition mass flux +'444000' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 7 ; + typeOfStatisticalProcessing = 1 ; + } +#Accumulated dry deposition mass flux +'445000' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 6 ; + typeOfStatisticalProcessing = 1 ; + } #Aerosol number density '450000' = { discipline = 0 ; @@ -5968,6 +6844,14 @@ parameterCategory = 2 ; parameterNumber = 0 ; } +#Snowmelt +'3099' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 41 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Mean zero-crossing wave period '140221' = { discipline = 10 ; @@ -6004,12 +6888,30 @@ parameterCategory = 0 ; parameterNumber = 5 ; } +#Mean direction of wind waves +'140235' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 75 ; + } #Mean period of wind waves '140236' = { discipline = 10 ; parameterCategory = 0 ; parameterNumber = 6 ; } +#Mean direction of total swell +'140238' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 74 ; + } +#2D wave spectra (single) +'140251' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 86 ; + } #Eastward sea water velocity '151131' = { discipline = 10 ; @@ -6024,6 +6926,76 @@ parameterNumber = 3 ; typeOfFirstFixedSurface = 160 ; } +#Skin reservoir content +'160198' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 50 ; + } +#Vertical integral of mass of atmosphere +'162053' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 39 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated kinetic energy +'162059' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated enthalpy +'162060' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated potential + internal energy +'162061' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of potential+internal+latent energy +'162062' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated total energy +'162063' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of eastward heat flux +'162069' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 19 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of northward heat flux +'162070' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 20 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Vertical integral of eastward water vapour flux '162071' = { discipline = 0 ; @@ -6040,6 +7012,12 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Vertically integrated moisture divergence flux +'162084' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + } #Surface runoff '174008' = { discipline = 2 ; @@ -6190,6 +7168,48 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } +#Minimum vertical gradient of refractivity inside trapping layer +'228015' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 45 ; + } +#Mean vertical gradient of refractivity inside trapping layer +'228016' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 44 ; + } +#Duct base height +'228017' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 41 ; + } +#Trapping layer base height +'228018' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 42 ; + } +#Trapping layer top height +'228019' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 43 ; + } +#U-component of neutral wind +'228131' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 56 ; + } +#V-component of neutral wind +'228132' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 57 ; + } #100 metre U wind component '228246' = { discipline = 0 ; @@ -6435,12 +7455,6 @@ parameterNumber = 0 ; typeOfFirstFixedSurface = 1 ; } -#Surface roughness -'173' = { - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 1 ; - } #Surface net short-wave (solar) radiation '176' = { discipline = 0 ; @@ -6627,12 +7641,6 @@ parameterCategory = 1 ; parameterNumber = 28 ; } -#Total snowfall -'260025' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 29 ; - } #Precipitable water category '260026' = { discipline = 0 ; @@ -6778,19 +7786,6 @@ parameterCategory = 1 ; parameterNumber = 54 ; } -#Convective snowfall rate water equivalent -'260051' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 55 ; - } -#Large scale snowfall rate water equivalent -'260052' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 56 ; - typeOfFirstFixedSurface = 1 ; - } #Total snowfall rate '260053' = { discipline = 0 ; @@ -7019,7 +8014,7 @@ parameterCategory = 4 ; parameterNumber = 50 ; } -#UV index +#UV index '260094' = { discipline = 0 ; parameterCategory = 4 ; @@ -7553,12 +8548,6 @@ parameterCategory = 0 ; parameterNumber = 8 ; } -#Volumetric soil moisture content -'260185' = { - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 9 ; - } #Ground heat flux '260186' = { discipline = 2 ; @@ -7649,60 +8638,12 @@ parameterCategory = 0 ; parameterNumber = 27 ; } -#Upper layer soil temperature -'260201' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 1 ; - } -#Upper layer soil moisture -'260202' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 2 ; - } -#Lower layer soil moisture -'260203' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 3 ; - } -#Bottom layer soil temperature -'260204' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 4 ; - } -#Liquid volumetric soil moisture (non-frozen) -'260205' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 5 ; - } #Number of soil layers in root zone '260206' = { discipline = 2 ; parameterCategory = 3 ; parameterNumber = 6 ; } -#Transpiration stress-onset (soil moisture) -'260207' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 7 ; - } -#Direct evaporation cease (soil moisture) -'260208' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 8 ; - } -#Soil porosity -'260209' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 9 ; - } #Liquid volumetric soil moisture (non-frozen) '260210' = { discipline = 2 ; @@ -7775,7 +8716,7 @@ parameterCategory = 1 ; parameterNumber = 3 ; } -#Estimated u component of wind +#Estimated u component of wind '260222' = { discipline = 3 ; parameterCategory = 1 ; @@ -7883,7 +8824,7 @@ parameterCategory = 191 ; parameterNumber = 0 ; } -#Albedo +#Forecast albedo '260509' = { discipline = 0 ; parameterCategory = 19 ; @@ -8039,13 +8980,13 @@ parameterCategory = 2 ; parameterNumber = 16 ; } -#U-component of current +#U-component of current '3049' = { discipline = 10 ; parameterCategory = 1 ; parameterNumber = 2 ; } -#V-component of current +#V-component of current '3050' = { discipline = 10 ; parameterCategory = 1 ; @@ -8141,12 +9082,6 @@ parameterCategory = 2 ; parameterNumber = 7 ; } -#Snow melt -'3099' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 16 ; - } #Direction of swell waves '3104' = { discipline = 10 ; @@ -8262,7 +9197,7 @@ parameterCategory = 1 ; parameterNumber = 60 ; } -#Snow Fall water equivalent +#Snowfall water equivalent '228144' = { discipline = 0 ; parameterCategory = 1 ; diff --git a/definitions/grib2/paramId.legacy.def b/definitions/grib2/paramId.legacy.def new file mode 100644 index 000000000..32269c201 --- /dev/null +++ b/definitions/grib2/paramId.legacy.def @@ -0,0 +1,54 @@ +#Volumetric soil moisture content +'260185' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 9 ; + } +#Upper layer soil temperature +'260201' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + } +#Upper layer soil moisture +'260202' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 2 ; + } +#Lower layer soil moisture +'260203' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + } +#Bottom layer soil temperature +'260204' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 4 ; + } +#Liquid volumetric soil moisture (non-frozen) +'260205' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + } +#Transpiration stress-onset (soil moisture) +'260207' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 7 ; + } +#Direct evaporation cease (soil moisture) +'260208' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 8 ; + } +#Soil porosity +'260209' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 9 ; + } diff --git a/definitions/grib2/products_8.def b/definitions/grib2/products_8.def index a1c28ffc7..a700457b5 100644 --- a/definitions/grib2/products_8.def +++ b/definitions/grib2/products_8.def @@ -1,5 +1,9 @@ # (C) Copyright 2005- ECMWF. # Uncertainties in ensembles of regional re-analysis project (UERRA) +if(localUsePresent == 0){ constant marsExpver = 'prod'; +} else { +constant marsExpver = experimentVersionNumber; +} include "grib2/products_uerra.def" diff --git a/definitions/grib2/products_9.def b/definitions/grib2/products_9.def index 3b2d3a4de..21b99733e 100644 --- a/definitions/grib2/products_9.def +++ b/definitions/grib2/products_9.def @@ -1,5 +1,9 @@ # (C) Copyright 2005- ECMWF. # Uncertainties in ensembles of regional re-analysis project test (UERRA) +if(localUsePresent == 0){ constant marsExpver = 'test'; +} else { +constant marsExpver = experimentVersionNumber; +} include "grib2/products_uerra.def" diff --git a/definitions/grib2/products_uerra.def b/definitions/grib2/products_uerra.def index ef70ea316..4c3352382 100644 --- a/definitions/grib2/products_uerra.def +++ b/definitions/grib2/products_uerra.def @@ -34,7 +34,14 @@ if(typeOfFirstFixedSurface == 151 && typeOfSecondFixedSurface == 151) { #alias mars.levelist = level; } -alias mars.expver = marsExpver; +# if there is a local section, we take the experimentVersionNumber +if(localUsePresent == 1){ + alias mars.expver = experimentVersionNumber; +} +if(localUsePresent == 0){ + alias mars.expver = marsExpver; +} + alias mars.class = marsClass; alias mars.param = paramId; alias mars.origin = centre; diff --git a/definitions/grib2/section.2.def b/definitions/grib2/section.2.def index 07852aaca..f7da1537a 100644 --- a/definitions/grib2/section.2.def +++ b/definitions/grib2/section.2.def @@ -16,6 +16,12 @@ if ( addEmptySection2 == 0 ) { if ( grib2LocalSectionPresent==1 or ( section2Length>5 or new() ) ) { alias section2Used=one; + if(productionStatusOfProcessedData == 8 || productionStatusOfProcessedData == 9) { + # This for adding an expver other than prod/test to UERRA + codetable[2] uerraLocalVersion 'grib2/uerraLocalVersion.table' = 1 : dump; + template uerraSection "grib2/local.uerra.[uerraLocalVersion:l].def"; + } + if(productionStatusOfProcessedData == 4 || productionStatusOfProcessedData == 5) { # This is TIGGE-LAM because of the productionStatusOfProcessedData and the non-empty section 2 codetable[2] tiggeLocalVersion 'grib2/tiggeLocalVersion.table' = 1 : dump; diff --git a/definitions/grib2/section.4.def b/definitions/grib2/section.4.def index 7eab7cd26..b62a15329 100644 --- a/definitions/grib2/section.4.def +++ b/definitions/grib2/section.4.def @@ -28,8 +28,9 @@ concept datasetForLocal(unknown) { "tigge" = {productionStatusOfProcessedData=5;} "s2s" = {productionStatusOfProcessedData=6;} "s2s" = {productionStatusOfProcessedData=7;} + "era6" = {marsClass="e6";} # for ERA6 parameters with constituentType "hydro" = {marsClass="ce";} # EFAS/GLOFAS - "hydro" = {marsClass="ul";} #ULYSSES + "hydro" = {marsClass="ul";} # ULYSSES "fire" = {marsClass="gw";} # Global Wildfire awareness system "uerra" = {productionStatusOfProcessedData=8;} # UERRA "uerra" = {productionStatusOfProcessedData=9;} # UERRA diff --git a/definitions/grib2/shortName.def b/definitions/grib2/shortName.def index de493f2fe..96060d34f 100644 --- a/definitions/grib2/shortName.def +++ b/definitions/grib2/shortName.def @@ -113,6 +113,14 @@ parameterCategory = 2 ; parameterNumber = 1 ; } +#Surface photosynthetically active radiation, clear sky +'parcs' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Unbalanced component of temperature 'uctp' = { discipline = 0 ; @@ -131,6 +139,30 @@ parameterCategory = 2 ; parameterNumber = 45 ; } +#Low vegetation cover +'cvl' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 53 ; + } +#High vegetation cover +'cvh' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 54 ; + } +#Type of low vegetation +'tvl' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 57 ; + } +#Type of high vegetation +'tvh' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 58 ; + } #Sea ice area fraction 'ci' = { discipline = 10 ; @@ -166,6 +198,14 @@ typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; } +#Magnitude of turbulent surface stress +'magss' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 58 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Large-scale precipitation fraction 'lspf' = { discipline = 0 ; @@ -190,6 +230,25 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Leaf area index, low vegetation +'lai_lv' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 55 ; + } +#Leaf area index, high vegetation +'lai_hv' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 56 ; + } +#Standard deviation of filtered subgrid orography (climatological) +'sdfor' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 38 ; + typeOfGeneratingProcess = 9 ; + } #Specific rain water content 'crwc' = { discipline = 0 ; @@ -239,6 +298,12 @@ parameterNumber = 20 ; typeOfStatisticalProcessing = 1 ; } +#Charnock +'chnk' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 76 ; + } #Boundary layer height 'blh' = { discipline = 0 ; @@ -253,6 +318,14 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Surface roughness (climatological) +'sr' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfGeneratingProcess = 9 ; + } #Surface long-wave (thermal) radiation downwards 'strd' = { discipline = 0 ; @@ -265,7 +338,7 @@ 'tsr' = { discipline = 0 ; parameterCategory = 4 ; - parameterNumber = 1 ; + parameterNumber = 9 ; typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } @@ -314,7 +387,7 @@ parameterCategory = 14 ; parameterNumber = 1 ; } -#Top net solar radiation, clear sky +#Top net short-wave (solar) radiation, clear sky 'tsrc' = { discipline = 0 ; parameterCategory = 4 ; @@ -322,7 +395,7 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } -#Top net thermal radiation, clear sky +#Top net long-wave (thermal) radiation, clear sky 'ttrc' = { discipline = 0 ; parameterCategory = 5 ; @@ -346,7 +419,7 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#TOA incident solar radiation +#TOA incident short-wave (solar) radiation 'tisr' = { discipline = 0 ; parameterCategory = 4 ; @@ -354,6 +427,13 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } +#Vertically integrated moisture divergence +'vimd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + typeOfStatisticalProcessing = 1 ; + } #Instantaneous eastward turbulent surface stress 'iews' = { discipline = 0 ; @@ -382,12 +462,34 @@ parameterNumber = 79 ; typeOfFirstFixedSurface = 1 ; } +#Logarithm of surface roughness length for heat (climatological) +'lsrh' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 54 ; + typeOfFirstFixedSurface = 1 ; + typeOfGeneratingProcess = 9 ; + } #Temperature of snow layer 'tsn' = { discipline = 2 ; parameterCategory = 3 ; parameterNumber = 28 ; } +#Forecast surface roughness +'fsr' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + } +#Forecast logarithm of surface roughness for heat +'flsr' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 54 ; + typeOfFirstFixedSurface = 1 ; + } #Specific cloud liquid water content 'clwc' = { discipline = 0 ; @@ -406,7 +508,7 @@ parameterCategory = 6 ; parameterNumber = 32 ; } -#large scale precipitation +#Large-scale precipitation 'lsp' = { discipline = 0 ; parameterCategory = 1 ; @@ -542,6 +644,92 @@ scaleFactorOfLowerLimit = 0 ; probabilityType = 0 ; } +#Wave induced mean sea level correction +'weta' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 87 ; + } +#Ratio of wave angular and frequency width +'wraf' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 80 ; + } +#Number of events in freak waves statistics +'wnslc' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 89 ; + } +#U-component of surface momentum flux into ocean +'utauo' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 90 ; + typeOfFirstFixedSurface = 1 ; + } +#V-component of surface momentum flux into ocean +'vtauo' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 91 ; + typeOfFirstFixedSurface = 1 ; + } +#Wave turbulent energy flux into ocean +'wphio' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 92 ; + } +#Wave energy flux magnitude +'wefxm' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 78 ; + } +#Wave energy flux mean direction +'wefxd' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 79 ; + } +#Wave Spectral Skewness +'wss' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 77 ; + } +#Free convective velocity over the oceans +'wstar' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 81 ; + } +#Air density over the oceans +'rhoao' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 82 ; + } +#Normalized energy flux into waves +'phiaw' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 83 ; + } +#Normalized energy flux into ocean +'phioc' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 85 ; + } +#Normalized stress into ocean +'tauoc' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 84 ; + } #Mean sea water temperature in the upper 300 m 'mswt300m' = { discipline = 10 ; @@ -554,6 +742,14 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } +#Total column vertically-integrated water enthalpy +'viwe' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #2 metre specific humidity '2sh' = { discipline = 0 ; @@ -612,6 +808,41 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } +#UV visible albedo for diffuse radiation (climatological) +'aluvd_p' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 55 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation (climatological) +'aluvp_p' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 56 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, geometric component (climatological) +'aluvpg_p' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 57 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, isotropic component (climatological) +'aluvpi_p' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 58 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, volumetric component (climatological) +'aluvpv_p' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 59 ; + typeOfGeneratingProcess = 9 ; + } #Ammonium aerosol mass mixing ratio 'aermr18' = { discipline = 0 ; @@ -660,6 +891,41 @@ aerosolType = 62033 ; is_aerosol = 1 ; } +#Near IR albedo for diffuse radiation (climatological) +'alnid_p' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 9 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation (climatological) +'alnip_p' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 10 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, geometric component (climatological) +'alnipg_p' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 11 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, isotropic component (climatological) +'alnipi_p' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 12 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, volumetric component (climatological) +'alnipv_p' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 13 ; + typeOfGeneratingProcess = 9 ; + } #Volcanic sulfur dioxide mass mixing ratio increment 'VSO2diff' = { discipline = 0 ; @@ -920,7 +1186,7 @@ constituentType = 60057 ; is_chemical = 1 ; } -#Column integrated mass density of Volcanic sulfur dioxide +#Column integrated mass density of Volcanic sulfur dioxide 'tc_VSO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -929,7 +1195,7 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } -#Column integrated mass density of Aromatic peroxy radical +#Column integrated mass density of Aromatic peroxy radical 'tc_AROO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -937,7 +1203,7 @@ constituentType = 60029 ; is_chemical = 1 ; } -#Column integrated mass density of Ethyne +#Column integrated mass density of Ethyne 'tc_C2H2' = { discipline = 0 ; parameterCategory = 20 ; @@ -945,7 +1211,7 @@ constituentType = 10010 ; is_chemical = 1 ; } -#Column integrated mass density of Acetonitrile +#Column integrated mass density of Acetonitrile 'tc_CH3CN' = { discipline = 0 ; parameterCategory = 20 ; @@ -953,7 +1219,7 @@ constituentType = 10007 ; is_chemical = 1 ; } -#Column integrated mass density of Methyl peroxy nitrate +#Column integrated mass density of Methyl peroxy nitrate 'tc_CH3O2NO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -961,7 +1227,7 @@ constituentType = 10055 ; is_chemical = 1 ; } -#Column integrated mass density of Hydrogen cyanide +#Column integrated mass density of Hydrogen cyanide 'tc_HCN' = { discipline = 0 ; parameterCategory = 20 ; @@ -969,7 +1235,7 @@ constituentType = 10006 ; is_chemical = 1 ; } -#Column integrated mass density of Hydroperoxy aldehydes type 1 +#Column integrated mass density of Hydroperoxy aldehydes type 1 'tc_HPALD1' = { discipline = 0 ; parameterCategory = 20 ; @@ -977,7 +1243,7 @@ constituentType = 60058 ; is_chemical = 1 ; } -#Column integrated mass density of Hydroperoxy aldehydes type 2 +#Column integrated mass density of Hydroperoxy aldehydes type 2 'tc_HPALD2' = { discipline = 0 ; parameterCategory = 20 ; @@ -985,7 +1251,7 @@ constituentType = 60059 ; is_chemical = 1 ; } -#Column integrated mass density of Isoprene peroxy type B +#Column integrated mass density of Isoprene peroxy type B 'tc_ISOPBO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -993,7 +1259,7 @@ constituentType = 60056 ; is_chemical = 1 ; } -#Column integrated mass density of Isoprene peroxy type D +#Column integrated mass density of Isoprene peroxy type D 'tc_ISOPDO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1001,7 +1267,7 @@ constituentType = 60057 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Volcanic sulfur dioxide +#Atmosphere emission mass flux of Volcanic sulfur dioxide 'e_VSO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1010,7 +1276,7 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } -#Atmosphere emission mass flux of Aromatic peroxy radical +#Atmosphere emission mass flux of Aromatic peroxy radical 'e_AROO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1018,7 +1284,7 @@ constituentType = 60029 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Ethyne +#Atmosphere emission mass flux of Ethyne 'e_C2H2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1026,7 +1292,7 @@ constituentType = 10010 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Acetonitrile +#Atmosphere emission mass flux of Acetonitrile 'e_CH3CN' = { discipline = 0 ; parameterCategory = 20 ; @@ -1034,7 +1300,7 @@ constituentType = 10007 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Methyl peroxy nitrate +#Atmosphere emission mass flux of Methyl peroxy nitrate 'e_CH3O2NO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1042,7 +1308,7 @@ constituentType = 10055 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Hydrogen cyanide +#Atmosphere emission mass flux of Hydrogen cyanide 'e_HCN' = { discipline = 0 ; parameterCategory = 20 ; @@ -1050,7 +1316,7 @@ constituentType = 10006 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Hydroperoxy aldehydes type 1 +#Atmosphere emission mass flux of Hydroperoxy aldehydes type 1 'e_HPALD1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1058,7 +1324,7 @@ constituentType = 60058 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Hydroperoxy aldehydes type 2 +#Atmosphere emission mass flux of Hydroperoxy aldehydes type 2 'e_HPALD2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1066,7 +1332,7 @@ constituentType = 60059 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Isoprene peroxy type B +#Atmosphere emission mass flux of Isoprene peroxy type B 'e_ISOPBO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1074,7 +1340,7 @@ constituentType = 60056 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Isoprene peroxy type D +#Atmosphere emission mass flux of Isoprene peroxy type D 'e_ISOPDO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1082,7 +1348,7 @@ constituentType = 60057 ; is_chemical = 1 ; } -#Dry deposition velocity of Volcanic sulfur dioxide +#Dry deposition velocity of Volcanic sulfur dioxide 'dv_VSO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1091,7 +1357,7 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } -#Dry deposition velocity of Aromatic peroxy radical +#Dry deposition velocity of Aromatic peroxy radical 'dv_AROO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1099,7 +1365,7 @@ constituentType = 60029 ; is_chemical = 1 ; } -#Dry deposition velocity of Ethyne +#Dry deposition velocity of Ethyne 'dv_C2H2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1107,7 +1373,7 @@ constituentType = 10010 ; is_chemical = 1 ; } -#Dry deposition velocity of Acetonitrile +#Dry deposition velocity of Acetonitrile 'dv_CH3CN' = { discipline = 0 ; parameterCategory = 20 ; @@ -1115,7 +1381,7 @@ constituentType = 10007 ; is_chemical = 1 ; } -#Dry deposition velocity of Methyl peroxy nitrate +#Dry deposition velocity of Methyl peroxy nitrate 'dv_CH3O2NO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1123,7 +1389,7 @@ constituentType = 10055 ; is_chemical = 1 ; } -#Dry deposition velocity of Hydrogen cyanide +#Dry deposition velocity of Hydrogen cyanide 'dv_HCN' = { discipline = 0 ; parameterCategory = 20 ; @@ -1131,7 +1397,7 @@ constituentType = 10006 ; is_chemical = 1 ; } -#Dry deposition velocity of Hydroperoxy aldehydes type 1 +#Dry deposition velocity of Hydroperoxy aldehydes type 1 'dv_HPALD1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1139,7 +1405,7 @@ constituentType = 60058 ; is_chemical = 1 ; } -#Dry deposition velocity of Hydroperoxy aldehydes type 2 +#Dry deposition velocity of Hydroperoxy aldehydes type 2 'dv_HPALD2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1147,7 +1413,7 @@ constituentType = 60059 ; is_chemical = 1 ; } -#Dry deposition velocity of Isoprene peroxy type B +#Dry deposition velocity of Isoprene peroxy type B 'dv_ISOPBO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1155,7 +1421,7 @@ constituentType = 60056 ; is_chemical = 1 ; } -#Dry deposition velocity of Isoprene peroxy type D +#Dry deposition velocity of Isoprene peroxy type D 'dv_ISOPDO2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1946,6 +2212,14 @@ scaledValueOfFirstFixedSurface = 26315 ; scaleFactorOfFirstFixedSurface = 2 ; } +#Surface direct short-wave radiation, clear sky +'cdir' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #0 degrees C isothermal level (atm) 'deg0l' = { discipline = 0 ; @@ -2051,6 +2325,18 @@ parameterCategory = 6 ; parameterNumber = 27 ; } +#Height of zero-degree wet-bulb temperature +'hwbt0' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 44 ; + } +#Height of one-degree wet-bulb temperature +'hwbt1' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 45 ; + } #Instantaneous total lightning flash density 'litoti' = { discipline = 0 ; @@ -2175,6 +2461,14 @@ scaledValueOfSecondFixedSurface = 10 ; scaleFactorOfSecondFixedSurface = 1 ; } +#Total column supercooled liquid water +'tcslw' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 167 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Total column rain water 'tcrw' = { discipline = 0 ; @@ -2230,6 +2524,16 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 10 ; } +#Accumulated mass emission of methane from Wetlands +'acc_e_WLCH4' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 3 ; + constituentType = 2 ; + typeOfStatisticalProcessing = 1 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 10 ; + } #Convective precipitation 'cp' = { discipline = 0 ; @@ -2265,6 +2569,20 @@ parameterNumber = 77 ; typeOfFirstFixedSurface = 1 ; } +#Convective snowfall rate water equivalent +'csfr' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 55 ; + typeOfFirstFixedSurface = 1 ; + } +#Large scale snowfall rate water equivalent +'lssfr' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 56 ; + typeOfFirstFixedSurface = 1 ; + } #Mixed-layer CAPE in the lowest 50 hPa 'mlcape50' = { discipline = 0 ; @@ -2480,6 +2798,379 @@ parameterCategory = 0 ; parameterNumber = 37 ; } +#Forecast logarithm of surface roughness length for moisture +'flsrm' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 55 ; + typeOfFirstFixedSurface = 1 ; + } +#Surface runoff rate +'surfror' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + } +#Surface runoff +'surfro' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Sub-surface runoff rate +'ssurfror' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 52 ; + typeOfFirstFixedSurface = 1 ; + } +#Sub-surface runoff +'ssurfro' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 52 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Reflectance in 0.4 micron channel +'rfl04' = { + discipline = 3 ; + parameterCategory = 1 ; + parameterNumber = 30 ; + } +#Burned area +'fba' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 3 ; + } +#Burning area +'bia' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 20 ; + } +#Burnable area +'baa' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 21 ; + } +#Un-burnable area +'ubaa' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 22 ; + } +#Fuel load +'fuell' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 23 ; + } +#Combustion completeness +'combc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 24 ; + } +#Fuel moisture content +'fuelmc' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 25 ; + } +#Time-integrated total column vertically-integrated eastward geopotential flux +'tvige' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 40 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward geopotential flux +'tvign' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 41 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of water geopotential flux +'tviwgd' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 42 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of geopotential flux +'tvigd' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 43 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward enthalpy flux +'tviee' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward enthalpy flux +'tvien' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 6 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward kinetic energy flux +'tvikee' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 9 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward kinetic energy flux +'tviken' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 10 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward total energy flux +'tvitee' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 11 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward total energy flux +'tviten' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 12 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of enthalpy flux +'tvied' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 13 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of kinetic energy flux +'tviked' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 16 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of total energy flux +'tvited' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 17 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of water enthalpy flux +'tviwed' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of mass flux +'tvimd' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 35 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward mass flux +'tvime' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 36 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward mass flux +'tvimn' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 37 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of water vapour flux +'tviwvd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 160 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of cloud liquid water flux +'tviclwd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 161 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of cloud ice water flux +'tviciwd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 162 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of rain flux +'tvird' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 163 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of snow flux +'tvisd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 164 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward water vapour flux +'tviwve' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 150 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward water vapour flux +'tviwvn' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 151 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward cloud liquid water flux +'tviclwe' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 152 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward cloud liquid water flux +'tviclwn' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 153 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward cloud ice water flux +'tviciwe' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 154 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward cloud ice water flux +'tviciwn' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 155 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward rain flux +'tvire' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 156 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward rain flux +'tvirn' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 157 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward snow flux +'tvise' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 158 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward snow flux +'tvisn' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 159 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } #Mean temperature tendency due to short-wave radiation 'mttswr' = { discipline = 0 ; @@ -2614,6 +3305,36 @@ typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; } +#Mean surface photosynthetically active radiation flux, clear sky +'msparfcs' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#Sunshine duration fraction +'sdf' = { + discipline = 0 ; + parameterCategory = 6 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + } +#Mean vertically integrated moisture divergence +'mvimd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + typeOfStatisticalProcessing = 0 ; + } +#Mean surface direct short-wave radiation flux, clear sky +'msdrswrfcs' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Time integral of surface latent heat sublimation flux 'tislhsf' = { discipline = 0 ; @@ -2836,6 +3557,14 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Total snowfall +'asnow' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 57 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #2 metre relative humidity '2r' = { discipline = 0 ; @@ -3600,7 +4329,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#X-component of sea ice velocity +#Eastward sea ice velocity 'siue' = { discipline = 10 ; parameterCategory = 2 ; @@ -3612,7 +4341,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Y-component of sea ice velocity +#Northward sea ice velocity 'sivn' = { discipline = 10 ; parameterCategory = 2 ; @@ -3816,7 +4545,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Sea surface salinity +#Sea surface practical salinity 'sos' = { discipline = 10 ; parameterCategory = 3 ; @@ -4032,7 +4761,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Vertically-integrated sea water practical salinity in the upper 300 m +#Average sea water practical salinity in the upper 300 m 'sc300m' = { discipline = 10 ; parameterCategory = 4 ; @@ -4044,7 +4773,7 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } -#Vertically-integrated sea water practical salinity in the upper 700 m +#Average sea water practical salinity in the upper 700 m 'sc700m' = { discipline = 10 ; parameterCategory = 4 ; @@ -4056,7 +4785,7 @@ scaledValueOfSecondFixedSurface = 700 ; scaleFactorOfSecondFixedSurface = 0 ; } -#Total column sea water practical salinity +#Total column average sea water practical salinity 'scbtm' = { discipline = 10 ; parameterCategory = 4 ; @@ -4329,8 +5058,26 @@ typeOfSecondFixedSurface = 255 ; scaledValueOfFirstFixedSurface = 0 ; scaleFactorOfFirstFixedSurface = 0 ; - scaledValueOfSecondFixedSurface = missing() ; - scaleFactorOfSecondFixedSurface = missing() ; + scaledValueOfSecondFixedSurface = missing() ; + scaleFactorOfSecondFixedSurface = missing() ; + } +#Sea surface height with inverse barometer correction +'zosib' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 20 ; + } +#Average sea water potential temperature in the upper 300m +'pt300m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; } #Sea water practical salinity 'so' = { @@ -4460,6 +5207,14 @@ typeOfFirstFixedSurface = 168 ; typeOfSecondFixedSurface = 168 ; } +#Sea water salinity +'salo' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 168 ; + typeOfSecondFixedSurface = 168 ; + } #Net short wave radiation rate at sea surface 'ssr_sea' = { discipline = 0 ; @@ -4606,7 +5361,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean X-component of sea ice velocity +#Time-mean eastward sea ice velocity 'avg_siue' = { discipline = 10 ; parameterCategory = 2 ; @@ -4619,7 +5374,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean Y-component of sea ice velocity +#Time-mean northward sea ice velocity 'avg_sivn' = { discipline = 10 ; parameterCategory = 2 ; @@ -4840,7 +5595,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean sea surface salinity +#Time-mean sea surface practical salinity 'avg_sos' = { discipline = 10 ; parameterCategory = 3 ; @@ -5074,7 +5829,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean vertically-integrated sea water practical salinity in the upper 300 m +#Time-mean average sea water practical salinity in the upper 300 m 'avg_sc300m' = { discipline = 10 ; parameterCategory = 4 ; @@ -5087,7 +5842,7 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } -#Time-mean vertically-integrated sea water practical salinity in the upper 700 m +#Time-mean average sea water practical salinity in the upper 700 m 'avg_sc700m' = { discipline = 10 ; parameterCategory = 4 ; @@ -5100,7 +5855,7 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } -#Time-mean total column sea water practical salinity +#Time-mean total column average sea water practical salinity 'avg_scbtm' = { discipline = 10 ; parameterCategory = 4 ; @@ -5399,6 +6154,19 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } +#Time-mean average sea water potential temperature in the upper 300m +'avg_pt300m' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } #Time-mean sea water practical salinity 'avg_so' = { discipline = 10 ; @@ -5741,6 +6509,8 @@ discipline = 0 ; parameterCategory = 20 ; parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 255 ; } #Dry deposition velocity 'drydep_vel' = { @@ -5944,6 +6714,112 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 10 ; } +#Net ecosystem exchange flux +'neef' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + } +#Mean net ecosystem exchange flux +'mneef' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + typeOfStatisticalProcessing = 0 ; + } +#Accumulated net ecosystem exchange flux +'aneef' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + typeOfStatisticalProcessing = 1 ; + } +#Gross primary production flux +'gppf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + } +#Mean gross primary production flux +'mgppf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + typeOfStatisticalProcessing = 0 ; + } +#Accumulated gross primary production flux +'agppf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + typeOfStatisticalProcessing = 1 ; + } +#Ecosystem respiration flux +'erf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + } +#Mean ecosystem respiration flux +'merf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + typeOfStatisticalProcessing = 0 ; + } +#Accumulated ecosystem respiration flux +'aerf' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + typeOfStatisticalProcessing = 1 ; + } +#Emission mass flux from bio fuel +'emi_mflx_biofuel' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 8 ; + } +#Emission mass flux from fossil fuel +'emi_mflx_fossilfuel' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 9 ; + } +#Emission mass flux from other +'emi_mflx_other' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 0 ; + } +#Emission mass flux from oceans +'emi_mflx_ocean' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 11 ; + } +#Accumulated wet deposition mass flux +'acc_wetdep_mflx' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 7 ; + typeOfStatisticalProcessing = 1 ; + } +#Accumulated dry deposition mass flux +'acc_drydep_mflx' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 6 ; + typeOfStatisticalProcessing = 1 ; + } #Aerosol number density 'aer_ndens' = { discipline = 0 ; @@ -5968,6 +6844,14 @@ parameterCategory = 2 ; parameterNumber = 0 ; } +#Snowmelt +'snom' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 41 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Mean zero-crossing wave period 'mp2' = { discipline = 10 ; @@ -6004,12 +6888,30 @@ parameterCategory = 0 ; parameterNumber = 5 ; } +#Mean direction of wind waves +'mdww' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 75 ; + } #Mean period of wind waves 'mpww' = { discipline = 10 ; parameterCategory = 0 ; parameterNumber = 6 ; } +#Mean direction of total swell +'mdts' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 74 ; + } +#2D wave spectra (single) +'2dfd' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 86 ; + } #Eastward sea water velocity 'ocu' = { discipline = 10 ; @@ -6024,6 +6926,76 @@ parameterNumber = 3 ; typeOfFirstFixedSurface = 160 ; } +#Skin reservoir content +'srcrea' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 50 ; + } +#Vertical integral of mass of atmosphere +'vima' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 39 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated kinetic energy +'vike' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated enthalpy +'vithe' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated potential + internal energy +'vipie' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of potential+internal+latent energy +'vipile' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated total energy +'vitoe' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of eastward heat flux +'vithee' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 19 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of northward heat flux +'vithen' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 20 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Vertical integral of eastward water vapour flux 'viwve' = { discipline = 0 ; @@ -6040,6 +7012,12 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Vertically integrated moisture divergence flux +'viwvd' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + } #Surface runoff 'sro' = { discipline = 2 ; @@ -6190,6 +7168,48 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } +#Minimum vertical gradient of refractivity inside trapping layer +'dndzn' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 45 ; + } +#Mean vertical gradient of refractivity inside trapping layer +'dndza' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 44 ; + } +#Duct base height +'dctb' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 41 ; + } +#Trapping layer base height +'tplb' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 42 ; + } +#Trapping layer top height +'tplt' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 43 ; + } +#U-component of neutral wind +'u10n' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 56 ; + } +#V-component of neutral wind +'v10n' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 57 ; + } #100 metre U wind component '100u' = { discipline = 0 ; @@ -6435,12 +7455,6 @@ parameterNumber = 0 ; typeOfFirstFixedSurface = 1 ; } -#Surface roughness -'sr' = { - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 1 ; - } #Surface net short-wave (solar) radiation 'ssr' = { discipline = 0 ; @@ -6627,12 +7641,6 @@ parameterCategory = 1 ; parameterNumber = 28 ; } -#Total snowfall -'asnow' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 29 ; - } #Precipitable water category 'pwcat' = { discipline = 0 ; @@ -6778,19 +7786,6 @@ parameterCategory = 1 ; parameterNumber = 54 ; } -#Convective snowfall rate water equivalent -'csrwe' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 55 ; - } -#Large scale snowfall rate water equivalent -'lssrwe' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 56 ; - typeOfFirstFixedSurface = 1 ; - } #Total snowfall rate 'tsrate' = { discipline = 0 ; @@ -7019,7 +8014,7 @@ parameterCategory = 4 ; parameterNumber = 50 ; } -#UV index +#UV index 'uvi' = { discipline = 0 ; parameterCategory = 4 ; @@ -7553,12 +8548,6 @@ parameterCategory = 0 ; parameterNumber = 8 ; } -#Volumetric soil moisture content -'soilw' = { - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 9 ; - } #Ground heat flux 'gflux' = { discipline = 2 ; @@ -7649,60 +8638,12 @@ parameterCategory = 0 ; parameterNumber = 27 ; } -#Upper layer soil temperature -'uplst' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 1 ; - } -#Upper layer soil moisture -'uplsm' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 2 ; - } -#Lower layer soil moisture -'lowlsm' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 3 ; - } -#Bottom layer soil temperature -'botlst' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 4 ; - } -#Liquid volumetric soil moisture (non-frozen) -'soill' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 5 ; - } #Number of soil layers in root zone 'rlyrs' = { discipline = 2 ; parameterCategory = 3 ; parameterNumber = 6 ; } -#Transpiration stress-onset (soil moisture) -'smref' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 7 ; - } -#Direct evaporation cease (soil moisture) -'smdry' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 8 ; - } -#Soil porosity -'poros' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 9 ; - } #Liquid volumetric soil moisture (non-frozen) 'liqvsm' = { discipline = 2 ; @@ -7775,7 +8716,7 @@ parameterCategory = 1 ; parameterNumber = 3 ; } -#Estimated u component of wind +#Estimated u component of wind 'estu' = { discipline = 3 ; parameterCategory = 1 ; @@ -7883,7 +8824,7 @@ parameterCategory = 191 ; parameterNumber = 0 ; } -#Albedo +#Forecast albedo 'al' = { discipline = 0 ; parameterCategory = 19 ; @@ -8039,13 +8980,13 @@ parameterCategory = 2 ; parameterNumber = 16 ; } -#U-component of current +#U-component of current 'ucurr' = { discipline = 10 ; parameterCategory = 1 ; parameterNumber = 2 ; } -#V-component of current +#V-component of current 'vcurr' = { discipline = 10 ; parameterCategory = 1 ; @@ -8141,12 +9082,6 @@ parameterCategory = 2 ; parameterNumber = 7 ; } -#Snow melt -'snom' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 16 ; - } #Direction of swell waves 'swdir' = { discipline = 10 ; @@ -8262,7 +9197,7 @@ parameterCategory = 1 ; parameterNumber = 60 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'sf' = { discipline = 0 ; parameterCategory = 1 ; diff --git a/definitions/grib2/shortName.legacy.def b/definitions/grib2/shortName.legacy.def new file mode 100644 index 000000000..ab51bf25c --- /dev/null +++ b/definitions/grib2/shortName.legacy.def @@ -0,0 +1,54 @@ +#Volumetric soil moisture content +'soilw' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 9 ; + } +#Upper layer soil temperature +'uplst' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + } +#Upper layer soil moisture +'uplsm' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 2 ; + } +#Lower layer soil moisture +'lowlsm' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + } +#Bottom layer soil temperature +'botlst' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 4 ; + } +#Liquid volumetric soil moisture (non-frozen) +'soill' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + } +#Transpiration stress-onset (soil moisture) +'smref' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 7 ; + } +#Direct evaporation cease (soil moisture) +'smdry' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 8 ; + } +#Soil porosity +'poros' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 9 ; + } diff --git a/definitions/grib2/tables/1.0.table b/definitions/grib2/tables/1.0.table index 8401cd1a4..bcd9f7108 100644 --- a/definitions/grib2/tables/1.0.table +++ b/definitions/grib2/tables/1.0.table @@ -30,6 +30,7 @@ 28 28 Version implemented on 15 November 2021 29 29 Version implemented on 15 May 2022 30 30 Version implemented on 15 November 2022 -31 31 Pre-operational to be implemented by next amendment -# 32-254 Future versions +31 31 Version implemented on 15 May 2023 +32 32 Pre-operational to be implemented by next amendment +# 33-254 Future versions 255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used. diff --git a/definitions/grib2/tables/10/4.1.192.table b/definitions/grib2/tables/10/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/10/4.1.192.table +++ b/definitions/grib2/tables/10/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/11/4.1.192.table b/definitions/grib2/tables/11/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/11/4.1.192.table +++ b/definitions/grib2/tables/11/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/12/4.1.192.table b/definitions/grib2/tables/12/4.1.192.table index c428acab0..5ee0de0d5 100644 --- a/definitions/grib2/tables/12/4.1.192.table +++ b/definitions/grib2/tables/12/4.1.192.table @@ -1,4 +1,2 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - - diff --git a/definitions/grib2/tables/13/4.1.192.table b/definitions/grib2/tables/13/4.1.192.table index c428acab0..5ee0de0d5 100644 --- a/definitions/grib2/tables/13/4.1.192.table +++ b/definitions/grib2/tables/13/4.1.192.table @@ -1,4 +1,2 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - - diff --git a/definitions/grib2/tables/15/4.1.192.table b/definitions/grib2/tables/15/4.1.192.table index c428acab0..5ee0de0d5 100644 --- a/definitions/grib2/tables/15/4.1.192.table +++ b/definitions/grib2/tables/15/4.1.192.table @@ -1,4 +1,2 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - - diff --git a/definitions/grib2/tables/16/4.1.192.table b/definitions/grib2/tables/16/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/16/4.1.192.table +++ b/definitions/grib2/tables/16/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/17/4.1.192.table b/definitions/grib2/tables/17/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/17/4.1.192.table +++ b/definitions/grib2/tables/17/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/18/4.1.192.table b/definitions/grib2/tables/18/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/18/4.1.192.table +++ b/definitions/grib2/tables/18/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/19/4.1.192.table b/definitions/grib2/tables/19/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/19/4.1.192.table +++ b/definitions/grib2/tables/19/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/20/4.1.192.table b/definitions/grib2/tables/20/4.1.192.table index c428acab0..5ee0de0d5 100644 --- a/definitions/grib2/tables/20/4.1.192.table +++ b/definitions/grib2/tables/20/4.1.192.table @@ -1,4 +1,2 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - - diff --git a/definitions/grib2/tables/21/4.1.192.table b/definitions/grib2/tables/21/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/21/4.1.192.table +++ b/definitions/grib2/tables/21/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/22/4.1.192.table b/definitions/grib2/tables/22/4.1.192.table index c428acab0..5ee0de0d5 100644 --- a/definitions/grib2/tables/22/4.1.192.table +++ b/definitions/grib2/tables/22/4.1.192.table @@ -1,4 +1,2 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - - diff --git a/definitions/grib2/tables/23/4.1.192.table b/definitions/grib2/tables/23/4.1.192.table index c428acab0..5ee0de0d5 100644 --- a/definitions/grib2/tables/23/4.1.192.table +++ b/definitions/grib2/tables/23/4.1.192.table @@ -1,4 +1,2 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - - diff --git a/definitions/grib2/tables/24/4.1.192.table b/definitions/grib2/tables/24/4.1.192.table index c428acab0..5ee0de0d5 100644 --- a/definitions/grib2/tables/24/4.1.192.table +++ b/definitions/grib2/tables/24/4.1.192.table @@ -1,4 +1,2 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - - diff --git a/definitions/grib2/tables/25/4.1.192.table b/definitions/grib2/tables/25/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/25/4.1.192.table +++ b/definitions/grib2/tables/25/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/26/4.1.192.table b/definitions/grib2/tables/26/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/26/4.1.192.table +++ b/definitions/grib2/tables/26/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/27/4.1.192.table b/definitions/grib2/tables/27/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/27/4.1.192.table +++ b/definitions/grib2/tables/27/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/28/4.1.192.table b/definitions/grib2/tables/28/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/28/4.1.192.table +++ b/definitions/grib2/tables/28/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/29/4.1.192.table b/definitions/grib2/tables/29/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/29/4.1.192.table +++ b/definitions/grib2/tables/29/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/30/4.1.192.table b/definitions/grib2/tables/30/4.1.192.table index c428acab0..5ee0de0d5 100644 --- a/definitions/grib2/tables/30/4.1.192.table +++ b/definitions/grib2/tables/30/4.1.192.table @@ -1,4 +1,2 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - - diff --git a/definitions/grib2/tables/31/0.0.table b/definitions/grib2/tables/31/0.0.table new file mode 100644 index 000000000..71ac57ab3 --- /dev/null +++ b/definitions/grib2/tables/31/0.0.table @@ -0,0 +1,13 @@ +# Code table 0.0 - Discipline of processed data in the GRIB message, number of GRIB Master table +0 0 Meteorological products +1 1 Hydrological products +2 2 Land surface products +3 3 Satellite remote sensing products (formerly Space products) +4 4 Space weather products +# 5-9 Reserved +10 10 Oceanographic products +# 11-19 Reserved +20 20 Health and socioeconomic impacts +# 21-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/1.0.table b/definitions/grib2/tables/31/1.0.table new file mode 100644 index 000000000..1dfcacf9a --- /dev/null +++ b/definitions/grib2/tables/31/1.0.table @@ -0,0 +1,36 @@ +# Code table 1.0 - GRIB master tables version number +0 0 Experimental +1 1 Version implemented on 7 November 2001 +2 2 Version implemented on 4 November 2003 +3 3 Version implemented on 2 November 2005 +4 4 Version implemented on 7 November 2007 +5 5 Version implemented on 4 November 2009 +6 6 Version implemented on 15 September 2010 +7 7 Version implemented on 4 May 2011 +8 8 Version implemented on 2 November 2011 +9 9 Version implemented on 2 May 2012 +10 10 Version implemented on 7 November 2012 +11 11 Version implemented on 8 May 2013 +12 12 Version implemented on 14 November 2013 +13 13 Version implemented on 7 May 2014 +14 14 Version implemented on 5 November 2014 +15 15 Version implemented on 6 May 2015 +16 16 Version implemented on 11 November 2015 +17 17 Version implemented on 4 May 2016 +18 18 Version implemented on 2 November 2016 +19 19 Version implemented on 3 May 2017 +20 20 Version implemented on 8 November 2017 +21 21 Version implemented on 2 May 2018 +22 22 Version implemented on 7 November 2018 +23 23 Version implemented on 15 May 2019 +24 24 Version implemented on 6 November 2019 +25 25 Version implemented on 6 May 2020 +26 26 Version implemented on 16 November 2020 +27 27 Version implemented on 15 June 2021 +28 28 Version implemented on 15 November 2021 +29 29 Version implemented on 15 May 2022 +30 30 Version implemented on 15 November 2022 +31 31 Version implemented on 15 May 2023 +32 32 Pre-operational to be implemented by next amendment +# 33-254 Future versions +255 255 Missing diff --git a/definitions/grib2/tables/31/1.1.table b/definitions/grib2/tables/31/1.1.table new file mode 100644 index 000000000..d50f8fd72 --- /dev/null +++ b/definitions/grib2/tables/31/1.1.table @@ -0,0 +1,4 @@ +# Code table 1.1 - GRIB local tables version number +0 0 Local tables not used. Only table entries and templates from the current master table are valid +# 1-254 Number of local tables version used +255 255 Missing diff --git a/definitions/grib2/tables/31/1.2.table b/definitions/grib2/tables/31/1.2.table new file mode 100644 index 000000000..44ea816e9 --- /dev/null +++ b/definitions/grib2/tables/31/1.2.table @@ -0,0 +1,9 @@ +# Code table 1.2 - Significance of reference time +0 0 Analysis +1 1 Start of forecast +2 2 Verifying time of forecast +3 3 Observation time +4 4 Local time +# 5-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/1.3.table b/definitions/grib2/tables/31/1.3.table new file mode 100644 index 000000000..dc138ef12 --- /dev/null +++ b/definitions/grib2/tables/31/1.3.table @@ -0,0 +1,16 @@ +# Code table 1.3 - Production status of data +0 0 Operational products +1 1 Operational test products +2 2 Research products +3 3 Re-analysis products +4 4 THORPEX Interactive Grand Global Ensemble (TIGGE) +5 5 THORPEX Interactive Grand Global Ensemble test (TIGGE) +6 6 S2S operational products +7 7 S2S test products +8 8 Uncertainties in Ensembles of Regional ReAnalyses project (UERRA) +9 9 Uncertainties in Ensembles of Regional ReAnalyses project test (UERRA) +10 10 Copernicus regional reanalysis (CARRA/CERRA) +11 11 Copernicus regional reanalysis test (CARRA/CERRA) +# 12-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/1.4.table b/definitions/grib2/tables/31/1.4.table new file mode 100644 index 000000000..03203d874 --- /dev/null +++ b/definitions/grib2/tables/31/1.4.table @@ -0,0 +1,13 @@ +# Code table 1.4 - Type of data +0 an Analysis products +1 fc Forecast products +2 af Analysis and forecast products +3 cf Control forecast products +4 pf Perturbed forecast products +5 cp Control and perturbed forecast products +6 sa Processed satellite observations +7 ra Processed radar observations +8 ep Event probability +# 9-191 Reserved +# 192-254 Reserved for local use +255 missing Missing diff --git a/definitions/grib2/tables/31/1.5.table b/definitions/grib2/tables/31/1.5.table new file mode 100644 index 000000000..b2cf9f087 --- /dev/null +++ b/definitions/grib2/tables/31/1.5.table @@ -0,0 +1,7 @@ +# Code table 1.5 - Identification template number +0 0 Calendar definition +1 1 Paleontological offset +2 2 Calendar definition and paleontological offset +# 3-32767 Reserved +# 32768-65534 Reserved for local use +65535 65535 Missing diff --git a/definitions/grib2/tables/31/1.6.table b/definitions/grib2/tables/31/1.6.table new file mode 100644 index 000000000..5db921990 --- /dev/null +++ b/definitions/grib2/tables/31/1.6.table @@ -0,0 +1,8 @@ +# Code table 1.6 - Type of calendar +0 0 Gregorian +1 1 360-day +2 2 365-day +3 3 Proleptic Gregorian +# 4-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/3.0.table b/definitions/grib2/tables/31/3.0.table new file mode 100644 index 000000000..45187b80d --- /dev/null +++ b/definitions/grib2/tables/31/3.0.table @@ -0,0 +1,6 @@ +# Code table 3.0 - Source of grid definition +0 0 Specified in Code table 3.1 +1 1 Predetermined grid definition (Defined by originating centre) +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 A grid definition does not apply to this product diff --git a/definitions/grib2/tables/31/3.1.table b/definitions/grib2/tables/31/3.1.table new file mode 100644 index 000000000..60a5eddb4 --- /dev/null +++ b/definitions/grib2/tables/31/3.1.table @@ -0,0 +1,55 @@ +# Code table 3.1 - Grid definition template number +0 0 Latitude/longitude (Also called equidistant cylindrical, or Plate Carree) +1 1 Rotated latitude/longitude +2 2 Stretched latitude/longitude +3 3 Stretched and rotated latitude/longitude +4 4 Variable resolution latitude/longitude +5 5 Variable resolution rotated latitude/longitude +# 6-9 Reserved +10 10 Mercator +# 11 Reserved +12 12 Transverse Mercator +13 13 Mercator with modelling subdomains definition +# 14-19 Reserved +20 20 Polar stereographic projection (Can be south or north) +# 21-22 Reserved +23 23 Polar stereographic with modelling subdomains definition +# 24-29 Reserved +30 30 Lambert conformal (Can be secant or tangent, conical or bipolar) +31 31 Albers equal area +32 32 Reserved +33 33 Lambert conformal with modelling subdomains definition +# 34-39 Reserved +40 40 Gaussian latitude/longitude +41 41 Rotated Gaussian latitude/longitude +42 42 Stretched Gaussian latitude/longitude +43 43 Stretched and rotated Gaussian latitude/longitude +# 44-49 Reserved +50 50 Spherical harmonic coefficients +51 51 Rotated spherical harmonic coefficients +52 52 Stretched spherical harmonic coefficients +53 53 Stretched and rotated spherical harmonic coefficients +# 54-60 Reserved +61 61 Spectral Mercator with modelling subdomains definition +62 62 Spectral polar stereographic with modelling subdomains definition +63 63 Spectral Lambert conformal with modelling subdomains definition +# 64-89 Reserved +90 90 Space view perspective or orthographic +# 91-99 Reserved +100 100 Triangular grid based on an icosahedron +101 101 General unstructured grid +# 102-109 Reserved +110 110 Equatorial azimuthal equidistant projection +# 111-119 Reserved +120 120 Azimuth-range projection +# 121-139 Reserved +140 140 Lambert azimuthal equal area projection +# 141-999 Reserved +1000 1000 Cross-section grid with points equally spaced on the horizontal +# 1001-1099 Reserved +1100 1100 Hovmoller diagram grid with points equally spaced on the horizontal +# 1101-1199 Reserved +1200 1200 Time section grid +# 1201-32767 Reserved +# 32768-65534 Reserved for local use +65535 65535 Missing diff --git a/definitions/grib2/tables/31/3.10.table b/definitions/grib2/tables/31/3.10.table new file mode 100644 index 000000000..afa8843a7 --- /dev/null +++ b/definitions/grib2/tables/31/3.10.table @@ -0,0 +1,8 @@ +# Flag table 3.10 - Scanning mode for one diamond +1 0 Points scan in +i direction, i.e. from pole to Equator +1 1 Points scan in -i direction, i.e. from Equator to pole +2 0 Points scan in +j direction, i.e. from west to east +2 1 Points scan in -j direction, i.e. from east to west +3 0 Adjacent points in i direction are consecutive +3 1 Adjacent points in j direction are consecutive +# 4-8 Reserved diff --git a/definitions/grib2/tables/31/3.11.table b/definitions/grib2/tables/31/3.11.table new file mode 100644 index 000000000..e516a2ab9 --- /dev/null +++ b/definitions/grib2/tables/31/3.11.table @@ -0,0 +1,7 @@ +# Code table 3.11 - Interpretation of list of numbers at end of section 3 +0 0 There is no appended list +1 1 Numbers define number of points corresponding to full coordinate circles (i.e. parallels), coordinate values on each circle are multiple of the circle mesh, and extreme coordinate values given in grid definition (i.e. extreme longitudes) may not be reached in all rows +2 2 Numbers define number of points corresponding to coordinate lines delimited by extreme coordinate values given in grid definition (i.e. extreme longitudes) which are present in each row +3 3 Numbers define the actual latitudes for each row in the grid. The list of numbers are integer values of the valid latitudes in microdegrees (scaled by 10-6) or in unit equal to the ratio of the basic angle and the subdivisions number for each row, in the same order as specified in the scanning mode flag (bit no. 2) +# 4-254 Reserved +255 255 Missing diff --git a/definitions/grib2/tables/31/3.15.table b/definitions/grib2/tables/31/3.15.table new file mode 100644 index 000000000..7c4626b88 --- /dev/null +++ b/definitions/grib2/tables/31/3.15.table @@ -0,0 +1,23 @@ +# Code table 3.15 - Physical meaning of vertical coordinate +# 0-19 Reserved +20 20 Temperature (K) +# 21-99 Reserved +100 100 Pressure (Pa) +101 101 Pressure deviation from mean sea level (Pa) +102 102 Altitude above mean sea level (m) +103 103 Height above ground (m) +104 104 Sigma coordinate +105 105 Hybrid coordinate +106 106 Depth below land surface (m) +107 pt Potential temperature (theta) (K) +108 108 Pressure deviation from ground to level (Pa) +109 pv Potential vorticity (K m2 kg-1 s-1) +110 110 Geometrical height (m) +111 111 Eta coordinate +112 112 Geopotential height (gpm) +113 113 Logarithmic hybrid coordinate +# 114-159 Reserved +160 160 Depth below sea level (m) +# 161-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/3.2.table b/definitions/grib2/tables/31/3.2.table new file mode 100644 index 000000000..bc3b653d0 --- /dev/null +++ b/definitions/grib2/tables/31/3.2.table @@ -0,0 +1,16 @@ +# Code table 3.2 - Shape of the reference system +0 0 Earth assumed spherical with radius = 6 367 470.0 m +1 1 Earth assumed spherical with radius specified (in m) by data producer +2 2 Earth assumed oblate spheroid with size as determined by IAU in 1965 (major axis = 6 378 160.0 m, minor axis = 6 356 775.0 m, f = 1/297.0) +3 3 Earth assumed oblate spheroid with major and minor axes specified (in km) by data producer +4 4 Earth assumed oblate spheroid as defined in IAG-GRS80 model (major axis = 6 378 137.0 m, minor axis = 6 356 752.314 m, f = 1/298.257 222 101) +5 5 Earth assumed represented by WGS-84 (as used by ICAO since 1998) +6 6 Earth assumed spherical with radius of 6 371 229.0 m +7 7 Earth assumed oblate spheroid with major or minor axes specified (in m) by data producer +8 8 Earth model assumed spherical with radius of 6 371 200 m, but the horizontal datum of the resulting latitude/longitude field is the WGS-84 reference frame +9 9 Earth represented by the Ordnance Survey Great Britain 1936 Datum, using the Airy 1830 Spheroid, the Greenwich meridian as 0 longitude, and the Newlyn datum as mean sea level, 0 height +10 10 Earth model assumed WGS84 with corrected geomagnetic coordinates (latitude and longitude) defined by Gustafsson et al., 1992 +11 11 Sun assumed spherical with radius = 695 990 000 m (Allen, C.W., Astrophysical Quantities, 3rd ed.; Athlone: London, 1976) and Stonyhurst latitude and longitude system with origin at the intersection of the solar central meridian (as seen from Earth) and the solar equator (Thompson, W., Coordinate systems for solar image data, Astron. Astrophys. 2006, 449, 791-803) +# 12-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/3.20.table b/definitions/grib2/tables/31/3.20.table new file mode 100644 index 000000000..efbf08d19 --- /dev/null +++ b/definitions/grib2/tables/31/3.20.table @@ -0,0 +1,6 @@ +# Code table 3.20 - Type of horizontal line +0 0 Rhumb +1 1 Great circle +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/3.21.table b/definitions/grib2/tables/31/3.21.table new file mode 100644 index 000000000..88dbb9019 --- /dev/null +++ b/definitions/grib2/tables/31/3.21.table @@ -0,0 +1,8 @@ +# Code table 3.21 - Vertical dimension coordinate values definition +0 0 Explicit coordinate values set +1 1 Linear coordinates f(1) = C1, f(n) = f(n-1) + C2 +# 2-10 Reserved +11 11 Geometric coordinates f(1) = C1, f(n) = C2 * f(n-1) +# 12-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/3.25.table b/definitions/grib2/tables/31/3.25.table new file mode 100644 index 000000000..de1bc74ed --- /dev/null +++ b/definitions/grib2/tables/31/3.25.table @@ -0,0 +1,10 @@ +# Code table 3.25 - Type of bi-Fourier truncation +# 0-76 Reserved +77 77 Rectangular +# 78-87 Reserved +88 88 Elliptic +# 89-98 Reserved +99 99 Diamond +# 100-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/3.3.table b/definitions/grib2/tables/31/3.3.table new file mode 100644 index 000000000..5dd7c7001 --- /dev/null +++ b/definitions/grib2/tables/31/3.3.table @@ -0,0 +1,9 @@ +# Flag table 3.3 - Resolution and component flags +# 1-2 Reserved +3 0 i direction increments not given +3 1 i direction increments given +4 0 j direction increments not given +4 1 j direction increments given +5 0 Resolved u- and v- components of vector quantities relative to easterly and northerly directions +5 1 Resolved u- and v- components of vector quantities relative to the defined grid in the direction of increasing x and y (or i and j) coordinates, respectively +# 6-8 Reserved - set to zero diff --git a/definitions/grib2/tables/31/3.4.table b/definitions/grib2/tables/31/3.4.table new file mode 100644 index 000000000..e5a628e45 --- /dev/null +++ b/definitions/grib2/tables/31/3.4.table @@ -0,0 +1,17 @@ +# Flag table 3.4 - Scanning mode +1 0 Points of first row or column scan in the +i (+x) direction +1 1 Points of first row or column scan in the -i (-x) direction +2 0 Points of first row or column scan in the -j (-y) direction +2 1 Points of first row or column scan in the +j (+y) direction +3 0 Adjacent points in i (x) direction are consecutive +3 1 Adjacent points in j (y) direction is consecutive +4 0 All rows scan in the same direction +4 1 Adjacent rows scan in the opposite direction +5 0 Points within odd rows are not offset in i (x) direction +5 1 Points within odd rows are offset by Di/2 in i (x) direction +6 0 Points within even rows are not offset in i (x) direction +6 1 Points within even rows are offset by Di/2 in i (x) direction +7 0 Points are not offset in j (y) direction +7 1 Points are offset by Dj/2 in j (y) direction +8 0 Rows have Ni grid points and columns have Nj grid points +8 1 Rows have Ni grid points if points are not offset in i direction Rows have Ni-1 grid points if points are offset by Di/2 in i direction Columns have Nj grid points if points are not offset in j direction Columns have Nj-1 grid points if points are offset by Dj/2 in j direction diff --git a/definitions/grib2/tables/31/3.5.table b/definitions/grib2/tables/31/3.5.table new file mode 100644 index 000000000..eabdde896 --- /dev/null +++ b/definitions/grib2/tables/31/3.5.table @@ -0,0 +1,5 @@ +# Flag table 3.5 - Projection centre +1 0 North Pole is on the projection plane +1 1 South Pole is on the projection plane +2 0 Only one projection centre is used +2 1 Projection is bipolar and symmetric diff --git a/definitions/grib2/tables/31/3.6.table b/definitions/grib2/tables/31/3.6.table new file mode 100644 index 000000000..3133b9cfe --- /dev/null +++ b/definitions/grib2/tables/31/3.6.table @@ -0,0 +1,3 @@ +# Code table 3.6 - Spectral data representation type +1 1 see separate doc or pdf file +2 2 Bi-Fourier representation diff --git a/definitions/grib2/tables/31/3.7.table b/definitions/grib2/tables/31/3.7.table new file mode 100644 index 000000000..cd566487b --- /dev/null +++ b/definitions/grib2/tables/31/3.7.table @@ -0,0 +1,5 @@ +# Code table 3.7 - Spectral data representation mode +0 0 Reserved +1 1 see separate doc or pdf file +# 2-254 Reserved +255 255 Missing diff --git a/definitions/grib2/tables/31/3.8.table b/definitions/grib2/tables/31/3.8.table new file mode 100644 index 000000000..844e74235 --- /dev/null +++ b/definitions/grib2/tables/31/3.8.table @@ -0,0 +1,7 @@ +# Code table 3.8 - Grid point position +0 0 Grid points at triangle vertices +1 1 Grid points at centres of triangles +2 2 Grid points at midpoints of triangle sides +# 3-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/3.9.table b/definitions/grib2/tables/31/3.9.table new file mode 100644 index 000000000..fd730bc64 --- /dev/null +++ b/definitions/grib2/tables/31/3.9.table @@ -0,0 +1,4 @@ +# Flag table 3.9 - Numbering order of diamonds as seen from the corresponding pole +1 0 Clockwise orientation +1 1 Anti-clockwise (i.e. counter-clockwise) orientation +# 2-8 Reserved diff --git a/definitions/grib2/tables/31/4.0.table b/definitions/grib2/tables/31/4.0.table new file mode 100644 index 000000000..7c34c45f3 --- /dev/null +++ b/definitions/grib2/tables/31/4.0.table @@ -0,0 +1,108 @@ +# Code table 4.0 - Product definition template number +0 0 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time +1 1 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time +2 2 Derived forecasts based on all ensemble members at a horizontal level or in a horizontal layer at a point in time +3 3 Derived forecasts based on a cluster of ensemble members over a rectangular area at a horizontal level or in a horizontal layer at a point in time +4 4 Derived forecasts based on a cluster of ensemble members over a circular area at a horizontal level or in a horizontal layer at a point in time +5 5 Probability forecasts at a horizontal level or in a horizontal layer at a point in time +6 6 Percentile forecasts at a horizontal level or in a horizontal layer at a point in time +7 7 Analysis or forecast error at a horizontal level or in a horizontal layer at a point in time +8 8 Average, accumulation, extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval +9 9 Probability forecasts at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval +10 10 Percentile forecasts at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval +11 11 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval +12 12 Derived forecasts based on all ensemble members at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval +13 13 Derived forecasts based on a cluster of ensemble members over a rectangular area, at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval +14 14 Derived forecasts based on a cluster of ensemble members over a circular area, at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval +15 15 Average, accumulation, extreme values or other statistically processed values over a spatial area at a horizontal level or in a horizontal layer at a point in time +# 16-19 Reserved +20 20 Radar product +# 21-29 Reserved +30 30 Satellite product (deprecated) +31 31 Satellite product +32 32 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for simulated (synthetic) satellite data +33 33 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for simulated (synthetic) satellite data +34 34 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval for simulated (synthetic) satellite data +35 35 Satellite product with or without associated quality values +# 36-39 Reserved +40 40 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents +41 41 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents +42 42 Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for atmospheric chemical constituents +43 43 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for atmospheric chemical constituents +44 44 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for aerosol +45 45 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for aerosol +46 46 Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for aerosol +47 47 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for aerosol +48 48 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for optical properties of aerosol +49 49 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for optical properties of aerosol +# 50 Reserved +51 51 Categorical forecasts at a horizontal level or in a horizontal layer at a point in time +# 52 Reserved +53 53 Partitioned parameters at a horizontal level or in a horizontal layer at a point in time +54 54 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for partitioned parameters +55 55 Spatio-temporal changing tiles at a horizontal level or horizontal layer at a point in time +56 56 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for spatio-temporal changing tile parameters (deprecated) +57 57 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents based on a distribution function +58 58 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents based on a distribution function +59 59 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for spatio-temporal changing tile parameters (corrected version of template 4.56) +60 60 Individual ensemble reforecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time +61 61 Individual ensemble reforecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous time interval +62 62 Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for spatio-temporal changing tiles at a horizontal level or horizontal layer at a point in time +63 63 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for spatio-temporal changing tiles +# 64-66 Reserved +67 67 Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for atmospheric chemical constituents based on a distribution function +68 68 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for atmospheric chemical constituents based on a distribution function +# 69 Reserved +70 70 Post-processing analysis or forecast at a horizontal level or in a horizontal layer at a point in time +71 71 Post-processing individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time +72 72 Post-processing average, accumulation, extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval +73 73 Post-processing individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous time interval +# 74-75 Reserved +76 76 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents with source or sink +77 77 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents with source or sink +78 78 Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for atmospheric chemical constituents with source or sink +79 79 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for atmospheric chemical constituents with source or sink +80 80 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for optical properties of aerosol with source or sink +81 81 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for optical properties of aerosol with source or sink +82 82 Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for aerosol with source or sink +83 83 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for aerosol with source or sink +84 84 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for aerosol with source or sink +85 85 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for aerosol +86 86 Quantile forecasts at a horizontal level or in a horizontal layer at a point in time +87 87 Quantile forecasts at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval +88 88 Analysis or forecast at a horizontal level or in a horizontal layer at a specified local time +# 89-90 Reserved +91 91 Categorical forecasts at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval +92 92 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a specified local time +93 93 Post-processing analysis or forecast at a horizontal level or in a horizontal layer at a specified local time +94 94 Post-processing individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a specified local time +95 95 Average, accumulation, extreme values or other statiscally processed value at a horizontal level or in a horizontal layer at a specified local time +96 96 Average, accumulation, extreme values or other statistically processed values of an individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a specified local time +97 97 Average, accumulation, extreme values or other statistically processed values of post-processing analysis or forecast at a horizontal level or in a horizontal layer at a specified local time +98 98 Average, accumulation, extreme values or other statistically processed values of a post-processing individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a specified local time +99 99 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for wave 2D spectra with explicit list of frequencies and directions +100 100 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for wave 2D spectra with explicit list of frequencies and directions +101 101 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for wave 2D spectra with frequencies and directions defined by formulae +102 102 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for wave 2D spectra with frequencies and directions defined by formulae +103 103 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for waves selected by period range +104 104 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for waves selected by period range +105 105 Anomalies, significance and other derived products from an analysis or forecast in relation to a reference period at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval +106 106 Anomalies, significance and other derived products from an individual ensemble forecast, control and perturbed in relation to a reference period at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval +107 107 Anomalies, significance and other derived products from derived forecasts based on all ensemble members in relation to a reference period at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval +108 108 Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for generic optical products +109 109 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for generic optical products +110 110 Average, accumulation, extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for generic optical products +111 111 Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval for generic optical products +112 112 Anomalies, significance and other derived products as probability forecasts in relation to a reference period at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval +# 113-253 Reserved +254 254 CCITT IA5 character string +# 255-999 Reserved +1000 1000 Cross-section of analysis and forecast at a point in time +1001 1001 Cross-section of averaged or otherwise statistically processed analysis or forecast over a range of time +1002 1002 Cross-section of analysis and forecast, averaged or otherwise statistically processed over latitude or longitude +# 1003-1099 Reserved +1100 1100 Hovmoller-type grid with no averaging or other statistical processing +1101 1101 Hovmoller-type grid with averaging or other statistical processing +# 1102-32767 Reserved +# 32768-65534 Reserved for local use +65535 65535 Missing diff --git a/definitions/grib2/tables/31/4.1.0.table b/definitions/grib2/tables/31/4.1.0.table new file mode 100644 index 000000000..9462cde19 --- /dev/null +++ b/definitions/grib2/tables/31/4.1.0.table @@ -0,0 +1,28 @@ +# Product discipline 0 - Meteorological products +0 0 Temperature +1 1 Moisture +2 2 Momentum +3 3 Mass +4 4 Short-wave radiation +5 5 Long-wave radiation +6 6 Cloud +7 7 Thermodynamic stability indices +8 8 Kinematic stability indices +9 9 Temperature probabilities +10 10 Moisture probabilities +11 11 Momentum probabilities +12 12 Mass probabilities +13 13 Aerosols +14 14 Trace gases (e.g. ozone, CO2) +15 15 Radar +16 16 Forecast radar imagery +17 17 Electrodynamics +18 18 Nuclear/radiology +19 19 Physical atmospheric properties +20 20 Atmospheric chemical constituents +21 21 Thermodynamic properties +# 22-189 Reserved +190 190 CCITT IA5 string +191 191 Miscellaneous +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.1.1.table b/definitions/grib2/tables/31/4.1.1.table new file mode 100644 index 000000000..20af0032a --- /dev/null +++ b/definitions/grib2/tables/31/4.1.1.table @@ -0,0 +1,7 @@ +# Product discipline 1 - Hydrological products +0 0 Hydrology basic products +1 1 Hydrology probabilities +2 2 Inland water and sediment properties +# 3-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.1.10.table b/definitions/grib2/tables/31/4.1.10.table new file mode 100644 index 000000000..afaea7619 --- /dev/null +++ b/definitions/grib2/tables/31/4.1.10.table @@ -0,0 +1,10 @@ +# Product discipline 10 - Oceanographic products +0 0 Waves +1 1 Currents +2 2 Ice +3 3 Surface properties +4 4 Subsurface properties +# 5-190 Reserved +191 191 Miscellaneous +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.1.192.table b/definitions/grib2/tables/31/4.1.192.table new file mode 100644 index 000000000..5ee0de0d5 --- /dev/null +++ b/definitions/grib2/tables/31/4.1.192.table @@ -0,0 +1,2 @@ +#Discipline 192: ECMWF local parameters +255 255 Missing diff --git a/definitions/grib2/tables/31/4.1.2.table b/definitions/grib2/tables/31/4.1.2.table new file mode 100644 index 000000000..3d67e0ceb --- /dev/null +++ b/definitions/grib2/tables/31/4.1.2.table @@ -0,0 +1,11 @@ +# Product discipline 2 - Land surface products +0 0 Vegetation/biomass +1 1 Agri-/aquacultural special products +2 2 Transportation-related products +3 3 Soil products +4 4 Fire weather products +5 5 Glaciers and inland ice +6 6 Urban areas +# 7-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.1.20.table b/definitions/grib2/tables/31/4.1.20.table new file mode 100644 index 000000000..235ed5810 --- /dev/null +++ b/definitions/grib2/tables/31/4.1.20.table @@ -0,0 +1,7 @@ +# Product discipline 20 - Health and socioeconomic impacts +0 0 Health indicators +1 1 Epidemiology +2 2 Socioeconomic indicators +# 3-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.1.3.table b/definitions/grib2/tables/31/4.1.3.table new file mode 100644 index 000000000..130b899bf --- /dev/null +++ b/definitions/grib2/tables/31/4.1.3.table @@ -0,0 +1,11 @@ +# Product discipline 3 - Satellite remote sensing products (formerly Space products) +0 0 Image format products +1 1 Quantitative products +2 2 Cloud properties +3 3 Flight rule conditions +4 4 Volcanic ash +5 5 Sea-surface temperature +6 6 Solar radiation +# 7-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.1.4.table b/definitions/grib2/tables/31/4.1.4.table new file mode 100644 index 000000000..3c769dcf7 --- /dev/null +++ b/definitions/grib2/tables/31/4.1.4.table @@ -0,0 +1,15 @@ +# Product discipline 4 - Space weather products +0 0 Temperature +1 1 Momentum +2 2 Charged particle mass and number +3 3 Electric and magnetic fields +4 4 Energetic particles +5 5 Waves +6 6 Solar electromagnetic emissions +7 7 Terrestrial electromagnetic emissions +8 8 Imagery +9 9 Ion-neutral coupling +10 10 Space weather indices +# 11-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.10.table b/definitions/grib2/tables/31/4.10.table new file mode 100644 index 000000000..1eee9c096 --- /dev/null +++ b/definitions/grib2/tables/31/4.10.table @@ -0,0 +1,20 @@ +# Code table 4.10 - Type of statistical processing +0 avg Average +1 accum Accumulation +2 max Maximum +3 min Minimum +4 diff Difference (value at the end of time range minus value at the beginning) +5 rms Root mean square +6 sd Standard deviation +7 cov Covariance (temporal variance) +8 8 Difference (value at the start of time range minus value at the end) +9 ratio Ratio +10 10 Standardized anomaly +11 11 Summation +12 12 Return period +# 13-99 Reserved +100 100 Severity +101 101 Mode +# 102-191 Reserved +# 192-254 Reserved for local use +255 missing Missing diff --git a/definitions/grib2/tables/31/4.100.table b/definitions/grib2/tables/31/4.100.table new file mode 100644 index 000000000..c31865fb2 --- /dev/null +++ b/definitions/grib2/tables/31/4.100.table @@ -0,0 +1,10 @@ +# Code table 4.100 - Type of reference dataset +0 0 Analysis +1 1 Forecast +2 2 Reforecast (Hindcast) +3 3 Reanalysis +4 4 Climate projection +5 5 Gridded observations +# 6-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.101.table b/definitions/grib2/tables/31/4.101.table new file mode 100644 index 000000000..7b0c295f3 --- /dev/null +++ b/definitions/grib2/tables/31/4.101.table @@ -0,0 +1,10 @@ +# Code table 4.101 - Type of relationship to reference dataset +0 0 Anomaly +1 1 Standardized anomaly +2 2 Significance (Wilcoxon-Mann-Whitney) +# 3-19 Reserved +20 20 Extreme Forecast Index (EFI) +21 21 Shift of Tails (SOT) +# 22-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.102.table b/definitions/grib2/tables/31/4.102.table new file mode 100644 index 000000000..e24b1bf29 --- /dev/null +++ b/definitions/grib2/tables/31/4.102.table @@ -0,0 +1,11 @@ +# Code table 4.102 - Statistical processing of reference period +0 0 Average +1 1 Accumulation +2 2 Maximum +3 3 Minimum +4 4 Median +# 5-19 Reserved +20 20 Model Climate +# 21-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.11.table b/definitions/grib2/tables/31/4.11.table new file mode 100644 index 000000000..7f404c849 --- /dev/null +++ b/definitions/grib2/tables/31/4.11.table @@ -0,0 +1,10 @@ +# Code table 4.11 - Type of time intervals +0 0 Reserved +1 1 Successive times processed have same forecast time, start time of forecast is incremented +2 2 Successive times processed have same start time of forecast, forecast time is incremented +3 3 Successive times processed have start time of forecast incremented and forecast time decremented so that valid time remains constant +4 4 Successive times processed have start time of forecast decremented and forecast time incremented so that valid time remains constant +5 5 Floating subinterval of time between forecast time and end of overall time interval +# 6-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.12.table b/definitions/grib2/tables/31/4.12.table new file mode 100644 index 000000000..03fd89b36 --- /dev/null +++ b/definitions/grib2/tables/31/4.12.table @@ -0,0 +1,7 @@ +# Code table 4.12 - Operating mode +0 0 Maintenance mode +1 1 Clear air +2 2 Precipitation +# 3-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.13.table b/definitions/grib2/tables/31/4.13.table new file mode 100644 index 000000000..c92854eec --- /dev/null +++ b/definitions/grib2/tables/31/4.13.table @@ -0,0 +1,6 @@ +# Code table 4.13 - Quality control indicator +0 0 No quality control applied +1 1 Quality control applied +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.14.table b/definitions/grib2/tables/31/4.14.table new file mode 100644 index 000000000..a88cb93fa --- /dev/null +++ b/definitions/grib2/tables/31/4.14.table @@ -0,0 +1,6 @@ +# Code table 4.14 - Clutter filter indicator +0 0 No clutter filter used +1 1 Clutter filter used +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.15.table b/definitions/grib2/tables/31/4.15.table new file mode 100644 index 000000000..2e5f3dea3 --- /dev/null +++ b/definitions/grib2/tables/31/4.15.table @@ -0,0 +1,11 @@ +# Code table 4.15 - Type of spatial processing used to arrive at given data value from the source data +0 0 Data is calculated directly from the source grid with no interpolation +1 1 Bilinear interpolation using the 4 source grid grid-point values surrounding the nominal grid-point +2 2 Bicubic interpolation using the 4 source grid grid-point values surrounding the nominal grid-point +3 3 Using the value from the source grid grid-point which is nearest to the nominal grid-point +4 4 Budget interpolation using the 4 source grid grid-point values surrounding the nominal grid-point +5 5 Spectral interpolation using the 4 source grid grid-point values surrounding the nominal grid-point +6 6 Neighbor-budget interpolation using the 4 source grid grid-point values surrounding the nominal grid-point +# 7-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.16.table b/definitions/grib2/tables/31/4.16.table new file mode 100644 index 000000000..fedb05324 --- /dev/null +++ b/definitions/grib2/tables/31/4.16.table @@ -0,0 +1,10 @@ +# Code table 4.16 - Quality value associated with parameter +0 0 Confidence index +1 1 Quality indicator +2 2 Correlation of product with used calibration product +3 3 Standard deviation +4 4 Random error +5 5 Probability +# 6-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.192.table b/definitions/grib2/tables/31/4.192.table new file mode 100644 index 000000000..e1fd91594 --- /dev/null +++ b/definitions/grib2/tables/31/4.192.table @@ -0,0 +1,4 @@ +1 1 first +2 2 second +3 3 third +4 4 fourth diff --git a/definitions/grib2/tables/31/4.2.0.0.table b/definitions/grib2/tables/31/4.2.0.0.table new file mode 100644 index 000000000..a2dff3668 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.0.table @@ -0,0 +1,37 @@ +# Product discipline 0 - Meteorological products, parameter category 0: temperature +0 0 Temperature (K) +1 1 Virtual temperature (K) +2 2 Potential temperature (K) +3 3 Pseudo-adiabatic potential temperature or equivalent potential temperature (K) +4 4 Maximum temperature (K) +5 5 Minimum temperature (K) +6 6 Dewpoint temperature (K) +7 7 Dewpoint depression (or deficit) (K) +8 8 Lapse rate (K/m) +9 9 Temperature anomaly (K) +10 10 Latent heat net flux (W m-2) +11 11 Sensible heat net flux (W m-2) +12 12 Heat index (K) +13 13 Wind chill factor (K) +14 14 Minimum dewpoint depression (K) +15 15 Virtual potential temperature (K) +16 16 Snow phase change heat flux (W m-2) +17 17 Skin temperature (K) +18 18 Snow temperature (top of snow) (K) +19 19 Turbulent transfer coefficient for heat (Numeric) +20 20 Turbulent diffusion coefficient for heat (m2/s) +21 21 Apparent temperature (K) +22 22 Temperature tendency due to short-wave radiation (K s-1) +23 23 Temperature tendency due to long-wave radiation (K s-1) +24 24 Temperature tendency due to short-wave radiation, clear sky (K s-1) +25 25 Temperature tendency due to long-wave radiation, clear sky (K s-1) +26 26 Temperature tendency due to parameterization (K s-1) +27 27 Wet-bulb temperature (K) +28 28 Unbalanced component of temperature (K) +29 29 Temperature advection (K s-1) +30 30 Latent heat net flux due to evaporation (W m-2) +31 31 Latent heat net flux due to sublimation (W m-2) +32 32 Wet-bulb potential temperature (K) +# 33-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.1.table b/definitions/grib2/tables/31/4.2.0.1.table new file mode 100644 index 000000000..85bc9fb64 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.1.table @@ -0,0 +1,172 @@ +# Product discipline 0 - Meteorological products, parameter category 1: moisture +0 0 Specific humidity (kg/kg) +1 1 Relative humidity (%) +2 2 Humidity mixing ratio (kg/kg) +3 3 Precipitable water (kg m-2) +4 4 Vapour pressure (Pa) +5 5 Saturation deficit (Pa) +6 6 Evaporation (kg m-2) +7 7 Precipitation rate (kg m-2 s-1) +8 8 Total precipitation (kg m-2) +9 9 Large-scale precipitation (non-convective) (kg m-2) +10 10 Convective precipitation (kg m-2) +11 11 Snow depth (m) +12 12 Snowfall rate water equivalent (kg m-2 s-1) +13 13 Water equivalent of accumulated snow depth (kg m-2) +14 14 Convective snow (kg m-2) +15 15 Large-scale snow (kg m-2) +16 16 Snow melt (kg m-2) +17 17 Snow age (d) +18 18 Absolute humidity (kg m-3) +19 19 Precipitation type (Code table 4.201) +20 20 Integrated liquid water (kg m-2) +21 21 Condensate (kg/kg) +22 22 Cloud mixing ratio (kg/kg) +23 23 Ice water mixing ratio (kg/kg) +24 24 Rain mixing ratio (kg/kg) +25 25 Snow mixing ratio (kg/kg) +26 26 Horizontal moisture convergence (kg kg-1 s-1) +27 27 Maximum relative humidity (%) +28 28 Maximum absolute humidity (kg m-3) +29 29 Total snowfall (m) +30 30 Precipitable water category (Code table 4.202) +31 31 Hail (m) +32 32 Graupel (snow pellets) (kg/kg) +33 33 Categorical rain (Code table 4.222) +34 34 Categorical freezing rain (Code table 4.222) +35 35 Categorical ice pellets (Code table 4.222) +36 36 Categorical snow (Code table 4.222) +37 37 Convective precipitation rate (kg m-2 s-1) +38 38 Horizontal moisture divergence (kg kg-1 s-1) +39 39 Per cent frozen precipitation (%) +40 40 Potential evaporation (kg m-2) +41 41 Potential evaporation rate (W m-2) +42 42 Snow cover (%) +43 43 Rain fraction of total cloud water (Proportion) +44 44 Rime factor (Numeric) +45 45 Total column integrated rain (kg m-2) +46 46 Total column integrated snow (kg m-2) +47 47 Large scale water precipitation (non-convective) (kg m-2) +48 48 Convective water precipitation (kg m-2) +49 49 Total water precipitation (kg m-2) +50 50 Total snow precipitation (kg m-2) +51 51 Total column water [Vertically integrated total water=vapour + cloud water/ice] (kg m-2) +52 52 Total precipitation rate (kg m-2 s-1) +53 53 Total snowfall rate water equivalent (kg m-2 s-1) +54 54 Large scale precipitation rate (kg m-2 s-1) +55 55 Convective snowfall rate water equivalent (kg m-2 s-1) +56 56 Large scale snowfall rate water equivalent (kg m-2 s-1) +57 57 Total snowfall rate (m/s) +58 58 Convective snowfall rate (m/s) +59 59 Large scale snowfall rate (m/s) +60 60 Snow depth water equivalent (kg m-2) +61 61 Snow density (kg m-3) +62 62 Snow evaporation (kg m-2) +63 63 Reserved +64 64 Total column integrated water vapour (kg m-2) +65 65 Rain precipitation rate (kg m-2 s-1) +66 66 Snow precipitation rate (kg m-2 s-1) +67 67 Freezing rain precipitation rate (kg m-2 s-1) +68 68 Ice pellets precipitation rate (kg m-2 s-1) +69 69 Total column integrated cloud water (kg m-2) +70 70 Total column integrated cloud ice (kg m-2) +71 71 Hail mixing ratio (kg/kg) +72 72 Total column integrated hail (kg m-2) +73 73 Hail precipitation rate (kg m-2 s-1) +74 74 Total column integrated graupel (kg m-2) +75 75 Graupel (snow pellets) precipitation rate (kg m-2 s-1) +76 76 Convective rain rate (kg m-2 s-1) +77 77 Large scale rain rate (kg m-2 s-1) +78 78 Total column integrated water (all components including precipitation) (kg m-2) +79 79 Evaporation rate (kg m-2 s-1) +80 80 Total condensate (kg/kg) +81 81 Total column-integrated condensate (kg m-2) +82 82 Cloud ice mixing-ratio (kg/kg) +83 83 Specific cloud liquid water content (kg/kg) +84 84 Specific cloud ice water content (kg/kg) +85 85 Specific rainwater content (kg/kg) +86 86 Specific snow water content (kg/kg) +87 87 Stratiform precipitation rate (kg m-2 s-1) +88 88 Categorical convective precipitation (Code table 4.222) +# 89 Reserved +90 90 Total kinematic moisture flux (kg kg-1 m s-1) +91 91 u-component (zonal) kinematic moisture flux (kg kg-1 m s-1) +92 92 v-component (meridional) kinematic moisture flux (kg kg-1 m s-1) +93 93 Relative humidity with respect to water (%) +94 94 Relative humidity with respect to ice (%) +95 95 Freezing or frozen precipitation rate (kg m-2 s-1) +96 96 Mass density of rain (kg m-3) +97 97 Mass density of snow (kg m-3) +98 98 Mass density of graupel (kg m-3) +99 99 Mass density of hail (kg m-3) +100 100 Specific number concentration of rain (kg-1) +101 101 Specific number concentration of snow (kg-1) +102 102 Specific number concentration of graupel (kg-1) +103 103 Specific number concentration of hail (kg-1) +104 104 Number density of rain (m-3) +105 105 Number density of snow (m-3) +106 106 Number density of graupel (m-3) +107 107 Number density of hail (m-3) +108 108 Specific humidity tendency due to parameterization (kg kg-1 s-1) +109 109 Mass density of liquid water coating on hail expressed as mass of liquid water per unit volume of air (kg m-3) +110 110 Specific mass of liquid water coating on hail expressed as mass of liquid water per unit mass of moist air (kg kg-1) +111 111 Mass mixing ratio of liquid water coating on hail expressed as mass of liquid water per unit mass of dry air (kg kg-1) +112 112 Mass density of liquid water coating on graupel expressed as mass of liquid water per unit volume of air (kg m-3) +113 113 Specific mass of liquid water coating on graupel expressed as mass of liquid water per unit mass of moist air (kg kg-1) +114 114 Mass mixing ratio of liquid water coating on graupel expressed as mass of liquid water per unit mass of dry air (kg kg-1) +115 115 Mass density of liquid water coating on snow expressed as mass of liquid water per unit volume of air (kg m-3) +116 116 Specific mass of liquid water coating on snow expressed as mass of liquid water per unit mass of moist air (kg kg-1) +117 117 Mass mixing ratio of liquid water coating on snow expressed as mass of liquid water per unit mass of dry air (kg kg-1) +118 118 Unbalanced component of specific humidity (kg kg-1) +119 119 Unbalanced component of specific cloud liquid water content (kg kg-1) +120 120 Unbalanced component of specific cloud ice water content (kg kg-1) +121 121 Fraction of snow cover (Proportion) +122 122 Precipitation intensity index (Code table 4.247) +123 123 Dominant precipitation type (Code table 4.201) +124 124 Presence of showers (Code table 4.222) +125 125 Presence of blowing snow (Code table 4.222) +126 126 Presence of blizzard (Code table 4.222) +127 127 Ice pellets (non-water equivalent) precipitation rate (m/s) +128 128 Total solid precipitation rate (kg m-2 s-1) +129 129 Effective radius of cloud water (m) +130 130 Effective radius of rain (m) +131 131 Effective radius of cloud ice (m) +132 132 Effective radius of snow (m) +133 133 Effective radius of graupel (m) +134 134 Effective radius of hail (m) +135 135 Effective radius of subgrid liquid clouds (m) +136 136 Effective radius of subgrid ice clouds (m) +137 137 Effective aspect ratio of rain (-) +138 138 Effective aspect ratio of cloud ice (-) +139 139 Effective aspect ratio of snow (-) +140 140 Effective aspect ratio of graupel (-) +141 141 Effective aspect ratio of hail (-) +142 142 Effective aspect ratio of subgrid ice clouds (-) +143 143 Potential evaporation rate (kg m-2 s-1) +144 144 Specific rain water content (convective) (kg kg-1) +145 145 Specific snow water content (convective) (kg kg-1) +146 146 Cloud ice precipitation rate (kg m-2 s-1) +147 147 Character of precipitation (Code table 4.249) +148 148 Snow evaporation rate (kg m-2 s-1) +149 149 Cloud water mixing ratio (kg kg-1) +150 150 Column integrated eastward water vapour mass flux (kg m-1 s-1) +151 151 Column integrated northward water vapour mass flux (kg m-1 s-1) +152 152 Column integrated eastward cloud liquid water mass flux (kg m-1 s-1) +153 153 Column integrated northward cloud liquid water mass flux (kg m-1 s-1) +154 154 Column integrated eastward cloud ice mass flux (kg m-1 s-1) +155 155 Column integrated northward cloud ice mass flux (kg m-1 s-1) +156 156 Column integrated eastward rain mass flux (kg m-1 s-1) +157 157 Column integrated northward rain mass flux (kg m-1 s-1) +158 158 Column integrated eastward snow mass flux (kg m-1 s-1) +159 159 Column integrated northward snow mass flux (kg m-1 s-1) +160 160 Column integrated divergence of water vapour mass flux (kg m-2 s-1) +161 161 Column integrated divergence of cloud liquid water mass flux (kg m-2 s-1) +162 162 Column integrated divergence of cloud ice mass flux (kg m-2 s-1) +163 163 Column integrated divergence of rain mass flux (kg m-2 s-1) +164 164 Column integrated divergence of snow mass flux (kg m-2 s-1) +165 165 Column integrated divergence of total water mass flux (kg m-2 s-1) +166 166 Column integrated water vapour flux (kg m-2 s-1) +167 167 Total column supercooled liquid water (kg m-2) +# 168-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.13.table b/definitions/grib2/tables/31/4.2.0.13.table new file mode 100644 index 000000000..fc7344d7e --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.13.table @@ -0,0 +1,5 @@ +# Product discipline 0 - Meteorological products, parameter category 13: aerosols +0 0 Aerosol type (Code table 4.205) +# 1-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.14.table b/definitions/grib2/tables/31/4.2.0.14.table new file mode 100644 index 000000000..87f1db9a2 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.14.table @@ -0,0 +1,7 @@ +# Product discipline 0 - Meteorological products, parameter category 14: trace gases +0 0 Total ozone (DU) +1 1 Ozone mixing ratio (kg/kg) +2 2 Total column integrated ozone (DU) +# 3-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.15.table b/definitions/grib2/tables/31/4.2.0.15.table new file mode 100644 index 000000000..02d0fcbf3 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.15.table @@ -0,0 +1,21 @@ +# Product discipline 0 - Meteorological products, parameter category 15: radar +0 0 Base spectrum width (m/s) +1 1 Base reflectivity (dB) +2 2 Base radial velocity (m/s) +3 3 Vertically integrated liquid water (VIL) (kg m-2) +4 4 Layer-maximum base reflectivity (dB) +5 5 Precipitation (kg m-2) +6 6 Radar spectra (1) (-) +7 7 Radar spectra (2) (-) +8 8 Radar spectra (3) (-) +9 9 Reflectivity of cloud droplets (dB) +10 10 Reflectivity of cloud ice (dB) +11 11 Reflectivity of snow (dB) +12 12 Reflectivity of rain (dB) +13 13 Reflectivity of graupel (dB) +14 14 Reflectivity of hail (dB) +15 15 Hybrid scan reflectivity (dB) +16 16 Hybrid scan reflectivity height (m) +# 17-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.16.table b/definitions/grib2/tables/31/4.2.0.16.table new file mode 100644 index 000000000..faaa32d16 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.16.table @@ -0,0 +1,10 @@ +# Product discipline 0 - Meteorological products, parameter category 16: forecast radar imagery +0 0 Equivalent radar reflectivity factor for rain (mm6 m-3) +1 1 Equivalent radar reflectivity factor for snow (mm6 m-3) +2 2 Equivalent radar reflectivity factor for parameterized convection (mm6 m-3) +3 3 Echo top (m) +4 4 Reflectivity (dB) +5 5 Composite reflectivity (dB) +# 6-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.17.table b/definitions/grib2/tables/31/4.2.0.17.table new file mode 100644 index 000000000..90ef72d87 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.17.table @@ -0,0 +1,7 @@ +# Product discipline 0 - Meteorological products, parameter category 17: electrodynamics +0 0 Lightning strike density (m-2 s-1) +1 1 Lightning potential index (LPI) (J kg-1) +2 2 Cloud-to-ground lightning flash density (km-2 day-1) +3 3 Cloud-to-cloud lightning flash density (km-2 day-1) +4 4 Total lightning flash density (km-2 day-1) +5 5 Subgrid-scale lightning potential index (J kg-1) diff --git a/definitions/grib2/tables/31/4.2.0.18.table b/definitions/grib2/tables/31/4.2.0.18.table new file mode 100644 index 000000000..fe2dac3dc --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.18.table @@ -0,0 +1,23 @@ +# Product discipline 0 - Meteorological products, parameter category 18: nuclear/radiology +0 0 Air concentration of caesium 137 (Bq m-3) +1 1 Air concentration of iodine 131 (Bq m-3) +2 2 Air concentration of radioactive pollutant (Bq m-3) +3 3 Ground deposition of caesium 137 (Bq m-2) +4 4 Ground deposition of iodine 131 (Bq m-2) +5 5 Ground deposition of radioactive pollutant (Bq m-2) +6 6 Time-integrated air concentration of caesium pollutant (Bq s m-3) +7 7 Time-integrated air concentration of iodine pollutant (Bq s m-3) +8 8 Time-integrated air concentration of radioactive pollutant (Bq s m-3) +9 9 Reserved +10 10 Air concentration (Bq m-3) +11 11 Wet deposition (Bq m-2) +12 12 Dry deposition (Bq m-2) +13 13 Total deposition (wet + dry) (Bq m-2) +14 14 Specific activity concentration (Bq kg-1) +15 15 Maximum of air concentration in layer (Bq m-3) +16 16 Height of maximum air concentration (m) +17 17 Column-integrated air concentration (Bq m-2) +18 18 Column-averaged air concentration in layer (Bq m-3) +# 19-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.19.table b/definitions/grib2/tables/31/4.2.0.19.table new file mode 100644 index 000000000..b6b71b358 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.19.table @@ -0,0 +1,50 @@ +# Product discipline 0 - Meteorological products, parameter category 19: physical atmospheric properties +0 0 Visibility (m) +1 1 Albedo (%) +2 2 Thunderstorm probability (%) +3 3 Mixed layer depth (m) +4 4 Volcanic ash (Code table 4.206) +5 5 Icing top (m) +6 6 Icing base (m) +7 7 Icing (Code table 4.207) +8 8 Turbulence top (m) +9 9 Turbulence base (m) +10 10 Turbulence (Code table 4.208) +11 11 Turbulent kinetic energy (J/kg) +12 12 Planetary boundary-layer regime (Code table 4.209) +13 13 Contrail intensity (Code table 4.210) +14 14 Contrail engine type (Code table 4.211) +15 15 Contrail top (m) +16 16 Contrail base (m) +17 17 Maximum snow albedo (%) +18 18 Snow free albedo (%) +19 19 Snow albedo (%) +20 20 Icing (%) +21 21 In-cloud turbulence (%) +22 22 Clear air turbulence (CAT) (%) +23 23 Supercooled large droplet probability (%) +24 24 Convective turbulent kinetic energy (J/kg) +25 25 Weather (Code table 4.225) +26 26 Convective outlook (Code table 4.224) +27 27 Icing scenario (Code table 4.227) +28 28 Mountain wave turbulence (eddy dissipation rate) (m2/3 s-1) +29 29 Clear air turbulence (CAT) (m2/3 s-1) +30 30 Eddy dissipation parameter (m2/3 s-1) +31 31 Maximum of eddy dissipation parameter in layer (m2/3 s-1) +32 32 Highest freezing level (m) +33 33 Visibility through liquid fog (m) +34 34 Visibility through ice fog (m) +35 35 Visibility through blowing snow (m) +36 36 Presence of snow squalls (Code table 4.222) +37 37 Icing severity (Code table 4.228) +38 38 Sky transparency index (Code table 4.214) +39 39 Seeing index (Code table 4.214) +40 40 Snow level (m) +41 41 Duct base height (m) +42 42 Trapping layer base height (m) +43 43 Trapping layer top height (m) +44 44 Mean vertical gradient of refractivity inside trapping layer (m-1) +45 45 Minimum vertical gradient of refractivity inside trapping layer (m-1) +# 46-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.190.table b/definitions/grib2/tables/31/4.2.0.190.table new file mode 100644 index 000000000..e5d6618cf --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.190.table @@ -0,0 +1,5 @@ +# Product discipline 0 - Meteorological products, parameter category 190: CCITT IA5 string +0 0 Arbitrary text string (CCITT IA5) +# 1-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.191.table b/definitions/grib2/tables/31/4.2.0.191.table new file mode 100644 index 000000000..d375dbd4a --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.191.table @@ -0,0 +1,8 @@ +# Product discipline 0 - Meteorological products, parameter category 191: miscellaneous +0 0 Seconds prior to initial reference time (defined in Section 1) (s) +1 1 Geographical latitude (deg N) +2 2 Geographical longitude (deg E) +3 3 Days since last observation (d) +# 4-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.2.table b/definitions/grib2/tables/31/4.2.0.2.table new file mode 100644 index 000000000..ae4d43c52 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.2.table @@ -0,0 +1,63 @@ +# Product discipline 0 - Meteorological products, parameter category 2: momentum +0 0 Wind direction (from which blowing) (degree true) +1 1 Wind speed (m/s) +2 2 u-component of wind (m/s) +3 3 v-component of wind (m/s) +4 4 Stream function (m2/s) +5 5 Velocity potential (m2/s) +6 6 Montgomery stream function (m2 s-2) +7 7 Sigma coordinate vertical velocity (/s) +8 8 Vertical velocity (pressure) (Pa/s) +9 9 Vertical velocity (geometric) (m/s) +10 10 Absolute vorticity (/s) +11 11 Absolute divergence (/s) +12 12 Relative vorticity (/s) +13 13 Relative divergence (/s) +14 14 Potential vorticity (K m2 kg-1 s-1) +15 15 Vertical u-component shear (/s) +16 16 Vertical v-component shear (/s) +17 17 Momentum flux, u-component (N m-2) +18 18 Momentum flux, v-component (N m-2) +19 19 Wind mixing energy (J) +20 20 Boundary layer dissipation (W m-2) +21 21 Maximum wind speed (m/s) +22 22 Wind speed (gust) (m/s) +23 23 u-component of wind (gust) (m/s) +24 24 v-component of wind (gust) (m/s) +25 25 Vertical speed shear (/s) +26 26 Horizontal momentum flux (N m-2) +27 27 u-component storm motion (m/s) +28 28 v-component storm motion (m/s) +29 29 Drag coefficient (Numeric) +30 30 Frictional velocity (m/s) +31 31 Turbulent diffusion coefficient for momentum (m2/s) +32 32 Eta coordinate vertical velocity (/s) +33 33 Wind fetch (m) +34 34 Normal wind component (m/s) +35 35 Tangential wind component (m/s) +36 36 Amplitude function for Rossby wave envelope for meridional wind (m/s) +37 37 Northward turbulent surface stress (N m-2 s) +38 38 Eastward turbulent surface stress (N m-2 s) +39 39 Eastward wind tendency due to parameterization (m s-2) +40 40 Northward wind tendency due to parameterization (m s-2) +41 41 u-component of geostrophic wind (m s-1) +42 42 v-component of geostrophic wind (m s-1) +43 43 Geostrophic wind direction (degree true) +44 44 Geostrophic wind speed (m s-1) +45 45 Unbalanced component of divergence (s-1) +46 46 Vorticity advection (s-2) +47 47 Surface roughness for heat (m) +48 48 Surface roughness for moisture (m) +49 49 Wind stress (N m-2) +50 50 Eastward wind stress (N m-2) +51 51 Northward wind stress (N m-2) +52 52 u-component of wind stress (N m-2) +53 53 v-component of wind stress (N m-2) +54 54 Natural logarithm of surface roughness length for heat (Numeric) +55 55 Natural logarithm of surface roughness length for moisture (Numeric) +56 56 u-component of neutral wind (m s-1) +57 57 v-component of neutral wind (m s-1) +58 58 Magnitude of turbulent surface stress (N m-2) +# 59-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.20.table b/definitions/grib2/tables/31/4.2.0.20.table new file mode 100644 index 000000000..9af93ae48 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.20.table @@ -0,0 +1,69 @@ +# Product discipline 0 - Meteorological products, parameter category 20: atmospheric chemical constituents +0 0 Mass density (concentration) (kg m-3) +1 1 Column-integrated mass density (kg m-2) +2 2 Mass mixing ratio (mass fraction in air) (kg/kg) +3 3 Atmosphere emission mass flux (kg m-2 s-1) +4 4 Atmosphere net production mass flux (kg m-2 s-1) +5 5 Atmosphere net production and emission mass flux (kg m-2 s-1) +6 6 Surface dry deposition mass flux (kg m-2 s-1) +7 7 Surface wet deposition mass flux (kg m-2 s-1) +8 8 Atmosphere re-emission mass flux (kg m-2 s-1) +9 9 Wet deposition by large-scale precipitation mass flux (kg m-2 s-1) +10 10 Wet deposition by convective precipitation mass flux (kg m-2 s-1) +11 11 Sedimentation mass flux (kg m-2 s-1) +12 12 Dry deposition mass flux (kg m-2 s-1) +13 13 Transfer from hydrophobic to hydrophilic (kg kg-1 s-1) +14 14 Transfer from SO2 (sulphur dioxide) to SO4 (sulphate) (kg kg-1 s-1) +15 15 Dry deposition velocity (m/s) +16 16 Mass mixing ratio with respect to dry air (kg/kg) +17 17 Mass mixing ratio with respect to wet air (kg/kg) +18 18 Potential of hydrogen (pH) (pH) +# 19-49 Reserved +50 50 Amount in atmosphere (mol) +51 51 Concentration in air (mol m-3) +52 52 Volume mixing ratio (fraction in air) (mol/mol) +53 53 Chemical gross production rate of concentration (mol m-3 s-1) +54 54 Chemical gross destruction rate of concentration (mol m-3 s-1) +55 55 Surface flux (mol m-2 s-1) +56 56 Changes of amount in atmosphere (mol/s) +57 57 Total yearly average burden of the atmosphere (mol) +58 58 Total yearly averaged atmospheric loss (mol/s) +59 59 Aerosol number concentration (m-3) +60 60 Aerosol specific number concentration (kg-1) +61 61 Maximum of mass density in layer (kg m-3) +62 62 Height of maximum mass density (m) +63 63 Column-averaged mass density in layer (kg m-3) +64 64 Mole fraction with respect to dry air (mol/mol) +65 65 Mole fraction with respect to wet air (mol/mol) +66 66 Column-integrated in-cloud scavenging rate by precipitation (kg m-2 s-1) +67 67 Column-integrated below-cloud scavenging rate by precipitation (kg m-2 s-1) +68 68 Column-integrated release rate from evaporating precipitation (kg m-2 s-1) +69 69 Column-integrated in-cloud scavenging rate by large-scale precipitation (kg m-2 s-1) +70 70 Column-integrated below-cloud scavenging rate by large-scale precipitation (kg m-2 s-1) +71 71 Column-integrated release rate from evaporating large-scale precipitation (kg m-2 s-1) +72 72 Column-integrated in-cloud scavenging rate by convective precipitation (kg m-2 s-1) +73 73 Column-integrated below-cloud scavenging rate by convective precipitation (kg m-2 s-1) +74 74 Column-integrated release rate from evaporating convective precipitation (kg m-2 s-1) +75 75 Wildfire flux (kg m-2 s-1) +76 76 Emission rate (kg kg-1 s-1) +77 77 Surface emission flux (kg m-2 s-1) +78 78 Column integrated eastward mass flux (kg m-1 s-1) +79 79 Column integrated northward mass flux (kg m-1 s-1) +80 80 Column integrated divergence of mass flux (kg m-2 s-1) +81 81 Column integrated net source (kg m-2 s-1) +# 82-99 Reserved +100 100 Surface area density (aerosol) (/m) +101 101 Vertical visual range (m) +102 102 Aerosol optical thickness (Numeric) +103 103 Single scattering albedo (Numeric) +104 104 Asymmetry factor (Numeric) +105 105 Aerosol extinction coefficient (/m) +106 106 Aerosol absorption coefficient (/m) +107 107 Aerosol lidar backscatter from satellite (m-1 sr-1) +108 108 Aerosol lidar backscatter from the ground (m-1 sr-1) +109 109 Aerosol lidar extinction from satellite (/m) +110 110 Aerosol lidar extinction from the ground (/m) +111 111 Angstrom exponent (Numeric) +# 112-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.21.table b/definitions/grib2/tables/31/4.2.0.21.table new file mode 100644 index 000000000..2734355b0 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.21.table @@ -0,0 +1,26 @@ +# Product discipline 0 - Meteorological products, parameter category 21: thermodynamic properties +0 0 Column integrated potential + internal energy (J m-2) +1 1 Column integrated kinetic energy (J m-2) +2 2 Column integrated total energy (J m-2) +3 3 Column integrated enthalpy (J m-2) +4 4 Column integrated water enthalpy (J m-2) +5 5 Column integrated eastward enthalpy flux (W m-1) +6 6 Column integrated northward enthalpy flux (W m-1) +7 7 Column integrated eastward potential energy flux (W m-1) +8 8 Column integrated northward potential energy flux (W m-1) +9 9 Column integrated eastward kinetic energy flux (W m-1) +10 10 Column integrated northward kinetic energy flux (W m-1) +11 11 Column integrated eastward total energy flux (W m-1) +12 12 Column integrated northward total energy flux (W m-1) +13 13 Divergence of column integrated enthalpy flux (W m-2) +14 14 Divergence of column integrated potential energy flux (W m-2) +15 15 Divergence of column integrated water potential energy flux (W m-2) +16 16 Divergence of column integrated kinetic energy flux (W m-2) +17 17 Divergence of column integrated total energy flux (W m-2) +18 18 Divergence of column integrated water enthalpy flux (W m-2) +19 19 Column integrated eastward heat flux (W m-1) +20 20 Column integrated northward heat flux (W m-1) +21 21 Column integrated potential+internal+latent energy (J m-2) +# 22-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.3.table b/definitions/grib2/tables/31/4.2.0.3.table new file mode 100644 index 000000000..5ccadabf8 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.3.table @@ -0,0 +1,50 @@ +# Product discipline 0 - Meteorological products, parameter category 3: mass +0 0 Pressure (Pa) +1 1 Pressure reduced to MSL (Pa) +2 2 Pressure tendency (Pa/s) +3 3 ICAO Standard Atmosphere Reference Height (m) +4 4 Geopotential (m2 s-2) +5 5 Geopotential height (gpm) +6 6 Geometric height (m) +7 7 Standard deviation of height (m) +8 8 Pressure anomaly (Pa) +9 9 Geopotential height anomaly (gpm) +10 10 Density (kg m-3) +11 11 Altimeter setting (Pa) +12 12 Thickness (m) +13 13 Pressure altitude (m) +14 14 Density altitude (m) +15 15 5-wave geopotential height (gpm) +16 16 Zonal flux of gravity wave stress (N m-2) +17 17 Meridional flux of gravity wave stress (N m-2) +18 18 Planetary boundary layer height (m) +19 19 5-wave geopotential height anomaly (gpm) +20 20 Standard deviation of sub-grid scale orography (m) +21 21 Angle of sub-gridscale orography (rad) +22 22 Slope of sub-gridscale orography (Numeric) +23 23 Gravity wave dissipation (W m-2) +24 24 Anisotropy of sub-gridscale orography (Numeric) +25 25 Natural logarithm of pressure in Pa (Numeric) +26 26 Exner pressure (Numeric) +27 27 Updraught mass flux (kg m-2 s-1) +28 28 Downdraught mass flux (kg m-2 s-1) +29 29 Updraught detrainment rate (kg m-3 s-1) +30 30 Downdraught detrainment rate (kg m-3 s-1) +31 31 Unbalanced component of logarithm of surface pressure (-) +32 32 Saturation water vapour pressure (Pa) +33 33 Geometric altitude above mean sea level (m) +34 34 Geometric height above ground level (m) +35 35 Column integrated divergence of total mass flux (kg m-2 s-1) +36 36 Column integrated eastward total mass flux (kg m-1 s-1) +37 37 Column integrated northward total mass flux (kg m-1 s-1) +38 38 Standard deviation of filtered subgrid orography (m) +39 39 Column integrated mass of atmosphere (kg m-2) +40 40 Column integrated eastward geopotential flux (W m-1) +41 41 Column integrated northward geopotential flux (W m-1) +42 42 Column integrated divergence of water geopotential flux (W m-2) +43 43 Column integrated divergence of geopotential flux (W m-2) +44 44 Height of zero-degree wet-bulb temperature (m) +45 45 Height of one-degree wet-bulb temperature (m) +# 46-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.4.table b/definitions/grib2/tables/31/4.2.0.4.table new file mode 100644 index 000000000..f6a225a8f --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.4.table @@ -0,0 +1,33 @@ +# Product discipline 0 - Meteorological products, parameter category 4: short-wave radiation +0 0 Net short-wave radiation flux (surface) (W m-2) +1 1 Net short-wave radiation flux (top of atmosphere) (W m-2) +2 2 Short-wave radiation flux (W m-2) +3 3 Global radiation flux (W m-2) +4 4 Brightness temperature (K) +5 5 Radiance (with respect to wave number) (W m-1 sr-1) +6 6 Radiance (with respect to wavelength) (W m-3 sr-1) +7 7 Downward short-wave radiation flux (W m-2) +8 8 Upward short-wave radiation flux (W m-2) +9 9 Net short wave radiation flux (W m-2) +10 10 Photosynthetically active radiation (W m-2) +11 11 Net short-wave radiation flux, clear sky (W m-2) +12 12 Downward UV radiation (W m-2) +13 13 Direct short-wave radiation flux (W m-2) +14 14 Diffuse short-wave radiation flux (W m-2) +15 15 Upward UV radiation emitted/reflected from the Earth's surface (W m-2) +# 16-49 Reserved +50 50 UV index (under clear sky) (Numeric) +51 51 UV index (Numeric) +52 52 Downward short-wave radiation flux, clear sky (W m-2) +53 53 Upward short-wave radiation flux, clear sky (W m-2) +54 54 Direct normal short-wave radiation flux (W m-2) +55 55 UV visible albedo for diffuse radiation (%) +56 56 UV visible albedo for direct radiation (%) +57 57 UV visible albedo for direct radiation, geometric component (%) +58 58 UV visible albedo for direct radiation, isotropic component (%) +59 59 UV visible albedo for direct radiation, volumetric component (%) +60 60 Photosynthetically active radiation flux, clear sky (W m-2) +61 61 Direct short-wave radiation flux, clear sky (W m-2) +# 62-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.5.table b/definitions/grib2/tables/31/4.2.0.5.table new file mode 100644 index 000000000..cadb20762 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.5.table @@ -0,0 +1,18 @@ +# Product discipline 0 - Meteorological products, parameter category 5: long-wave radiation +0 0 Net long-wave radiation flux (surface) (W m-2) +1 1 Net long-wave radiation flux (top of atmosphere) (W m-2) +2 2 Long-wave radiation flux (W m-2) +3 3 Downward long-wave radiation flux (W m-2) +4 4 Upward long-wave radiation flux (W m-2) +5 5 Net long-wave radiation flux (W m-2) +6 6 Net long-wave radiation flux, clear sky (W m-2) +7 7 Brightness temperature (K) +8 8 Downward long-wave radiation flux, clear sky (W m-2) +9 9 Near IR albedo for diffuse radiation (%) +10 10 Near IR albedo for direct radiation (%) +11 11 Near IR albedo for direct radiation, geometric component (%) +12 12 Near IR albedo for direct radiation, isotropic component (%) +13 13 Near IR albedo for direct radiation, volumetric component (%) +# 14-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.6.table b/definitions/grib2/tables/31/4.2.0.6.table new file mode 100644 index 000000000..46f5a7684 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.6.table @@ -0,0 +1,51 @@ +# Product discipline 0 - Meteorological products, parameter category 6: cloud +0 0 Cloud ice (kg m-2) +1 1 Total cloud cover (%) +2 2 Convective cloud cover (%) +3 3 Low cloud cover (%) +4 4 Medium cloud cover (%) +5 5 High cloud cover (%) +6 6 Cloud water (kg m-2) +7 7 Cloud amount (%) +8 8 Cloud type (Code table 4.203) +9 9 Thunderstorm maximum tops (m) +10 10 Thunderstorm coverage (Code table 4.204) +11 11 Cloud base (m) +12 12 Cloud top (m) +13 13 Ceiling (m) +14 14 Non-convective cloud cover (%) +15 15 Cloud work function (J/kg) +16 16 Convective cloud efficiency (Proportion) +17 17 Total condensate (kg/kg) +18 18 Total column-integrated cloud water (kg m-2) +19 19 Total column-integrated cloud ice (kg m-2) +20 20 Total column-integrated condensate (kg m-2) +21 21 Ice fraction of total condensate (Proportion) +22 22 Cloud cover (%) +23 23 Cloud ice mixing ratio (kg/kg) +24 24 Sunshine (Numeric) +25 25 Horizontal extent of cumulonimbus (CB) (%) +26 26 Height of convective cloud base (m) +27 27 Height of convective cloud top (m) +28 28 Number of cloud droplets per unit mass of air (/kg) +29 29 Number of cloud ice particles per unit mass of air (/kg) +30 30 Number density of cloud droplets (m-3) +31 31 Number density of cloud ice particles (m-3) +32 32 Fraction of cloud cover (Numeric) +33 33 Sunshine duration (s) +34 34 Surface long-wave effective total cloudiness (Numeric) +35 35 Surface short-wave effective total cloudiness (Numeric) +36 36 Fraction of stratiform precipitation cover (Proportion) +37 37 Fraction of convective precipitation cover (Proportion) +38 38 Mass density of cloud droplets (kg m-3) +39 39 Mass density of cloud ice (kg m-3) +40 40 Mass density of convective cloud water droplets (kg m-3) +# 41-46 Reserved +47 47 Volume fraction of cloud water droplets (Numeric) +48 48 Volume fraction of cloud ice particles (Numeric) +49 49 Volume fraction of cloud (ice and/or water) (Numeric) +50 50 Fog (%) +51 51 Sunshine duration fraction (Proportion) +# 52-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.0.7.table b/definitions/grib2/tables/31/4.2.0.7.table new file mode 100644 index 000000000..93d4d1335 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.0.7.table @@ -0,0 +1,25 @@ +# Product discipline 0 - Meteorological products, parameter category 7: thermodynamic stability indices +0 0 Parcel lifted index (to 500 hPa) (K) +1 1 Best lifted index (to 500 hPa) (K) +2 2 K index (K) +3 3 KO index (K) +4 4 Total totals index (K) +5 5 Sweat index (Numeric) +6 6 Convective available potential energy (J/kg) +7 7 Convective inhibition (J/kg) +8 8 Storm relative helicity (J/kg) +9 9 Energy helicity index (Numeric) +10 10 Surface lifted index (K) +11 11 Best (4-layer) lifted index (K) +12 12 Richardson number (Numeric) +13 13 Showalter index (K) +14 14 Reserved +15 15 Updraught helicity (m2 s-2) +16 16 Bulk Richardson number (Numeric) +17 17 Gradient Richardson number (Numeric) +18 18 Flux Richardson number (Numeric) +19 19 Convective available potential energy - shear (m2 s-2) +20 20 Thunderstorm intensity index (Code table 4.246) +# 21-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.1.0.table b/definitions/grib2/tables/31/4.2.1.0.table new file mode 100644 index 000000000..0ce4b8fc4 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.1.0.table @@ -0,0 +1,21 @@ +# Product discipline 1 - Hydrological products, parameter category 0: hydrology basic products +0 0 Flash flood guidance (Encoded as an accumulation over a floating subinterval of time between the reference time and valid time) (kg m-2) +1 1 Flash flood runoff (Encoded as an accumulation over a floating subinterval of time) (kg m-2) +2 2 Remotely-sensed snow cover (Code table 4.215) +3 3 Elevation of snow-covered terrain (Code table 4.216) +4 4 Snow water equivalent per cent of normal (%) +5 5 Baseflow-groundwater runoff (kg m-2) +6 6 Storm surface runoff (kg m-2) +7 7 Discharge from rivers or streams (m3/s) +8 8 Groundwater upper storage (kg m-2) +9 9 Groundwater lower storage (kg m-2) +10 10 Side flow into river channel (m3 s-1 m-1) +11 11 River storage of water (m3) +12 12 Floodplain storage of water (m3) +13 13 Depth of water on soil surface (kg m-2) +14 14 Upstream accumulated precipitation (kg m-2) +15 15 Upstream accumulated snow melt (kg m-2) +16 16 Percolation rate (kg m-2 s-1) +# 17-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.1.1.table b/definitions/grib2/tables/31/4.2.1.1.table new file mode 100644 index 000000000..ede9a3a72 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.1.1.table @@ -0,0 +1,7 @@ +# Product discipline 1 - Hydrological products, parameter category 1: hydrology probabilities +0 0 Conditional per cent precipitation amount fractile for an overall period (Encoded as an accumulation) (kg m-2) +1 1 Per cent precipitation in a sub-period of an overall period (Encoded as per cent accumulation over the sub-period) (%) +2 2 Probability of 0.01 inch of precipitation (POP) (%) +# 3-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.1.2.table b/definitions/grib2/tables/31/4.2.1.2.table new file mode 100644 index 000000000..97f062dbc --- /dev/null +++ b/definitions/grib2/tables/31/4.2.1.2.table @@ -0,0 +1,19 @@ +# Product discipline 1 - Hydrological products, parameter category 2: inland water and sediment properties +0 0 Water depth (m) +1 1 Water temperature (K) +2 2 Water fraction (Proportion) +3 3 Sediment thickness (m) +4 4 Sediment temperature (K) +5 5 Ice thickness (m) +6 6 Ice temperature (K) +7 7 Ice cover (Proportion) +8 8 Land cover (0 = water, 1 = land) (Proportion) +9 9 Shape factor with respect to salinity profile (-) +10 10 Shape factor with respect to temperature profile in thermocline (-) +11 11 Attenuation coefficient of water with respect to solar radiation (/m) +12 12 Salinity (kg/kg) +13 13 Cross-sectional area of flow in channel (m2) +14 14 Snow temperature (K) +# 15-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.10.0.table b/definitions/grib2/tables/31/4.2.10.0.table new file mode 100644 index 000000000..07a91363f --- /dev/null +++ b/definitions/grib2/tables/31/4.2.10.0.table @@ -0,0 +1,97 @@ +# Product discipline 10 - Oceanographic products, parameter category 0: waves +0 0 Wave spectra (1) (-) +1 1 Wave spectra (2) (-) +2 2 Wave spectra (3) (-) +3 3 Significant height of combined wind waves and swell (m) +4 4 Direction of wind waves (degree true) +5 5 Significant height of wind waves (m) +6 6 Mean period of wind waves (s) +7 7 Direction of swell waves (degree true) +8 8 Significant height of swell waves (m) +9 9 Mean period of swell waves (s) +10 10 Primary wave direction (degree true) +11 11 Primary wave mean period (s) +12 12 Secondary wave direction (degree true) +13 13 Secondary wave mean period (s) +14 14 Mean direction of combined wind waves and swell (degree true) +15 15 Mean period of combined wind waves and swell (s) +16 16 Coefficient of drag with waves (-) +17 17 Friction velocity (m/s) +18 18 Wave stress (N m-2) +19 19 Normalized wave stress (-) +20 20 Mean square slope of waves (-) +21 21 u-component surface Stokes drift (m/s) +22 22 v-component surface Stokes drift (m/s) +23 23 Period of maximum individual wave height (s) +24 24 Maximum individual wave height (m) +25 25 Inverse mean wave frequency (s) +26 26 Inverse mean frequency of wind waves (s) +27 27 Inverse mean frequency of total swell (s) +28 28 Mean zero-crossing wave period (s) +29 29 Mean zero-crossing period of wind waves (s) +30 30 Mean zero-crossing period of total swell (s) +31 31 Wave directional width (-) +32 32 Directional width of wind waves (-) +33 33 Directional width of total swell (-) +34 34 Peak wave period (s) +35 35 Peak period of wind waves (s) +36 36 Peak period of total swell (s) +37 37 Altimeter wave height (m) +38 38 Altimeter corrected wave height (m) +39 39 Altimeter range relative correction (-) +40 40 10-metre neutral wind speed over waves (m/s) +41 41 10-metre wind direction over waves (deg) +42 42 Wave energy spectrum (m2 s rad-1) +43 43 Kurtosis of the sea-surface elevation due to waves (-) +44 44 Benjamin-Feir index (-) +45 45 Spectral peakedness factor (/s) +46 46 Peak wave direction (deg) +47 47 Significant wave height of first swell partition (m) +48 48 Significant wave height of second swell partition (m) +49 49 Significant wave height of third swell partition (m) +50 50 Mean wave period of first swell partition (s) +51 51 Mean wave period of second swell partition (s) +52 52 Mean wave period of third swell partition (s) +53 53 Mean wave direction of first swell partition (deg) +54 54 Mean wave direction of second swell partition (deg) +55 55 Mean wave direction of third swell partition (deg) +56 56 Wave directional width of first swell partition (-) +57 57 Wave directional width of second swell partition (-) +58 58 Wave directional width of third swell partition (-) +59 59 Wave frequency width of first swell partition (-) +60 60 Wave frequency width of second swell partition (-) +61 61 Wave frequency width of third swell partition (-) +62 62 Wave frequency width (-) +63 63 Frequency width of wind waves (-) +64 64 Frequency width of total swell (-) +65 65 Peak wave period of first swell partition (s) +66 66 Peak wave period of second swell partition (s) +67 67 Peak wave period of third swell partition (s) +68 68 Peak wave direction of first swell partition (degree true) +69 69 Peak wave direction of second swell partition (degree true) +70 70 Peak wave direction of third swell partition (degree true) +71 71 Peak direction of wind waves (degree true) +72 72 Peak direction of total swell (degree true) +73 73 Whitecap fraction (fraction) +74 74 Mean direction of total swell (degree) +75 75 Mean direction of wind waves (degree) +76 76 Charnock (Numeric) +77 77 Wave Spectral Skewness (Numeric) +78 78 Wave energy flux magnitude (W m-1) +79 79 Wave energy flux mean direction (degree true) +80 80 Ratio of wave angular and frequency width (Numeric) +81 81 Free convective velocity over the oceans (m s-1) +82 82 Air density over the oceans (kg m-3) +83 83 Normalized energy flux into waves (Numeric) +84 84 Normalized stress into ocean (Numeric) +85 85 Normalized energy flux into ocean (Numeric) +86 86 Surface elevation variance due to waves (over all frequencies and directions) (m2 s rad-1) +87 87 Wave induced mean sea level correction (m) +88 88 Spectral width index (Numeric) +89 89 Number of events in freak waves statistics (Numeric) +90 90 u-component of surface momentum flux into ocean (N m-2) +91 91 v-component of surface momentum flux into ocean (N m-2) +92 92 Wave turbulent energy flux into ocean (W m-2) +# 93-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.10.1.table b/definitions/grib2/tables/31/4.2.10.1.table new file mode 100644 index 000000000..bcdbbc793 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.10.1.table @@ -0,0 +1,11 @@ +# Product discipline 10 - Oceanographic products, parameter category 1: currents +0 0 Current direction (degree true) +1 1 Current speed (m/s) +2 2 u-component of current (m/s) +3 3 v-component of current (m/s) +4 4 Rip current occurrence probability (%) +5 5 Eastward current (m s-1) +6 6 Northward current (m s-1) +# 7-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.10.191.table b/definitions/grib2/tables/31/4.2.10.191.table new file mode 100644 index 000000000..bda676c83 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.10.191.table @@ -0,0 +1,9 @@ +# Product discipline 10 - Oceanographic products, parameter category 191: miscellaneous +0 0 Seconds prior to initial reference time (defined in Section 1) (s) +1 1 Meridional overturning stream function (m3/s) +2 2 Reserved +3 3 Days since last observation (d) +4 4 Barotropic stream function (m3 s-1) +# 5-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.10.2.table b/definitions/grib2/tables/31/4.2.10.2.table new file mode 100644 index 000000000..1591ed64e --- /dev/null +++ b/definitions/grib2/tables/31/4.2.10.2.table @@ -0,0 +1,28 @@ +# Product discipline 10 - Oceanographic products, parameter category 2: ice +0 0 Ice cover (Proportion) +1 1 Ice thickness (m) +2 2 Direction of ice drift (degree true) +3 3 Speed of ice drift (m/s) +4 4 u-component of ice drift (m/s) +5 5 v-component of ice drift (m/s) +6 6 Ice growth rate (m/s) +7 7 Ice divergence (/s) +8 8 Ice temperature (K) +9 9 Module of ice internal pressure (Pa m) +10 10 Zonal vector component of vertically integrated ice internal pressure (Pa m) +11 11 Meridional vector component of vertically integrated ice internal pressure (Pa m) +12 12 Compressive ice strength (N/m) +13 13 Snow temperature (over sea ice) (K) +14 14 Albedo (Numeric) +15 15 Sea ice volume per unit area (m3 m-2) +16 16 Snow volume over sea ice per unit area (m3 m-2) +17 17 Sea ice heat content (J m-2) +18 18 Snow over sea ice heat content (J m-2) +19 19 Ice freeboard thickness (m) +20 20 Ice melt pond fraction (fraction) +21 21 Ice melt pond depth (m) +22 22 Ice melt pond volume per unit area (m3 m-2) +23 23 Sea ice fraction tendency due to parameterization (s-1) +# 24-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.10.3.table b/definitions/grib2/tables/31/4.2.10.3.table new file mode 100644 index 000000000..14481d01f --- /dev/null +++ b/definitions/grib2/tables/31/4.2.10.3.table @@ -0,0 +1,25 @@ +# Product discipline 10 - Oceanographic products, parameter category 3: surface properties +0 0 Water temperature (K) +1 1 Deviation of sea level from mean (m) +2 2 Heat exchange coefficient (-) +3 3 Practical salinity (Numeric) +4 4 Downward heat flux (W m-2) +5 5 Eastward surface stress (N m-2) +6 6 Northward surface stress (N m-2) +7 7 x-component surface stress (N m-2) +8 8 y-component surface stress (N m-2) +9 9 Thermosteric change in sea surface height (m) +10 10 Halosteric change in sea surface height (m) +11 11 Steric change in sea surface height (m) +12 12 Sea salt flux (kg m-2 s-1) +13 13 Net upward water flux (kg m-2 s-1) +14 14 Eastward surface water velocity (m s-1) +15 15 Northward surface water velocity (m s-1) +16 16 x-component of surface water velocity (m s-1) +17 17 y-component of surface water velocity (m s-1) +18 18 Heat flux correction (W m-2) +19 19 Sea surface height tendency due to parameterization (m s-1) +20 20 Deviation of sea level from mean with inverse barometer correction (m) +# 21-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.10.4.table b/definitions/grib2/tables/31/4.2.10.4.table new file mode 100644 index 000000000..2da0b9807 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.10.4.table @@ -0,0 +1,44 @@ +# Product discipline 10 - Oceanographic products, parameter category 4: subsurface properties +0 0 Main thermocline depth (m) +1 1 Main thermocline anomaly (m) +2 2 Transient thermocline depth (m) +3 3 Salinity (kg/kg) +4 4 Ocean vertical heat diffusivity (m2/s) +5 5 Ocean vertical salt diffusivity (m2/s) +6 6 Ocean vertical momentum diffusivity (m2/s) +7 7 Bathymetry (m) +# 8-10 Reserved +11 11 Shape factor with respect to salinity profile (-) +12 12 Shape factor with respect to temperature profile in thermocline (-) +13 13 Attenuation coefficient of water with respect to solar radiation (/m) +14 14 Water depth (m) +15 15 Water temperature (K) +16 16 Water density (rho) (kg m-3) +17 17 Water density anomaly (sigma) (kg m-3) +18 18 Water potential temperature (theta) (K) +19 19 Water potential density (rho theta) (kg m-3) +20 20 Water potential density anomaly (sigma theta) (kg m-3) +21 21 Practical salinity (Numeric) +22 22 Water column-integrated heat content (J m-2) +23 23 Eastward water velocity (m s-1) +24 24 Northward water velocity (m s-1) +25 25 x-component water velocity (m s-1) +26 26 y-component water velocity (m s-1) +27 27 Upward water velocity (m s-1) +28 28 Vertical eddy diffusivity (m2 s-1) +29 29 Bottom pressure equivalent height (m) +30 30 Fresh water flux into sea water from rivers (kg m-2 s-1) +31 31 Fresh water flux correction (kg m-2 s-1) +32 32 Virtual salt flux into sea water (g kg-1 m-2 s-1) +33 33 Virtual salt flux correction (g kg-1 m-2 s-1) +34 34 Sea water temperature tendency due to Newtonian relaxation (K s-1) +35 35 Sea water salinity tendency due to Newtonian relaxation (g kg-1 s-1) +36 36 Sea water temperature tendency due to parameterization (K s-1) +37 37 Sea water salinity tendency due to parameterization (g kg-1 s-1) +38 38 Eastward sea water velocity tendency due to parameterization (m-2 s-1) +39 39 Northward sea water velocity tendency due to parameterization (m-2 s-1) +40 40 Sea water temperature tendency due to direct bias correction (K s-1) +41 41 Sea water salinity tendency due to direct bias correction (g kg-1 s-1) +# 42-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.2.0.table b/definitions/grib2/tables/31/4.2.2.0.table new file mode 100644 index 000000000..b01d681c7 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.2.0.table @@ -0,0 +1,66 @@ +# Product discipline 2 - Land surface products, parameter category 0: vegetation/biomass +0 0 Land cover (0 = sea, 1 = land) (Proportion) +1 1 Surface roughness (m) +2 2 Soil temperature (K) +3 3 Soil moisture content (kg m-2) +4 4 Vegetation (%) +5 5 Water runoff (kg m-2) +6 6 Evapotranspiration (kg-2 s-1) +7 7 Model terrain height (m) +8 8 Land use (Code table 4.212) +9 9 Volumetric soil moisture content (Proportion) +10 10 Ground heat flux (W m-2) +11 11 Moisture availability (%) +12 12 Exchange coefficient (kg m-2 s-1) +13 13 Plant canopy surface water (kg m-2) +14 14 Blackadar's mixing length scale (m) +15 15 Canopy conductance (m/s) +16 16 Minimal stomatal resistance (s/m) +17 17 Wilting point (Proportion) +18 18 Solar parameter in canopy conductance (Proportion) +19 19 Temperature parameter in canopy (Proportion) +20 20 Humidity parameter in canopy conductance (Proportion) +21 21 Soil moisture parameter in canopy conductance (Proportion) +22 22 Soil moisture (kg m-3) +23 23 Column-integrated soil water (kg m-2) +24 24 Heat flux (W m-2) +25 25 Volumetric soil moisture (m3 m-3) +26 26 Wilting point (kg m-3) +27 27 Volumetric wilting point (m3 m-3) +28 28 Leaf area index (Numeric) +29 29 Evergreen forest cover (Proportion) +30 30 Deciduous forest cover (Proportion) +31 31 Normalized differential vegetation index (NDVI) (Numeric) +32 32 Root depth of vegetation (m) +33 33 Water runoff and drainage (kg m-2) +34 34 Surface water runoff (kg m-2) +35 35 Tile class (Code table 4.243) +36 36 Tile fraction (Proportion) +37 37 Tile percentage (%) +38 38 Soil volumetric ice content (water equivalent) (m3 m-3) +39 39 Evapotranspiration rate (kg m-2 s-1) +40 40 Potential evapotranspiration rate (kg m-2 s-1) +41 41 Snow melt rate (kg m-2 s-1) +42 42 Water runoff and drainage rate (kg m-2 s-1) +43 43 Drainage direction (Code table 4.250) +44 44 Upstream area (m2) +45 45 Wetland cover (Proportion) +46 46 Wetland type (Code table 4.239) +47 47 Irrigation cover (Proportion) +48 48 C4 crop cover (Proportion) +49 49 C4 grass cover (Proportion) +50 50 Skin reservoir content (kg m-2) +51 51 Surface runoff rate (kg m-2 s-1) +52 52 Subsurface runoff rate (kg m-2 s-1) +53 53 Low-vegetation cover (Proportion) +54 54 High-vegetation cover (Proportion) +55 55 Leaf area index, low-vegetation (m2 m-2) +56 56 Leaf area index, high-vegetation (m2 m-2) +57 57 Type of low-vegetation (Code table 4.234) +58 58 Type of high-vegetation (Code table 4.234) +59 59 Net ecosystem exchange flux (kg m-2 s-1) +60 60 Gross primary production flux (kg m-2 s-1) +61 61 Ecosystem respiration flux (kg m-2 s-1) +# 62-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.2.3.table b/definitions/grib2/tables/31/4.2.2.3.table new file mode 100644 index 000000000..5eb7c4d02 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.2.3.table @@ -0,0 +1,34 @@ +# Product discipline 2 - Land surface products, parameter category 3: soil products +0 0 Soil type (Code table 4.213) +1 1 Upper layer soil temperature (K) +2 2 Upper layer soil moisture (kg m-3) +3 3 Lower layer soil moisture (kg m-3) +4 4 Bottom layer soil temperature (K) +5 5 Liquid volumetric soil moisture (non-frozen) (Proportion) +6 6 Number of soil layers in root zone (Numeric) +7 7 Transpiration stress-onset (soil moisture) (Proportion) +8 8 Direct evaporation cease (soil moisture) (Proportion) +9 9 Soil porosity (Proportion) +10 10 Liquid volumetric soil moisture (non-frozen) (m3 m-3) +11 11 Volumetric transpiration stress-onset (soil moisture) (m3 m-3) +12 12 Transpiration stress-onset (soil moisture) (kg m-3) +13 13 Volumetric direct evaporation cease (soil moisture) (m3 m-3) +14 14 Direct evaporation cease (soil moisture) (kg m-3) +15 15 Soil porosity (m3 m-3) +16 16 Volumetric saturation of soil moisture (m3 m-3) +17 17 Saturation of soil moisture (kg m-3) +18 18 Soil temperature (K) +19 19 Soil moisture (kg m-3) +20 20 Column-integrated soil moisture (kg m-2) +21 21 Soil ice (kg m-3) +22 22 Column-integrated soil ice (kg m-2) +23 23 Liquid water in snow pack (kg m-2) +24 24 Frost index (K day-1) +25 25 Snow depth at elevation bands (kg m-2) +26 26 Soil heat flux (W m-2) +27 27 Soil depth (m) +28 28 Snow temperature (K) +29 29 Ice temperature (K) +# 30-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.2.4.table b/definitions/grib2/tables/31/4.2.2.4.table new file mode 100644 index 000000000..d7d107416 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.2.4.table @@ -0,0 +1,31 @@ +# Product discipline 2 - Land surface products, parameter category 4: fire weather products +0 0 Fire outlook (Code table 4.224) +1 1 Fire outlook due to dry thunderstorm (Code table 4.224) +2 2 Haines index (Numeric) +3 3 Fire burned area (%) +4 4 Fosberg index (Numeric) +5 5 Forest Fire Weather Index (as defined by the Canadian Forest Service) (Numeric) +6 6 Fine Fuel Moisture Code (as defined by the Canadian Forest Service) (Numeric) +7 7 Duff Moisture Code (as defined by the Canadian Forest Service) (Numeric) +8 8 Drought Code (as defined by the Canadian Forest Service) (Numeric) +9 9 Initial Fire Spread Index (as defined by the Canadian Forest Service) (Numeric) +10 10 Fire Buildup Index (as defined by the Canadian Forest Service) (Numeric) +11 11 Fire Daily Severity Rating (as defined by the Canadian Forest Service) (Numeric) +12 12 Keetch-Byram drought index (Numeric) +13 13 Drought factor (as defined by the Australian forest service ) (Numeric) +14 14 Rate of spread (as defined by the Australian forest service ) (m/s) +15 15 Fire danger index (as defined by the Australian forest service ) (Numeric) +16 16 Spread component (as defined by the US Forest Service National Fire Danger Rating System) (Numeric) +17 17 Burning index (as defined by the US Forest Service National Fire Danger Rating System) (Numeric) +18 18 Ignition component (as defined by the US Forest Service National Fire Danger Rating System) (%) +19 19 Energy release component (as defined by the US Forest Service National Fire Danger Rating System) (Joule/m2) +20 20 Burning area (%) +21 21 Burnable area (%) +22 22 Unburnable area (%) +23 23 Fuel load (kg m-2) +24 24 Combustion completeness (%) +25 25 Fuel moisture content (kg kg-1) +26 26 Wildfire potential (as defined by the US NOAA Global Systems Laboratory) (Numeric) +# 27-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.2.5.table b/definitions/grib2/tables/31/4.2.2.5.table new file mode 100644 index 000000000..7e87927b1 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.2.5.table @@ -0,0 +1,6 @@ +# Product discipline 2 - Land surface products, parameter category 5: glaciers and inland ice +0 0 Glacier cover (Proportion) +1 1 Glacier temperature (K) +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.2.6.table b/definitions/grib2/tables/31/4.2.2.6.table new file mode 100644 index 000000000..a2ba47cb2 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.2.6.table @@ -0,0 +1,10 @@ +# Product discipline 2 - Land surface products, parameter category 6: urban areas +0 0 Urban cover (Proportion) +1 1 Road cover (Proportion) +2 2 Building cover (Proportion) +3 3 Building height (m) +4 4 Vertical-to-horizontal area fraction (m2 m-2) +5 5 Standard deviation of building height (m) +# 6-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.20.0.table b/definitions/grib2/tables/31/4.2.20.0.table new file mode 100644 index 000000000..64ce0f01c --- /dev/null +++ b/definitions/grib2/tables/31/4.2.20.0.table @@ -0,0 +1,13 @@ +# Product discipline 20 - Health and socioeconomic impacts, parameter category 0: health indicators +0 0 Universal thermal climate index (K) +1 1 Mean radiant temperature (K) +2 2 Wet-bulb globe temperature (K) +3 3 Globe temperature (K) +4 4 Humidex (K) +5 5 Effective temperature (K) +6 6 Normal effective temperature (K) +7 7 Standard effective temperature (K) +8 8 Physiological equivalent temperature (K) +# 9-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.20.1.table b/definitions/grib2/tables/31/4.2.20.1.table new file mode 100644 index 000000000..c4c87d4ad --- /dev/null +++ b/definitions/grib2/tables/31/4.2.20.1.table @@ -0,0 +1,14 @@ +# Product discipline 20 - Health and socioeconomic impacts, parameter category 1: epidemiology +0 0 Malaria cases (Fraction) +1 1 Malaria circumsporozoite protein rate (Fraction) +2 2 Plasmodium falciparum entomological inoculation rate (Bites per day per person) +3 3 Human bite rate by anopheles vectors (Bites per day per person) +4 4 Malaria immunity (Fraction) +5 5 Falciparum parasite rates (Fraction) +6 6 Detectable falciparum parasite ratio (after day 10) (Fraction) +7 7 Anopheles vector to host ratio (Fraction) +8 8 Anopheles vector number (Number m-2) +9 9 Fraction of malarial vector reproductive habitat (Fraction) +# 10-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.20.2.table b/definitions/grib2/tables/31/4.2.20.2.table new file mode 100644 index 000000000..3c3563ac0 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.20.2.table @@ -0,0 +1,5 @@ +# Product discipline 20 - Health and socioeconomic impacts, parameter category 2: socioeconomic indicators +0 0 Population density (Person m-2) +# 1-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.3.0.table b/definitions/grib2/tables/31/4.2.3.0.table new file mode 100644 index 000000000..fd75ee1b8 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.3.0.table @@ -0,0 +1,14 @@ +# Product discipline 3 - Space products, parameter category 0: image format products +0 0 Scaled radiance (Numeric) +1 1 Scaled albedo (Numeric) +2 2 Scaled brightness temperature (Numeric) +3 3 Scaled precipitable water (Numeric) +4 4 Scaled lifted index (Numeric) +5 5 Scaled cloud top pressure (Numeric) +6 6 Scaled skin temperature (Numeric) +7 7 Cloud mask (Code table 4.217) +8 8 Pixel scene type (Code table 4.218) +9 9 Fire detection indicator (Code table 4.223) +# 10-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.3.1.table b/definitions/grib2/tables/31/4.2.3.1.table new file mode 100644 index 000000000..ad568321d --- /dev/null +++ b/definitions/grib2/tables/31/4.2.3.1.table @@ -0,0 +1,36 @@ +# Product discipline 3 - Space products, parameter category 1: quantitative products +0 0 Estimated precipitation (kg m-2) +1 1 Instantaneous rain rate (kg m-2 s-1) +2 2 Cloud top height (m) +3 3 Cloud top height quality indicator (Code table 4.219) +4 4 Estimated u-component of wind (m/s) +5 5 Estimated v-component of wind (m/s) +6 6 Number of pixel used (Numeric) +7 7 Solar zenith angle (deg) +8 8 Relative azimuth angle (deg) +9 9 Reflectance in 0.6 micron channel (%) +10 10 Reflectance in 0.8 micron channel (%) +11 11 Reflectance in 1.6 micron channel (%) +12 12 Reflectance in 3.9 micron channel (%) +13 13 Atmospheric divergence (/s) +14 14 Cloudy brightness temperature (K) +15 15 Clear-sky brightness temperature (K) +16 16 Cloudy radiance (with respect to wave number) (W m-1 sr-1) +17 17 Clear-sky radiance (with respect to wave number) (W m-1 sr-1) +18 18 Reserved +19 19 Wind speed (m/s) +20 20 Aerosol optical thickness at 0.635 um +21 21 Aerosol optical thickness at 0.810 um +22 22 Aerosol optical thickness at 1.640 um +23 23 Angstrom coefficient +# 24-26 Reserved +27 27 Bidirectional reflectance factor (Numeric) +28 28 Brightness temperature (K) +29 29 Scaled radiance (Numeric) +30 30 Reflectance in 0.4 micron channel (%) +# 31-97 Reserved +98 98 Correlation coefficient between MPE rain-rates for the co-located IR data and the microwave data rain-rates (Numeric) +99 99 Standard deviation between MPE rain-rates for the co-located IR data and the microwave data rain-rates (kg m-2 s-1) +# 100-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.3.2.table b/definitions/grib2/tables/31/4.2.3.2.table new file mode 100644 index 000000000..a97ce4942 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.3.2.table @@ -0,0 +1,24 @@ +# Product discipline 3 - Space products, parameter category 2: cloud properties +0 0 Clear sky probability (%) +1 1 Cloud top temperature (K) +2 2 Cloud top pressure (Pa) +3 3 Cloud type (Code table 4.218) +4 4 Cloud phase (Code table 4.218) +5 5 Cloud optical depth (Numeric) +6 6 Cloud particle effective radius (m) +7 7 Cloud liquid water path (kg m-2) +8 8 Cloud ice water path (kg m-2) +9 9 Cloud albedo (Numeric) +10 10 Cloud emissivity (Numeric) +11 11 Effective absorption optical depth ratio (Numeric) +30 30 Measurement cost (Numeric) +31 31 Upper layer cloud optical depth (Numeric) +32 32 Upper layer cloud top pressure (Pa) +33 33 Upper layer cloud effective radius (m) +34 34 Error in upper layer cloud optical depth (Numeric) +35 35 Error in upper layer cloud top pressure (Pa) +36 36 Error in upper layer cloud effective radius (m) +37 37 Lower layer cloud optical depth (Numeric) +38 38 Lower layer cloud top pressure (Pa) +39 39 Error in lower layer cloud optical depth (Numeric) +40 40 Error in lower layer cloud top pressure (Pa) diff --git a/definitions/grib2/tables/31/4.2.3.3.table b/definitions/grib2/tables/31/4.2.3.3.table new file mode 100644 index 000000000..c487a578e --- /dev/null +++ b/definitions/grib2/tables/31/4.2.3.3.table @@ -0,0 +1,4 @@ +# Product discipline 3 - Space products, parameter category 3: flight rule conditions +0 0 Probability of encountering marginal visual flight rule conditions (%) +1 1 Probability of encountering low instrument flight rule conditions (%) +2 2 Probability of encountering instrument flight rule conditions (%) diff --git a/definitions/grib2/tables/31/4.2.3.4.table b/definitions/grib2/tables/31/4.2.3.4.table new file mode 100644 index 000000000..7f832ff3c --- /dev/null +++ b/definitions/grib2/tables/31/4.2.3.4.table @@ -0,0 +1,10 @@ +# Product discipline 3 - Space products, parameter category 4: volcanic ash +0 0 Volcanic ash probability (%) +1 1 Volcanic ash cloud top temperature (K) +2 2 Volcanic ash cloud top pressure (Pa) +3 3 Volcanic ash cloud top height (m) +4 4 Volcanic ash cloud emissivity (Numeric) +5 5 Volcanic ash effective absorption optical depth ratio (Numeric) +6 6 Volcanic ash cloud optical depth (Numeric) +7 7 Volcanic ash column density (kg m-2) +8 8 Volcanic ash particle effective radius (m) diff --git a/definitions/grib2/tables/31/4.2.3.5.table b/definitions/grib2/tables/31/4.2.3.5.table new file mode 100644 index 000000000..58a3f12cb --- /dev/null +++ b/definitions/grib2/tables/31/4.2.3.5.table @@ -0,0 +1,7 @@ +# Product discipline 3 - Space products, parameter category 5: sea-surface temperature +0 0 Interface sea-surface temperature (K) +1 1 Skin sea-surface temperature (K) +2 2 Sub-skin sea-surface temperature (K) +3 3 Foundation sea-surface temperature (K) +4 4 Estimated bias between sea-surface temperature and standard (K) +5 5 Estimated standard deviation between sea surface temperature and standard (K) diff --git a/definitions/grib2/tables/31/4.2.3.6.table b/definitions/grib2/tables/31/4.2.3.6.table new file mode 100644 index 000000000..62a5ba656 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.3.6.table @@ -0,0 +1,7 @@ +# Product discipline 3 - Space products, parameter category 6: solar radiation +0 0 Global solar irradiance (W m-2) +1 1 Global solar exposure (J m-2) +2 2 Direct solar irradiance (W m-2) +3 3 Direct solar exposure (J m-2) +4 4 Diffuse solar irradiance (W m-2) +5 5 Diffuse solar exposure (J m-2) diff --git a/definitions/grib2/tables/31/4.2.4.0.table b/definitions/grib2/tables/31/4.2.4.0.table new file mode 100644 index 000000000..1a9318430 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.4.0.table @@ -0,0 +1,10 @@ +# Product discipline 4 - Space weather products, parameter category 0: temperature +0 0 Temperature (K) +1 1 Electron temperature (K) +2 2 Proton temperature (K) +3 3 Ion temperature (K) +4 4 Parallel temperature (K) +5 5 Perpendicular temperature (K) +# 6-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.4.1.table b/definitions/grib2/tables/31/4.2.4.1.table new file mode 100644 index 000000000..ba2d09db8 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.4.1.table @@ -0,0 +1,8 @@ +# Product discipline 4 - Space weather products, parameter category 1: momentum +0 0 Velocity magnitude (speed) (m s-1) +1 1 1st vector component of velocity (coordinate system dependent) (m s-1) +2 2 2nd vector component of velocity (coordinate system dependent) (m s-1) +3 3 3rd vector component of velocity (coordinate system dependent) (m s-1) +# 4-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.4.10.table b/definitions/grib2/tables/31/4.2.4.10.table new file mode 100644 index 000000000..fd9b2db49 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.4.10.table @@ -0,0 +1,12 @@ +# Product discipline 4 - Space weather products, parameter category 10: space weather indices +0 0 Scintillation index (sigma phi) (rad) +1 1 Scintillation index S4 (Numeric) +2 2 Rate of change of TEC index (ROTI) (TECU/min) +3 3 Disturbance ionosphere index spatial gradient (DIXSG) (Numeric) +4 4 Along arc TEC rate (AATR) (TECU/min) +5 5 Kp (Numeric) +6 6 Equatorial disturbance storm time index (Dst) (nT) +7 7 Auroral electrojet (AE) (nT) +# 8-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.4.2.table b/definitions/grib2/tables/31/4.2.4.2.table new file mode 100644 index 000000000..90a94d23d --- /dev/null +++ b/definitions/grib2/tables/31/4.2.4.2.table @@ -0,0 +1,18 @@ +# Product discipline 4 - Space weather products, parameter category 2: charged particle mass and number +0 0 Particle number density (m-3) +1 1 Electron density (m-3) +2 2 Proton density (m-3) +3 3 Ion density (m-3) +4 4 Vertical total electron content (TECU) +5 5 HF absorption frequency (Hz) +6 6 HF absorption (dB) +7 7 Spread F (m) +8 8 h'F (m) +9 9 Critical frequency (Hz) +10 10 Maximal usable frequency (MUF) (Hz) +11 11 Peak height (hm) (m) +12 12 Peak density (Nm) (m-3) +13 13 Equivalent slab thickness (tau) (km) +# 14-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.4.3.table b/definitions/grib2/tables/31/4.2.4.3.table new file mode 100644 index 000000000..aabee3d3a --- /dev/null +++ b/definitions/grib2/tables/31/4.2.4.3.table @@ -0,0 +1,12 @@ +# Product discipline 4 - Space weather products, parameter category 3: electric and magnetic fields +0 0 Magnetic field magnitude (T) +1 1 1st vector component of magnetic field (T) +2 2 2nd vector component of magnetic field (T) +3 3 3rd vector component of magnetic field (T) +4 4 Electric field magnitude (V m-1) +5 5 1st vector component of electric field (V m-1) +6 6 2nd vector component of electric field (V m-1) +7 7 3rd vector component of electric field (V m-1) +# 8-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.4.4.table b/definitions/grib2/tables/31/4.2.4.4.table new file mode 100644 index 000000000..b54568ce4 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.4.4.table @@ -0,0 +1,11 @@ +# Product discipline 4 - Space weather products, parameter category 4: energetic particles +0 0 Proton flux (differential) ((m2 s sr eV)-1) +1 1 Proton flux (integral) ((m2 s sr )-1) +2 2 Electron flux (differential) ((m2 s sr eV)-1) +3 3 Electron flux (integral) ((m2 s sr)-1) +4 4 Heavy ion flux (differential) ((m2 s sr eV/nuc)-1) +5 5 Heavy ion flux (integral) ((m2 s sr)-1) +6 6 Cosmic ray neutron flux (h-1) +# 7-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.4.5.table b/definitions/grib2/tables/31/4.2.4.5.table new file mode 100644 index 000000000..93bfa1d01 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.4.5.table @@ -0,0 +1,8 @@ +# Product discipline 4 - Space weather products, parameter category 5: waves +0 0 Amplitude (dB) +1 1 Phase (rad) +2 2 Frequency (Hz) +3 3 Wavelength (m) +# 4-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.4.6.table b/definitions/grib2/tables/31/4.2.4.6.table new file mode 100644 index 000000000..92bdcb92c --- /dev/null +++ b/definitions/grib2/tables/31/4.2.4.6.table @@ -0,0 +1,11 @@ +# Product discipline 4 - Space weather products, parameter category 6: solar electromagnetic emissions +0 0 Integrated solar irradiance (W m-2) +1 1 Solar X-ray flux (XRS long) (W m-2) +2 2 Solar X-ray flux (XRS short) (W m-2) +3 3 Solar EUV irradiance (W m-2) +4 4 Solar spectral irradiance (W m-2 nm-1) +5 5 F10.7 (W m-2 Hz-1) +6 6 Solar radio emissions (W m-2 Hz-1) +# 7-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.4.7.table b/definitions/grib2/tables/31/4.2.4.7.table new file mode 100644 index 000000000..da779d098 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.4.7.table @@ -0,0 +1,8 @@ +# Product discipline 4 - Space weather products, parameter category 7: terrestrial electromagnetic emissions +0 0 Limb intensity (J m-2 s-1) +1 1 Disk intensity (J m-2 s-1) +2 2 Disk intensity day (J m-2 s-1) +3 3 Disk intensity night (J m-2 s-1) +# 4-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.4.8.table b/definitions/grib2/tables/31/4.2.4.8.table new file mode 100644 index 000000000..fd2227ccd --- /dev/null +++ b/definitions/grib2/tables/31/4.2.4.8.table @@ -0,0 +1,13 @@ +# Product discipline 4 - Space weather products, parameter category 8: imagery +0 0 X-ray radiance (W sr-1 m-2) +1 1 EUV radiance (W sr-1 m-2) +2 2 H-alpha radiance (W sr-1 m-2) +3 3 White light radiance (W sr-1 m-2) +4 4 CaII-K radiance (W sr-1 m-2) +5 5 White light coronagraph radiance (W sr-1 m-2) +6 6 Heliospheric radiance (W sr-1 m-2) +7 7 Thematic mask (Numeric) +8 8 Solar induced chlorophyll fluorescence (W m-2 sr-1 m-1) +# 9-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.2.4.9.table b/definitions/grib2/tables/31/4.2.4.9.table new file mode 100644 index 000000000..9c4e93ec7 --- /dev/null +++ b/definitions/grib2/tables/31/4.2.4.9.table @@ -0,0 +1,7 @@ +# Product discipline 4 - Space weather products, parameter category 9: ion-neutral coupling +0 0 Pedersen conductivity (S m-1) +1 1 Hall conductivity (S m-1) +2 2 Parallel conductivity (S m-1) +# 3-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.201.table b/definitions/grib2/tables/31/4.201.table new file mode 100644 index 000000000..49fe27c85 --- /dev/null +++ b/definitions/grib2/tables/31/4.201.table @@ -0,0 +1,17 @@ +# Code table 4.201 - Precipitation type +0 0 No precipitation +1 1 Rain +2 2 Thunderstorm +3 3 Freezing rain +4 4 Mixed/ice +5 5 Snow +6 6 Wet snow +7 7 Mixture of rain and snow +8 8 Ice pellets +9 9 Graupel +10 10 Hail +11 11 Drizzle +12 12 Freezing drizzle +# 13-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.202.table b/definitions/grib2/tables/31/4.202.table new file mode 100644 index 000000000..438502ff9 --- /dev/null +++ b/definitions/grib2/tables/31/4.202.table @@ -0,0 +1,4 @@ +# Code table 4.202 - Precipitable water category +# 0-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.203.table b/definitions/grib2/tables/31/4.203.table new file mode 100644 index 000000000..8a9aedf7a --- /dev/null +++ b/definitions/grib2/tables/31/4.203.table @@ -0,0 +1,26 @@ +# Code table 4.203 - Cloud type +0 0 Clear +1 1 Cumulonimbus +2 2 Stratus +3 3 Stratocumulus +4 4 Cumulus +5 5 Altostratus +6 6 Nimbostratus +7 7 Altocumulus +8 8 Cirrostratus +9 9 Cirrocumulus +10 10 Cirrus +11 11 Cumulonimbus - ground-based fog beneath the lowest layer +12 12 Stratus - ground-based fog beneath the lowest layer +13 13 Stratocumulus - ground-based fog beneath the lowest layer +14 14 Cumulus - ground-based fog beneath the lowest layer +15 15 Altostratus - ground-based fog beneath the lowest layer +16 16 Nimbostratus - ground-based fog beneath the lowest layer +17 17 Altocumulus - ground-based fog beneath the lowest layer +18 18 Cirrostratus - ground-based fog beneath the lowest layer +19 19 Cirrocumulus - ground-based fog beneath the lowest layer +20 20 Cirrus - ground-based fog beneath the lowest layer +# 21-190 Reserved +191 191 Unknown +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.204.table b/definitions/grib2/tables/31/4.204.table new file mode 100644 index 000000000..481372936 --- /dev/null +++ b/definitions/grib2/tables/31/4.204.table @@ -0,0 +1,9 @@ +# Code table 4.204 - Thunderstorm coverage +0 0 None +1 1 Isolated (1-2%) +2 2 Few (3-5%) +3 3 Scattered (6-45%) +4 4 Numerous (> 45%) +# 5-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.205.table b/definitions/grib2/tables/31/4.205.table new file mode 100644 index 000000000..5b4484dfd --- /dev/null +++ b/definitions/grib2/tables/31/4.205.table @@ -0,0 +1,6 @@ +# Code table 4.205 - Presence of aerosol +0 0 Aerosol not present +1 1 Aerosol present +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.206.table b/definitions/grib2/tables/31/4.206.table new file mode 100644 index 000000000..02c3dfdf9 --- /dev/null +++ b/definitions/grib2/tables/31/4.206.table @@ -0,0 +1,6 @@ +# Code table 4.206 - Volcanic ash +0 0 Not present +1 1 Present +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.207.table b/definitions/grib2/tables/31/4.207.table new file mode 100644 index 000000000..8ddb2e048 --- /dev/null +++ b/definitions/grib2/tables/31/4.207.table @@ -0,0 +1,10 @@ +# Code table 4.207 - Icing +0 0 None +1 1 Light +2 2 Moderate +3 3 Severe +4 4 Trace +5 5 Heavy +# 6-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.208.table b/definitions/grib2/tables/31/4.208.table new file mode 100644 index 000000000..b83685a1a --- /dev/null +++ b/definitions/grib2/tables/31/4.208.table @@ -0,0 +1,9 @@ +# Code table 4.208 - Turbulence +0 0 None (smooth) +1 1 Light +2 2 Moderate +3 3 Severe +4 4 Extreme +# 5-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.209.table b/definitions/grib2/tables/31/4.209.table new file mode 100644 index 000000000..cb7617071 --- /dev/null +++ b/definitions/grib2/tables/31/4.209.table @@ -0,0 +1,9 @@ +# Code table 4.209 - Planetary boundary-layer regime +0 0 Reserved +1 1 Stable +2 2 Mechanically driven turbulence +3 3 Forced convection +4 4 Free convection +# 5-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.210.table b/definitions/grib2/tables/31/4.210.table new file mode 100644 index 000000000..524a6ca73 --- /dev/null +++ b/definitions/grib2/tables/31/4.210.table @@ -0,0 +1,6 @@ +# Code table 4.210 - Contrail intensity +0 0 Contrail not present +1 1 Contrail present +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.211.table b/definitions/grib2/tables/31/4.211.table new file mode 100644 index 000000000..098eb2d43 --- /dev/null +++ b/definitions/grib2/tables/31/4.211.table @@ -0,0 +1,7 @@ +# Code table 4.211 - Contrail engine type +0 0 Low bypass +1 1 High bypass +2 2 Non-bypass +# 3-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.212.table b/definitions/grib2/tables/31/4.212.table new file mode 100644 index 000000000..1a085b88d --- /dev/null +++ b/definitions/grib2/tables/31/4.212.table @@ -0,0 +1,18 @@ +# Code table 4.212 - Land use +0 0 Reserved +1 1 Urban land +2 2 Agriculture +3 3 Range land +4 4 Deciduous forest +5 5 Coniferous forest +6 6 Forest/wetland +7 7 Water +8 8 Wetlands +9 9 Desert +10 10 Tundra +11 11 Ice +12 12 Tropical forest +13 13 Savannah +# 14-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.213.table b/definitions/grib2/tables/31/4.213.table new file mode 100644 index 000000000..c65784a00 --- /dev/null +++ b/definitions/grib2/tables/31/4.213.table @@ -0,0 +1,16 @@ +# Code table 4.213 - Soil type +0 0 Reserved +1 1 Sand +2 2 Loamy sand +3 3 Sandy loam +4 4 Silt loam +5 5 Organic (redefined) +6 6 Sandy clay loam +7 7 Silt clay loam +8 8 Clay loam +9 9 Sandy clay +10 10 Silty clay +11 11 Clay +# 12-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.214.table b/definitions/grib2/tables/31/4.214.table new file mode 100644 index 000000000..9df466fe5 --- /dev/null +++ b/definitions/grib2/tables/31/4.214.table @@ -0,0 +1,11 @@ +# Code table 4.214 - Environmental Factor Qualifier +0 0 Worst +1 1 Very poor +2 2 Poor +3 3 Average +4 4 Good +5 5 Excellent +# 6-190 Reserved +191 191 Unknown +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.215.table b/definitions/grib2/tables/31/4.215.table new file mode 100644 index 000000000..034db72be --- /dev/null +++ b/definitions/grib2/tables/31/4.215.table @@ -0,0 +1,9 @@ +# Code table 4.215 - Remotely sensed snow coverage +# 0-49 Reserved +50 50 No-snow/no-cloud +# 51-99 Reserved +100 100 Clouds +# 101-249 Reserved +250 250 Snow +# 251-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.216.table b/definitions/grib2/tables/31/4.216.table new file mode 100644 index 000000000..5d1460cef --- /dev/null +++ b/definitions/grib2/tables/31/4.216.table @@ -0,0 +1,5 @@ +# Code table 4.216 - Elevation of snow-covered terrain +# 0-90 Elevation in increments of 100 m +# 91-253 Reserved +254 254 Clouds +255 255 Missing diff --git a/definitions/grib2/tables/31/4.217.table b/definitions/grib2/tables/31/4.217.table new file mode 100644 index 000000000..a4452182c --- /dev/null +++ b/definitions/grib2/tables/31/4.217.table @@ -0,0 +1,8 @@ +# Code table 4.217 - Cloud mask type +0 0 Clear over water +1 1 Clear over land +2 2 Cloud +3 3 No data +# 4-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.218.table b/definitions/grib2/tables/31/4.218.table new file mode 100644 index 000000000..fcd06c348 --- /dev/null +++ b/definitions/grib2/tables/31/4.218.table @@ -0,0 +1,46 @@ +# Code table 4.218 - Pixel scene type +0 0 No scene identified +1 1 Green needle-leafed forest +2 2 Green broad-leafed forest +3 3 Deciduous needle-leafed forest +4 4 Deciduous broad-leafed forest +5 5 Deciduous mixed forest +6 6 Closed shrub-land +7 7 Open shrub-land +8 8 Woody savannah +9 9 Savannah +10 10 Grassland +11 11 Permanent wetland +12 12 Cropland +13 13 Urban +14 14 Vegetation/crops +15 15 Permanent snow/ice +16 16 Barren desert +17 17 Water bodies +18 18 Tundra +19 19 Warm liquid water cloud +20 20 Supercooled liquid water cloud +21 21 Mixed-phase cloud +22 22 Optically thin ice cloud +23 23 Optically thick ice cloud +24 24 Multilayered cloud +# 25-96 Reserved +97 97 Snow/ice on land +98 98 Snow/ice on water +99 99 Sun-glint +100 100 General cloud +101 101 Low cloud/fog/stratus +102 102 Low cloud/stratocumulus +103 103 Low cloud/unknown type +104 104 Medium cloud/nimbostratus +105 105 Medium cloud/altostratus +106 106 Medium cloud/unknown type +107 107 High cloud/cumulus +108 108 High cloud/cirrus +109 109 High cloud/unknown +110 110 Unknown cloud type +111 111 Single layer water cloud +112 112 Single layer ice cloud +# 113-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.219.table b/definitions/grib2/tables/31/4.219.table new file mode 100644 index 000000000..86df0522e --- /dev/null +++ b/definitions/grib2/tables/31/4.219.table @@ -0,0 +1,8 @@ +# Code table 4.219 - Cloud top height quality indicator +0 0 Nominal cloud top height quality +1 1 Fog in segment +2 2 Poor quality height estimation +3 3 Fog in segment and poor quality height estimation +# 4-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.220.table b/definitions/grib2/tables/31/4.220.table new file mode 100644 index 000000000..93e841f8b --- /dev/null +++ b/definitions/grib2/tables/31/4.220.table @@ -0,0 +1,6 @@ +# Code table 4.220 - Horizontal dimension processed +0 0 Latitude +1 1 Longitude +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.221.table b/definitions/grib2/tables/31/4.221.table new file mode 100644 index 000000000..8448533d7 --- /dev/null +++ b/definitions/grib2/tables/31/4.221.table @@ -0,0 +1,6 @@ +# Code table 4.221 - Treatment of missing data +0 0 Not included +1 1 Extrapolated +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.222.table b/definitions/grib2/tables/31/4.222.table new file mode 100644 index 000000000..57f113014 --- /dev/null +++ b/definitions/grib2/tables/31/4.222.table @@ -0,0 +1,6 @@ +# Code table 4.222 - Categorical result +0 0 No +1 1 Yes +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.223.table b/definitions/grib2/tables/31/4.223.table new file mode 100644 index 000000000..f0deb076a --- /dev/null +++ b/definitions/grib2/tables/31/4.223.table @@ -0,0 +1,5 @@ +# Code table 4.223 - Fire detection indicator +0 0 No fire detected +1 1 Possible fire detected +2 2 Probable fire detected +3 3 Missing diff --git a/definitions/grib2/tables/31/4.224.table b/definitions/grib2/tables/31/4.224.table new file mode 100644 index 000000000..e87cde4bb --- /dev/null +++ b/definitions/grib2/tables/31/4.224.table @@ -0,0 +1,18 @@ +# Code table 4.224 - Categorical outlook +0 0 No risk area +1 1 Reserved +2 2 General thunderstorm risk area +3 3 Reserved +4 4 Slight risk area +5 5 Reserved +6 6 Moderate risk area +7 7 Reserved +8 8 High risk area +# 9-10 Reserved +11 11 Dry thunderstorm (dry lightning) risk area +# 12-13 Reserved +14 14 Critical risk area +# 15-17 Reserved +18 18 Extremely critical risk area +# 19-254 Reserved +255 255 Missing diff --git a/definitions/grib2/tables/31/4.225.table b/definitions/grib2/tables/31/4.225.table new file mode 100644 index 000000000..9dc374087 --- /dev/null +++ b/definitions/grib2/tables/31/4.225.table @@ -0,0 +1,2 @@ +# Code table 4.225 - Weather (see FM 94 BUFR/FM 95 CREX Code table 0 20 003 - Present weather) +511 511 Missing value diff --git a/definitions/grib2/tables/31/4.227.table b/definitions/grib2/tables/31/4.227.table new file mode 100644 index 000000000..27c76553d --- /dev/null +++ b/definitions/grib2/tables/31/4.227.table @@ -0,0 +1,9 @@ +# Code table 4.227 - Icing scenario (weather/cloud classification) +0 0 None +1 1 General +2 2 Convective +3 3 Stratiform +4 4 Freezing +# 5-191 Reserved +# 192-254 Reserved for local use +255 255 Missing value diff --git a/definitions/grib2/tables/31/4.228.table b/definitions/grib2/tables/31/4.228.table new file mode 100644 index 000000000..559ae916a --- /dev/null +++ b/definitions/grib2/tables/31/4.228.table @@ -0,0 +1,8 @@ +# Code table 4.228 - Icing severity +0 0 None +1 1 Trace +2 2 Light +3 3 Moderate +4 4 Severe +# 5-254 Reserved +255 255 Missing value diff --git a/definitions/grib2/tables/31/4.230.table b/definitions/grib2/tables/31/4.230.table new file mode 100644 index 000000000..47e011140 --- /dev/null +++ b/definitions/grib2/tables/31/4.230.table @@ -0,0 +1,534 @@ +# Code table 4.230 - Atmospheric chemical constituent type +0 0 Ozone O3 +1 1 Water vapour H2O +2 2 Methane CH4 +3 3 Carbon dioxide CO2 +4 4 Carbon monoxide CO +5 5 Nitrogen dioxide NO2 +6 6 Nitrous oxide N2O +7 7 Formaldehyde HCHO +8 8 Sulphur dioxide SO2 +9 9 Ammonia NH3 +10 10 Ammonium cation NH4+ +11 11 Nitrogen monoxide NO +12 12 Atomic oxygen O +13 13 Nitrate radical NO3* +14 14 Hydroperoxyl radical HOO* +15 15 Dinitrogen pentoxide N2O5 +16 16 Nitrous acid HONO +17 17 Nitric acid HNO3 +18 18 Peroxynitric acid HO2NO2 +19 19 Hydrogen peroxide H2O2 +20 20 Dihydrogen H2 +21 21 Atomic nitrogen N +22 22 Sulphate anion SO42- +23 23 Atomic Radon Rn +24 24 Mercury vapour Hg(0) +25 25 Mercury(II) cation Hg2+ +26 26 Atomic chlorine Cl +27 27 Chlorine monoxide ClO +28 28 Dichlorine peroxide Cl2O2 +29 29 Hypochlorous acid HClO +30 30 Chlorine nitrate ClONO2 +31 31 Chlorine dioxide ClO2 +32 32 Atomic bromine Br +33 33 Bromine monoxide BrO +34 34 Bromine chloride BrCl +35 35 Hydrogen bromide HBr +36 36 Hypobromous acid HBrO +37 37 Bromine nitrate BrONO2 +38 38 Dioxygen O2 +39 39 Nitryl chloride NO2Cl +40 40 Sulphuric acid H2SO4 +41 41 Hydrogen sulphide H2S +42 42 Sulphur trioxide SO3 +43 43 Bromine Br2 +44 44 Hydrofluoric acid HF +45 45 Sulphur hexafluoride SF6 +46 46 Chlorine Cl2 +# 47-9999 Reserved +10000 10000 Hydroxyl radical HO* +10001 10001 Methyl peroxy radical CH3OO* +10002 10002 Methyl hydroperoxide CH3OOH +10004 10004 Methanol CH3OH +10005 10005 Formic acid HCOOH +10006 10006 Hydrogen cyanide HCN +10007 10007 Aceto nitrile CH3CN +10008 10008 Ethane C2H6 +10009 10009 Ethene (= Ethylene) C2H4 +10010 10010 Ethyne (= Acetylene) C2H2 +10011 10011 Ethanol C2H5OH +10012 10012 Acetic acid C2H5OOH +10013 10013 Peroxyacetyl nitrate CH3C(O)OONO2 +10014 10014 Propane C3H8 +10015 10015 Propene C3H6 +10016 10016 Butane (all isomers) C4H10 +10017 10017 Isoprene C5H10 +10018 10018 Alpha pinene C10H16 +10019 10019 Beta pinene C10H16 +10020 10020 Limonene C10H16 +10021 10021 Benzene C6H6 +10022 10022 Toluene C7H8 +10023 10023 Xylene C8H10 +10024 10024 Methanesulphonic acid CH3SO3H +10025 10025 Methylglyoxal (2-oxopropanal) CH3C(O)CHO +10026 10026 Peroxyacetyl radical CH3C(O)OO* +10027 10027 Methacrylic acid (2-methylprop-2-enoic acid) CH2C(CH3)COOH +10028 10028 Methacrolein (2-methylprop-2-enal) CH2C(CH3)CHO +10029 10029 Acetone (propan-2-one) CH3C(O)CH3 +10030 10030 Ethyl dioxidanyl radical CH3CH2OO* +10031 10031 Butadiene (buta-1,3-diene) (CH2CH)2 +10032 10032 Acetaldehyde (ethanal) CH3CHO +10033 10033 Glycolaldehyde (hydroxyethanal) HOCH2CHO +10034 10034 Cresol (methylphenol), all isomers CH3C6H4OH +10035 10035 Peracetic acid (ethaneperoxoic acid) CH3C(O)OOH +10036 10036 2-hydroxyethyl oxidanyl radical HOCH2CH2O* +10037 10037 2-hydroxyethyl dioxidanyl radical HOCH2CH2OO* +10038 10038 Glyoxal (oxaldehyde) OCHCHO +10039 10039 Isopropyl dioxidanyl radical (CH3)2CHOO* +10040 10040 Isopropyl hydroperoxide (2-hydroperoxypropane) (CH3)2CHOOH +10041 10041 Hydroxyacetone (1-hydroxypropan-2-one) CH3C(O)CH2OH +10042 10042 Peroxyacetic acid (ethaneperoxoic acid) CH3C(O)OOH +10043 10043 Methyl vinyl ketone (but-3-en-2-one) CH3C(O)CHCH2 +10044 10044 Phenoxy radical C6H5O* +10045 10045 Methyl radical CH3* +10046 10046 Carbonyl sulphide (carbon oxide sulphide) OCS +10047 10047 Dibromomethane CH2Br2 +10048 10048 Methoxy radical CH3O* +10049 10049 Tribromomethane CHBr3 +10050 10050 Formyl radical (oxomethyl radical) HOC* +10051 10051 Hydroxymethyl dioxidanyl radical HOCH2OO* +10052 10052 Ethyl hydroperoxide CH3CH2OOH +10053 10053 3-hydroxypropyl dioxidanyl radical HOCH2CH2CH2OO* +10054 10054 3-hydroxypropyl hydroperoxide HOCH2CH2CH2OOH +10055 10055 Methyl-peroxy-nitrate (nitroperoxy-methane) CH3OONO2 +10056 10056 2-lambda^1-oxidanyloxy-2-methylbut-3-en-1-ol (4-hydroxy-3-methyl-1-butene-3-ylperoxy radical) HOCH2C(CH3)(OO*)CHCH2 +10057 10057 2-lambda^1-oxidanyloxy-3-methylbut-3-en-1-ol (2-hydroxy-1-isopropenylethylperoxy radical) HOCH2CH(OO*)C(CH3)CH2 +10058 10058 (Z)-4-hydroperoxy-2-methyl-2-butenal CH2(OOH)CHC(CH3)CHO +10059 10059 (Z)-4-hydroperoxy-3-methyl-2-butenal CH2(OOH)C(CH3)CHCHO +# 10060-10499 Reserved for other simple organic molecules (e.g. higher aldehydes, alcohols, peroxides, etc.) +10500 10500 Dimethyl sulphide CH3SCH3 (DMS) +10501 10501 DMSO (dimethyl sulfoxide) (CH3)2SO +# 10502-20000 Reserved +20001 20001 Hydrogen chloride HCl +20002 20002 CFC-11 (trichlorofluoromethane) CCl3F +20003 20003 CFC-12 (dichlorodifluoromethane) CCl2F2 +20004 20004 CFC-113 (1,1,2-trichloro-1,2,2-trifluoroethane) Cl2FC-CClF2 +20005 20005 CFC-113a (1,1,1-trichloro-2,2,2-trifluoroethane) Cl3C-CF3 +20006 20006 CFC-114 (1,2-dichloro-1,1,2,2-tetrafluoroethane) ClF2C-CClF2 +20007 20007 CFC-115 (1-chloro-1,1,2,2,2-pentafluoroethane) ClF2C-CF3 +20008 20008 HCFC-22 (chlorodifluoromethane) CHClF2 +20009 20009 HCFC-141b (1,1-dichloro-1-fluoroethane) Cl2FC-CH3 +20010 20010 HCFC-142b (1-chloro-1,1-difluoroethane) ClF2C-CH3 +20011 20011 Halon-1202 (dibromodifluoromethane) CBr2F2 +20012 20012 Halon-1211 (bromochlorodifluoromethane) CBrClF2 +20013 20013 Halon-1301 (bromotrifluoromethane) CBrF3 +20014 20014 Halon-2402 (1,2-dibromo-1,1,2,2-tetrafluoroethane) BrF2C-CBrF2 +20015 20015 HCC-40 (methyl chloride) CH3Cl +20016 20016 HCC-10 (carbon tetrachloride) CCl4 +20017 20017 HCC-140a (1,1,1-trichloroethane) Cl3C-CH3 +20018 20018 HBC-40B1 (methyl bromide) CH3Br +20019 20019 HCH (hexachlorocyclohexane) all isomers C6H6Cl6 +20020 20020 alpha-HCH (alpha-hexachlorocyclohexane) both enantiomers alpha-C6H6Cl6 +20021 20021 PCB-153 (2,2',4,4',5,5'-hexachlorobiphenyl) (C6H2Cl3)2 +20022 20022 HCFC-141a (1,1-dichloro-2-fluoroethane) Cl2HC-CH2F +# 20023-29999 Reserved +30000 30000 Radioactive pollutant (tracer, defined by originating centre) +# 30001-30009 Reserved +30010 30010 Tritium (Hydrogen 3) H-3 +30011 30011 Tritium organic bounded H-3o +30012 30012 Tritium inorganic H-3a +30013 30013 Beryllium 7 Be-7 +30014 30014 Beryllium 10 Be-10 +30015 30015 Carbon 14 C-14 +30016 30016 Carbon 14 CO2 C-14CO2 +30017 30017 Carbon 14 other gases C-14og +30018 30018 Nitrogen 13 N-13 +30019 30019 Nitrogen 16 N-16 +30020 30020 Fluorine 18 F-18 +30021 30021 Sodium 22 Na-22 +30022 30022 Phosphate 32 P-32 +30023 30023 Phosphate 33 P-33 +30024 30024 Sulphur 35 S-35 +30025 30025 Chlorine 36 Cl-36 +30026 30026 Potassium 40 K-40 +30027 30027 Argon 41 Ar-41 +30028 30028 Calcium 41 Ca-41 +30029 30029 Calcium 45 Ca-45 +30030 30030 Titanium 44 Ti-44 +30031 30031 Scandium 46 Sc-46 +30032 30032 Vanadium 48 V-48 +30033 30033 Vanadium 49 V-49 +30034 30034 Chrome 51 Cr-51 +30035 30035 Manganese 52 Mn-52 +30036 30036 Manganese 54 Mn-54 +30037 30037 Iron 55 Fe-55 +30038 30038 Iron 59 Fe-59 +30039 30039 Cobalt 56 Co-56 +30040 30040 Cobalt 57 Co-57 +30041 30041 Cobalt 58 Co-58 +30042 30042 Cobalt 60 Co-60 +30043 30043 Nickel 59 Ni-59 +30044 30044 Nickel 63 Ni-63 +30045 30045 Zinc 65 Zn-65 +30046 30046 Gallium 67 Ga-67 +30047 30047 Gallium 68 Ga-68 +30048 30048 Germanium 68 Ge-68 +30049 30049 Germanium 69 Ge-69 +30050 30050 Arsenic 73 As-73 +30051 30051 Selenium 75 Se-75 +30052 30052 Selenium 79 Se-79 +30053 30053 Rubidium 81 Rb-81 +30054 30054 Rubidium 83 Rb-83 +30055 30055 Rubidium 84 Rb-84 +30056 30056 Rubidium 86 Rb-86 +30057 30057 Rubidium 87 Rb-87 +30058 30058 Rubidium 88 Rb-88 +30059 30059 Krypton 85 Kr-85 +30060 30060 Krypton 85 metastable Kr-85m +30061 30061 Krypton 87 Kr-87 +30062 30062 Krypton 88 Kr-88 +30063 30063 Krypton 89 Kr-89 +30064 30064 Strontium 85 Sr-85 +30065 30065 Strontium 89 Sr-89 +30066 30066 Strontium 89/90 Sr-8990 +30067 30067 Strontium 90 Sr-90 +30068 30068 Strontium 91 Sr-91 +30069 30069 Strontium 92 Sr-92 +30070 30070 Yttrium 87 Y-87 +30071 30071 Yttrium 88 Y-88 +30072 30072 Yttrium 90 Y-90 +30073 30073 Yttrium 91 Y-91 +30074 30074 Yttrium 91 metastable Y-91m +30075 30075 Yttrium 92 Y-92 +30076 30076 Yttrium 93 Y-93 +30077 30077 Zirconium 89 Zr-89 +30078 30078 Zirconium 93 Zr-93 +30079 30079 Zirconium 95 Zr-95 +30080 30080 Zirconium 97 Zr-97 +30081 30081 Niobium 93 metastable Nb-93m +30082 30082 Niobium 94 Nb-94 +30083 30083 Niobium 95 Nb-95 +30084 30084 Niobium 95 metastable Nb-95m +30085 30085 Niobium 97 Nb-97 +30086 30086 Niobium 97 metastable Nb-97m +30087 30087 Molybdenum 93 Mo-93 +30088 30088 Molybdenum 99 Mo-99 +30089 30089 Technetium 95 metastable Tc-95m +30090 30090 Technetium 96 Tc-96 +30091 30091 Technetium 99 Tc-99 +30092 30092 Technetium 99 metastable Tc-99m +30093 30093 Rhodium 99 Rh-99 +30094 30094 Rhodium 101 Rh-101 +30095 30095 Rhodium 102 metastable Rh-102m +30096 30096 Rhodium 103 metastable Rh-103m +30097 30097 Rhodium 105 Rh-105 +30098 30098 Rhodium 106 Rh-106 +30099 30099 Palladium 100 Pd-100 +30100 30100 Palladium 103 Pd-103 +30101 30101 Palladium 107 Pd-107 +30102 30102 Ruthenium 103 Ru-103 +30103 30103 Ruthenium 105 Ru-105 +30104 30104 Ruthenium 106 Ru-106 +30105 30105 Silver 108 metastable Ag-108m +30106 30106 Silver 110 metastable Ag-110m +30107 30107 Cadmium 109 Cd-109 +30108 30108 Cadmium 113 metastable Cd-113m +30109 30109 Cadmium 115 metastable Cd-115m +30110 30110 Indium 114 metastable In-114m +30111 30111 Tin 113 Sn-113 +30112 30112 Tin 119 metastable Sn-119m +30113 30113 Tin 121 metastable Sn-121m +30114 30114 Tin 122 Sn-122 +30115 30115 Tin 123 Sn-123 +30116 30116 Tin 126 Sn-126 +30117 30117 Antimony 124 Sb-124 +30118 30118 Antimony 125 Sb-125 +30119 30119 Antimony 126 Sb-126 +30120 30120 Antimony 127 Sb-127 +30121 30121 Antimony 129 Sb-129 +30122 30122 Tellurium 123 metastable Te-123m +30123 30123 Tellurium 125 metastable Te-125m +30124 30124 Tellurium 127 Te-127 +30125 30125 Tellurium 127 metastable Te-127m +30126 30126 Tellurium 129 Te-129 +30127 30127 Tellurium 129 metastable Te-129m +30128 30128 Tellurium 131 metastable Te-131m +30129 30129 Tellurium 132 Te-132 +30130 30130 Iodine 123 I-123 +30131 30131 Iodine 124 I-124 +30132 30132 Iodine 125 I-125 +30133 30133 Iodine 126 I-126 +30134 30134 Iodine 129 I-129 +30135 30135 Iodine 129 elementary gaseous I-129g +30136 30136 Iodine 129 organic bounded I-129o +30137 30137 Iodine 131 I-131 +30138 30138 Iodine 131 elementary gaseous I-131g +30139 30139 Iodine 131 organic bounded I-131o +30140 30140 Iodine 131 gaseous elementary and organic bounded I-131go +30141 30141 Iodine 131 aerosol I-131a +30142 30142 Iodine 132 I-132 +30143 30143 Iodine 132 elementary gaseous I-132g +30144 30144 Iodine 132 organic bounded I-132o +30145 30145 Iodine 132 gaseous elementary and organic bounded I-132go +30146 30146 Iodine 132 aerosol I-132a +30147 30147 Iodine 133 I-133 +30148 30148 Iodine 133 elementary gaseous I-133g +30149 30149 Iodine 133 organic bounded I-133o +30150 30150 Iodine 133 gaseous elementary and organic bounded I-133go +30151 30151 Iodine 133 aerosol I-133a +30152 30152 Iodine 134 I-134 +30153 30153 Iodine 134 elementary gaseous I-134g +30154 30154 Iodine 134 organic bounded I-134o +30155 30155 Iodine 135 I-135 +30156 30156 Iodine 135 elementary gaseous I-135g +30157 30157 Iodine 135 organic bounded I-135o +30158 30158 Iodine 135 gaseous elementary and organic bounded I-135go +30159 30159 Iodine 135 aerosol I-135a +30160 30160 Xenon 131 metastable Xe-131m +30161 30161 Xenon 133 Xe-133 +30162 30162 Xenon 133 metastable Xe-133m +30163 30163 Xenon 135 Xe-135 +30164 30164 Xenon 135 metastable Xe-135m +30165 30165 Xenon 137 Xe-137 +30166 30166 Xenon 138 Xe-138 +30167 30167 Xenon sum of all Xenon isotopes Xe-sum +30168 30168 Caesium 131 Cs-131 +30169 30169 Caesium 134 Cs-134 +30170 30170 Caesium 135 Cs-135 +30171 30171 Caesium 136 Cs-136 +30172 30172 Caesium 137 Cs-137 +30173 30173 Barium 133 Ba-133 +30174 30174 Barium 137 metastable Ba-137m +30175 30175 Barium 140 Ba-140 +30176 30176 Cerium 139 Ce-139 +30177 30177 Cerium 141 Ce-141 +30178 30178 Cerium 143 Ce-143 +30179 30179 Cerium 144 Ce-144 +30180 30180 Lanthanum 140 La-140 +30181 30181 Lanthanum 141 La-141 +30182 30182 Praseodymium 143 Pr-143 +30183 30183 Praseodymium 144 Pr-144 +30184 30184 Praseodymium 144 metastable Pr-144m +30185 30185 Samarium 145 Sm-145 +30186 30186 Samarium 147 Sm-147 +30187 30187 Samarium 151 Sm-151 +30188 30188 Neodymium 147 Nd-147 +30189 30189 Promethium 146 Pm-146 +30190 30190 Promethium 147 Pm-147 +30191 30191 Promethium 151 Pm-151 +30192 30192 Europium 152 Eu-152 +30193 30193 Europium 154 Eu-154 +30194 30194 Europium 155 Eu-155 +30195 30195 Gadolinium 153 Gd-153 +30196 30196 Terbium 160 Tb-160 +30197 30197 Holmium 166 metastable Ho-166m +30198 30198 Thulium 170 Tm-170 +30199 30199 Ytterbium 169 Yb-169 +30200 30200 Hafnium 175 Hf-175 +30201 30201 Hafnium 181 Hf-181 +30202 30202 Tantalum 179 Ta-179 +30203 30203 Tantalum 182 Ta-182 +30204 30204 Rhenium 184 Re-184 +30205 30205 Iridium 192 Ir-192 +30206 30206 Mercury 203 Hg-203 +30207 30207 Thallium 204 Tl-204 +30208 30208 Thallium 207 Tl-207 +30209 30209 Thallium 208 Tl-208 +30210 30210 Thallium 209 Tl-209 +30211 30211 Bismuth 205 Bi-205 +30212 30212 Bismuth 207 Bi-207 +30213 30213 Bismuth 210 Bi-210 +30214 30214 Bismuth 211 Bi-211 +30215 30215 Bismuth 212 Bi-212 +30216 30216 Bismuth 213 Bi-213 +30217 30217 Bismuth 214 Bi-214 +30218 30218 Polonium 208 Po-208 +30219 30219 Polonium 210 Po-210 +30220 30220 Polonium 212 Po-212 +30221 30221 Polonium 213 Po-213 +30222 30222 Polonium 214 Po-214 +30223 30223 Polonium 215 Po-215 +30224 30224 Polonium 216 Po-216 +30225 30225 Polonium 218 Po-218 +30226 30226 Lead 209 Pb-209 +30227 30227 Lead 210 Pb-210 +30228 30228 Lead 211 Pb-211 +30229 30229 Lead 212 Pb-212 +30230 30230 Lead 214 Pb-214 +30231 30231 Astatine 217 At-217 +30232 30232 Radon 219 Rn-219 +30233 30233 Radon 220 Rn-220 +30234 30234 Radon 222 Rn-222 +30235 30235 Francium 221 Fr-221 +30236 30236 Francium 223 Fr-223 +30237 30237 Radium 223 Ra-223 +30238 30238 Radium 224 Ra-224 +30239 30239 Radium 225 Ra-225 +30240 30240 Radium 226 Ra-226 +30241 30241 Radium 228 Ra-228 +30242 30242 Actinium 225 Ac-225 +30243 30243 Actinium 227 Ac-227 +30244 30244 Actinium 228 Ac-228 +30245 30245 Thorium 227 Th-227 +30246 30246 Thorium 228 Th-228 +30247 30247 Thorium 229 Th-229 +30248 30248 Thorium 230 Th-230 +30249 30249 Thorium 231 Th-231 +30250 30250 Thorium 232 Th-232 +30251 30251 Thorium 234 Th-234 +30252 30252 Protactinium 231 Pa-231 +30253 30253 Protactinium 233 Pa-233 +30254 30254 Protactinium 234 metastable Pa-234m +30255 30255 Uranium 232 U-232 +30256 30256 Uranium 233 U-233 +30257 30257 Uranium 234 U-234 +30258 30258 Uranium 235 U-235 +30259 30259 Uranium 236 U-236 +30260 30260 Uranium 237 U-237 +30261 30261 Uranium 238 U-238 +30262 30262 Plutonium 236 Pu-236 +30263 30263 Plutonium 238 Pu-238 +30264 30264 Plutonium 239 Pu-239 +30265 30265 Plutonium 240 Pu-240 +30266 30266 Plutonium 241 Pu-241 +30267 30267 Plutonium 242 Pu-242 +30268 30268 Plutonium 244 Pu-244 +30269 30269 Neptunium 237 Np-237 +30270 30270 Neptunium 238 Np-238 +30271 30271 Neptunium 239 Np-239 +30272 30272 Americium 241 Am-241 +30273 30273 Americium 242 Am-242 +30274 30274 Americium 242 metastable Am-242m +30275 30275 Americium 243 Am-243 +30276 30276 Curium 242 Cm-242 +30277 30277 Curium 243 Cm-243 +30278 30278 Curium 244 Cm-244 +30279 30279 Curium 245 Cm-245 +30280 30280 Curium 246 Cm-246 +30281 30281 Curium 247 Cm-247 +30282 30282 Curium 248 Cm-248 +30283 30283 Curium 243/244 Cm-243244 +30284 30284 Plutonium 238/Americium 241 Pu-238Am-241 +30285 30285 Plutonium 239/240 Pu-239240 +30286 30286 Berkelium 249 Bk-249 +30287 30287 Californium 249 Cf-249 +30288 30288 Californium 250 Cf-250 +30289 30289 Californium 252 Cf-252 +30290 30290 Sum aerosol particulates SumAer +30291 30291 Sum Iodine SumIod +30292 30292 Sum noble gas SumNG +30293 30293 Activation gas ActGas +30294 30294 Cs-137 Equivalent EquCs137 +30295 30295 Carbon-13 C-13 +30296 30296 Lead Pb +30297 30297 Tellurium 131 Te-131 +30298 30298 Neodymium 137 Nd-137 +# 30299-39999 Reserved +40000 40000 Singlet sigma oxygen (dioxygen (sigma singlet)) O2 +40001 40001 Singlet delta oxygen (dioxygen (delta singlet)) O2 +40002 40002 Singlet excited oxygen atom O(1D) +40003 40003 Triplet ground state oxygen atom O(3P) +# 40004-59999 Reserved +60000 60000 HOx radical (OH+HO2) HOx* +60001 60001 Total inorganic and organic peroxy radicals (HOO* + ROO*) ROO* +60002 60002 Passive Ozone +60003 60003 NOx expressed as nitrogen NOx +60004 60004 All nitrogen oxides (NOy) expressed as nitrogen NOy +60005 60005 Total inorganic chlorine Clx +60006 60006 Total inorganic bromine Brx +60007 60007 Total inorganic chlorine except HCl, ClONO2: ClOx +60008 60008 Total inorganic bromine except HBr, BrONO2: BrOx +60009 60009 Lumped alkanes +60010 60010 Lumped alkenes +60011 60011 Lumped aromatic compounds +60012 60012 Lumped terpenes +60013 60013 Non-methane volatile organic compounds expressed as carbon NMVOC +60014 60014 Anthropogenic non-methane volatile organic compounds expressed as carbon aNMVOC +60015 60015 Biogenic non-methane volatile organic compounds expressed as carbon bNMVOC +60016 60016 Lumped oxygenated hydrocarbons OVOC +60017 60017 NOx expressed as nitrogen dioxide (NO2) NOx +60018 60018 Organic aldehydes RCHO +60019 60019 Organic peroxides ROOH +60020 60020 Organic nitrates RNO3 +60021 60021 Ethers ROR' +60022 60022 Amines NRR'R'' +60023 60023 Ketones RC(O)R' +60024 60024 Dicarbonyls unsaturated RC(O)CH2C(O)R' +60025 60025 Hydroxy dicarbonyls unsaturated RC(O)CHOHC(O)R' +60026 60026 Hydroxy ketones RC(OH)C(O)R' +60027 60027 Oxides Ox +60028 60028 Peroxyacyl nitrates RC(O)OONO2 +60029 60029 Aromatic peroxide radical (Aryl dioxydanyl radicals) ArOO* +60030 60030 Biogenic secondary organic compound +60031 60031 Anthropogenic secondary organic compound +60032 60032 All hydroxy-peroxides products of the reaction of hydroxy-isoprene adducts with O2 ISOPOOH +60033 60033 Anthropogenic volatile organic compounds aVOC +60034 60034 Biomass burning volatile organic compounds bbVOC +# 60035-61999 Reserved +62000 62000 Total aerosol +62001 62001 Dust dry +62002 62002 Water in ambient +62003 62003 Ammonium dry +62004 62004 Nitrate dry +62005 62005 Nitric acid trihydrate +62006 62006 Sulphate dry +62007 62007 Mercury dry +62008 62008 Sea salt dry +62009 62009 Black carbon dry +62010 62010 Particulate organic matter dry +62011 62011 Primary particulate organic matter dry +62012 62012 Secondary particulate organic matter dry +62013 62013 Black carbon hydrophilic dry +62014 62014 Black carbon hydrophobic dry +62015 62015 Particulate organic matter hydrophilic dry +62016 62016 Particulate organic matter hydrophobic dry +62017 62017 Nitrate hydrophilic dry +62018 62018 Nitrate hydrophobic dry +# 62019 Reserved +62020 62020 Smoke - high absorption +62021 62021 Smoke - low absorption +62022 62022 Aerosol - high absorption +62023 62023 Aerosol - low absorption +# 62024 Reserved +62025 62025 Volcanic ash +62026 62026 Particulate matter (PM) +# 62027 Reserved +62028 62028 Total aerosol hydrophilic +62029 62029 Total aerosol hydrophobic +62030 62030 Primary particulate inorganic matter dry +62031 62031 Secondary particulate inorganic matter dry +62032 62032 Biogenic secondary organic aerosol +62033 62033 Anthropogenic secondary organic aerosol +62034 62034 Rain water H2Orain +62035 62035 Cloud water H2Ocloud +62036 62036 Brown carbon dry +# 62037-62099 Reserved +62100 62100 Alnus (alder) pollen +62101 62101 Betula (birch) pollen +62102 62102 Castanea (chestnut) pollen +62103 62103 Carpinus (hornbeam) pollen +62104 62104 Corylus (hazel) pollen +62105 62105 Fagus (beech) pollen +62106 62106 Fraxinus (ash) pollen +62107 62107 Pinus (pine) pollen +62108 62108 Platanus (plane) pollen +62109 62109 Populus (cottonwood, poplar) pollen +62110 62110 Quercus (oak) pollen +62111 62111 Salix (willow) pollen +62112 62112 Taxus (yew) pollen +62113 62113 Tilia (lime, linden) pollen +62114 62114 Ulmus (elm) pollen +62115 62115 Olea (olive) pollen +# 62116-62199 Reserved +62200 62200 Ambrosia (ragweed, burr-ragweed) pollen +62201 62201 Artemisia (sagebrush, wormwood, mugwort) pollen +62202 62202 Brassica (rape, broccoli, Brussels sprouts, cabbage, cauliflower, collards, kale, kohlrabi, mustard, rutabaga) pollen +62203 62203 Plantago (plantain) pollen +62204 62204 Rumex (dock, sorrel) pollen +62205 62205 Urtica (nettle) pollen +# 62206-62299 Reserved +62300 62300 Poaceae (grass family) pollen +# 62301-62999 Reserved +# 63000-65534 For experimental use at local level +65535 65535 Missing diff --git a/definitions/grib2/tables/31/4.233.table b/definitions/grib2/tables/31/4.233.table new file mode 100644 index 000000000..011c7d6af --- /dev/null +++ b/definitions/grib2/tables/31/4.233.table @@ -0,0 +1,534 @@ +# Code table 4.233 - Aerosol type +0 0 Ozone O3 +1 1 Water vapour H2O +2 2 Methane CH4 +3 3 Carbon dioxide CO2 +4 4 Carbon monoxide CO +5 5 Nitrogen dioxide NO2 +6 6 Nitrous oxide N2O +7 7 Formaldehyde HCHO +8 8 Sulphur dioxide SO2 +9 9 Ammonia NH3 +10 10 Ammonium cation NH4+ +11 11 Nitrogen monoxide NO +12 12 Atomic oxygen O +13 13 Nitrate radical NO3* +14 14 Hydroperoxyl radical HOO* +15 15 Dinitrogen pentoxide N2O5 +16 16 Nitrous acid HONO +17 17 Nitric acid HNO3 +18 18 Peroxynitric acid HO2NO2 +19 19 Hydrogen peroxide H2O2 +20 20 Dihydrogen H2 +21 21 Atomic nitrogen N +22 22 Sulphate anion SO42- +23 23 Atomic Radon Rn +24 24 Mercury vapour Hg(0) +25 25 Mercury(II) cation Hg2+ +26 26 Atomic chlorine Cl +27 27 Chlorine monoxide ClO +28 28 Dichlorine peroxide Cl2O2 +29 29 Hypochlorous acid HClO +30 30 Chlorine nitrate ClONO2 +31 31 Chlorine dioxide ClO2 +32 32 Atomic bromine Br +33 33 Bromine monoxide BrO +34 34 Bromine chloride BrCl +35 35 Hydrogen bromide HBr +36 36 Hypobromous acid HBrO +37 37 Bromine nitrate BrONO2 +38 38 Dioxygen O2 +39 39 Nitryl chloride NO2Cl +40 40 Sulphuric acid H2SO4 +41 41 Hydrogen sulphide H2S +42 42 Sulphur trioxide SO3 +43 43 Bromine Br2 +44 44 Hydrofluoric acid HF +45 45 Sulphur hexafluoride SF6 +46 46 Chlorine Cl2 +# 47-9999 Reserved +10000 10000 Hydroxyl radical HO* +10001 10001 Methyl peroxy radical CH3OO* +10002 10002 Methyl hydroperoxide CH3OOH +10004 10004 Methanol CH3OH +10005 10005 Formic acid HCOOH +10006 10006 Hydrogen cyanide HCN +10007 10007 Aceto nitrile CH3CN +10008 10008 Ethane C2H6 +10009 10009 Ethene (= Ethylene) C2H4 +10010 10010 Ethyne (= Acetylene) C2H2 +10011 10011 Ethanol C2H5OH +10012 10012 Acetic acid C2H5OOH +10013 10013 Peroxyacetyl nitrate CH3C(O)OONO2 +10014 10014 Propane C3H8 +10015 10015 Propene C3H6 +10016 10016 Butane (all isomers) C4H10 +10017 10017 Isoprene C5H10 +10018 10018 Alpha pinene C10H16 +10019 10019 Beta pinene C10H16 +10020 10020 Limonene C10H16 +10021 10021 Benzene C6H6 +10022 10022 Toluene C7H8 +10023 10023 Xylene C8H10 +10024 10024 Methanesulphonic acid CH3SO3H +10025 10025 Methylglyoxal (2-oxopropanal) CH3C(O)CHO +10026 10026 Peroxyacetyl radical CH3C(O)OO* +10027 10027 Methacrylic acid (2-methylprop-2-enoic acid) CH2C(CH3)COOH +10028 10028 Methacrolein (2-methylprop-2-enal) CH2C(CH3)CHO +10029 10029 Acetone (propan-2-one) CH3C(O)CH3 +10030 10030 Ethyl dioxidanyl radical CH3CH2OO* +10031 10031 Butadiene (buta-1,3-diene) (CH2CH)2 +10032 10032 Acetaldehyde (ethanal) CH3CHO +10033 10033 Glycolaldehyde (hydroxyethanal) HOCH2CHO +10034 10034 Cresol (methylphenol), all isomers CH3C6H4OH +10035 10035 Peracetic acid (ethaneperoxoic acid) CH3C(O)OOH +10036 10036 2-hydroxyethyl oxidanyl radical HOCH2CH2O* +10037 10037 2-hydroxyethyl dioxidanyl radical HOCH2CH2OO* +10038 10038 Glyoxal (oxaldehyde) OCHCHO +10039 10039 Isopropyl dioxidanyl radical (CH3)2CHOO* +10040 10040 Isopropyl hydroperoxide (2-hydroperoxypropane) (CH3)2CHOOH +10041 10041 Hydroxyacetone (1-hydroxypropan-2-one) CH3C(O)CH2OH +10042 10042 Peroxyacetic acid (ethaneperoxoic acid) CH3C(O)OOH +10043 10043 Methyl vinyl ketone (but-3-en-2-one) CH3C(O)CHCH2 +10044 10044 Phenoxy radical C6H5O* +10045 10045 Methyl radical CH3* +10046 10046 Carbonyl sulphide (carbon oxide sulphide) OCS +10047 10047 Dibromomethane CH2Br2 +10048 10048 Methoxy radical CH3O* +10049 10049 Tribromomethane CHBr3 +10050 10050 Formyl radical (oxomethyl radical) HOC* +10051 10051 Hydroxymethyl dioxidanyl radical HOCH2OO* +10052 10052 Ethyl hydroperoxide CH3CH2OOH +10053 10053 3-hydroxypropyl dioxidanyl radical HOCH2CH2CH2OO* +10054 10054 3-hydroxypropyl hydroperoxide HOCH2CH2CH2OOH +10055 10055 Methyl-peroxy-nitrate (nitroperoxy-methane) CH3OONO2 +10056 10056 2-lambda^1-oxidanyloxy-2-methylbut-3-en-1-ol (4-hydroxy-3-methyl-1-butene-3-ylperoxy radical) HOCH2C(CH3)(OO*)CHCH2 +10057 10057 2-lambda^1-oxidanyloxy-3-methylbut-3-en-1-ol (2-hydroxy-1-isopropenylethylperoxy radical) HOCH2CH(OO*)C(CH3)CH2 +10058 10058 (Z)-4-hydroperoxy-2-methyl-2-butenal CH2(OOH)CHC(CH3)CHO +10059 10059 (Z)-4-hydroperoxy-3-methyl-2-butenal CH2(OOH)C(CH3)CHCHO +# 10060-10499 Reserved for other simple organic molecules (e.g. higher aldehydes, alcohols, peroxides, etc.) +10500 10500 Dimethyl sulphide CH3SCH3 (DMS) +10501 10501 DMSO (dimethyl sulfoxide) (CH3)2SO +# 10502-20000 Reserved +20001 20001 Hydrogen chloride HCl +20002 20002 CFC-11 (trichlorofluoromethane) CCl3F +20003 20003 CFC-12 (dichlorodifluoromethane) CCl2F2 +20004 20004 CFC-113 (1,1,2-trichloro-1,2,2-trifluoroethane) Cl2FC-CClF2 +20005 20005 CFC-113a (1,1,1-trichloro-2,2,2-trifluoroethane) Cl3C-CF3 +20006 20006 CFC-114 (1,2-dichloro-1,1,2,2-tetrafluoroethane) ClF2C-CClF2 +20007 20007 CFC-115 (1-chloro-1,1,2,2,2-pentafluoroethane) ClF2C-CF3 +20008 20008 HCFC-22 (chlorodifluoromethane) CHClF2 +20009 20009 HCFC-141b (1,1-dichloro-1-fluoroethane) Cl2FC-CH3 +20010 20010 HCFC-142b (1-chloro-1,1-difluoroethane) ClF2C-CH3 +20011 20011 Halon-1202 (dibromodifluoromethane) CBr2F2 +20012 20012 Halon-1211 (bromochlorodifluoromethane) CBrClF2 +20013 20013 Halon-1301 (bromotrifluoromethane) CBrF3 +20014 20014 Halon-2402 (1,2-dibromo-1,1,2,2-tetrafluoroethane) BrF2C-CBrF2 +20015 20015 HCC-40 (methyl chloride) CH3Cl +20016 20016 HCC-10 (carbon tetrachloride) CCl4 +20017 20017 HCC-140a (1,1,1-trichloroethane) Cl3C-CH3 +20018 20018 HBC-40B1 (methyl bromide) CH3Br +20019 20019 HCH (hexachlorocyclohexane) all isomers C6H6Cl6 +20020 20020 alpha-HCH (alpha-hexachlorocyclohexane) both enantiomers alpha-C6H6Cl6 +20021 20021 PCB-153 (2,2',4,4',5,5'-hexachlorobiphenyl) (C6H2Cl3)2 +20022 20022 HCFC-141a (1,1-dichloro-2-fluoroethane) Cl2HC-CH2F +# 20023-29999 Reserved +30000 30000 Radioactive pollutant (tracer, defined by originating centre) +# 30001-30009 Reserved +30010 30010 Tritium (Hydrogen 3) H-3 +30011 30011 Tritium organic bounded H-3o +30012 30012 Tritium inorganic H-3a +30013 30013 Beryllium 7 Be-7 +30014 30014 Beryllium 10 Be-10 +30015 30015 Carbon 14 C-14 +30016 30016 Carbon 14 CO2 C-14CO2 +30017 30017 Carbon 14 other gases C-14og +30018 30018 Nitrogen 13 N-13 +30019 30019 Nitrogen 16 N-16 +30020 30020 Fluorine 18 F-18 +30021 30021 Sodium 22 Na-22 +30022 30022 Phosphate 32 P-32 +30023 30023 Phosphate 33 P-33 +30024 30024 Sulphur 35 S-35 +30025 30025 Chlorine 36 Cl-36 +30026 30026 Potassium 40 K-40 +30027 30027 Argon 41 Ar-41 +30028 30028 Calcium 41 Ca-41 +30029 30029 Calcium 45 Ca-45 +30030 30030 Titanium 44 Ti-44 +30031 30031 Scandium 46 Sc-46 +30032 30032 Vanadium 48 V-48 +30033 30033 Vanadium 49 V-49 +30034 30034 Chrome 51 Cr-51 +30035 30035 Manganese 52 Mn-52 +30036 30036 Manganese 54 Mn-54 +30037 30037 Iron 55 Fe-55 +30038 30038 Iron 59 Fe-59 +30039 30039 Cobalt 56 Co-56 +30040 30040 Cobalt 57 Co-57 +30041 30041 Cobalt 58 Co-58 +30042 30042 Cobalt 60 Co-60 +30043 30043 Nickel 59 Ni-59 +30044 30044 Nickel 63 Ni-63 +30045 30045 Zinc 65 Zn-65 +30046 30046 Gallium 67 Ga-67 +30047 30047 Gallium 68 Ga-68 +30048 30048 Germanium 68 Ge-68 +30049 30049 Germanium 69 Ge-69 +30050 30050 Arsenic 73 As-73 +30051 30051 Selenium 75 Se-75 +30052 30052 Selenium 79 Se-79 +30053 30053 Rubidium 81 Rb-81 +30054 30054 Rubidium 83 Rb-83 +30055 30055 Rubidium 84 Rb-84 +30056 30056 Rubidium 86 Rb-86 +30057 30057 Rubidium 87 Rb-87 +30058 30058 Rubidium 88 Rb-88 +30059 30059 Krypton 85 Kr-85 +30060 30060 Krypton 85 metastable Kr-85m +30061 30061 Krypton 87 Kr-87 +30062 30062 Krypton 88 Kr-88 +30063 30063 Krypton 89 Kr-89 +30064 30064 Strontium 85 Sr-85 +30065 30065 Strontium 89 Sr-89 +30066 30066 Strontium 89/90 Sr-8990 +30067 30067 Strontium 90 Sr-90 +30068 30068 Strontium 91 Sr-91 +30069 30069 Strontium 92 Sr-92 +30070 30070 Yttrium 87 Y-87 +30071 30071 Yttrium 88 Y-88 +30072 30072 Yttrium 90 Y-90 +30073 30073 Yttrium 91 Y-91 +30074 30074 Yttrium 91 metastable Y-91m +30075 30075 Yttrium 92 Y-92 +30076 30076 Yttrium 93 Y-93 +30077 30077 Zirconium 89 Zr-89 +30078 30078 Zirconium 93 Zr-93 +30079 30079 Zirconium 95 Zr-95 +30080 30080 Zirconium 97 Zr-97 +30081 30081 Niobium 93 metastable Nb-93m +30082 30082 Niobium 94 Nb-94 +30083 30083 Niobium 95 Nb-95 +30084 30084 Niobium 95 metastable Nb-95m +30085 30085 Niobium 97 Nb-97 +30086 30086 Niobium 97 metastable Nb-97m +30087 30087 Molybdenum 93 Mo-93 +30088 30088 Molybdenum 99 Mo-99 +30089 30089 Technetium 95 metastable Tc-95m +30090 30090 Technetium 96 Tc-96 +30091 30091 Technetium 99 Tc-99 +30092 30092 Technetium 99 metastable Tc-99m +30093 30093 Rhodium 99 Rh-99 +30094 30094 Rhodium 101 Rh-101 +30095 30095 Rhodium 102 metastable Rh-102m +30096 30096 Rhodium 103 metastable Rh-103m +30097 30097 Rhodium 105 Rh-105 +30098 30098 Rhodium 106 Rh-106 +30099 30099 Palladium 100 Pd-100 +30100 30100 Palladium 103 Pd-103 +30101 30101 Palladium 107 Pd-107 +30102 30102 Ruthenium 103 Ru-103 +30103 30103 Ruthenium 105 Ru-105 +30104 30104 Ruthenium 106 Ru-106 +30105 30105 Silver 108 metastable Ag-108m +30106 30106 Silver 110 metastable Ag-110m +30107 30107 Cadmium 109 Cd-109 +30108 30108 Cadmium 113 metastable Cd-113m +30109 30109 Cadmium 115 metastable Cd-115m +30110 30110 Indium 114 metastable In-114m +30111 30111 Tin 113 Sn-113 +30112 30112 Tin 119 metastable Sn-119m +30113 30113 Tin 121 metastable Sn-121m +30114 30114 Tin 122 Sn-122 +30115 30115 Tin 123 Sn-123 +30116 30116 Tin 126 Sn-126 +30117 30117 Antimony 124 Sb-124 +30118 30118 Antimony 125 Sb-125 +30119 30119 Antimony 126 Sb-126 +30120 30120 Antimony 127 Sb-127 +30121 30121 Antimony 129 Sb-129 +30122 30122 Tellurium 123 metastable Te-123m +30123 30123 Tellurium 125 metastable Te-125m +30124 30124 Tellurium 127 Te-127 +30125 30125 Tellurium 127 metastable Te-127m +30126 30126 Tellurium 129 Te-129 +30127 30127 Tellurium 129 metastable Te-129m +30128 30128 Tellurium 131 metastable Te-131m +30129 30129 Tellurium 132 Te-132 +30130 30130 Iodine 123 I-123 +30131 30131 Iodine 124 I-124 +30132 30132 Iodine 125 I-125 +30133 30133 Iodine 126 I-126 +30134 30134 Iodine 129 I-129 +30135 30135 Iodine 129 elementary gaseous I-129g +30136 30136 Iodine 129 organic bounded I-129o +30137 30137 Iodine 131 I-131 +30138 30138 Iodine 131 elementary gaseous I-131g +30139 30139 Iodine 131 organic bounded I-131o +30140 30140 Iodine 131 gaseous elementary and organic bounded I-131go +30141 30141 Iodine 131 aerosol I-131a +30142 30142 Iodine 132 I-132 +30143 30143 Iodine 132 elementary gaseous I-132g +30144 30144 Iodine 132 organic bounded I-132o +30145 30145 Iodine 132 gaseous elementary and organic bounded I-132go +30146 30146 Iodine 132 aerosol I-132a +30147 30147 Iodine 133 I-133 +30148 30148 Iodine 133 elementary gaseous I-133g +30149 30149 Iodine 133 organic bounded I-133o +30150 30150 Iodine 133 gaseous elementary and organic bounded I-133go +30151 30151 Iodine 133 aerosol I-133a +30152 30152 Iodine 134 I-134 +30153 30153 Iodine 134 elementary gaseous I-134g +30154 30154 Iodine 134 organic bounded I-134o +30155 30155 Iodine 135 I-135 +30156 30156 Iodine 135 elementary gaseous I-135g +30157 30157 Iodine 135 organic bounded I-135o +30158 30158 Iodine 135 gaseous elementary and organic bounded I-135go +30159 30159 Iodine 135 aerosol I-135a +30160 30160 Xenon 131 metastable Xe-131m +30161 30161 Xenon 133 Xe-133 +30162 30162 Xenon 133 metastable Xe-133m +30163 30163 Xenon 135 Xe-135 +30164 30164 Xenon 135 metastable Xe-135m +30165 30165 Xenon 137 Xe-137 +30166 30166 Xenon 138 Xe-138 +30167 30167 Xenon sum of all Xenon isotopes Xe-sum +30168 30168 Caesium 131 Cs-131 +30169 30169 Caesium 134 Cs-134 +30170 30170 Caesium 135 Cs-135 +30171 30171 Caesium 136 Cs-136 +30172 30172 Caesium 137 Cs-137 +30173 30173 Barium 133 Ba-133 +30174 30174 Barium 137 metastable Ba-137m +30175 30175 Barium 140 Ba-140 +30176 30176 Cerium 139 Ce-139 +30177 30177 Cerium 141 Ce-141 +30178 30178 Cerium 143 Ce-143 +30179 30179 Cerium 144 Ce-144 +30180 30180 Lanthanum 140 La-140 +30181 30181 Lanthanum 141 La-141 +30182 30182 Praseodymium 143 Pr-143 +30183 30183 Praseodymium 144 Pr-144 +30184 30184 Praseodymium 144 metastable Pr-144m +30185 30185 Samarium 145 Sm-145 +30186 30186 Samarium 147 Sm-147 +30187 30187 Samarium 151 Sm-151 +30188 30188 Neodymium 147 Nd-147 +30189 30189 Promethium 146 Pm-146 +30190 30190 Promethium 147 Pm-147 +30191 30191 Promethium 151 Pm-151 +30192 30192 Europium 152 Eu-152 +30193 30193 Europium 154 Eu-154 +30194 30194 Europium 155 Eu-155 +30195 30195 Gadolinium 153 Gd-153 +30196 30196 Terbium 160 Tb-160 +30197 30197 Holmium 166 metastable Ho-166m +30198 30198 Thulium 170 Tm-170 +30199 30199 Ytterbium 169 Yb-169 +30200 30200 Hafnium 175 Hf-175 +30201 30201 Hafnium 181 Hf-181 +30202 30202 Tantalum 179 Ta-179 +30203 30203 Tantalum 182 Ta-182 +30204 30204 Rhenium 184 Re-184 +30205 30205 Iridium 192 Ir-192 +30206 30206 Mercury 203 Hg-203 +30207 30207 Thallium 204 Tl-204 +30208 30208 Thallium 207 Tl-207 +30209 30209 Thallium 208 Tl-208 +30210 30210 Thallium 209 Tl-209 +30211 30211 Bismuth 205 Bi-205 +30212 30212 Bismuth 207 Bi-207 +30213 30213 Bismuth 210 Bi-210 +30214 30214 Bismuth 211 Bi-211 +30215 30215 Bismuth 212 Bi-212 +30216 30216 Bismuth 213 Bi-213 +30217 30217 Bismuth 214 Bi-214 +30218 30218 Polonium 208 Po-208 +30219 30219 Polonium 210 Po-210 +30220 30220 Polonium 212 Po-212 +30221 30221 Polonium 213 Po-213 +30222 30222 Polonium 214 Po-214 +30223 30223 Polonium 215 Po-215 +30224 30224 Polonium 216 Po-216 +30225 30225 Polonium 218 Po-218 +30226 30226 Lead 209 Pb-209 +30227 30227 Lead 210 Pb-210 +30228 30228 Lead 211 Pb-211 +30229 30229 Lead 212 Pb-212 +30230 30230 Lead 214 Pb-214 +30231 30231 Astatine 217 At-217 +30232 30232 Radon 219 Rn-219 +30233 30233 Radon 220 Rn-220 +30234 30234 Radon 222 Rn-222 +30235 30235 Francium 221 Fr-221 +30236 30236 Francium 223 Fr-223 +30237 30237 Radium 223 Ra-223 +30238 30238 Radium 224 Ra-224 +30239 30239 Radium 225 Ra-225 +30240 30240 Radium 226 Ra-226 +30241 30241 Radium 228 Ra-228 +30242 30242 Actinium 225 Ac-225 +30243 30243 Actinium 227 Ac-227 +30244 30244 Actinium 228 Ac-228 +30245 30245 Thorium 227 Th-227 +30246 30246 Thorium 228 Th-228 +30247 30247 Thorium 229 Th-229 +30248 30248 Thorium 230 Th-230 +30249 30249 Thorium 231 Th-231 +30250 30250 Thorium 232 Th-232 +30251 30251 Thorium 234 Th-234 +30252 30252 Protactinium 231 Pa-231 +30253 30253 Protactinium 233 Pa-233 +30254 30254 Protactinium 234 metastable Pa-234m +30255 30255 Uranium 232 U-232 +30256 30256 Uranium 233 U-233 +30257 30257 Uranium 234 U-234 +30258 30258 Uranium 235 U-235 +30259 30259 Uranium 236 U-236 +30260 30260 Uranium 237 U-237 +30261 30261 Uranium 238 U-238 +30262 30262 Plutonium 236 Pu-236 +30263 30263 Plutonium 238 Pu-238 +30264 30264 Plutonium 239 Pu-239 +30265 30265 Plutonium 240 Pu-240 +30266 30266 Plutonium 241 Pu-241 +30267 30267 Plutonium 242 Pu-242 +30268 30268 Plutonium 244 Pu-244 +30269 30269 Neptunium 237 Np-237 +30270 30270 Neptunium 238 Np-238 +30271 30271 Neptunium 239 Np-239 +30272 30272 Americium 241 Am-241 +30273 30273 Americium 242 Am-242 +30274 30274 Americium 242 metastable Am-242m +30275 30275 Americium 243 Am-243 +30276 30276 Curium 242 Cm-242 +30277 30277 Curium 243 Cm-243 +30278 30278 Curium 244 Cm-244 +30279 30279 Curium 245 Cm-245 +30280 30280 Curium 246 Cm-246 +30281 30281 Curium 247 Cm-247 +30282 30282 Curium 248 Cm-248 +30283 30283 Curium 243/244 Cm-243244 +30284 30284 Plutonium 238/Americium 241 Pu-238Am-241 +30285 30285 Plutonium 239/240 Pu-239240 +30286 30286 Berkelium 249 Bk-249 +30287 30287 Californium 249 Cf-249 +30288 30288 Californium 250 Cf-250 +30289 30289 Californium 252 Cf-252 +30290 30290 Sum aerosol particulates SumAer +30291 30291 Sum Iodine SumIod +30292 30292 Sum noble gas SumNG +30293 30293 Activation gas ActGas +30294 30294 Cs-137 Equivalent EquCs137 +30295 30295 Carbon-13 C-13 +30296 30296 Lead Pb +30297 30297 Tellurium 131 Te-131 +30298 30298 Neodymium 137 Nd-137 +# 30299-39999 Reserved +40000 40000 Singlet sigma oxygen (dioxygen (sigma singlet)) O2 +40001 40001 Singlet delta oxygen (dioxygen (delta singlet)) O2 +40002 40002 Singlet excited oxygen atom O(1D) +40003 40003 Triplet ground state oxygen atom O(3P) +# 40004-59999 Reserved +60000 60000 HOx radical (OH+HO2) HOx* +60001 60001 Total inorganic and organic peroxy radicals (HOO* + ROO*) ROO* +60002 60002 Passive Ozone +60003 60003 NOx expressed as nitrogen NOx +60004 60004 All nitrogen oxides (NOy) expressed as nitrogen NOy +60005 60005 Total inorganic chlorine Clx +60006 60006 Total inorganic bromine Brx +60007 60007 Total inorganic chlorine except HCl, ClONO2: ClOx +60008 60008 Total inorganic bromine except HBr, BrONO2: BrOx +60009 60009 Lumped alkanes +60010 60010 Lumped alkenes +60011 60011 Lumped aromatic compounds +60012 60012 Lumped terpenes +60013 60013 Non-methane volatile organic compounds expressed as carbon NMVOC +60014 60014 Anthropogenic non-methane volatile organic compounds expressed as carbon aNMVOC +60015 60015 Biogenic non-methane volatile organic compounds expressed as carbon bNMVOC +60016 60016 Lumped oxygenated hydrocarbons OVOC +60017 60017 NOx expressed as nitrogen dioxide (NO2) NOx +60018 60018 Organic aldehydes RCHO +60019 60019 Organic peroxides ROOH +60020 60020 Organic nitrates RNO3 +60021 60021 Ethers ROR' +60022 60022 Amines NRR'R'' +60023 60023 Ketones RC(O)R' +60024 60024 Dicarbonyls unsaturated RC(O)CH2C(O)R' +60025 60025 Hydroxy dicarbonyls unsaturated RC(O)CHOHC(O)R' +60026 60026 Hydroxy ketones RC(OH)C(O)R' +60027 60027 Oxides Ox +60028 60028 Peroxyacyl nitrates RC(O)OONO2 +60029 60029 Aromatic peroxide radical (Aryl dioxydanyl radicals) ArOO* +60030 60030 Biogenic secondary organic compound +60031 60031 Anthropogenic secondary organic compound +60032 60032 All hydroxy-peroxides products of the reaction of hydroxy-isoprene adducts with O2 ISOPOOH +60033 60033 Anthropogenic volatile organic compounds aVOC +60034 60034 Biomass burning volatile organic compounds bbVOC +# 60035-61999 Reserved +62000 62000 Total aerosol +62001 62001 Dust dry +62002 62002 Water in ambient +62003 62003 Ammonium dry +62004 62004 Nitrate dry +62005 62005 Nitric acid trihydrate +62006 62006 Sulphate dry +62007 62007 Mercury dry +62008 62008 Sea salt dry +62009 62009 Black carbon dry +62010 62010 Particulate organic matter dry +62011 62011 Primary particulate organic matter dry +62012 62012 Secondary particulate organic matter dry +62013 62013 Black carbon hydrophilic dry +62014 62014 Black carbon hydrophobic dry +62015 62015 Particulate organic matter hydrophilic dry +62016 62016 Particulate organic matter hydrophobic dry +62017 62017 Nitrate hydrophilic dry +62018 62018 Nitrate hydrophobic dry +# 62019 Reserved +62020 62020 Smoke - high absorption +62021 62021 Smoke - low absorption +62022 62022 Aerosol - high absorption +62023 62023 Aerosol - low absorption +# 62024 Reserved +62025 62025 Volcanic ash +62026 62026 Particulate matter (PM) +# 62027 Reserved +62028 62028 Total aerosol hydrophilic +62029 62029 Total aerosol hydrophobic +62030 62030 Primary particulate inorganic matter dry +62031 62031 Secondary particulate inorganic matter dry +62032 62032 Biogenic secondary organic aerosol +62033 62033 Anthropogenic secondary organic aerosol +62034 62034 Rain water H2Orain +62035 62035 Cloud water H2Ocloud +62036 62036 Brown carbon dry +# 62037-62099 Reserved +62100 62100 Alnus (alder) pollen +62101 62101 Betula (birch) pollen +62102 62102 Castanea (chestnut) pollen +62103 62103 Carpinus (hornbeam) pollen +62104 62104 Corylus (hazel) pollen +62105 62105 Fagus (beech) pollen +62106 62106 Fraxinus (ash) pollen +62107 62107 Pinus (pine) pollen +62108 62108 Platanus (plane) pollen +62109 62109 Populus (cottonwood, poplar) pollen +62110 62110 Quercus (oak) pollen +62111 62111 Salix (willow) pollen +62112 62112 Taxus (yew) pollen +62113 62113 Tilia (lime, linden) pollen +62114 62114 Ulmus (elm) pollen +62115 62115 Olea (olive) pollen +# 62116-62199 Reserved +62200 62200 Ambrosia (ragweed, burr-ragweed) pollen +62201 62201 Artemisia (sagebrush, wormwood, mugwort) pollen +62202 62202 Brassica (rape, broccoli, Brussels sprouts, cabbage, cauliflower, collards, kale, kohlrabi, mustard, rutabaga) pollen +62203 62203 Plantago (plantain) pollen +62204 62204 Rumex (dock, sorrel) pollen +62205 62205 Urtica (nettle) pollen +# 62206-62299 Reserved +62300 62300 Poaceae (grass family) pollen +# 62301-62999 Reserved +# 63000-65534 For experimental use at local level +65535 65535 Missing diff --git a/definitions/grib2/tables/31/4.234.table b/definitions/grib2/tables/31/4.234.table new file mode 100644 index 000000000..816541ce9 --- /dev/null +++ b/definitions/grib2/tables/31/4.234.table @@ -0,0 +1,21 @@ +# Code table 4.234 - Canopy cover fraction (to be used as partitioned parameter in product definition template 4.53 or 4.54) +1 1 Crops, mixed farming +2 2 Short grass +3 3 Evergreen needleleaf trees +4 4 Deciduous needleleaf trees +5 5 Deciduous broadleaf trees +6 6 Evergreen broadleaf trees +7 7 Tall grass +8 8 Desert +9 9 Tundra +10 10 Irrigated crops +11 11 Semidesert +12 12 Ice caps and glaciers +13 13 Bogs and marshes +14 14 Inland water +15 15 Ocean +16 16 Evergreen shrubs +17 17 Deciduous shrubs +18 18 Mixed forest +19 19 Interrupted forest +20 20 Water and land mixtures diff --git a/definitions/grib2/tables/31/4.236.table b/definitions/grib2/tables/31/4.236.table new file mode 100644 index 000000000..fbe093ce9 --- /dev/null +++ b/definitions/grib2/tables/31/4.236.table @@ -0,0 +1,8 @@ +# Code table 4.236 - Soil texture fraction (to be used as partitioned parameter in product definition template 4.53 or 4.54) +1 1 Coarse +2 2 Medium +3 3 Medium-fine +4 4 Fine +5 5 Very-fine +6 6 Organic +7 7 Tropical-organic diff --git a/definitions/grib2/tables/31/4.238.table b/definitions/grib2/tables/31/4.238.table new file mode 100644 index 000000000..7e1c8e4d0 --- /dev/null +++ b/definitions/grib2/tables/31/4.238.table @@ -0,0 +1,32 @@ +# Code table 4.238 - Source or sink +0 0 Other +1 1 Aviation +2 2 Lightning +3 3 Biogenic sources +4 4 Anthropogenic sources +5 5 Wild fires +6 6 Natural sources +7 7 Volcanoes +8 8 Bio-fuel +9 9 Fossil-fuel +10 10 Wetlands +11 11 Oceans +12 12 Elevated anthropogenic sources +13 13 Surface anthropogenic sources +14 14 Agriculture livestock +15 15 Agriculture soils +16 16 Agriculture waste burning +17 17 Agriculture (all) +18 18 Residential, commercial and other combustion +19 19 Power generation +20 20 Super power stations +21 21 Fugitives +22 22 Industrial process +23 23 Solvents +24 24 Ships +25 25 Wastes (solid and water) +26 26 Road transportation +27 27 Off-road transportation +# 28-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.239.table b/definitions/grib2/tables/31/4.239.table new file mode 100644 index 000000000..c038926a5 --- /dev/null +++ b/definitions/grib2/tables/31/4.239.table @@ -0,0 +1,17 @@ +# Code table 4.239 - Wetland Type +0 0 Reserved +1 1 Bog +2 2 Drained +3 3 Fen +4 4 Floodplain +5 5 Mangrove +6 6 Marsh +7 7 Rice +8 8 Riverine +9 9 Salt marsh +10 10 Swamp +11 11 Upland +12 12 Wet tundra +# 13-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.240.table b/definitions/grib2/tables/31/4.240.table new file mode 100644 index 000000000..e34ad678c --- /dev/null +++ b/definitions/grib2/tables/31/4.240.table @@ -0,0 +1,13 @@ +# Code table 4.240 - Type of distribution function +0 0 No specific distribution function given +1 1 Delta functions with spatially variable concentration and fixed diameters Dl (p1) in metre +2 2 Delta functions with spatially variable concentration and fixed masses Ml (p1) in kg +3 3 Gaussian (normal) distribution with spatially variable concentration and fixed mean diameter Dl(p1) and variance(p2) +4 4 Gaussian (normal) distribution with spatially variable concentration, mean diameter and variance +5 5 Log-normal distribution with spatially variable number density, mean diameter and variance +6 6 Log-normal distribution with spatially variable number density, mean diameter and fixed variance(p1) +7 7 Log-normal distribution with spatially variable number density and mass density and fixed variance(p1) and fixed particle density(p2) +8 8 No distribution function. The encoded variable is derived from variables characterized by type of distribution function of type No. 7 (see above) with fixed variance(p1) and fixed particle density(p2) +# 9-49151 Reserved +# 49152-65534 Reserved for local use +65535 65535 Missing value diff --git a/definitions/grib2/tables/31/4.241.table b/definitions/grib2/tables/31/4.241.table new file mode 100644 index 000000000..a037b4ba5 --- /dev/null +++ b/definitions/grib2/tables/31/4.241.table @@ -0,0 +1,9 @@ +# Code table 4.241 - Coverage attributes +0 0 Undefined +1 1 Unmodified +2 2 Snow covered +3 3 Flooded +4 4 Ice covered +# 5-191 Reserved +# 192-254 Reserved for local use +255 255 Missing value diff --git a/definitions/grib2/tables/31/4.242.table b/definitions/grib2/tables/31/4.242.table new file mode 100644 index 000000000..083f88c29 --- /dev/null +++ b/definitions/grib2/tables/31/4.242.table @@ -0,0 +1,7 @@ +# Code table 4.242 - Tile classification +0 0 Reserved +1 1 Land use classes according to ESA-GlobCover GCV2009 +2 2 Land use classes according to European Commission-Global Land Cover Project GLC2000 +# 3-191 Reserved +# 192-254 Reserved for local use +255 255 Missing value diff --git a/definitions/grib2/tables/31/4.243.table b/definitions/grib2/tables/31/4.243.table new file mode 100644 index 000000000..b39053311 --- /dev/null +++ b/definitions/grib2/tables/31/4.243.table @@ -0,0 +1,43 @@ +# Code table 4.243 - Tile class +0 0 Reserved +1 1 Evergreen broadleaved forest +2 2 Deciduous broadleaved closed forest +3 3 Deciduous broadleaved open forest +4 4 Evergreen needle-leaf forest +5 5 Deciduous needle-leaf forest +6 6 Mixed leaf trees +7 7 Freshwater flooded trees +8 8 Saline water flooded trees +9 9 Mosaic tree/natural vegetation +10 10 Burnt tree cover +11 11 Evergreen shrubs closed-open +12 12 Deciduous shrubs closed-open +13 13 Herbaceous vegetation closed-open +14 14 Sparse herbaceous or grass +15 15 Flooded shrubs or herbaceous +16 16 Cultivated and managed areas +17 17 Mosaic crop/tree/natural vegetation +18 18 Mosaic crop/shrub/grass +19 19 Bare areas +20 20 Water +21 21 Snow and ice +22 22 Artificial surface +23 23 Ocean +24 24 Irrigated croplands +25 25 Rainfed croplands +26 26 Mosaic cropland (50-70%) - vegetation (20-50%) +27 27 Mosaic vegetation (50-70%) - cropland (20-50%) +28 28 Closed broadleaved evergreen forest +29 29 Closed needle-leaved evergreen forest +30 30 Open needle-leaved deciduous forest +31 31 Mixed broadleaved and needle-leaved forest +32 32 Mosaic shrubland (50-70%) - grassland (20-50%) +33 33 Mosaic grassland (50-70%) - shrubland (20-50%) +34 34 Closed to open shrubland +35 35 Sparse vegetation +36 36 Closed to open forest regularly flooded +37 37 Closed forest or shrubland permanently flooded +38 38 Closed to open grassland regularly flooded +39 39 Undefined +# 40-32767 Reserved +# 32768- Reserved for local use diff --git a/definitions/grib2/tables/31/4.244.table b/definitions/grib2/tables/31/4.244.table new file mode 100644 index 000000000..40534ee09 --- /dev/null +++ b/definitions/grib2/tables/31/4.244.table @@ -0,0 +1,7 @@ +# Code table 4.244 - Quality indicator +0 0 No quality information available +1 1 Failed +2 2 Passed +# 3-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.246.table b/definitions/grib2/tables/31/4.246.table new file mode 100644 index 000000000..bc89c27b9 --- /dev/null +++ b/definitions/grib2/tables/31/4.246.table @@ -0,0 +1,7 @@ +# Code table 4.246 - Thunderstorm intensity +0 0 No thunderstorm occurrence +1 1 Weak thunderstorm +2 2 Moderate thunderstorm +3 3 Severe thunderstorm +# 4-254 Reserved +255 255 Missing diff --git a/definitions/grib2/tables/31/4.247.table b/definitions/grib2/tables/31/4.247.table new file mode 100644 index 000000000..cd7fc90bd --- /dev/null +++ b/definitions/grib2/tables/31/4.247.table @@ -0,0 +1,7 @@ +# Code table 4.247 - Precipitation intensity +0 0 No precipitation occurrence +1 1 Light precipitation +2 2 Moderate precipitation +3 3 Heavy precipitation +# 4-254 Reserved +255 255 Missing diff --git a/definitions/grib2/tables/31/4.248.table b/definitions/grib2/tables/31/4.248.table new file mode 100644 index 000000000..694eebb72 --- /dev/null +++ b/definitions/grib2/tables/31/4.248.table @@ -0,0 +1,6 @@ +# Code table 4.248 - Method used to derive data values for a given local time +0 0 Nearest forecast or analysis time to specified local time +1 1 Interpolated to be valid at the specified local time +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.249.table b/definitions/grib2/tables/31/4.249.table new file mode 100644 index 000000000..9e62d9bbb --- /dev/null +++ b/definitions/grib2/tables/31/4.249.table @@ -0,0 +1,7 @@ +# Code table 4.249 - Character of precipitation +0 0 None +1 1 Showers +2 2 Intermittent +3 3 Continuous +# 4-254 Reserved +255 255 Missing diff --git a/definitions/grib2/tables/31/4.250.table b/definitions/grib2/tables/31/4.250.table new file mode 100644 index 000000000..26209ed07 --- /dev/null +++ b/definitions/grib2/tables/31/4.250.table @@ -0,0 +1,14 @@ +# Code table 4.250 - Drainage direction +0 0 Reserved +1 1 South-west +2 2 South +3 3 South-east +4 4 West +5 5 No direction +6 6 East +7 7 North-west +8 8 North +9 9 North-east +# 10-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.251.table b/definitions/grib2/tables/31/4.251.table new file mode 100644 index 000000000..e6c8da0b9 --- /dev/null +++ b/definitions/grib2/tables/31/4.251.table @@ -0,0 +1,7 @@ +# Code table 4.251 - Wave direction and frequency formulae +0 0 Undefined sequence +1 1 Geometric sequence +2 2 Arithmetic sequence +# 3-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.3.table b/definitions/grib2/tables/31/4.3.table new file mode 100644 index 000000000..7ad6be363 --- /dev/null +++ b/definitions/grib2/tables/31/4.3.table @@ -0,0 +1,26 @@ +# Code table 4.3 - Type of generating process +0 0 Analysis +1 1 Initialization +2 2 Forecast +3 3 Bias corrected forecast +4 4 Ensemble forecast +5 5 Probability forecast +6 6 Forecast error +7 7 Analysis error +8 8 Observation +9 9 Climatological +10 10 Probability-weighted forecast +11 11 Bias-corrected ensemble forecast +12 12 Post-processed analysis +13 13 Post-processed forecast +14 14 Nowcast +15 15 Hindcast +16 16 Physical retrieval +17 17 Regression analysis +18 18 Difference between two forecasts +19 19 First guess +20 20 Analysis increment +21 21 Initialization increment for analysis +# 22-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.4.table b/definitions/grib2/tables/31/4.4.table new file mode 100644 index 000000000..7087ebddb --- /dev/null +++ b/definitions/grib2/tables/31/4.4.table @@ -0,0 +1,17 @@ +# Code table 4.4 - Indicator of unit of time range +0 m Minute +1 h Hour +2 D Day +3 M Month +4 Y Year +5 10Y Decade (10 years) +6 30Y Normal (30 years) +7 C Century (100 years) +# 8-9 Reserved +10 3h 3 hours +11 6h 6 hours +12 12h 12 hours +13 s Second +# 14-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.5.table b/definitions/grib2/tables/31/4.5.table new file mode 100644 index 000000000..3c338232d --- /dev/null +++ b/definitions/grib2/tables/31/4.5.table @@ -0,0 +1,89 @@ +# Code table 4.5 - Fixed surface types and units +0 0 Reserved +1 sfc Ground or water surface (-) +2 2 Cloud base level (-) +3 3 Level of cloud tops (-) +4 4 Level of 0 degree C isotherm (-) +5 5 Level of adiabatic condensation lifted from the surface (-) +6 6 Maximum wind level (-) +7 sfc Tropopause (-) +8 sfc Nominal top of the atmosphere (-) +9 9 Sea bottom (-) +10 10 Entire atmosphere (-) +11 11 Cumulonimbus (CB) base (m) +12 12 Cumulonimbus (CB) top (m) +13 13 Lowest level where vertically integrated cloud cover exceeds the specified percentage (cloud base for a given percentage cloud cover) (%) +14 14 Level of free convection (LFC) (-) +15 15 Convective condensation level (CCL) (-) +16 16 Level of neutral buoyancy or equilibrium level (LNB) (-) +17 sfc Departure level of the most unstable parcel of air (MUDL) +18 sfc Departure level of a mixed layer parcel of air with specified layer depth (Pa) +# 19 Reserved +20 20 Isothermal level (K) +21 21 Lowest level where mass density exceeds the specified value (base for a given threshold of mass density) (kg m-3) +22 22 Highest level where mass density exceeds the specified value (top for a given threshold of mass density) (kg m-3) +23 23 Lowest level where air concentration exceeds the specified value (base for a given threshold of air concentration) (Bq m-3) +24 24 Highest level where air concentration exceeds the specified value (top for a given threshold of air concentration) (Bq m-3) +25 25 Highest level where radar reflectivity exceeds the specified value (echo top for a given threshold of reflectivity) (dBZ) +26 26 Convective cloud layer base (m) +27 27 Convective cloud layer top (m) +# 28-29 Reserved +30 30 Specified radius from the centre of the Sun (m) +31 31 Solar photosphere +32 32 Ionospheric D-region level +33 33 Ionospheric E-region level +34 34 Ionospheric F1-region level +35 35 Ionospheric F2-region level +# 36-99 Reserved +100 pl Isobaric surface (Pa) +101 sfc Mean sea level +102 102 Specific altitude above mean sea level (m) +103 sfc Specified height level above ground (m) +104 104 Sigma level (sigma value) +105 ml Hybrid level (-) +106 sfc Depth below land surface (m) +107 pt Isentropic (theta) level (K) +108 108 Level at specified pressure difference from ground to level (Pa) +109 pv Potential vorticity surface (K m2 kg-1 s-1) +110 110 Reserved +111 111 Eta level (-) +112 112 Reserved +113 113 Logarithmic hybrid level +114 sol Snow level (Numeric) +115 115 Sigma height level +# 116 Reserved +117 117 Mixed layer depth (m) +118 hhl Hybrid height level (-) +119 hpl Hybrid pressure level (-) +# 120-149 Reserved +150 150 Generalized vertical height coordinate +151 sol Soil level (Numeric) +152 sol Sea-ice level (Numeric) +# 153-159 Reserved +160 160 Depth below sea level (m) +161 161 Depth below water surface (m) +162 sfc Lake or river bottom (-) +163 163 Bottom of sediment layer (-) +164 164 Bottom of thermally active sediment layer (-) +165 165 Bottom of sediment layer penetrated by thermal wave (-) +166 sfc Mixing layer (-) +167 167 Bottom of root zone (-) +168 168 Ocean model level (Numeric) +169 169 Ocean level defined by water density (sigma-theta) difference from near-surface to level (kg m-3) +170 170 Ocean level defined by water potential temperature difference from near-surface to level (K) +171 171 Ocean level defined by vertical eddy diffusivity difference from near-surface to level (m2 s-1) +# 172-173 Reserved +174 sfc Top surface of ice on sea, lake or river +175 175 Top surface of ice, under snow cover, on sea, lake or river +176 176 Bottom surface (underside) ice on sea, lake or river +177 sfc Deep soil (of indefinite depth) +# 178 Reserved +179 179 Top surface of glacier ice and inland ice +180 180 Deep inland or glacier ice (of indefinite depth) +181 181 Grid tile land fraction as a model surface +182 182 Grid tile water fraction as a model surface +183 183 Grid tile ice fraction on sea, lake or river as a model surface +184 184 Grid tile glacier ice and inland ice fraction as a model surface +# 185-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.6.table b/definitions/grib2/tables/31/4.6.table new file mode 100644 index 000000000..b2dfeb498 --- /dev/null +++ b/definitions/grib2/tables/31/4.6.table @@ -0,0 +1,9 @@ +# Code table 4.6 - Type of ensemble forecast +0 0 Unperturbed high-resolution control forecast +1 1 Unperturbed low-resolution control forecast +2 2 Negatively perturbed forecast +3 3 Positively perturbed forecast +4 4 Multi-model forecast +# 5-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.7.table b/definitions/grib2/tables/31/4.7.table new file mode 100644 index 000000000..e0de0e1b2 --- /dev/null +++ b/definitions/grib2/tables/31/4.7.table @@ -0,0 +1,14 @@ +# Code table 4.7 - Derived forecast +0 0 Unweighted mean of all members +1 1 Weighted mean of all members +2 2 Standard deviation with respect to cluster mean +3 3 Standard deviation with respect to cluster mean, normalized +4 4 Spread of all members +5 5 Large anomaly index of all members +6 6 Unweighted mean of the cluster members +7 7 Interquartile range (range between the 25th and 75th quantile) +8 8 Minimum of all ensemble members +9 9 Maximum of all ensemble members +# 10-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.8.table b/definitions/grib2/tables/31/4.8.table new file mode 100644 index 000000000..ad883039c --- /dev/null +++ b/definitions/grib2/tables/31/4.8.table @@ -0,0 +1,6 @@ +# Code table 4.8 - Clustering method +0 0 Anomaly correlation +1 1 Root mean square +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.9.table b/definitions/grib2/tables/31/4.9.table new file mode 100644 index 000000000..9f74599c3 --- /dev/null +++ b/definitions/grib2/tables/31/4.9.table @@ -0,0 +1,13 @@ +# Code table 4.9 - Probability type +0 0 Probability of event below lower limit +1 1 Probability of event above upper limit +2 2 Probability of event between lower and upper limits (the range includes the lower limit but not the upper limit) +3 3 Probability of event above lower limit +4 4 Probability of event below upper limit +5 5 Probability of event equal to lower limit +6 6 Probability of event in above normal category +7 7 Probability of event in near normal category +8 8 Probability of event in below normal category +# 9-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/4.91.table b/definitions/grib2/tables/31/4.91.table new file mode 100644 index 000000000..ae31ed61c --- /dev/null +++ b/definitions/grib2/tables/31/4.91.table @@ -0,0 +1,16 @@ +# Code table 4.91 - Type of Interval +0 0 Smaller than first limit +1 1 Greater than second limit +2 2 Between first and second limit. The range includes the first limit but not the second limit +3 3 Greater than first limit +4 4 Smaller than second limit +5 5 Smaller or equal first limit +6 6 Greater or equal second limit +7 7 Between first and second. The range includes the first limit and the second limit +8 8 Greater or equal first limit +9 9 Smaller or equal second limit +10 10 Between first and second limit. The range includes the second limit but not the first limit +11 11 Equal to first limit +# 12-191 Reserved +# 192-254 Reserved for local use +255 missing Missing diff --git a/definitions/grib2/tables/31/5.0.table b/definitions/grib2/tables/31/5.0.table new file mode 100644 index 000000000..5e00004b0 --- /dev/null +++ b/definitions/grib2/tables/31/5.0.table @@ -0,0 +1,22 @@ +# Code table 5.0 - Data representation template number +0 0 Grid point data - simple packing +1 1 Matrix value at grid point - simple packing +2 2 Grid point data - complex packing +3 3 Grid point data - complex packing and spatial differencing +4 4 Grid point data - IEEE floating point data +# 5-39 Reserved +40 40 Grid point data - JPEG 2000 code stream format +41 41 Grid point data - Portable Network Graphics (PNG) +42 42 Grid point data - CCSDS recommended lossless compression +# 43-49 Reserved +50 50 Spectral data - simple packing +51 51 Spherical harmonics data - complex packing +# 52 Reserved +53 53 Spectral data for limited area models - complex packing +# 54-60 Reserved +61 61 Grid point data - simple packing with logarithm pre-processing +# 62-199 Reserved +200 200 Run length packing with level values +# 201-49151 Reserved +# 49152-65534 Reserved for local use +65535 65535 Missing diff --git a/definitions/grib2/tables/31/5.1.table b/definitions/grib2/tables/31/5.1.table new file mode 100644 index 000000000..854330c74 --- /dev/null +++ b/definitions/grib2/tables/31/5.1.table @@ -0,0 +1,6 @@ +# Code table 5.1 - Type of original field values +0 0 Floating point +1 1 Integer +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/5.2.table b/definitions/grib2/tables/31/5.2.table new file mode 100644 index 000000000..eb2d544f0 --- /dev/null +++ b/definitions/grib2/tables/31/5.2.table @@ -0,0 +1,8 @@ +# Code table 5.2 - Matrix coordinate value function definition +0 0 Explicit coordinate values set +1 1 Linear coordinates f(1) = C1, f(n) = f(n-1) + C2 +# 2-10 Reserved +11 11 Geometric coordinates f(1) = C1, f(n) = C2 * f(n-1) +# 12-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/5.25.table b/definitions/grib2/tables/31/5.25.table new file mode 100644 index 000000000..1b45f28a3 --- /dev/null +++ b/definitions/grib2/tables/31/5.25.table @@ -0,0 +1,9 @@ +# Code table 5.25 - type of bi-Fourier subtruncation +# 0-76 Reserved +77 77 Rectangular +# 78-87 Reserved +88 88 Elliptic +# 89-98 Reserved +99 99 Diamond +# 100-254 Reserved +255 255 Missing diff --git a/definitions/grib2/tables/31/5.26.table b/definitions/grib2/tables/31/5.26.table new file mode 100644 index 000000000..9e91ebf2e --- /dev/null +++ b/definitions/grib2/tables/31/5.26.table @@ -0,0 +1,5 @@ +# Code table 5.26 - packing mode for axes +0 0 Spectral coefficients for axes are packed +1 1 Spectral coefficients for axes included in the unpacked subset +# 2-254 Reserved +255 255 Missing diff --git a/definitions/grib2/tables/31/5.3.table b/definitions/grib2/tables/31/5.3.table new file mode 100644 index 000000000..c3b7b30fe --- /dev/null +++ b/definitions/grib2/tables/31/5.3.table @@ -0,0 +1,7 @@ +# Code table 5.3 - Matrix coordinate parameter +1 1 Direction degrees true +2 2 Frequency (s-1) +3 3 Radial number (2pi/lambda) (m-1) +# 4-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/5.4.table b/definitions/grib2/tables/31/5.4.table new file mode 100644 index 000000000..8121c1819 --- /dev/null +++ b/definitions/grib2/tables/31/5.4.table @@ -0,0 +1,6 @@ +# Code table 5.4 - Group splitting method +0 0 Row by row splitting +1 1 General group splitting +# 2-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/5.40.table b/definitions/grib2/tables/31/5.40.table new file mode 100644 index 000000000..b9bad2c39 --- /dev/null +++ b/definitions/grib2/tables/31/5.40.table @@ -0,0 +1,5 @@ +# Code table 5.40 - Type of compression +0 0 Lossless +1 1 Lossy +# 2-254 Reserved +255 255 Missing diff --git a/definitions/grib2/tables/31/5.5.table b/definitions/grib2/tables/31/5.5.table new file mode 100644 index 000000000..3ef3eb070 --- /dev/null +++ b/definitions/grib2/tables/31/5.5.table @@ -0,0 +1,7 @@ +# Code table 5.5 - Missing value management for complex packing +0 0 No explicit missing values included within data values +1 1 Primary missing values included within data values +2 2 Primary and secondary missing values included within data values +# 3-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/5.6.table b/definitions/grib2/tables/31/5.6.table new file mode 100644 index 000000000..6d5177877 --- /dev/null +++ b/definitions/grib2/tables/31/5.6.table @@ -0,0 +1,7 @@ +# Code table 5.6 - Order of spatial differencing +0 0 Reserved +1 1 First-order spatial differencing +2 2 Second-order spatial differencing +# 3-191 Reserved +# 192-254 Reserved for local use +255 255 Missing diff --git a/definitions/grib2/tables/31/5.7.table b/definitions/grib2/tables/31/5.7.table new file mode 100644 index 000000000..5ab780056 --- /dev/null +++ b/definitions/grib2/tables/31/5.7.table @@ -0,0 +1,7 @@ +# Code table 5.7 - Precision of floating-point numbers +0 0 Reserved +1 1 IEEE 32-bit (I=4 in section 7) +2 2 IEEE 64-bit (I=8 in section 7) +3 3 IEEE 128-bit (I=16 in section 7) +# 4-254 Reserved +255 255 Missing diff --git a/definitions/grib2/tables/31/6.0.table b/definitions/grib2/tables/31/6.0.table new file mode 100644 index 000000000..a8f30f5a4 --- /dev/null +++ b/definitions/grib2/tables/31/6.0.table @@ -0,0 +1,6 @@ +# Code table 6.0 - Bit map indicator +0 0 A bit map applies to this product and is specified in this Section +1 1 A bit map pre-determined by the originating/generating centre applies to this product and is not specified in this Section +# 1-253 A bit map predetermined by the originating/generating centre applies to this product and is not specified in this Section +254 254 A bit map defined previously in the same GRIB message applies to this product +255 255 A bit map does not apply to this product diff --git a/definitions/grib2/tables/4/4.1.192.table b/definitions/grib2/tables/4/4.1.192.table index c428acab0..5ee0de0d5 100644 --- a/definitions/grib2/tables/4/4.1.192.table +++ b/definitions/grib2/tables/4/4.1.192.table @@ -1,4 +1,2 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - - diff --git a/definitions/grib2/tables/5/4.1.192.table b/definitions/grib2/tables/5/4.1.192.table index c428acab0..5ee0de0d5 100644 --- a/definitions/grib2/tables/5/4.1.192.table +++ b/definitions/grib2/tables/5/4.1.192.table @@ -1,4 +1,2 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - - diff --git a/definitions/grib2/tables/6/4.1.192.table b/definitions/grib2/tables/6/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/6/4.1.192.table +++ b/definitions/grib2/tables/6/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/7/4.1.192.table b/definitions/grib2/tables/7/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/7/4.1.192.table +++ b/definitions/grib2/tables/7/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/8/4.1.192.table b/definitions/grib2/tables/8/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/8/4.1.192.table +++ b/definitions/grib2/tables/8/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/9/4.1.192.table b/definitions/grib2/tables/9/4.1.192.table index c428acab0..67b962652 100644 --- a/definitions/grib2/tables/9/4.1.192.table +++ b/definitions/grib2/tables/9/4.1.192.table @@ -1,4 +1,3 @@ #Discipline 192: ECMWF local parameters 255 255 Missing - diff --git a/definitions/grib2/tables/local/ecmf/1/4.2.0.1.table b/definitions/grib2/tables/local/ecmf/1/4.2.0.1.table index bee2409ab..2c4961ba0 100644 --- a/definitions/grib2/tables/local/ecmf/1/4.2.0.1.table +++ b/definitions/grib2/tables/local/ecmf/1/4.2.0.1.table @@ -2,6 +2,7 @@ 192 192 Snow evaporation rate (kg m-2 s-1) 193 193 Total precipitation (m) 194 194 Accumulated freezing rain (m) +195 195 Convective precipitation (m) 196 196 Large-scale precipitation (m) 197 197 Snow evaporation (m of water equivalent) 198 198 Snowfall (m of water equivalent) diff --git a/definitions/grib2/tables/local/ecmf/1/4.2.0.19.table b/definitions/grib2/tables/local/ecmf/1/4.2.0.19.table index 77627555f..d2fbdd32d 100644 --- a/definitions/grib2/tables/local/ecmf/1/4.2.0.19.table +++ b/definitions/grib2/tables/local/ecmf/1/4.2.0.19.table @@ -1,3 +1,4 @@ # Code table 4.2 - discipline=0 category=19 for ECMWF 192 192 Snow albedo (0-1) +193 193 Forecast albedo (0-1) 255 255 Missing diff --git a/definitions/grib2/tables/local/ecmf/1/4.2.0.4.table b/definitions/grib2/tables/local/ecmf/1/4.2.0.4.table new file mode 100644 index 000000000..b48509064 --- /dev/null +++ b/definitions/grib2/tables/local/ecmf/1/4.2.0.4.table @@ -0,0 +1,5 @@ +192 192 UV visible albedo for diffuse radiation +193 193 UV visible albedo for direct radiation +194 194 UV visible albedo for direct radiation, geometric component +195 195 UV visible albedo for direct radiation, isotropic component +196 196 UV visible albedo for direct radiation, volumetric component diff --git a/definitions/grib2/tables/local/ecmf/1/4.2.0.5.table b/definitions/grib2/tables/local/ecmf/1/4.2.0.5.table new file mode 100644 index 000000000..b1836dfe2 --- /dev/null +++ b/definitions/grib2/tables/local/ecmf/1/4.2.0.5.table @@ -0,0 +1,5 @@ +192 192 Near IR albedo for diffuse radiation +193 193 Near IR albedo for direct radiation +194 194 Near IR albedo for direct radiation, volumetric component +195 195 Near IR albedo for direct radiation, isotropic component +196 196 Near IR albedo for direct radiation, volumetric component diff --git a/definitions/grib2/tables/local/ecmf/1/4.2.2.0.table b/definitions/grib2/tables/local/ecmf/1/4.2.2.0.table index bdc028ffe..f68411f32 100644 --- a/definitions/grib2/tables/local/ecmf/1/4.2.2.0.table +++ b/definitions/grib2/tables/local/ecmf/1/4.2.2.0.table @@ -11,4 +11,6 @@ 201 201 Water runoff (m) 202 202 Surface runoff (m) 203 203 Snow melt (m of water equivalent) +204 204 Sub-surface runoff (m) +205 205 Skin reservoir content (m of water equivalent) 255 255 Missing diff --git a/definitions/grib2/tables/local/ecmf/1/4.238.table b/definitions/grib2/tables/local/ecmf/1/4.238.table index 36b20e9a2..23a3468d8 100644 --- a/definitions/grib2/tables/local/ecmf/1/4.238.table +++ b/definitions/grib2/tables/local/ecmf/1/4.238.table @@ -2,4 +2,5 @@ 192 192 Vegetation 193 193 Biomass burning 194 194 Settlements - +195 195 Soil +196 195 Wild animals diff --git a/definitions/grib2/template.4.100.def b/definitions/grib2/template.4.100.def new file mode 100644 index 000000000..d78c32013 --- /dev/null +++ b/definitions/grib2/template.4.100.def @@ -0,0 +1,12 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.100, Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for wave 2D spectra with explicit list of frequencies and directions + +include "grib2/template.4.parameter.def" +include "grib2/template.4.wave.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.point_in_time.def" +#include "grib2/template.4.horizontal.def" +include "grib2/template.4.eps.def" +include "grib2/template.4.wave_spectra_list.def" diff --git a/definitions/grib2/template.4.101.def b/definitions/grib2/template.4.101.def new file mode 100644 index 000000000..a19b0b164 --- /dev/null +++ b/definitions/grib2/template.4.101.def @@ -0,0 +1,11 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.101, Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for wave 2D spectra with frequencies and directions defined by formulae + +include "grib2/template.4.parameter.def" +include "grib2/template.4.wave.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.point_in_time.def" +#include "grib2/template.4.horizontal.def" +include "grib2/template.4.wave_spectra_formula.def" diff --git a/definitions/grib2/template.4.102.def b/definitions/grib2/template.4.102.def new file mode 100644 index 000000000..7bd5726a0 --- /dev/null +++ b/definitions/grib2/template.4.102.def @@ -0,0 +1,12 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.102, Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for wave 2D spectra with frequencies and directions defined by formulae + +include "grib2/template.4.parameter.def" +include "grib2/template.4.wave.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.point_in_time.def" +#include "grib2/template.4.horizontal.def" +include "grib2/template.4.eps.def" +include "grib2/template.4.wave_spectra_formula.def" diff --git a/definitions/grib2/template.4.103.def b/definitions/grib2/template.4.103.def new file mode 100644 index 000000000..118403f33 --- /dev/null +++ b/definitions/grib2/template.4.103.def @@ -0,0 +1,10 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.103, Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for waves selected by period range. + +include "grib2/template.4.parameter.def" +include "grib2/template.4.wave_period_range.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.point_in_time.def" +include "grib2/template.4.horizontal.def" diff --git a/definitions/grib2/template.4.104.def b/definitions/grib2/template.4.104.def new file mode 100644 index 000000000..f0db4712d --- /dev/null +++ b/definitions/grib2/template.4.104.def @@ -0,0 +1,11 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.104, Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for waves selected by period range. + +include "grib2/template.4.parameter.def" +include "grib2/template.4.wave_period_range.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.point_in_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.eps.def" diff --git a/definitions/grib2/template.4.105.def b/definitions/grib2/template.4.105.def new file mode 100644 index 000000000..1ae52eaa0 --- /dev/null +++ b/definitions/grib2/template.4.105.def @@ -0,0 +1,10 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.105, Analysis or forecast in relation to a reference period at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval + +include "grib2/template.4.parameter.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.statistical.def" +include "grib2/template.4.referenceperiod.def" diff --git a/definitions/grib2/template.4.106.def b/definitions/grib2/template.4.106.def new file mode 100644 index 000000000..8c0920074 --- /dev/null +++ b/definitions/grib2/template.4.106.def @@ -0,0 +1,11 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.106, Individual ensemble forecast, control and perturbed in relation to a reference period at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval + +include "grib2/template.4.parameter.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.statistical.def" +include "grib2/template.4.eps.def" +include "grib2/template.4.referenceperiod.def" diff --git a/definitions/grib2/template.4.107.def b/definitions/grib2/template.4.107.def new file mode 100644 index 000000000..f0f06a8d7 --- /dev/null +++ b/definitions/grib2/template.4.107.def @@ -0,0 +1,11 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.107, Derived forecasts based on all ensemble members in relation to a reference period at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval + +include "grib2/template.4.parameter.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.statistical.def" +include "grib2/template.4.derived.def" +include "grib2/template.4.referenceperiod.def" diff --git a/definitions/grib2/template.4.112.def b/definitions/grib2/template.4.112.def new file mode 100644 index 000000000..6361f0762 --- /dev/null +++ b/definitions/grib2/template.4.112.def @@ -0,0 +1,11 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.112, Probability forecasts in relation to a reference period at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval + +include "grib2/template.4.parameter.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.statistical.def" +include "grib2/template.4.probability.def" +include "grib2/template.4.referenceperiod.def" diff --git a/definitions/grib2/template.4.99.def b/definitions/grib2/template.4.99.def new file mode 100644 index 000000000..fc2d9a616 --- /dev/null +++ b/definitions/grib2/template.4.99.def @@ -0,0 +1,11 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.99, Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for wave 2D spectra with explicit list of frequencies and directions + +include "grib2/template.4.parameter.def" +include "grib2/template.4.wave.def" +include "grib2/template.4.generating_process.def" +include "grib2/template.4.forecast_time.def" +include "grib2/template.4.point_in_time.def" +#include "grib2/template.4.horizontal.def" +include "grib2/template.4.wave_spectra_list.def" diff --git a/definitions/grib2/template.4.referenceperiod.def b/definitions/grib2/template.4.referenceperiod.def new file mode 100644 index 000000000..90c05351f --- /dev/null +++ b/definitions/grib2/template.4.referenceperiod.def @@ -0,0 +1,49 @@ +# Type of reference dataset +codetable[1] typeOfReferenceDataset ('4.100.table',masterDir,localDir) = 255 : dump,edition_specific; + +# Type of relation to reference dataset +codetable[1] typeOfRelationToReferenceDataset ('4.101.table',masterDir,localDir) = 255 : dump,edition_specific; + +# number of additional parameters +unsigned[1] numberOfAdditionalParametersForReferencePeriod=0 ; +additionalParameter list(numberOfAdditionalParametersForReferencePeriod) +{ + signed[1] scaleFactorOfAdditionalParameterForReferencePeriod; + signed[4] scaledValueOfAdditionalParameterForReferencePeriod; +} + +## Start of reference period + +unsigned[2] yearOfStartOfReferencePeriod = missing() : edition_specific,can_be_missing; + +unsigned[1] monthOfStartOfReferencePeriod = missing() : edition_specific,can_be_missing; + +unsigned[1] dayOfStartOfReferencePeriod = missing() : edition_specific,can_be_missing; + +unsigned[1] hourOfStartOfReferencePeriod = missing() : edition_specific,can_be_missing; + +unsigned[1] minuteOfStartOfReferencePeriod = missing() : edition_specific,can_be_missing; + +unsigned[1] secondOfStartOfReferencePeriod = missing() : edition_specific,can_be_missing; + +meta startDateOfReferencePeriod g2date(yearOfStartOfReferencePeriod,monthOfStartOfReferencePeriod,dayOfStartOfReferencePeriod); + +## End of reference period (defined as startDateOfReferencePeriod + referencePeriodTimeIncrement * referencePeriodIndicatorOfUnitForTimeIncrement) + +unsigned[4] sampleSizeOfReferencePeriod = 0; + +# n - number of time range specifications describing the time intervals used to calculate the statistically-processed field +unsigned[1] numberOfReferencePeriodTimeRanges = 1 : edition_specific; +alias nref = numberOfReferencePeriodTimeRanges; + +referencePeriodList list(numberOfReferencePeriodTimeRanges) +{ + # Type of statistical processing of reference period + codetable[1] typeOfStatisticalProcessingForTimeRangeForReferencePeriod ('4.102.table',masterDir,localDir) = 255 : dump,edition_specific; + + # Indicator of unit of time for the increment between the successive fields used + codetable[1] indicatorOfUnitForTimeRangeForReferencePeriod ('4.4.table',masterDir,localDir)=255 ; + + # Length of reference period, in units defined by the previous octet [referencePeriodIndicatorOfUnitForTimeIncrement] + unsigned[4] lengthOfTimeRangeForReferencePeriod=0 ; +} diff --git a/definitions/grib2/template.4.statistical.def b/definitions/grib2/template.4.statistical.def index c9307b04e..63545eea0 100644 --- a/definitions/grib2/template.4.statistical.def +++ b/definitions/grib2/template.4.statistical.def @@ -54,9 +54,11 @@ statisticalProcessesList list(numberOfTimeRange) if (numberOfTimeRange == 1 || numberOfTimeRange == 2) { concept stepTypeInternal { "instant" = {typeOfStatisticalProcessing=255;} + "avg" = {typeOfStatisticalProcessing=0;typeOfTimeIncrement=255;} "avg" = {typeOfStatisticalProcessing=0;typeOfTimeIncrement=2;} "avg" = {typeOfStatisticalProcessing=0;typeOfTimeIncrement=3;} "avgd" = {typeOfStatisticalProcessing=0;typeOfTimeIncrement=1;} + "accum" = {typeOfStatisticalProcessing=1;typeOfTimeIncrement=255;} "accum" = {typeOfStatisticalProcessing=1;typeOfTimeIncrement=2;} "max" = {typeOfStatisticalProcessing=2;} "min" = {typeOfStatisticalProcessing=3;} diff --git a/definitions/grib2/template.4.wave.def b/definitions/grib2/template.4.wave.def new file mode 100644 index 000000000..a5bfac03c --- /dev/null +++ b/definitions/grib2/template.4.wave.def @@ -0,0 +1,18 @@ +# Template for wave parameters + +## Direction part +unsigned[2] waveDirectionNumber : dump; +alias mars.direction = waveDirectionNumber; + +unsigned[2] numberOfWaveDirections = 1 : dump; +alias totalNumberOfWaveDirections = numberOfWaveDirections; + +## Frequency part +unsigned[2] waveFrequencyNumber : dump; +alias mars.frequency = waveFrequencyNumber; + +unsigned[2] numberOfWaveFrequencies = 1 : dump; +alias totalNumberOfWaveFrequencies = numberOfWaveFrequencies; + +constant waveLevType="sfc"; +alias mars.levtype = waveLevType; diff --git a/definitions/grib2/template.4.wave_period_range.def b/definitions/grib2/template.4.wave_period_range.def new file mode 100644 index 000000000..3bd02fa4f --- /dev/null +++ b/definitions/grib2/template.4.wave_period_range.def @@ -0,0 +1,10 @@ +# Template for wave parameters defined on a certain period range + +# Type of period interval +codetable[1] typeOfWavePeriodInterval ('4.91.table',masterDir,localDir) = 255 : dump,no_copy,edition_specific,string_type; + +signed[1] scaleFactorOfLowerWavePeriodLimit = missing() : can_be_missing,dump; +unsigned[4] scaledValueOfLowerWavePeriodLimit = missing() : can_be_missing,dump; + +signed[1] scaleFactorOfUpperWavePeriodLimit = missing() : can_be_missing,dump; +unsigned[4] scaledValueOfUpperWavePeriodLimit = missing() : can_be_missing,dump; diff --git a/definitions/grib2/template.4.wave_spectra_formula.def b/definitions/grib2/template.4.wave_spectra_formula.def new file mode 100644 index 000000000..c0893da1a --- /dev/null +++ b/definitions/grib2/template.4.wave_spectra_formula.def @@ -0,0 +1,26 @@ +# Template for wave spectra defined using a formula for frequency and direction + +## Direction part +# Type of direction sequence +codetable[1] typeOfWaveDirectionSequence ('4.251.table',masterDir,localDir) : dump; + +# Number of following function parameters for the directions +unsigned[1] numberOfWaveDirectionSequenceParameters = 1 : dump; +alias NDSP = numberOfWaveDirectionSequenceParameters; + +listOfWaveDirectionSequenceParameters list(numberOfWaveDirectionSequenceParameters) { + signed[1] scaleFactorOfWaveDirectionSequenceParameter : dump; + signed[4] scaledValueOfWaveDirectionSequenceParameter : dump; +} + +## Frequency part +codetable[1] typeOfWaveFrequencySequence ('4.251.table',masterDir,localDir) : dump; + +# Number of following function parameters for the frequencies +unsigned[1] numberOfWaveFrequencySequenceParameters = 1 : dump; +alias NFSP = numberOfWaveFrequencySequenceParameters; + +listOfWaveFrequencySequenceParameters list(numberOfWaveFrequencySequenceParameters) { + signed[1] scaleFactorOfWaveFrequencySequenceParameter : dump; + signed[4] scaledValueOfWaveFrequencySequenceParameter : dump; +} diff --git a/definitions/grib2/template.4.wave_spectra_list.def b/definitions/grib2/template.4.wave_spectra_list.def new file mode 100644 index 000000000..f90e2dc35 --- /dev/null +++ b/definitions/grib2/template.4.wave_spectra_list.def @@ -0,0 +1,13 @@ +# Template for wave spectra defined using an array of frequencies and directions + +## Direction part +signed[1] scaleFactorOfWaveDirections : dump; +alias integerScalingFactorAppliedToDirections = scaleFactorOfWaveDirections; + +unsigned[4] scaledValuesOfWaveDirections[numberOfWaveDirections] : dump; + +## Frequency part +signed[1] scaleFactorOfWaveFrequencies : dump; +alias integerScalingFactorAppliedToFrequencies = scaleFactorOfWaveFrequencies; + +unsigned[4] scaledValuesOfWaveFrequencies[numberOfWaveFrequencies] : dump; diff --git a/definitions/grib2/template.5.50000.def b/definitions/grib2/template.5.50000.def index 84e5cd545..74b79897d 100644 --- a/definitions/grib2/template.5.50000.def +++ b/definitions/grib2/template.5.50000.def @@ -33,3 +33,8 @@ meta _TS spectral_truncation(J,K,M,TS) : read_only,hidden; codetable[1] unpackedSubsetPrecision ('5.7.table',masterDir,localDir) = 2 : dump; alias precisionOfTheUnpackedSubset=unpackedSubsetPrecision; +concept accuracy(zero) { + 32 = { unpackedSubsetPrecision = 1; } + 64 = { unpackedSubsetPrecision = 2; } + 128 = { unpackedSubsetPrecision = 3; } +} : long_type, no_copy; diff --git a/definitions/grib2/template.5.61.def b/definitions/grib2/template.5.61.def index 3565ebea7..9799fd5ad 100644 --- a/definitions/grib2/template.5.61.def +++ b/definitions/grib2/template.5.61.def @@ -1,8 +1,11 @@ # (C) Copyright 2005- ECMWF. # Grid point data - Simple packing with logarithmic preprocessing -constant typeOfPreProcessing=1; + +# Note from WMO document: +# This template is experimental, was not validated at the time of publication and should be used only for bilateral previously agreed tests +constant typeOfPreProcessing = 1; include "grib2/template.5.packing.def"; -ieeefloat preProcessingParameter : read_only; +ieeefloat preProcessingParameter : read_only; diff --git a/definitions/grib2/template.7.0.def b/definitions/grib2/template.7.0.def index 02b4ea60c..1a8de3684 100644 --- a/definitions/grib2/template.7.0.def +++ b/definitions/grib2/template.7.0.def @@ -1,8 +1,6 @@ # (C) Copyright 2005- ECMWF. # TEMPLATE 7.0, Grid point data - simple packing -# Octets 6-nn : Binary data values - binary string, with each -# (scaled) meta codedValues data_g2simple_packing( section7Length, diff --git a/definitions/grib2/template.7.1.def b/definitions/grib2/template.7.1.def index 1f1f6ab57..b5376139a 100644 --- a/definitions/grib2/template.7.1.def +++ b/definitions/grib2/template.7.1.def @@ -1,9 +1,6 @@ # (C) Copyright 2005- ECMWF. # TEMPLATE 7.1, Matrix values at grid point -simple packing -# Octets 6-nn : Binary data values - binary string, with each -# (scaled) -# ???? data_values__binary_string_with_each meta codedValues data_g2simple_packing( section7Length, diff --git a/definitions/grib2/template.7.2.def b/definitions/grib2/template.7.2.def index 3e8ca8f5e..bbff89acc 100644 --- a/definitions/grib2/template.7.2.def +++ b/definitions/grib2/template.7.2.def @@ -17,6 +17,7 @@ meta codedValues data_g22order_packing( referenceValue, binaryScaleFactor, decimalScaleFactor, + optimizeScaleFactor, typeOfOriginalFieldValues , groupSplittingMethodUsed, diff --git a/definitions/grib2/template.7.3.def b/definitions/grib2/template.7.3.def index 13fff2006..c2293fc8d 100644 --- a/definitions/grib2/template.7.3.def +++ b/definitions/grib2/template.7.3.def @@ -14,6 +14,7 @@ meta codedValues data_g22order_packing( referenceValue, binaryScaleFactor, decimalScaleFactor, + optimizeScaleFactor, typeOfOriginalFieldValues , groupSplittingMethodUsed, diff --git a/definitions/grib2/template.7.40.def b/definitions/grib2/template.7.40.def index 731d7979e..3fa1d3299 100644 --- a/definitions/grib2/template.7.40.def +++ b/definitions/grib2/template.7.40.def @@ -1,9 +1,6 @@ # (C) Copyright 2005- ECMWF. -# TEMPLATE 7.40, Grid point data - jpeg2000 -# Octets 6-xx : NG group reference values -# (XI in the decoding formula) -# ???? ng_group_reference_values +# TEMPLATE 7.40, Grid point data - JPEG2000 meta codedValues data_jpeg2000_packing( @@ -28,7 +25,6 @@ meta codedValues data_jpeg2000_packing( #bitsPerValue, # For encoding - typeOfCompressionUsed, targetCompressionRatio, Nx, diff --git a/definitions/grib2/template.7.41.def b/definitions/grib2/template.7.41.def index 31e90a54e..f4b79671c 100644 --- a/definitions/grib2/template.7.41.def +++ b/definitions/grib2/template.7.41.def @@ -1,6 +1,7 @@ # (C) Copyright 2005- ECMWF. -# TEMPLATE 7.41, Grid point data - png +# TEMPLATE 7.41, Grid point data - PNG + meta codedValues data_png_packing( section7Length, offsetBeforeData, @@ -10,11 +11,9 @@ meta codedValues data_png_packing( binaryScaleFactor, decimalScaleFactor, bitsPerValue, - - # For encoding + # For encoding Nx, Ny, - interpretationOfNumberOfPoints, numberOfDataPoints, scanningMode diff --git a/definitions/grib2/template.7.42.def b/definitions/grib2/template.7.42.def index 6f456485f..09f1a9833 100644 --- a/definitions/grib2/template.7.42.def +++ b/definitions/grib2/template.7.42.def @@ -1,6 +1,7 @@ # (C) Copyright 2005- ECMWF. # TEMPLATE 7.42, Grid point data - CCSDS + meta codedValues data_ccsds_packing( section7Length, offsetBeforeData, @@ -9,14 +10,12 @@ meta codedValues data_ccsds_packing( referenceValue, binaryScaleFactor, decimalScaleFactor, + optimizeScaleFactor, bitsPerValue, - numberOfDataPoints, - ccsdsFlags, ccsdsBlockSize, ccsdsRsi - ): read_only; meta values data_apply_bitmap(codedValues, diff --git a/definitions/grib2/template.7.50.def b/definitions/grib2/template.7.50.def index 60dcddd12..8ff1483f4 100644 --- a/definitions/grib2/template.7.50.def +++ b/definitions/grib2/template.7.50.def @@ -1,8 +1,6 @@ # (C) Copyright 2005- ECMWF. # TEMPLATE 7.50, Spectral data - simple packing -# Octets 6-nn : Binary data values - binary string, with each -# (scaled) transient numberOfValues = ( J + 1 ) * ( J + 2 ) : no_copy ; transient numberOfPackedValues = numberOfValues - 1 : no_copy; diff --git a/definitions/grib2/template.7.50000.def b/definitions/grib2/template.7.50000.def index 0a45b8cd7..1aef1204e 100644 --- a/definitions/grib2/template.7.50000.def +++ b/definitions/grib2/template.7.50000.def @@ -1,5 +1,6 @@ # (C) Copyright 2005- ECMWF. -# spectral_ieee + +# TEMPLATE 7.50000, spectral_ieee constant GRIBEXShBugPresent = 0; constant sphericalHarmonics = 1; diff --git a/definitions/grib2/template.7.50001.def b/definitions/grib2/template.7.50001.def index 35e5fe602..1eb465a32 100644 --- a/definitions/grib2/template.7.50001.def +++ b/definitions/grib2/template.7.50001.def @@ -1,5 +1,6 @@ # (C) Copyright 2005- ECMWF. -# Second order + +# TEMPLATE 7.50001, Second order if (bitsPerValue) { meta groupWidths unsigned_bits(widthOfWidths,numberOfGroups) : read_only; diff --git a/definitions/grib2/template.7.50002.def b/definitions/grib2/template.7.50002.def index e274aaa19..b68c95816 100644 --- a/definitions/grib2/template.7.50002.def +++ b/definitions/grib2/template.7.50002.def @@ -1,5 +1,7 @@ # (C) Copyright 2005- ECMWF. +# TEMPLATE 7.50002, grid_second_order, grid_second_order_boustrophedonic + meta groupWidths unsigned_bits(widthOfWidths,numberOfGroups) : read_only; meta groupLengths unsigned_bits(widthOfLengths,numberOfGroups) : read_only; meta firstOrderValues unsigned_bits(widthOfFirstOrderValues,numberOfGroups) : read_only; diff --git a/definitions/grib2/template.7.51.def b/definitions/grib2/template.7.51.def index 04522eb68..c17de4aca 100644 --- a/definitions/grib2/template.7.51.def +++ b/definitions/grib2/template.7.51.def @@ -1,9 +1,6 @@ # (C) Copyright 2005- ECMWF. # TEMPLATE 7.51, Spherical harmonics - complex packing -# Octets 6-(5+I*TS) : Data values from the unpacked subset -# (IEEE floating-point values on I octets) -# ???? data_values_from_the_unpacked_subset constant GRIBEXShBugPresent = 0; constant sphericalHarmonics = 1; diff --git a/definitions/grib2/template.7.6.def b/definitions/grib2/template.7.6.def index 5fd1c1afe..f4308d128 100644 --- a/definitions/grib2/template.7.6.def +++ b/definitions/grib2/template.7.6.def @@ -1,7 +1,6 @@ # (C) Copyright 2005- ECMWF. # TEMPLATE 7.6, Grid point data - simple packing with preprocessing -# Octets 6-nn : Binary data values - binary string, with each (scaled) meta codedValues data_g2simple_packing_with_preprocessing( section7Length, diff --git a/definitions/grib2/template.7.61.def b/definitions/grib2/template.7.61.def index 5fd1c1afe..58f6f93e6 100644 --- a/definitions/grib2/template.7.61.def +++ b/definitions/grib2/template.7.61.def @@ -1,6 +1,10 @@ # (C) Copyright 2005- ECMWF. -# TEMPLATE 7.6, Grid point data - simple packing with preprocessing +# TEMPLATE 7.61, Grid point data - simple packing with logarithm pre-processing + +# Note from WMO document: +# This template is experimental, was not validated at the time of publication and should be used only for bilateral previously agreed tests + # Octets 6-nn : Binary data values - binary string, with each (scaled) meta codedValues data_g2simple_packing_with_preprocessing( diff --git a/definitions/grib2/uerraLocalVersion.table b/definitions/grib2/uerraLocalVersion.table new file mode 100644 index 000000000..4b9a72922 --- /dev/null +++ b/definitions/grib2/uerraLocalVersion.table @@ -0,0 +1 @@ +1 UERRA UERRA with expver diff --git a/definitions/grib2/units.def b/definitions/grib2/units.def index af0f728a6..4d0c360c3 100644 --- a/definitions/grib2/units.def +++ b/definitions/grib2/units.def @@ -113,6 +113,14 @@ parameterCategory = 2 ; parameterNumber = 1 ; } +#Surface photosynthetically active radiation, clear sky +'J m**-2' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Unbalanced component of temperature 'K' = { discipline = 0 ; @@ -131,6 +139,30 @@ parameterCategory = 2 ; parameterNumber = 45 ; } +#Low vegetation cover +'(0 - 1)' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 53 ; + } +#High vegetation cover +'(0 - 1)' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 54 ; + } +#Type of low vegetation +'(code table 4.234)' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 57 ; + } +#Type of high vegetation +'(code table 4.234)' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 58 ; + } #Sea ice area fraction '(0 - 1)' = { discipline = 10 ; @@ -166,6 +198,14 @@ typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; } +#Magnitude of turbulent surface stress +'N m**-2 s' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 58 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Large-scale precipitation fraction 's' = { discipline = 0 ; @@ -190,6 +230,25 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Leaf area index, low vegetation +'m**2 m**-2' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 55 ; + } +#Leaf area index, high vegetation +'m**2 m**-2' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 56 ; + } +#Standard deviation of filtered subgrid orography (climatological) +'m' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 38 ; + typeOfGeneratingProcess = 9 ; + } #Specific rain water content 'kg kg**-1' = { discipline = 0 ; @@ -239,6 +298,12 @@ parameterNumber = 20 ; typeOfStatisticalProcessing = 1 ; } +#Charnock +'Numeric' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 76 ; + } #Boundary layer height 'm' = { discipline = 0 ; @@ -253,6 +318,14 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } +#Surface roughness (climatological) +'m' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfGeneratingProcess = 9 ; + } #Surface long-wave (thermal) radiation downwards 'J m**-2' = { discipline = 0 ; @@ -265,7 +338,7 @@ 'J m**-2' = { discipline = 0 ; parameterCategory = 4 ; - parameterNumber = 1 ; + parameterNumber = 9 ; typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } @@ -314,7 +387,7 @@ parameterCategory = 14 ; parameterNumber = 1 ; } -#Top net solar radiation, clear sky +#Top net short-wave (solar) radiation, clear sky 'J m**-2' = { discipline = 0 ; parameterCategory = 4 ; @@ -322,7 +395,7 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } -#Top net thermal radiation, clear sky +#Top net long-wave (thermal) radiation, clear sky 'J m**-2' = { discipline = 0 ; parameterCategory = 5 ; @@ -346,7 +419,7 @@ typeOfFirstFixedSurface = 1 ; typeOfStatisticalProcessing = 1 ; } -#TOA incident solar radiation +#TOA incident short-wave (solar) radiation 'J m**-2' = { discipline = 0 ; parameterCategory = 4 ; @@ -354,6 +427,13 @@ typeOfFirstFixedSurface = 8 ; typeOfStatisticalProcessing = 1 ; } +#Vertically integrated moisture divergence +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + typeOfStatisticalProcessing = 1 ; + } #Instantaneous eastward turbulent surface stress 'N m**-2' = { discipline = 0 ; @@ -382,12 +462,34 @@ parameterNumber = 79 ; typeOfFirstFixedSurface = 1 ; } +#Logarithm of surface roughness length for heat (climatological) +'Numeric' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 54 ; + typeOfFirstFixedSurface = 1 ; + typeOfGeneratingProcess = 9 ; + } #Temperature of snow layer 'K' = { discipline = 2 ; parameterCategory = 3 ; parameterNumber = 28 ; } +#Forecast surface roughness +'m' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + } +#Forecast logarithm of surface roughness for heat +'Numeric' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 54 ; + typeOfFirstFixedSurface = 1 ; + } #Specific cloud liquid water content 'kg kg**-1' = { discipline = 0 ; @@ -406,7 +508,7 @@ parameterCategory = 6 ; parameterNumber = 32 ; } -#large scale precipitation +#Large-scale precipitation 'kg m**-2' = { discipline = 0 ; parameterCategory = 1 ; @@ -542,6 +644,92 @@ scaleFactorOfLowerLimit = 0 ; probabilityType = 0 ; } +#Wave induced mean sea level correction +'m' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 87 ; + } +#Ratio of wave angular and frequency width +'Numeric' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 80 ; + } +#Number of events in freak waves statistics +'Numeric' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 89 ; + } +#U-component of surface momentum flux into ocean +'N m**-2' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 90 ; + typeOfFirstFixedSurface = 1 ; + } +#V-component of surface momentum flux into ocean +'N m**-2' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 91 ; + typeOfFirstFixedSurface = 1 ; + } +#Wave turbulent energy flux into ocean +'W m**-2' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 92 ; + } +#Wave energy flux magnitude +'W m**-1' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 78 ; + } +#Wave energy flux mean direction +'Degree true' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 79 ; + } +#Wave Spectral Skewness +'Numeric' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 77 ; + } +#Free convective velocity over the oceans +'m s**-1' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 81 ; + } +#Air density over the oceans +'kg m**-3' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 82 ; + } +#Normalized energy flux into waves +'Numeric' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 83 ; + } +#Normalized energy flux into ocean +'Numeric' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 85 ; + } +#Normalized stress into ocean +'Numeric' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 84 ; + } #Mean sea water temperature in the upper 300 m 'K' = { discipline = 10 ; @@ -554,6 +742,14 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } +#Total column vertically-integrated water enthalpy +'J m**-2' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 4 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #2 metre specific humidity 'kg kg**-1' = { discipline = 0 ; @@ -612,6 +808,41 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } +#UV visible albedo for diffuse radiation (climatological) +'%' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 55 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation (climatological) +'%' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 56 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, geometric component (climatological) +'%' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 57 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, isotropic component (climatological) +'%' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 58 ; + typeOfGeneratingProcess = 9 ; + } +#UV visible albedo for direct radiation, volumetric component (climatological) +'%' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 59 ; + typeOfGeneratingProcess = 9 ; + } #Ammonium aerosol mass mixing ratio 'kg kg**-1' = { discipline = 0 ; @@ -660,6 +891,41 @@ aerosolType = 62033 ; is_aerosol = 1 ; } +#Near IR albedo for diffuse radiation (climatological) +'%' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 9 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation (climatological) +'%' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 10 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, geometric component (climatological) +'%' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 11 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, isotropic component (climatological) +'%' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 12 ; + typeOfGeneratingProcess = 9 ; + } +#Near IR albedo for direct radiation, volumetric component (climatological) +'%' = { + discipline = 0 ; + parameterCategory = 5 ; + parameterNumber = 13 ; + typeOfGeneratingProcess = 9 ; + } #Volcanic sulfur dioxide mass mixing ratio increment 'kg kg**-1' = { discipline = 0 ; @@ -920,7 +1186,7 @@ constituentType = 60057 ; is_chemical = 1 ; } -#Column integrated mass density of Volcanic sulfur dioxide +#Column integrated mass density of Volcanic sulfur dioxide 'kg m**-2' = { discipline = 0 ; parameterCategory = 20 ; @@ -929,7 +1195,7 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } -#Column integrated mass density of Aromatic peroxy radical +#Column integrated mass density of Aromatic peroxy radical 'kg m**-2' = { discipline = 0 ; parameterCategory = 20 ; @@ -937,7 +1203,7 @@ constituentType = 60029 ; is_chemical = 1 ; } -#Column integrated mass density of Ethyne +#Column integrated mass density of Ethyne 'kg m**-2' = { discipline = 0 ; parameterCategory = 20 ; @@ -945,7 +1211,7 @@ constituentType = 10010 ; is_chemical = 1 ; } -#Column integrated mass density of Acetonitrile +#Column integrated mass density of Acetonitrile 'kg m**-2' = { discipline = 0 ; parameterCategory = 20 ; @@ -953,7 +1219,7 @@ constituentType = 10007 ; is_chemical = 1 ; } -#Column integrated mass density of Methyl peroxy nitrate +#Column integrated mass density of Methyl peroxy nitrate 'kg m**-2' = { discipline = 0 ; parameterCategory = 20 ; @@ -961,7 +1227,7 @@ constituentType = 10055 ; is_chemical = 1 ; } -#Column integrated mass density of Hydrogen cyanide +#Column integrated mass density of Hydrogen cyanide 'kg m**-2' = { discipline = 0 ; parameterCategory = 20 ; @@ -969,7 +1235,7 @@ constituentType = 10006 ; is_chemical = 1 ; } -#Column integrated mass density of Hydroperoxy aldehydes type 1 +#Column integrated mass density of Hydroperoxy aldehydes type 1 'kg m**-2' = { discipline = 0 ; parameterCategory = 20 ; @@ -977,7 +1243,7 @@ constituentType = 60058 ; is_chemical = 1 ; } -#Column integrated mass density of Hydroperoxy aldehydes type 2 +#Column integrated mass density of Hydroperoxy aldehydes type 2 'kg m**-2' = { discipline = 0 ; parameterCategory = 20 ; @@ -985,7 +1251,7 @@ constituentType = 60059 ; is_chemical = 1 ; } -#Column integrated mass density of Isoprene peroxy type B +#Column integrated mass density of Isoprene peroxy type B 'kg m**-2' = { discipline = 0 ; parameterCategory = 20 ; @@ -993,7 +1259,7 @@ constituentType = 60056 ; is_chemical = 1 ; } -#Column integrated mass density of Isoprene peroxy type D +#Column integrated mass density of Isoprene peroxy type D 'kg m**-2' = { discipline = 0 ; parameterCategory = 20 ; @@ -1001,7 +1267,7 @@ constituentType = 60057 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Volcanic sulfur dioxide +#Atmosphere emission mass flux of Volcanic sulfur dioxide 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1010,7 +1276,7 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } -#Atmosphere emission mass flux of Aromatic peroxy radical +#Atmosphere emission mass flux of Aromatic peroxy radical 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1018,7 +1284,7 @@ constituentType = 60029 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Ethyne +#Atmosphere emission mass flux of Ethyne 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1026,7 +1292,7 @@ constituentType = 10010 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Acetonitrile +#Atmosphere emission mass flux of Acetonitrile 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1034,7 +1300,7 @@ constituentType = 10007 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Methyl peroxy nitrate +#Atmosphere emission mass flux of Methyl peroxy nitrate 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1042,7 +1308,7 @@ constituentType = 10055 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Hydrogen cyanide +#Atmosphere emission mass flux of Hydrogen cyanide 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1050,7 +1316,7 @@ constituentType = 10006 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Hydroperoxy aldehydes type 1 +#Atmosphere emission mass flux of Hydroperoxy aldehydes type 1 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1058,7 +1324,7 @@ constituentType = 60058 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Hydroperoxy aldehydes type 2 +#Atmosphere emission mass flux of Hydroperoxy aldehydes type 2 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1066,7 +1332,7 @@ constituentType = 60059 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Isoprene peroxy type B +#Atmosphere emission mass flux of Isoprene peroxy type B 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1074,7 +1340,7 @@ constituentType = 60056 ; is_chemical = 1 ; } -#Atmosphere emission mass flux of Isoprene peroxy type D +#Atmosphere emission mass flux of Isoprene peroxy type D 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1082,7 +1348,7 @@ constituentType = 60057 ; is_chemical = 1 ; } -#Dry deposition velocity of Volcanic sulfur dioxide +#Dry deposition velocity of Volcanic sulfur dioxide 'm s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1091,7 +1357,7 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 7 ; } -#Dry deposition velocity of Aromatic peroxy radical +#Dry deposition velocity of Aromatic peroxy radical 'm s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1099,7 +1365,7 @@ constituentType = 60029 ; is_chemical = 1 ; } -#Dry deposition velocity of Ethyne +#Dry deposition velocity of Ethyne 'm s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1107,7 +1373,7 @@ constituentType = 10010 ; is_chemical = 1 ; } -#Dry deposition velocity of Acetonitrile +#Dry deposition velocity of Acetonitrile 'm s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1115,7 +1381,7 @@ constituentType = 10007 ; is_chemical = 1 ; } -#Dry deposition velocity of Methyl peroxy nitrate +#Dry deposition velocity of Methyl peroxy nitrate 'm s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1123,7 +1389,7 @@ constituentType = 10055 ; is_chemical = 1 ; } -#Dry deposition velocity of Hydrogen cyanide +#Dry deposition velocity of Hydrogen cyanide 'm s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1131,7 +1397,7 @@ constituentType = 10006 ; is_chemical = 1 ; } -#Dry deposition velocity of Hydroperoxy aldehydes type 1 +#Dry deposition velocity of Hydroperoxy aldehydes type 1 'm s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1139,7 +1405,7 @@ constituentType = 60058 ; is_chemical = 1 ; } -#Dry deposition velocity of Hydroperoxy aldehydes type 2 +#Dry deposition velocity of Hydroperoxy aldehydes type 2 'm s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1147,7 +1413,7 @@ constituentType = 60059 ; is_chemical = 1 ; } -#Dry deposition velocity of Isoprene peroxy type B +#Dry deposition velocity of Isoprene peroxy type B 'm s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1155,7 +1421,7 @@ constituentType = 60056 ; is_chemical = 1 ; } -#Dry deposition velocity of Isoprene peroxy type D +#Dry deposition velocity of Isoprene peroxy type D 'm s**-1' = { discipline = 0 ; parameterCategory = 20 ; @@ -1946,6 +2212,14 @@ scaledValueOfFirstFixedSurface = 26315 ; scaleFactorOfFirstFixedSurface = 2 ; } +#Surface direct short-wave radiation, clear sky +'J m**-2' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #0 degrees C isothermal level (atm) 'm' = { discipline = 0 ; @@ -2051,6 +2325,18 @@ parameterCategory = 6 ; parameterNumber = 27 ; } +#Height of zero-degree wet-bulb temperature +'m' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 44 ; + } +#Height of one-degree wet-bulb temperature +'m' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 45 ; + } #Instantaneous total lightning flash density 'km**-2 day**-1' = { discipline = 0 ; @@ -2175,6 +2461,14 @@ scaledValueOfSecondFixedSurface = 10 ; scaleFactorOfSecondFixedSurface = 1 ; } +#Total column supercooled liquid water +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 167 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Total column rain water 'kg m**-2' = { discipline = 0 ; @@ -2230,6 +2524,16 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 10 ; } +#Accumulated mass emission of methane from Wetlands +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 3 ; + constituentType = 2 ; + typeOfStatisticalProcessing = 1 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 10 ; + } #Convective precipitation 'kg m**-2' = { discipline = 0 ; @@ -2265,6 +2569,20 @@ parameterNumber = 77 ; typeOfFirstFixedSurface = 1 ; } +#Convective snowfall rate water equivalent +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 55 ; + typeOfFirstFixedSurface = 1 ; + } +#Large scale snowfall rate water equivalent +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 56 ; + typeOfFirstFixedSurface = 1 ; + } #Mixed-layer CAPE in the lowest 50 hPa 'J kg**-1' = { discipline = 0 ; @@ -2480,12 +2798,385 @@ parameterCategory = 0 ; parameterNumber = 37 ; } -#Mean temperature tendency due to short-wave radiation -'K s**-1' = { +#Forecast logarithm of surface roughness length for moisture +'Numeric' = { discipline = 0 ; - parameterCategory = 0 ; - parameterNumber = 22 ; - typeOfStatisticalProcessing = 0 ; + parameterCategory = 2 ; + parameterNumber = 55 ; + typeOfFirstFixedSurface = 1 ; + } +#Surface runoff rate +'kg m**-2 s**-1' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + } +#Surface runoff +'kg m**-2' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Sub-surface runoff rate +'kg m**-2 s**-1' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 52 ; + typeOfFirstFixedSurface = 1 ; + } +#Sub-surface runoff +'kg m**-2' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 52 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } +#Reflectance in 0.4 micron channel +'%' = { + discipline = 3 ; + parameterCategory = 1 ; + parameterNumber = 30 ; + } +#Burned area +'%' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 3 ; + } +#Burning area +'%' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 20 ; + } +#Burnable area +'%' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 21 ; + } +#Un-burnable area +'%' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 22 ; + } +#Fuel load +'kg m**-2' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 23 ; + } +#Combustion completeness +'%' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 24 ; + } +#Fuel moisture content +'kg kg**-1' = { + discipline = 2 ; + parameterCategory = 4 ; + parameterNumber = 25 ; + } +#Time-integrated total column vertically-integrated eastward geopotential flux +'J m**-1' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 40 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward geopotential flux +'J m**-1' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 41 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of water geopotential flux +'J m**-2' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 42 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of geopotential flux +'J m**-2' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 43 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward enthalpy flux +'J m**-1' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 5 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward enthalpy flux +'J m**-1' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 6 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward kinetic energy flux +'J m**-1' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 9 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward kinetic energy flux +'J m**-1' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 10 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated eastward total energy flux +'J m**-1' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 11 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated northward total energy flux +'J m**-1' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 12 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of enthalpy flux +'J m**-2' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 13 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of kinetic energy flux +'J m**-2' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 16 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of total energy flux +'J m**-2' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 17 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time-integrated total column vertically-integrated divergence of water enthalpy flux +'J m**-2' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of mass flux +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 35 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward mass flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 36 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward mass flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 37 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of water vapour flux +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 160 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of cloud liquid water flux +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 161 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of cloud ice water flux +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 162 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of rain flux +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 163 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated divergence of snow flux +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 164 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward water vapour flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 150 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward water vapour flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 151 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward cloud liquid water flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 152 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward cloud liquid water flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 153 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward cloud ice water flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 154 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward cloud ice water flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 155 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward rain flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 156 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward rain flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 157 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated eastward snow flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 158 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Time integrated, vertically integrated northward snow flux +'kg m**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 159 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + typeOfStatisticalProcessing = 1 ; + } +#Mean temperature tendency due to short-wave radiation +'K s**-1' = { + discipline = 0 ; + parameterCategory = 0 ; + parameterNumber = 22 ; + typeOfStatisticalProcessing = 0 ; } #Mean temperature tendency due to long-wave radiation 'K s**-1' = { @@ -2614,6 +3305,36 @@ typeOfSecondFixedSurface = 255 ; typeOfStatisticalProcessing = 1 ; } +#Mean surface photosynthetically active radiation flux, clear sky +'W m**-2' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 60 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } +#Sunshine duration fraction +'Proportion' = { + discipline = 0 ; + parameterCategory = 6 ; + parameterNumber = 51 ; + typeOfFirstFixedSurface = 1 ; + } +#Mean vertically integrated moisture divergence +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + typeOfStatisticalProcessing = 0 ; + } +#Mean surface direct short-wave radiation flux, clear sky +'W m**-2' = { + discipline = 0 ; + parameterCategory = 4 ; + parameterNumber = 61 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 0 ; + } #Time integral of surface latent heat sublimation flux 'J m**-2' = { discipline = 0 ; @@ -2836,6 +3557,14 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Total snowfall +'m' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 57 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #2 metre relative humidity '%' = { discipline = 0 ; @@ -3600,7 +4329,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#X-component of sea ice velocity +#Eastward sea ice velocity 'm s**-1' = { discipline = 10 ; parameterCategory = 2 ; @@ -3612,7 +4341,7 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Y-component of sea ice velocity +#Northward sea ice velocity 'm s**-1' = { discipline = 10 ; parameterCategory = 2 ; @@ -3816,8 +4545,8 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Sea surface salinity -'Numeric' = { +#Sea surface practical salinity +'g kg**-1' = { discipline = 10 ; parameterCategory = 3 ; parameterNumber = 3 ; @@ -4032,8 +4761,8 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } -#Vertically-integrated sea water practical salinity in the upper 300 m -'10**-3 m**-2' = { +#Average sea water practical salinity in the upper 300 m +'g kg**-1' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -4044,8 +4773,8 @@ scaledValueOfSecondFixedSurface = 300 ; scaleFactorOfSecondFixedSurface = 0 ; } -#Vertically-integrated sea water practical salinity in the upper 700 m -'10**-3 m**-2' = { +#Average sea water practical salinity in the upper 700 m +'g kg**-1' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -4056,8 +4785,8 @@ scaledValueOfSecondFixedSurface = 700 ; scaleFactorOfSecondFixedSurface = 0 ; } -#Total column sea water practical salinity -'10**-3 m**-2' = { +#Total column average sea water practical salinity +'g kg**-1' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -4332,8 +5061,26 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } +#Sea surface height with inverse barometer correction +'m' = { + discipline = 10 ; + parameterCategory = 3 ; + parameterNumber = 20 ; + } +#Average sea water potential temperature in the upper 300m +'K' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + } #Sea water practical salinity -'10**-3' = { +'g kg**-1' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -4460,6 +5207,14 @@ typeOfFirstFixedSurface = 168 ; typeOfSecondFixedSurface = 168 ; } +#Sea water salinity +'kg kg**-1' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 168 ; + typeOfSecondFixedSurface = 168 ; + } #Net short wave radiation rate at sea surface 'W m**-2' = { discipline = 0 ; @@ -4606,7 +5361,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean X-component of sea ice velocity +#Time-mean eastward sea ice velocity 'm s**-1' = { discipline = 10 ; parameterCategory = 2 ; @@ -4619,7 +5374,7 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean Y-component of sea ice velocity +#Time-mean northward sea ice velocity 'm s**-1' = { discipline = 10 ; parameterCategory = 2 ; @@ -4840,8 +5595,8 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean sea surface salinity -'Numeric' = { +#Time-mean sea surface practical salinity +'g kg**-1' = { discipline = 10 ; parameterCategory = 3 ; parameterNumber = 3 ; @@ -5074,8 +5829,8 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } -#Time-mean vertically-integrated sea water practical salinity in the upper 300 m -'10**-3 m**-2' = { +#Time-mean average sea water practical salinity in the upper 300 m +'g kg**-1' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -5087,8 +5842,8 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } -#Time-mean vertically-integrated sea water practical salinity in the upper 700 m -'10**-3 m**-2' = { +#Time-mean average sea water practical salinity in the upper 700 m +'g kg**-1' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -5100,8 +5855,8 @@ scaleFactorOfSecondFixedSurface = 0 ; typeOfStatisticalProcessing = 0 ; } -#Time-mean total column sea water practical salinity -'10**-3 m**-2' = { +#Time-mean total column average sea water practical salinity +'g kg**-1' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -5399,8 +6154,21 @@ scaleFactorOfSecondFixedSurface = missing() ; typeOfStatisticalProcessing = 0 ; } +#Time-mean average sea water potential temperature in the upper 300m +'K' = { + discipline = 10 ; + parameterCategory = 4 ; + parameterNumber = 18 ; + typeOfFirstFixedSurface = 160 ; + typeOfSecondFixedSurface = 160 ; + scaledValueOfFirstFixedSurface = 0 ; + scaleFactorOfFirstFixedSurface = 0 ; + scaledValueOfSecondFixedSurface = 300 ; + scaleFactorOfSecondFixedSurface = 0 ; + typeOfStatisticalProcessing = 0 ; + } #Time-mean sea water practical salinity -'10**-3' = { +'g kg**-1' = { discipline = 10 ; parameterCategory = 4 ; parameterNumber = 21 ; @@ -5741,6 +6509,8 @@ discipline = 0 ; parameterCategory = 20 ; parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 255 ; } #Dry deposition velocity 'm s**-1' = { @@ -5864,85 +6634,191 @@ is_chemical_srcsink = 1 ; sourceSinkChemicalPhysicalProcess = 19 ; } -#Emission mass flux from fugitives +#Emission mass flux from fugitives +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 21 ; + } +#Emission mass flux from industrial process +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 22 ; + } +#Emission mass flux from solvents +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 23 ; + } +#Emission mass flux from ships +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 24 ; + } +#Emission mass flux from wastes (solid and water) +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 25 ; + } +#Emission mass flux from off-road transportation +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 27 ; + } +#Emission mass flux from road transportation +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 26 ; + } +#Emission mass flux from super power stations +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 20 ; + } +#Emission mass flux from volcanoes +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 7 ; + } +#Emission mass flux from wetlands +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 20 ; + parameterNumber = 77 ; + is_chemical_srcsink = 1 ; + sourceSinkChemicalPhysicalProcess = 10 ; + } +#Net ecosystem exchange flux +'kg m**-2 s**-1' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + } +#Mean net ecosystem exchange flux +'kg m**-2 s**-1' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + typeOfStatisticalProcessing = 0 ; + } +#Accumulated net ecosystem exchange flux +'kg m**-2 s**-1' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 59 ; + typeOfStatisticalProcessing = 1 ; + } +#Gross primary production flux +'kg m**-2 s**-1' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + } +#Mean gross primary production flux 'kg m**-2 s**-1' = { - discipline = 0 ; - parameterCategory = 20 ; - parameterNumber = 77 ; - is_chemical_srcsink = 1 ; - sourceSinkChemicalPhysicalProcess = 21 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + typeOfStatisticalProcessing = 0 ; } -#Emission mass flux from industrial process +#Accumulated gross primary production flux 'kg m**-2 s**-1' = { - discipline = 0 ; - parameterCategory = 20 ; - parameterNumber = 77 ; - is_chemical_srcsink = 1 ; - sourceSinkChemicalPhysicalProcess = 22 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 60 ; + typeOfStatisticalProcessing = 1 ; } -#Emission mass flux from solvents +#Ecosystem respiration flux 'kg m**-2 s**-1' = { - discipline = 0 ; - parameterCategory = 20 ; - parameterNumber = 77 ; - is_chemical_srcsink = 1 ; - sourceSinkChemicalPhysicalProcess = 23 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; } -#Emission mass flux from ships +#Mean ecosystem respiration flux 'kg m**-2 s**-1' = { - discipline = 0 ; - parameterCategory = 20 ; - parameterNumber = 77 ; - is_chemical_srcsink = 1 ; - sourceSinkChemicalPhysicalProcess = 24 ; + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + typeOfStatisticalProcessing = 0 ; } -#Emission mass flux from wastes (solid and water) +#Accumulated ecosystem respiration flux +'kg m**-2 s**-1' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 61 ; + typeOfStatisticalProcessing = 1 ; + } +#Emission mass flux from bio fuel 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 77 ; is_chemical_srcsink = 1 ; - sourceSinkChemicalPhysicalProcess = 25 ; + sourceSinkChemicalPhysicalProcess = 8 ; } -#Emission mass flux from off-road transportation +#Emission mass flux from fossil fuel 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 77 ; is_chemical_srcsink = 1 ; - sourceSinkChemicalPhysicalProcess = 27 ; + sourceSinkChemicalPhysicalProcess = 9 ; } -#Emission mass flux from road transportation +#Emission mass flux from other 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 77 ; is_chemical_srcsink = 1 ; - sourceSinkChemicalPhysicalProcess = 26 ; + sourceSinkChemicalPhysicalProcess = 0 ; } -#Emission mass flux from super power stations +#Emission mass flux from oceans 'kg m**-2 s**-1' = { discipline = 0 ; parameterCategory = 20 ; parameterNumber = 77 ; is_chemical_srcsink = 1 ; - sourceSinkChemicalPhysicalProcess = 20 ; + sourceSinkChemicalPhysicalProcess = 11 ; } -#Emission mass flux from volcanoes -'kg m**-2 s**-1' = { +#Accumulated wet deposition mass flux +'kg m**-2' = { discipline = 0 ; parameterCategory = 20 ; - parameterNumber = 77 ; - is_chemical_srcsink = 1 ; - sourceSinkChemicalPhysicalProcess = 7 ; + parameterNumber = 7 ; + typeOfStatisticalProcessing = 1 ; } -#Emission mass flux from wetlands -'kg m**-2 s**-1' = { +#Accumulated dry deposition mass flux +'kg m**-2' = { discipline = 0 ; parameterCategory = 20 ; - parameterNumber = 77 ; - is_chemical_srcsink = 1 ; - sourceSinkChemicalPhysicalProcess = 10 ; + parameterNumber = 6 ; + typeOfStatisticalProcessing = 1 ; } #Aerosol number density 'm**-3' = { @@ -5968,6 +6844,14 @@ parameterCategory = 2 ; parameterNumber = 0 ; } +#Snowmelt +'kg m**-2' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 41 ; + typeOfFirstFixedSurface = 1 ; + typeOfStatisticalProcessing = 1 ; + } #Mean zero-crossing wave period 's' = { discipline = 10 ; @@ -6004,12 +6888,30 @@ parameterCategory = 0 ; parameterNumber = 5 ; } +#Mean direction of wind waves +'degrees' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 75 ; + } #Mean period of wind waves 's' = { discipline = 10 ; parameterCategory = 0 ; parameterNumber = 6 ; } +#Mean direction of total swell +'degrees' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 74 ; + } +#2D wave spectra (single) +'m**2 s radian**-1' = { + discipline = 10 ; + parameterCategory = 0 ; + parameterNumber = 86 ; + } #Eastward sea water velocity 'm s**-1' = { discipline = 10 ; @@ -6024,6 +6926,76 @@ parameterNumber = 3 ; typeOfFirstFixedSurface = 160 ; } +#Skin reservoir content +'kg m**-2' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 50 ; + } +#Vertical integral of mass of atmosphere +'kg m**-2' = { + discipline = 0 ; + parameterCategory = 3 ; + parameterNumber = 39 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated kinetic energy +'J m**-2' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 1 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated enthalpy +'J m**-2' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 3 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated potential + internal energy +'J m**-2' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 0 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of potential+internal+latent energy +'J m**-2' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 21 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Total column vertically-integrated total energy +'J m**-2' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 2 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of eastward heat flux +'W m**-1' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 19 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } +#Vertical integral of northward heat flux +'W m**-1' = { + discipline = 0 ; + parameterCategory = 21 ; + parameterNumber = 20 ; + typeOfFirstFixedSurface = 1 ; + typeOfSecondFixedSurface = 8 ; + } #Vertical integral of eastward water vapour flux 'kg m**-1 s**-1' = { discipline = 0 ; @@ -6040,6 +7012,12 @@ typeOfFirstFixedSurface = 1 ; typeOfSecondFixedSurface = 8 ; } +#Vertically integrated moisture divergence flux +'kg m**-2 s**-1' = { + discipline = 0 ; + parameterCategory = 1 ; + parameterNumber = 165 ; + } #Surface runoff 'kg m**-2' = { discipline = 2 ; @@ -6190,6 +7168,48 @@ scaledValueOfSecondFixedSurface = missing() ; scaleFactorOfSecondFixedSurface = missing() ; } +#Minimum vertical gradient of refractivity inside trapping layer +'m**-1' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 45 ; + } +#Mean vertical gradient of refractivity inside trapping layer +'m**-1' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 44 ; + } +#Duct base height +'m' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 41 ; + } +#Trapping layer base height +'m' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 42 ; + } +#Trapping layer top height +'m' = { + discipline = 0 ; + parameterCategory = 19 ; + parameterNumber = 43 ; + } +#U-component of neutral wind +'m s**-1' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 56 ; + } +#V-component of neutral wind +'m s**-1' = { + discipline = 0 ; + parameterCategory = 2 ; + parameterNumber = 57 ; + } #100 metre U wind component 'm s**-1' = { discipline = 0 ; @@ -6435,12 +7455,6 @@ parameterNumber = 0 ; typeOfFirstFixedSurface = 1 ; } -#Surface roughness -'m' = { - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 1 ; - } #Surface net short-wave (solar) radiation 'J m**-2' = { discipline = 0 ; @@ -6627,12 +7641,6 @@ parameterCategory = 1 ; parameterNumber = 28 ; } -#Total snowfall -'m' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 29 ; - } #Precipitable water category 'code table (4.202)' = { discipline = 0 ; @@ -6778,19 +7786,6 @@ parameterCategory = 1 ; parameterNumber = 54 ; } -#Convective snowfall rate water equivalent -'kg m**-2 s**-1' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 55 ; - } -#Large scale snowfall rate water equivalent -'kg m**-2 s**-1' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 56 ; - typeOfFirstFixedSurface = 1 ; - } #Total snowfall rate 'm s**-1' = { discipline = 0 ; @@ -7019,7 +8014,7 @@ parameterCategory = 4 ; parameterNumber = 50 ; } -#UV index +#UV index 'Numeric' = { discipline = 0 ; parameterCategory = 4 ; @@ -7553,12 +8548,6 @@ parameterCategory = 0 ; parameterNumber = 8 ; } -#Volumetric soil moisture content -'Proportion' = { - discipline = 2 ; - parameterCategory = 0 ; - parameterNumber = 9 ; - } #Ground heat flux 'W m**-2' = { discipline = 2 ; @@ -7649,60 +8638,12 @@ parameterCategory = 0 ; parameterNumber = 27 ; } -#Upper layer soil temperature -'K' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 1 ; - } -#Upper layer soil moisture -'kg m**-3' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 2 ; - } -#Lower layer soil moisture -'kg m**-3' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 3 ; - } -#Bottom layer soil temperature -'K' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 4 ; - } -#Liquid volumetric soil moisture (non-frozen) -'Proportion' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 5 ; - } #Number of soil layers in root zone 'Numeric' = { discipline = 2 ; parameterCategory = 3 ; parameterNumber = 6 ; } -#Transpiration stress-onset (soil moisture) -'Proportion' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 7 ; - } -#Direct evaporation cease (soil moisture) -'Proportion' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 8 ; - } -#Soil porosity -'Proportion' = { - discipline = 2 ; - parameterCategory = 3 ; - parameterNumber = 9 ; - } #Liquid volumetric soil moisture (non-frozen) 'm**3 m**-3' = { discipline = 2 ; @@ -7775,7 +8716,7 @@ parameterCategory = 1 ; parameterNumber = 3 ; } -#Estimated u component of wind +#Estimated u component of wind 'm s**-1' = { discipline = 3 ; parameterCategory = 1 ; @@ -7883,7 +8824,7 @@ parameterCategory = 191 ; parameterNumber = 0 ; } -#Albedo +#Forecast albedo '%' = { discipline = 0 ; parameterCategory = 19 ; @@ -8039,13 +8980,13 @@ parameterCategory = 2 ; parameterNumber = 16 ; } -#U-component of current +#U-component of current 'm s**-1' = { discipline = 10 ; parameterCategory = 1 ; parameterNumber = 2 ; } -#V-component of current +#V-component of current 'm s**-1' = { discipline = 10 ; parameterCategory = 1 ; @@ -8141,12 +9082,6 @@ parameterCategory = 2 ; parameterNumber = 7 ; } -#Snow melt -'kg m**-2' = { - discipline = 0 ; - parameterCategory = 1 ; - parameterNumber = 16 ; - } #Direction of swell waves 'Degree true' = { discipline = 10 ; @@ -8262,7 +9197,7 @@ parameterCategory = 1 ; parameterNumber = 60 ; } -#Snow Fall water equivalent +#Snowfall water equivalent 'kg m**-2' = { discipline = 0 ; parameterCategory = 1 ; diff --git a/definitions/grib2/units.legacy.def b/definitions/grib2/units.legacy.def new file mode 100644 index 000000000..4c55cbbbc --- /dev/null +++ b/definitions/grib2/units.legacy.def @@ -0,0 +1,54 @@ +#Volumetric soil moisture content +'Proportion' = { + discipline = 2 ; + parameterCategory = 0 ; + parameterNumber = 9 ; + } +#Upper layer soil temperature +'K' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 1 ; + } +#Upper layer soil moisture +'kg m**-3' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 2 ; + } +#Lower layer soil moisture +'kg m**-3' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 3 ; + } +#Bottom layer soil temperature +'K' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 4 ; + } +#Liquid volumetric soil moisture (non-frozen) +'Proportion' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 5 ; + } +#Transpiration stress-onset (soil moisture) +'Proportion' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 7 ; + } +#Direct evaporation cease (soil moisture) +'Proportion' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 8 ; + } +#Soil porosity +'Proportion' = { + discipline = 2 ; + parameterCategory = 3 ; + parameterNumber = 9 ; + } diff --git a/definitions/grib3/centre.table b/definitions/grib3/centre.table index 85cde3fcf..206305d7b 100644 --- a/definitions/grib3/centre.table +++ b/definitions/grib3/centre.table @@ -78,7 +78,7 @@ 210 210 Frascati (ESA/ESRIN) 211 211 Lannion 212 212 Lisboa -213 213 Reykjavik +213 birk Reykjavik 214 lemm INM 215 lssw Zurich 216 216 Service ARGOS Toulouse diff --git a/definitions/grib3/local/2.0.table b/definitions/grib3/local/2.0.table deleted file mode 100644 index 91bdf6d35..000000000 --- a/definitions/grib3/local/2.0.table +++ /dev/null @@ -1,96 +0,0 @@ -# Code table 2.0: Identification of centres for local section 2 -0 0 Absent -1 ammc Melbourne (WMC) -2 2 Melbourne (WMC) -4 rums Moscow (WMC) -5 5 Moscow (WMC) -7 kwbc US National Weather Service - NCEP (WMC) -8 8 US National Weather Service - NWSTG (WMC) -9 9 US National Weather Service - Other (WMC) -10 10 Cairo (RSMC/RAFC) -12 12 Dakar (RSMC/RAFC) -14 14 Nairobi (RSMC/RAFC) -16 16 Atananarivo (RSMC) -18 18 Tunis-Casablanca (RSMC) -20 20 Las Palmas (RAFC) -21 21 Algiers (RSMC) -22 22 Lagos (RSMC) -24 fapr Pretoria (RSMC) -26 26 Khabarovsk (RSMC) -28 28 New Delhi (RSMC/RAFC) -30 30 Novosibirsk (RSMC) -32 32 Tashkent (RSMC) -33 33 Jeddah (RSMC) -34 rjtd Japanese Meteorological Agency - Tokyo (RSMC) -36 36 Bankok -37 37 Ulan Bator -38 babj Beijing (RSMC) -40 rksl Seoul -41 sabm Buenos Aires (RSMC/RAFC) -43 43 Brasilia (RSMC/RAFC) -45 45 Santiago -46 sbsj Brasilian Space Agency - INPE -51 51 Miami (RSMC/RAFC) -52 52 National Hurricane Center, Miami -53 53 Canadian Meteorological Service - Montreal (RSMC) -54 cwao Canadian Meteorological Service - Montreal (RSMC) -55 55 San Francisco -57 57 U.S. Air Force - Global Weather Center -58 fnmo US Navy - Fleet Numerical Oceanography Center -59 59 NOAA Forecast Systems Lab, Boulder CO -60 60 National Center for Atmospheric Research (NCAR), Boulder, CO -64 64 Honolulu -65 65 Darwin (RSMC) -67 67 Melbourne (RSMC) -69 nzkl Wellington (RSMC/RAFC) -74 egrr U.K. Met Office - Exeter -76 76 Moscow (RSMC/RAFC) -78 edzw Offenbach (RSMC) -80 cnmc Rome (RSMC) -82 eswi Norrkoping -84 lfpw French Weather Service - Toulouse -85 lfpw French Weather Service - Toulouse -86 86 Helsinki -87 87 Belgrade -88 enmi Oslo -89 89 Prague -90 90 Episkopi -91 91 Ankara -92 92 Frankfurt/Main (RAFC) -93 93 London (WAFC) -94 ekmi Copenhagen -95 95 Rota -96 96 Athens -97 97 European Space Agency (ESA) -98 ecmf European Centre for Medium-Range Weather Forecasts -99 99 DeBilt, Netherlands -#100 to 109 Reserved for centres in Region I which are not in the list above -110 110 Hong-Kong -#111 to 133 Reserved for centres in Region II which are not in the list above -#134 to 153 Reserved for centres in Region I which are not listed above -#154 to 159 Reserved for centres in Region III which are not in the list above -160 160 US NOAA/NESDIS -# 161 to 185 Reserved for centres in Region IV which are not in the list above -# 186 to 198 Reserved for centres in Region I which are not listed above -# 199 to 209 Reserved for centres in Region V which are not in the list above -195 wiix Indonesia (NMC) -204 204 National Institute of Water and Atmospheric Research (NIWA - New Zealand) -210 210 Frascati (ESA/ESRIN) -211 211 Lannion -212 212 Lisboa -213 213 Reykjavik -214 lemm INM -215 lssw Zurich -216 216 Service ARGOS Toulouse -218 habp Budapest -224 lowm Austria -227 ebum Belgium (NMC) -233 eidb Dublin -235 ingv INGV -239 crfc CERFAX -246 ifmk IfM-Kiel -247 hadc Hadley Centre -250 cosmo COnsortium for Small scale MOdelling (COSMO) -251 251 Meteorological Cooperation on Operational NWP (MetCoOp) -254 eums EUMETSAT Operation Centre -1098 tigge TIGGE CENTRES diff --git a/definitions/mars/grib.ocda.tpa.def b/definitions/mars/grib.ocda.tpa.def new file mode 100644 index 000000000..d46a8bd2a --- /dev/null +++ b/definitions/mars/grib.ocda.tpa.def @@ -0,0 +1,8 @@ +# aliasing MARS date and time to the date and time defined in section 1 +alias mars.date = dataDate; +alias mars.time = dataTime; + +# dateOfAnalysis and timeOfAnalysis still exist in this stream but is not used in MARS + +unalias mars.step; +alias mars.step = stepRange; diff --git a/definitions/mars/grib.oper.fc.def b/definitions/mars/grib.oper.fc.def index a7a404bc3..1ece3366b 100644 --- a/definitions/mars/grib.oper.fc.def +++ b/definitions/mars/grib.oper.fc.def @@ -1 +1,5 @@ -alias mars.step = endStep; +if (levtype is "o2d" || levtype is "o3d") { + alias mars.step = stepRange; +} else { + alias mars.step = endStep; +} diff --git a/examples/C/bufr_missing.c b/examples/C/bufr_missing.c index 0c9fcc867..3c985d282 100644 --- a/examples/C/bufr_missing.c +++ b/examples/C/bufr_missing.c @@ -15,7 +15,6 @@ */ #include "eccodes.h" -#include int main(int argc, char* argv[]) { diff --git a/examples/C/grib_precipitation.c b/examples/C/grib_precipitation.c index 51214da9d..c59613e3c 100644 --- a/examples/C/grib_precipitation.c +++ b/examples/C/grib_precipitation.c @@ -13,7 +13,7 @@ * * Description: convert fields accumulated from 0 step in * fields accumulated in the interval between - * a field and another. In the input file the fields + * a field and another. In the input file the fields * must be in ascending order in the step. * step must be the most external loop (slower varying index) * diff --git a/examples/C/large_grib1.c b/examples/C/large_grib1.c index 6f5b3dc7a..a01761ced 100644 --- a/examples/C/large_grib1.c +++ b/examples/C/large_grib1.c @@ -10,6 +10,7 @@ #include #include +#include #include "eccodes.h" /* See JIRA issue GRIB-361 */ @@ -23,6 +24,10 @@ int main() codes_handle* h = NULL; const char* filename = "bigfile.grib"; +#ifndef ECCODES_ON_WINDOWS + unsigned int seed = time(NULL); +#endif + numbytes = ni * nj * sizeof(double); values = (double*)malloc(numbytes); if (!values) { @@ -31,7 +36,11 @@ int main() } for (i = 0; i < ni * nj; i++) { - double r = rand() * 1.0 / RAND_MAX; + #ifndef ECCODES_ON_WINDOWS + double r = rand_r(&seed) * 1.0 / RAND_MAX; + #else + double r = rand() * 1.0 / RAND_MAX; + #endif values[i] = r; } @@ -65,7 +74,6 @@ int main() CODES_CHECK(codes_set_double_array(h, "values", values, ni * nj), 0); codes_write_message(h, filename, "w"); - /*printf("Wrote file %s\n", filename);*/ codes_handle_delete(h); free(values); diff --git a/examples/C/large_grib1.sh b/examples/C/large_grib1.sh index 700d354e3..1db407110 100755 --- a/examples/C/large_grib1.sh +++ b/examples/C/large_grib1.sh @@ -9,10 +9,13 @@ . ./include.ctest.sh -# The executable should produce a GRIB1 file +# The executable will produce a GRIB1 file called "bigfile.grib" +output=bigfile.grib ${examples_dir}/c_large_grib1 # Make sure the newly created file can be listed OK -output=bigfile.grib -${tools_dir}/grib_ls $output > /dev/null +${tools_dir}/grib_ls -p numberOfDataPoints,numberOfCodedValues,numberOfMissing $output +num=$(${tools_dir}/grib_get -p numberOfDataPoints $output) +[ $num = 8294400 ] + rm -f $output diff --git a/examples/F90/CMakeLists.txt b/examples/F90/CMakeLists.txt index dd52ca843..72f71ec9b 100644 --- a/examples/F90/CMakeLists.txt +++ b/examples/F90/CMakeLists.txt @@ -13,6 +13,7 @@ if( HAVE_BUILD_TOOLS ) grib_set_data bufr_ecc-1284 bufr_ecc-1019 + get_native_type grib_ecc-671 ) list( APPEND tests_extra grib_index @@ -62,6 +63,7 @@ else() list( APPEND tests_sanity grib_set_pv grib_set_data + get_native_type grib_ecc-671 ) list( APPEND tests_extra grib_index diff --git a/examples/F90/bufr_get_string_array.sh b/examples/F90/bufr_get_string_array.sh index edfd86d20..463ce0d18 100755 --- a/examples/F90/bufr_get_string_array.sh +++ b/examples/F90/bufr_get_string_array.sh @@ -9,31 +9,23 @@ . ./include.ctest.sh -#Define a common label for all the tmp files +# Define a common label for all the tmp files label="bufr_get_string_array_test_f" -#Prepare tmp file +# Prepare tmp file fTmp=${label}.tmp.txt rm -f $fTmp -#----------------------------------------------------- +#---------------------------------------------------- # Test get string array from a BUFR #---------------------------------------------------- - fRef=${data_dir}/bufr/get_string_array.ref -REDIRECT=/dev/null - -#Write the values into a file and compare with reference +# Write the values into a file and compare with reference ${examples_dir}/eccodes_f_bufr_get_string_array > $fTmp -#We compare output to the reference by ignoring the whitespaces +# Compare output to the reference by ignoring the whitespaces diff -w $fRef $fTmp -#cat $fRes - -#Clean up +# Clean up rm -f ${fTmp} - - - diff --git a/examples/F90/bufr_read_header.sh b/examples/F90/bufr_read_header.sh index cb060d2b3..ee1172fcb 100755 --- a/examples/F90/bufr_read_header.sh +++ b/examples/F90/bufr_read_header.sh @@ -26,7 +26,7 @@ REDIRECT=/dev/null # Write the values into a file and compare with reference ${examples_dir}/eccodes_f_bufr_read_header $f 2> $REDIRECT > $fTmp -# Compare output to the reference by ignoring the whitespaces +# Compare output to the reference by ignoring the whitespaces diff -w $fRef $fTmp >$REDIRECT 2> $REDIRECT #Clean up diff --git a/examples/F90/bufr_read_scatterometer.sh b/examples/F90/bufr_read_scatterometer.sh index 8c80ac2b4..f69c2b8b8 100755 --- a/examples/F90/bufr_read_scatterometer.sh +++ b/examples/F90/bufr_read_scatterometer.sh @@ -10,7 +10,6 @@ . ./include.ctest.sh - # Define a common label for all the tmp files label="bufr_read_scatterometer_f" @@ -19,15 +18,12 @@ fTmp=${label}.tmp.txt rm -f $fTmp # We check "asca_139.bufr". The path is hardcoded in the example - -REDIRECT=/dev/null - # Write the key values into a file -${examples_dir}/eccodes_f_bufr_read_scatterometer 2> $REDIRECT > $fTmp +${examples_dir}/eccodes_f_bufr_read_scatterometer > $fTmp # Check the results REFERENCE_FILE=bufr_read_scatterometer_f.ref diff $REFERENCE_FILE $fTmp -#Clean up +# Clean up rm -f $fTmp diff --git a/examples/F90/bufr_read_temp.sh b/examples/F90/bufr_read_temp.sh index bc9184197..810fb4cb6 100755 --- a/examples/F90/bufr_read_temp.sh +++ b/examples/F90/bufr_read_temp.sh @@ -10,22 +10,15 @@ . ./include.ctest.sh - -#Define a common label for all the tmp files +# Define a common label for all the tmp files label="bufr_read_temp_f" -#Define tmp file fTmp=${label}.tmp.txt rm -f $fTmp # The path to the BUFR file is hardcoded in the example - -REDIRECT=/dev/null - -# Run the example ${examples_dir}/eccodes_f_bufr_read_temp > $fTmp +grep -q 'timePeriod pressure geopotentialHeight' $fTmp -#TODO: check the results - -#Clean up +# Clean up rm -f $fTmp diff --git a/examples/F90/bufr_subset.sh b/examples/F90/bufr_subset.sh index 3c2571444..1ae3e5ad4 100755 --- a/examples/F90/bufr_subset.sh +++ b/examples/F90/bufr_subset.sh @@ -10,15 +10,15 @@ . ./include.ctest.sh -#Define a common label for all the tmp files +# Define a common label for all the tmp files label="bufr_subset_test_f" -#Prepare tmp file +# Prepare tmp file fTmp=${label}.tmp.txt fTmp2=${label}.tmp2.txt rm -f $fTmp -#Prepare ref file +# Prepare ref file fRef=${label}.ref cat > $fRef < $fRef < $REDIRECT > $fTmp # Remove blank lines sed '/^\s*$/d' < $fTmp > $fTmp2 -#We compare output to the reference by ignoring the whitespaces +# We compare output to the reference by ignoring the whitespaces diff -w $fRef $fTmp2 >$REDIRECT 2> $REDIRECT #Clean up diff --git a/examples/F90/get_native_type.f90 b/examples/F90/get_native_type.f90 new file mode 100644 index 000000000..66a66f9e5 --- /dev/null +++ b/examples/F90/get_native_type.f90 @@ -0,0 +1,41 @@ +! (C) Copyright 2005- 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/LICENSECODES_INTERNAL_ERROR.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. +! +program get_native_type + use eccodes + implicit none + integer :: iret + integer :: ihandle + integer :: ktype = CODES_TYPE_UNDEFINED + + CALL codes_grib_new_from_samples(ihandle, "regular_ll_sfc_grib2") + + CALL codes_get_native_type(ihandle, 'edition', ktype) + IF (ktype /= CODES_TYPE_LONG) THEN + call codes_check(CODES_INTERNAL_ERROR, 'Error', 'key edition should have integer type') + END IF + + CALL codes_get_native_type(ihandle, 'referenceValue', ktype) + IF (ktype /= CODES_TYPE_DOUBLE) THEN + call codes_check(CODES_INTERNAL_ERROR, 'Error', 'key referenceValue should have double type') + END IF + + CALL codes_get_native_type(ihandle, 'identifier', ktype) + IF (ktype /= CODES_TYPE_STRING) THEN + call codes_check(CODES_INTERNAL_ERROR, 'Error', 'key identifier should have string type') + END IF + + CALL codes_set(ihandle, 'bitmapPresent', 1) + CALL codes_get_native_type(ihandle, 'bitmap', ktype) + IF (ktype /= CODES_TYPE_BYTES) THEN + call codes_check(CODES_INTERNAL_ERROR, 'Error', 'key bitmap should have bytes type') + END IF + + CALL codes_release(ihandle) + +end program get_native_type diff --git a/tests/grib_sh_spectral_complex.sh b/examples/F90/get_native_type.sh similarity index 80% rename from tests/grib_sh_spectral_complex.sh rename to examples/F90/get_native_type.sh index 56acac9e5..52e34da44 100755 --- a/tests/grib_sh_spectral_complex.sh +++ b/examples/F90/get_native_type.sh @@ -3,14 +3,13 @@ # # 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.ctest.sh -TEMP=output.grib_sh_spectral_complex.grib -$EXEC ${test_dir}/grib_sh_spectral_complex +label="get_native_type_f" -rm -f $TEMP +${examples_dir}/eccodes_f_get_native_type diff --git a/examples/F90/grib_get_pl.f90 b/examples/F90/grib_get_pl.f90 index b07a6937f..834d86e49 100644 --- a/examples/F90/grib_get_pl.f90 +++ b/examples/F90/grib_get_pl.f90 @@ -16,10 +16,10 @@ program grib_get_pl integer :: infile integer :: igrib integer :: PLPresent, nb_pl - real, dimension(:), allocatable :: pl + integer(kind=8), dimension(:), allocatable :: pl_8 + integer(kind=4), dimension(:), allocatable :: pl_4 - call codes_open_file(infile, & - '../../data/reduced_gaussian_surface.grib1', 'r') + call codes_open_file(infile, '../../data/reduced_gaussian_surface.grib1', 'r') ! A new grib message is loaded from file ! igrib is the grib id to be used in subsequent calls @@ -31,12 +31,15 @@ program grib_get_pl if (PLPresent == 1) then call codes_get_size(igrib, 'pl', nb_pl) print *, "there are ", nb_pl, " PL values" - allocate (pl(nb_pl)) - call codes_get(igrib, 'pl', pl) - print *, "pl = ", pl - deallocate (pl) + allocate (pl_4(nb_pl)) + call codes_get(igrib, 'pl', pl_4) + allocate (pl_8(nb_pl)) + call codes_get(igrib, 'pl', pl_8) + ! print *, "pl = ", pl + deallocate (pl_4) + deallocate (pl_8) else - print *, "There is no PL values in your GRIB message!" + print *, "There are no PL values in your GRIB message!" end if call codes_release(igrib) diff --git a/examples/F90/grib_get_pv.f90 b/examples/F90/grib_get_pv.f90 index 230d81575..dadc90b05 100644 --- a/examples/F90/grib_get_pv.f90 +++ b/examples/F90/grib_get_pv.f90 @@ -16,7 +16,7 @@ program grib_get_pv integer :: infile integer :: igrib integer :: PVPresent, nb_pv - real(kind=8), dimension(:), allocatable :: pv + real(kind=4), dimension(:), allocatable :: pv call codes_open_file(infile, '../../data/reduced_gaussian_model_level.grib1', 'r') diff --git a/examples/F90/grib_get_pv.sh b/examples/F90/grib_get_pv.sh index c1b1e3537..1052fb34d 100755 --- a/examples/F90/grib_get_pv.sh +++ b/examples/F90/grib_get_pv.sh @@ -9,4 +9,4 @@ . ./include.ctest.sh -${examples_dir}/eccodes_f_grib_get_pv > /dev/null +${examples_dir}/eccodes_f_grib_get_pv diff --git a/fortran/eccodes_f90_head.f90 b/fortran/eccodes_f90_head.f90 index 2373e288c..cd162e0e8 100644 --- a/fortran/eccodes_f90_head.f90 +++ b/fortran/eccodes_f90_head.f90 @@ -17,13 +17,23 @@ module eccodes include "eccodes_visibility.h" include "eccodes_settings.h" - real(8), parameter, public :: CODES_MISSING_DOUBLE = -1.D+100 - integer(4), parameter, public :: CODES_MISSING_LONG = 2147483647 + real(8), parameter, public :: CODES_MISSING_DOUBLE = -1.D+100 + integer(4), parameter, public :: CODES_MISSING_LONG = 2147483647 - integer, parameter, public :: CODES_PRODUCT_ANY = 0 + integer, parameter, public :: CODES_PRODUCT_ANY = 0 integer, parameter, public :: CODES_PRODUCT_GRIB = 1 integer, parameter, public :: CODES_PRODUCT_BUFR = 2 + ! Key types + integer, parameter, public :: CODES_TYPE_UNDEFINED = 0 + integer, parameter, public :: CODES_TYPE_LONG = 1 + integer, parameter, public :: CODES_TYPE_DOUBLE = 2 + integer, parameter, public :: CODES_TYPE_STRING = 3 + integer, parameter, public :: CODES_TYPE_BYTES = 4 + integer, parameter, public :: CODES_TYPE_SECTION = 5 + integer, parameter, public :: CODES_TYPE_LABEL = 6 + integer, parameter, public :: CODES_TYPE_MISSING = 7 + !> Create a new message in memory from an integer or character array containting the coded message. !> !> The message can be accessed through its ID and it will be available\n @@ -100,7 +110,7 @@ module eccodes !> !> \b Examples: \ref grib_nearest.f90 "grib_nearest.f90" !> - !> @param[in] gribid id of the grib loaded in memory + !> @param[in] gribid ID of the GRIB loaded in memory !> @param[in] is_lsm .true. if the nearest land point is required otherwise .false. !> @param[in] inlat latitude of the point in degrees !> @param[in] inlon longitudes of the point in degrees @@ -129,7 +139,7 @@ module eccodes !> !> \b Examples: \ref grib_get_data.f90 "grib_get_data.f90" !> - !> @param[in] gribid id of the grib loaded in memory + !> @param[in] gribid ID of the GRIB loaded in memory !> @param[out] lats latitudes array with dimension "size" !> @param[out] lons longitudes array with dimension "size" !> @param[out] values data values array with dimension "size" diff --git a/fortran/eccodes_f90_int.f90 b/fortran/eccodes_f90_int.f90 index 6f1aa7964..5202aa4f7 100644 --- a/fortran/eccodes_f90_int.f90 +++ b/fortran/eccodes_f90_int.f90 @@ -100,6 +100,7 @@ codes_get_string, & codes_get_byte_array, & codes_get_int_array, & + codes_get_long_array, & codes_get_real4_array, & codes_get_real8_array end interface codes_get diff --git a/fortran/eccodes_f90_long_int.f90 b/fortran/eccodes_f90_long_int.f90 index 937e4aad8..5399b54be 100644 --- a/fortran/eccodes_f90_long_int.f90 +++ b/fortran/eccodes_f90_long_int.f90 @@ -101,6 +101,7 @@ codes_get_string, & codes_get_byte_array, & codes_get_int_array, & + codes_get_long_array, & codes_get_real4_array, & codes_get_real8_array end interface codes_get diff --git a/fortran/eccodes_f90_tail.f90 b/fortran/eccodes_f90_tail.f90 index a4672d204..7dfdd952a 100644 --- a/fortran/eccodes_f90_tail.f90 +++ b/fortran/eccodes_f90_tail.f90 @@ -1618,19 +1618,41 @@ end subroutine codes_get_size_long !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref codes_get_error_string. !> - !> @param msgid id of the message loaded in memory + !> @param msgid id of the message loaded in memory !> @param key key name !> @param value the integer(4) value !> @param status CODES_SUCCESS if OK, integer value on error subroutine codes_get_int(msgid, key, value, status) - integer(kind=kindOfInt), intent(in) :: msgid - character(len=*), intent(in) :: key + integer(kind=kindOfInt), intent(in) :: msgid + character(len=*), intent(in) :: key integer(kind=kindOfInt), intent(out) :: value integer(kind=kindOfInt), optional, intent(out) :: status call grib_get_int(msgid, key, value, status) end subroutine codes_get_int + + !> Get the native type of a key from a message. + !> + !> In case of error, if the status parameter (optional) is not given, the program will + !> exit with an error message.\n Otherwise the error message can be + !> gathered with @ref grib_get_error_string. + !> + !> @param msgid id of the message loaded in memory + !> @param key key name + !> @param value the type as an integer(4) value + !> @param status GRIB_SUCCESS if OK, integer value on error + subroutine codes_get_native_type(msgid, key, value, status) + integer(kind=kindOfInt), intent(in) :: msgid + character(len=*), intent(in) :: key + integer(kind=kindOfInt), intent(out) :: value + integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfInt) :: iret + + call grib_get_native_type(msgid, key, value, status) + end subroutine codes_get_native_type + + !> Get the integer value of a key from a message. !> !> In case of error, if the status parameter (optional) is not given, the program will @@ -1661,9 +1683,9 @@ end subroutine codes_get_long !> @param is_missing 0->not missing, 1->missing !> @param status CODES_SUCCESS if OK, integer value on error subroutine codes_is_missing(msgid, key, is_missing, status) - integer(kind=kindOfInt), intent(in) :: msgid - character(len=*), intent(in) :: key - integer(kind=kindOfInt), intent(out) :: is_missing + integer(kind=kindOfInt), intent(in) :: msgid + character(len=*), intent(in) :: key + integer(kind=kindOfInt), intent(out) :: is_missing integer(kind=kindOfInt), optional, intent(out) :: status call grib_is_missing(msgid, key, is_missing, status) @@ -1680,9 +1702,9 @@ end subroutine codes_is_missing !> @param is_defined 0->not defined, 1->defined !> @param status CODES_SUCCESS if OK, integer value on error subroutine codes_is_defined(msgid, key, is_defined, status) - integer(kind=kindOfInt), intent(in) :: msgid - character(len=*), intent(in) :: key - integer(kind=kindOfInt), intent(out) :: is_defined + integer(kind=kindOfInt), intent(in) :: msgid + character(len=*), intent(in) :: key + integer(kind=kindOfInt), intent(out) :: is_defined integer(kind=kindOfInt), optional, intent(out) :: status call grib_is_defined(msgid, key, is_defined, status) @@ -1700,9 +1722,9 @@ end subroutine codes_is_defined !> @param status CODES_SUCCESS if OK, integer value on error subroutine codes_get_real4(msgid, key, value, status) integer(kind=kindOfInt), intent(in) :: msgid - character(len=*), intent(in) :: key - real(kind=kindOfFloat), intent(out) :: value - integer(kind=kindOfInt), optional, intent(out) :: status + character(len=*), intent(in) :: key + real(kind=kindOfFloat), intent(out) :: value + integer(kind=kindOfInt), optional, intent(out) :: status call grib_get_real4(msgid, key, value, status) end subroutine codes_get_real4 @@ -1718,10 +1740,10 @@ end subroutine codes_get_real4 !> @param value the real(8) value !> @param status CODES_SUCCESS if OK, integer value on error subroutine codes_get_real8(msgid, key, value, status) - integer(kind=kindOfInt), intent(in) :: msgid - character(len=*), intent(in) :: key - real(kind=kindOfDouble), intent(out) :: value - integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfInt), intent(in) :: msgid + character(len=*), intent(in) :: key + real(kind=kindOfDouble), intent(out) :: value + integer(kind=kindOfInt), optional, intent(out) :: status call grib_get_real8(msgid, key, value, status) end subroutine codes_get_real8 @@ -1737,9 +1759,9 @@ end subroutine codes_get_real8 !> @param value the character value !> @param status CODES_SUCCESS if OK, integer value on error subroutine codes_get_string(msgid, key, value, status) - integer(kind=kindOfInt), intent(in) :: msgid - character(len=*), intent(in) :: key - character(len=*), intent(out) :: value + integer(kind=kindOfInt), intent(in) :: msgid + character(len=*), intent(in) :: key + character(len=*), intent(out) :: value integer(kind=kindOfInt), optional, intent(out) :: status call grib_get_string(msgid, key, value, status) @@ -1757,10 +1779,10 @@ end subroutine codes_get_string !> @param value string array value !> @param status CODES_SUCCESS if OK, integer value on error subroutine codes_get_string_array(msgid, key, value, status) - integer(kind=kindOfInt), intent(in) :: msgid - character(len=*), intent(in) :: key + integer(kind=kindOfInt), intent(in) :: msgid + character(len=*), intent(in) :: key character(len=*), dimension(:), allocatable, intent(inout) :: value - integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfInt), optional, intent(out) :: status character :: cvalue(size(value)*len(value(0))) integer(kind=kindOfInt) :: iret @@ -1802,10 +1824,10 @@ end subroutine codes_get_string_array !> @param msgid2 id of the message to which the data are copied !> @param status CODES_SUCCESS if OK, integer value on error subroutine codes_bufr_copy_data(msgid1, msgid2, status) - integer(kind=kindOfInt), intent(in) :: msgid1 - integer(kind=kindOfInt), intent(in) :: msgid2 - integer(kind=kindOfInt), optional, intent(out) :: status - integer(kind=kindOfInt) :: iret + integer(kind=kindOfInt), intent(in) :: msgid1 + integer(kind=kindOfInt), intent(in) :: msgid2 + integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfInt) :: iret iret = codes_f_bufr_copy_data(msgid1, msgid2) @@ -1829,10 +1851,10 @@ end subroutine codes_bufr_copy_data !> @param value string array value !> @param status CODES_SUCCESS if OK, integer value on error subroutine codes_set_string_array(msgid, key, value, status) - integer(kind=kindOfInt), intent(in) :: msgid - character(len=*), intent(in) :: key - character(len=*), dimension(:), allocatable, intent(in) :: value - integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfInt), intent(in) :: msgid + character(len=*), intent(in) :: key + character(len=*), dimension(:), allocatable, intent(in) :: value + integer(kind=kindOfInt), optional, intent(out) :: status character :: cvalue(size(value)*len(value(0))) character :: svalue(len(value(0))) @@ -1875,11 +1897,10 @@ end subroutine codes_set_string_array !> @param value integer(4) array value !> @param status CODES_SUCCESS if OK, integer value on error subroutine codes_get_int_array(msgid, key, value, status) - integer(kind=kindOfInt), intent(in) :: msgid + integer(kind=kindOfInt), intent(in) :: msgid character(len=*), intent(in) :: key integer(kind=kindOfInt), dimension(:), allocatable, intent(inout) :: value - integer(kind=kindOfInt), optional, intent(out) :: status - + integer(kind=kindOfInt), optional, intent(out) :: status integer(kind=kindOfInt) :: iret integer(kind=kindOfInt) :: nb_values integer(kind=kindOfInt) :: size_value @@ -1928,12 +1949,11 @@ end subroutine codes_get_int_array !> @param value integer(4) array value !> @param status CODES_SUCCESS if OK, integer value on error subroutine codes_get_long_array(msgid, key, value, status) - integer(kind=kindOfInt), intent(in) :: msgid + integer(kind=kindOfInt), intent(in) :: msgid character(len=*), intent(in) :: key integer(kind=kindOfLong), dimension(:), allocatable, intent(inout) :: value - integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfInt), optional, intent(out) :: status integer(kind=kindOfInt) :: iret - integer(kind=kindOfInt) :: nb_values integer(kind=kindOfInt) :: size_value integer(kind=kindOfInt) :: i @@ -2003,11 +2023,10 @@ end subroutine codes_get_byte_array !> @param status CODES_SUCCESS if OK, integer value on error subroutine codes_get_real4_array(msgid, key, value, status) integer(kind=kindOfInt), intent(in) :: msgid - character(len=*), intent(in) :: key + character(len=*), intent(in) :: key real(kind=kindOfFloat), dimension(:), allocatable, intent(inout) :: value - integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfInt), optional, intent(out) :: status integer(kind=kindOfInt) :: iret - integer(kind=kindOfInt) :: nb_values integer(kind=kindOfInt) :: size_value integer(kind=kindOfInt) :: i diff --git a/fortran/eccodes_visibility.h b/fortran/eccodes_visibility.h index ad3cf2fbd..0c26a53f7 100644 --- a/fortran/eccodes_visibility.h +++ b/fortran/eccodes_visibility.h @@ -26,6 +26,7 @@ public :: codes_new_from_message, & public :: codes_release public :: codes_dump public :: codes_get_error_string +public :: codes_get_native_type public :: codes_get_api_version public :: codes_get_size public :: codes_get_message_size, codes_copy_message diff --git a/fortran/grib_api_externals.h b/fortran/grib_api_externals.h index 1cafa17c9..f41562c02 100644 --- a/fortran/grib_api_externals.h +++ b/fortran/grib_api_externals.h @@ -34,8 +34,9 @@ integer, external :: grib_f_new_from_message, & bufr_f_new_from_file, & grib_f_headers_only_new_from_file integer, external :: grib_f_release -integer, external :: grib_f_dump, grib_f_print +integer, external :: grib_f_dump integer, external :: grib_f_get_error_string +integer, external :: grib_f_get_native_type integer, external :: grib_f_get_size_int,grib_f_get_size_long integer, external :: grib_f_get_data_real4,grib_f_get_data_real8 integer, external :: grib_f_get_int, grib_f_get_long,grib_f_get_int_array, & diff --git a/fortran/grib_api_visibility.h b/fortran/grib_api_visibility.h index ad34358ad..bf3e90654 100644 --- a/fortran/grib_api_visibility.h +++ b/fortran/grib_api_visibility.h @@ -16,6 +16,7 @@ public :: grib_new_from_message, & public :: grib_release public :: grib_dump public :: grib_get_error_string +public :: grib_get_native_type public :: grib_get_size public :: grib_get_message_size, grib_copy_message public :: grib_write, grib_multi_append diff --git a/fortran/grib_f90_tail.f90 b/fortran/grib_f90_tail.f90 index afc5628a9..0f8b19103 100644 --- a/fortran/grib_f90_tail.f90 +++ b/fortran/grib_f90_tail.f90 @@ -12,14 +12,14 @@ !> !> \b Examples: \ref grib_set_missing.f90 "grib_set_missing.f90" !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param key key name !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_set_missing(gribid, key, status) - integer(kind=kindOfInt), intent(in) :: gribid - character(len=*), intent(in) :: key - integer(kind=kindOfInt), optional, intent(out) :: status - integer(kind=kindOfInt) :: iret + integer(kind=kindOfInt), intent(in) :: gribid + character(len=*), intent(in) :: key + integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfInt) :: iret iret = grib_f_set_missing(gribid, key) if (iret /= 0) then @@ -41,15 +41,15 @@ end subroutine grib_set_missing !> !> \b Examples: \ref grib_index.f90 "grib_index.f90" !> - !> @param indexid id of the newly created index - !> @param filename name of the file of messages to be indexed - !> @param keys : comma separated list of keys for the index. The type of the key can be explicitly declared appending :l for long, :d for double, :s for string to the key name. If the type is not declared explicitly, the native type is assumed. + !> @param indexid ID of the newly created index + !> @param filename name of the file of messages to be indexed + !> @param keys comma separated list of keys for the index. The type of the key can be explicitly declared appending :l for long, :d for double, :s for string to the key name. If the type is not declared explicitly, the native type is assumed. !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_index_create(indexid, filename, keys, status) integer(kind=kindOfInt), intent(inout) :: indexid character(len=*), intent(in) :: filename character(len=*), intent(in) :: keys - integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfInt), optional, intent(out) :: status integer(kind=kindOfInt) :: iret iret = grib_f_index_new_from_file(filename, keys, indexid) @@ -69,13 +69,13 @@ end subroutine grib_index_create !> !> \b Examples: \ref grib_index.f90 "grib_index.f90" !> - !> @param indexid id of the index I want to add a file to + !> @param indexid ID of the index I want to add a file to !> @param filename name of the file I want to add to the index !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_index_add_file(indexid, filename, status) integer(kind=kindOfInt), intent(in) :: indexid character(len=*), intent(in) :: filename - integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfInt), optional, intent(out) :: status integer(kind=kindOfInt) :: iret iret = grib_f_index_add_file(indexid, filename) @@ -95,15 +95,15 @@ end subroutine grib_index_add_file !> !> \b Examples: \ref grib_index.f90 "grib_index.f90" !> - !> @param indexid id of an index created from a file. The index must have been created with the key in argument. + !> @param indexid ID of an index created from a file. The index must have been created with the key in argument. !> @param key key for which the number of values is computed !> @param size number of distinct values of the key in the index - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_index_get_size_long(indexid, key, size, status) - integer(kind=kindOfInt), intent(in) :: indexid + integer(kind=kindOfInt), intent(in) :: indexid character(len=*), intent(in) :: key - integer(kind=kindOfLong), intent(out) :: size - integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfLong), intent(out) :: size + integer(kind=kindOfInt), optional, intent(out) :: status integer(kind=kindOfInt) :: iret iret = grib_f_index_get_size_long(indexid, key, size) @@ -123,15 +123,15 @@ end subroutine grib_index_get_size_long !> !> \b Examples: \ref grib_index.f90 "grib_index.f90" !> - !> @param indexid id of an index created from a file. The index must have been created with the key in argument. + !> @param indexid ID of an index created from a file. The index must have been created with the key in argument. !> @param key key for which the number of values is computed !> @param size number of distinct values of the key in the index - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_index_get_size_int(indexid, key, size, status) - integer(kind=kindOfInt), intent(in) :: indexid + integer(kind=kindOfInt), intent(in) :: indexid character(len=*), intent(in) :: key - integer(kind=kindOfInt), intent(out) :: size - integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfInt), intent(out) :: size + integer(kind=kindOfInt), optional, intent(out) :: status integer(kind=kindOfInt) :: iret iret = grib_f_index_get_size_int(indexid, key, size) @@ -142,7 +142,9 @@ subroutine grib_index_get_size_int(indexid, key, size, status) end if end subroutine grib_index_get_size_int - !> Get the distinct values of the key in argument contained in the index. The key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long. + !> Get the distinct values of the key in argument contained in the index. + !> The key must belong to the index. + !> This function is used when the type of the key was explicitly defined as long or when the native type of the key is long. !> !> !> In case of error, if the status parameter (optional) is not given, the program will @@ -151,10 +153,10 @@ end subroutine grib_index_get_size_int !> !> \b Examples: \ref grib_index.f90 "grib_index.f90" !> - !> @param indexid id of an index created from a file. The index must have been created with the key in argument. + !> @param indexid ID of an index created from a file. The index must have been created with the key in argument. !> @param key key for wich the values are returned !> @param values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_index_get_int(indexid, key, values, status) integer(kind=kindOfInt), intent(in) :: indexid character(len=*), intent(in) :: key @@ -181,10 +183,10 @@ end subroutine grib_index_get_int !> !> \b Examples: \ref grib_index.f90 "grib_index.f90" !> - !> @param indexid id of an index created from a file. The index must have been created with the key in argument. + !> @param indexid ID of an index created from a file. The index must have been created with the key in argument. !> @param key key for wich the values are returned !> @param values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_index_get_long(indexid, key, values, status) integer(kind=kindOfInt), intent(in) :: indexid character(len=*), intent(in) :: key @@ -388,7 +390,7 @@ end subroutine grib_index_select_real8 !> \b Examples: \ref grib_index.f90 "grib_index.f90" !> !> @param indexid id of an index created from a file. - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param status GRIB_SUCCESS if OK, GRIB_END_OF_FILE at the end of file, or error code subroutine grib_new_from_index(indexid, gribid, status) integer(kind=kindOfInt), intent(in) :: indexid @@ -1250,7 +1252,7 @@ end subroutine grib_count_in_file !> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90" !> !> @param ifile id of the file opened with @ref grib_open_file - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param status GRIB_SUCCESS if OK, GRIB_END_OF_FILE at the end of file, or error code subroutine grib_headers_only_new_from_file(ifile, gribid, status) integer(kind=kindOfInt), intent(in) :: ifile @@ -1274,7 +1276,7 @@ end subroutine grib_headers_only_new_from_file !> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90" !> !> @param ifile id of the file opened with @ref grib_open_file - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param status GRIB_SUCCESS if OK, GRIB_END_OF_FILE at the end of file, or error code subroutine grib_new_from_file(ifile, gribid, status) integer(kind=kindOfInt), intent(in) :: ifile @@ -1348,7 +1350,7 @@ end subroutine any_new_from_file !> !> \b Examples: \ref grib_copy_message.f90 "grib_copy_message.f90" !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param message character array containing the coded message !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_new_from_message_char(gribid, message, status) @@ -1381,7 +1383,7 @@ end subroutine grib_new_from_message_char !> !> \b Examples: \ref grib_copy_message.f90 "grib_copy_message.f90" !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param message integer array containing the coded message !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_new_from_message_int4(gribid, message, status) @@ -1412,7 +1414,7 @@ end subroutine grib_new_from_message_int4 !> !> \b Examples: \ref grib_samples.f90 "grib_samples.f90" !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param samplename name of the sample to be used !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_new_from_samples(gribid, samplename, status) @@ -1437,7 +1439,7 @@ end subroutine grib_new_from_samples !> !> \b Examples: \ref grib_get_keys.f90 "grib_get_keys.f90" !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_release(gribid, status) integer(kind=kindOfInt), intent(in) :: gribid @@ -1561,7 +1563,7 @@ end subroutine grib_check !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param lats latitudes array with dimension "size" !> @param lons longitudes array with dimension "size" !> @param values data values array with dimension "size" @@ -1597,7 +1599,7 @@ end subroutine grib_get_data_real4 !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param lats latitudes array !> @param lons longitudes array !> @param values data values array @@ -1640,7 +1642,7 @@ end subroutine grib_get_data_real8 !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param iterid keys iterator id to be used in the keys iterator functions !> @param namespace the namespace of the keys to search for (all the keys if empty) !> @param status GRIB_SUCCESS if OK, integer value on error @@ -1746,7 +1748,7 @@ end subroutine grib_keys_iterator_rewind !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_dump(gribid, status) integer(kind=kindOfInt), intent(in) :: gribid @@ -1788,7 +1790,7 @@ end subroutine grib_get_error_string !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param key name of the key !> @param size size of the array key !> @param status GRIB_SUCCESS if OK, integer value on error @@ -1818,8 +1820,8 @@ end subroutine grib_get_size_int !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key name of the key + !> @param gribid ID of the message loaded in memory + !> @param key name of the key !> @param size size of the array key !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_get_size_long(gribid, key, size, status) @@ -1846,8 +1848,8 @@ end subroutine grib_get_size_long !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value the integer(4) value !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_get_int(gribid, key, value, status) @@ -1874,8 +1876,8 @@ end subroutine grib_get_int !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value the integer(4) value !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_get_long(gribid, key, value, status) @@ -1896,13 +1898,42 @@ subroutine grib_get_long(gribid, key, value, status) end if end subroutine grib_get_long + + !> Get the native type of a key from a message. + !> + !> In case of error, if the status parameter (optional) is not given, the program will + !> exit with an error message.\n Otherwise the error message can be + !> gathered with @ref grib_get_error_string. + !> + !> @param gribid id of the message loaded in memory + !> @param key key name + !> @param value the type as an integer(4) value + !> @param status GRIB_SUCCESS if OK, integer value on error + subroutine grib_get_native_type(gribid, key, value, status) + integer(kind=kindOfInt), intent(in) :: gribid + character(len=*), intent(in) :: key + integer(kind=kindOfInt), intent(out) :: value + integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfInt) :: iret + + iret = grib_f_get_native_type(gribid, key, value) + if (iret /= 0) then + call grib_f_write_on_fail(gribid) + end if + if (present(status)) then + status = iret + else + call grib_check(iret, 'get_native_type', key) + end if + end subroutine grib_get_native_type + !> Check if the value of a key is MISSING. !> !> In case of error, if the status parameter (optional) is not given, the program will !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param key key name !> @param is_missing 0->not missing, 1->missing !> @param status GRIB_SUCCESS if OK, integer value on error @@ -1930,7 +1961,7 @@ end subroutine grib_is_missing !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param key key name !> @param is_defined 0->not defined, 1->defined !> @param status GRIB_SUCCESS if OK, integer value on error @@ -1958,8 +1989,8 @@ end subroutine grib_is_defined !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value the real(4) value !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_get_real4(gribid, key, value, status) @@ -1976,7 +2007,7 @@ subroutine grib_get_real4(gribid, key, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'get', key) + call grib_check(iret, 'get_real4', key) end if end subroutine grib_get_real4 @@ -1986,8 +2017,8 @@ end subroutine grib_get_real4 !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value the real(8) value !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_get_real8(gribid, key, value, status) @@ -2004,7 +2035,7 @@ subroutine grib_get_real8(gribid, key, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'get', key) + call grib_check(iret, 'get_real8', key) end if end subroutine grib_get_real8 @@ -2014,8 +2045,8 @@ end subroutine grib_get_real8 !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value the real(8) value !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_get_string(gribid, key, value, status) @@ -2032,7 +2063,7 @@ subroutine grib_get_string(gribid, key, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'get', key) + call grib_check(iret, 'get_string', key) end if end subroutine grib_get_string @@ -2042,10 +2073,10 @@ end subroutine grib_get_string !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value integer(4) array value - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_get_int_array(gribid, key, value, status) integer(kind=kindOfInt), intent(in) :: gribid character(len=*), intent(in) :: key @@ -2063,7 +2094,7 @@ subroutine grib_get_int_array(gribid, key, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'get', key) + call grib_check(iret, 'get_int_array', key) end if end subroutine grib_get_int_array @@ -2073,10 +2104,10 @@ end subroutine grib_get_int_array !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value integer(4) array value - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_get_long_array(gribid, key, value, status) integer(kind=kindOfInt), intent(in) :: gribid character(len=*), intent(in) :: key @@ -2093,7 +2124,7 @@ subroutine grib_get_long_array(gribid, key, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'get', key) + call grib_check(iret, 'get_long_array', key) end if end subroutine grib_get_long_array @@ -2103,7 +2134,7 @@ end subroutine grib_get_long_array !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param key key name !> @param value character(len=1) array of byte values !> @param length (optional) output: number of values retrieved @@ -2131,7 +2162,7 @@ subroutine grib_get_byte_array(gribid, key, value, length, status) if (present(status)) then status = iret else - call grib_check(iret, 'get', key) + call grib_check(iret, 'get_byte_array', key) end if end subroutine grib_get_byte_array @@ -2141,10 +2172,10 @@ end subroutine grib_get_byte_array !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value real(4) array value - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_get_real4_array(gribid, key, value, status) integer(kind=kindOfInt), intent(in) :: gribid character(len=*), intent(in) :: key @@ -2161,7 +2192,7 @@ subroutine grib_get_real4_array(gribid, key, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'get', key) + call grib_check(iret, 'get_real4_array', key) end if end subroutine grib_get_real4_array @@ -2171,10 +2202,10 @@ end subroutine grib_get_real4_array !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name - !> @param value real(8) array value - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param gribid ID of the message loaded in memory + !> @param key key name + !> @param value real(8) array value + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_get_real8_array(gribid, key, value, status) integer(kind=kindOfInt), intent(in) :: gribid character(len=*), intent(in) :: key @@ -2191,7 +2222,7 @@ subroutine grib_get_real8_array(gribid, key, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'get', key) + call grib_check(iret, 'get_real8_array', key) end if end subroutine grib_get_real8_array @@ -2201,7 +2232,7 @@ end subroutine grib_get_real8_array !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param key key name !> @param kindex integer(4) index !> @param value real(4) value @@ -2221,7 +2252,7 @@ subroutine grib_get_real4_element(gribid, key, kindex, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'get', key) + call grib_check(iret, 'get_real4_element', key) end if end subroutine grib_get_real4_element @@ -2231,7 +2262,7 @@ end subroutine grib_get_real4_element !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param key key name !> @param kindex integer(4) index !> @param value real(8) value @@ -2261,7 +2292,7 @@ end subroutine grib_get_real8_element !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param key key name !> @param kindex integer(4) array indexes !> @param value real(4) array value @@ -2293,7 +2324,7 @@ end subroutine grib_get_real4_elements !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param key key name !> @param kindex integer(4) array index !> @param value real(8) array value @@ -2325,10 +2356,10 @@ end subroutine grib_get_real8_elements !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value integer(4) value - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_set_int(gribid, key, value, status) integer(kind=kindOfInt), intent(in) :: gribid character(len=*), intent(in) :: key @@ -2353,10 +2384,10 @@ end subroutine grib_set_int !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value integer(4) value - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_set_long(gribid, key, value, status) integer(kind=kindOfInt), intent(in) :: gribid character(len=*), intent(in) :: key @@ -2381,10 +2412,10 @@ end subroutine grib_set_long !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value real(4) value - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_set_real4(gribid, key, value, status) integer(kind=kindOfInt), intent(in) :: gribid character(len=*), intent(in) :: key @@ -2409,10 +2440,10 @@ end subroutine grib_set_real4 !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value real(8) value - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_set_real8(gribid, key, value, status) integer(kind=kindOfInt), intent(in) :: gribid character(len=*), intent(in) :: key @@ -2427,7 +2458,7 @@ subroutine grib_set_real8(gribid, key, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'set', key) + call grib_check(iret, 'set_real8', key) end if end subroutine grib_set_real8 @@ -2437,10 +2468,10 @@ end subroutine grib_set_real8 !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value integer(4) array value - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_set_int_array(gribid, key, value, status) integer(kind=kindOfInt), intent(in) :: gribid character(len=*), intent(in) :: key @@ -2457,7 +2488,7 @@ subroutine grib_set_int_array(gribid, key, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'set', key) + call grib_check(iret, 'set_int_array', key) end if end subroutine grib_set_int_array @@ -2467,10 +2498,10 @@ end subroutine grib_set_int_array !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name - !> @param value integer(4) array value - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param gribid ID of the message loaded in memory + !> @param key key name + !> @param value integer(4) array value + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_set_long_array(gribid, key, value, status) integer(kind=kindOfInt), intent(in) :: gribid character(len=*), intent(in) :: key @@ -2487,7 +2518,7 @@ subroutine grib_set_long_array(gribid, key, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'set', key) + call grib_check(iret, 'set_long_array', key) end if end subroutine grib_set_long_array @@ -2498,7 +2529,7 @@ end subroutine grib_set_long_array !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param key key name !> @param value character(len=1) array of byte values !> @param length (optional) output: number of values written @@ -2525,7 +2556,7 @@ subroutine grib_set_byte_array(gribid, key, value, length, status) if (present(status)) then status = iret else - call grib_check(iret, 'set', key) + call grib_check(iret, 'set_byte_array', key) end if end subroutine grib_set_byte_array @@ -2535,7 +2566,7 @@ end subroutine grib_set_byte_array !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param key key name !> @param value real(4) array value !> @param status GRIB_SUCCESS if OK, integer value on error @@ -2555,7 +2586,7 @@ subroutine grib_set_real4_array(gribid, key, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'set', key) + call grib_check(iret, 'set_real4_array', key) end if end subroutine grib_set_real4_array @@ -2565,10 +2596,10 @@ end subroutine grib_set_real4_array !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value real(8) array value - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_set_real8_array(gribid, key, value, status) integer(kind=kindOfInt), intent(in) :: gribid character(len=*), intent(in) :: key @@ -2585,7 +2616,7 @@ subroutine grib_set_real8_array(gribid, key, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'set', key) + call grib_check(iret, 'set_real8_array', key) end if end subroutine grib_set_real8_array @@ -2596,10 +2627,10 @@ end subroutine grib_set_real8_array !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value real(4) array value - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_set_force_real4_array(gribid, key, value, status) integer(kind=kindOfInt), intent(in) :: gribid character(len=*), intent(in) :: key @@ -2627,10 +2658,10 @@ end subroutine grib_set_force_real4_array !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory - !> @param key key name + !> @param gribid ID of the message loaded in memory + !> @param key key name !> @param value real(8) array value - !> @param status GRIB_SUCCESS if OK, integer value on error + !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_set_force_real8_array(gribid, key, value, status) integer(kind=kindOfInt), intent(in) :: gribid character(len=*), intent(in) :: key @@ -2657,7 +2688,7 @@ end subroutine grib_set_force_real8_array !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param key key name !> @param value character value !> @param status GRIB_SUCCESS if OK, integer value on error @@ -2675,7 +2706,7 @@ subroutine grib_set_string(gribid, key, value, status) if (present(status)) then status = iret else - call grib_check(iret, 'set', key) + call grib_check(iret, 'set_string', key) end if end subroutine grib_set_string @@ -2685,7 +2716,7 @@ end subroutine grib_set_string !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param nbytes size in bytes of the message !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_get_message_size_int(gribid, nbytes, status) @@ -2716,7 +2747,7 @@ end subroutine grib_get_message_size_int !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param nbytes size in bytes of the message !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_get_message_size_size_t(gribid, nbytes, status) @@ -2742,7 +2773,7 @@ end subroutine grib_get_message_size_size_t !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param message array containing the coded message to be copied !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_copy_message(gribid, message, status) @@ -2770,7 +2801,7 @@ end subroutine grib_copy_message !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param ifile file id of a file opened with \ref grib_open_file !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_write(gribid, ifile, status) @@ -2845,7 +2876,7 @@ end subroutine grib_multi_append !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param is_lsm .true. if the nearest land point is required otherwise .false. !> @param inlats input real(8) array of the latitudes of the points !> @param inlons input real(8) array of the longitudes of the points @@ -2891,7 +2922,7 @@ end subroutine grib_find_nearest_multiple !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param is_lsm .true. if the nearest land point is required otherwise .false. !> @param inlat latitude of the point !> @param inlon longitudes of the point @@ -2934,7 +2965,7 @@ end subroutine grib_find_nearest_single !> exit with an error message.\n Otherwise the error message can be !> gathered with @ref grib_get_error_string. !> - !> @param gribid id of the grib loaded in memory + !> @param gribid ID of the message loaded in memory !> @param is_lsm .true. if the nearest land point is required otherwise .false. !> @param inlat latitude of the point !> @param inlon longitudes of the point @@ -3133,9 +3164,9 @@ end subroutine grib_skip_duplicates !> @param iterid keys iterator id !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_skip_read_only(iterid, status) - integer(kind=kindOfInt), intent(in) :: iterid + integer(kind=kindOfInt), intent(in) :: iterid integer(kind=kindOfInt), optional, intent(out) :: status - integer(kind=kindOfInt) :: iret + integer(kind=kindOfInt) :: iret iret = grib_f_skip_read_only(iterid) if (present(status)) then @@ -3175,9 +3206,9 @@ end subroutine grib_set_definitions_path !> @param path samples path !> @param status GRIB_SUCCESS if OK, integer value on error subroutine grib_set_samples_path(path, status) - character(len=*), intent(in) :: path - integer(kind=kindOfInt), optional, intent(out) :: status - integer(kind=kindOfInt) :: iret + character(len=*), intent(in) :: path + integer(kind=kindOfInt), optional, intent(out) :: status + integer(kind=kindOfInt) :: iret iret = grib_f_set_samples_path(path) if (present(status)) then @@ -3188,4 +3219,3 @@ subroutine grib_set_samples_path(path, status) end subroutine grib_set_samples_path end module grib_api - diff --git a/fortran/grib_fortran.c b/fortran/grib_fortran.c index 2a4c734ea..26191cc2c 100644 --- a/fortran/grib_fortran.c +++ b/fortran/grib_fortran.c @@ -2154,6 +2154,7 @@ int grib_f_dump(int* gid){ } /*****************************************************************************/ +#ifdef USE_GRIB_PRINT int grib_f_print_(int* gid, char* key, int len){ grib_handle *h = get_handle(*gid); int err = GRIB_SUCCESS; @@ -2175,7 +2176,7 @@ int grib_f_print__(int* gid, char* key, int len){ int grib_f_print(int* gid, char* key, int len){ return grib_f_print_(gid, key, len); } - +#endif /*****************************************************************************/ int grib_f_get_error_string_(int* err, char* buf, int len){ const char* err_msg = grib_get_error_message(*err); @@ -2305,6 +2306,7 @@ int grib_f_get_int__(int* gid, char* key, int* val, int len){ int grib_f_get_int(int* gid, char* key, int* val, int len){ return grib_f_get_int_( gid, key, val, len); } + int grib_f_get_long_(int* gid, char* key, long* val, int len){ grib_handle *h = get_handle(*gid); int err = GRIB_SUCCESS; @@ -2321,6 +2323,25 @@ int grib_f_get_long(int* gid, char* key, long* val, int len){ return grib_f_get_long_( gid, key, val, len); } +/*****************************************************************************/ +int grib_f_get_native_type_(int* gid, char* key, int* val, int len){ + grib_handle *h = get_handle(*gid); + int type_val = 0; + int err = GRIB_SUCCESS; + char buf[1024]; + + if(!h) return GRIB_INVALID_GRIB; + err = grib_get_native_type(h, cast_char(buf,key,len), &type_val); + *val = type_val; + return err; +} +int grib_f_get_native_type__(int* gid, char* key, int* val, int len){ + return grib_f_get_native_type_( gid, key, val, len); +} +int grib_f_get_native_type(int* gid, char* key, int* val, int len){ + return grib_f_get_native_type_( gid, key, val, len); +} + /*****************************************************************************/ int grib_f_get_int_array_(int* gid, char* key, int *val, int* size, int len){ @@ -2330,7 +2351,6 @@ int grib_f_get_int_array_(int* gid, char* key, int *val, int* size, int len){ char buf[1024]; size_t lsize = *size; - if(!h) return GRIB_INVALID_GRIB; if(sizeof(long) == sizeof(int)){ @@ -2761,39 +2781,50 @@ int grib_f_get_real4(int* gid, char* key, float* val, int len){ return grib_f_get_real4_( gid, key, val, len); } -int grib_f_get_real4_array_(int* gid, char* key, float *val, int* size, int len) +int grib_f_get_real4_array_(int* gid, char* key, float* val, int* size, int len) { - /* See ECC-1579 */ + /* See ECC-1579: + * Ideally we should ALWAYS be calling: + * err = grib_get_float_array(h, cast_char(buf,key,len), val, &lsize); + */ - grib_handle *h = get_handle(*gid); - int err = GRIB_SUCCESS; + grib_handle* h = get_handle(*gid); + size_t lsize = *size; char buf[1024]; - size_t lsize = *size; - double* val8 = NULL; - size_t i; + int err = GRIB_SUCCESS; + const int single_precision_mode = (h->context->single_precision != 0); - if(!h) return GRIB_INVALID_GRIB; + if (!h) return GRIB_INVALID_GRIB; - if(*size) - val8 = (double*)grib_context_malloc(h->context,(*size)*(sizeof(double))); - else - val8 = (double*)grib_context_malloc(h->context,sizeof(double)); + if (single_precision_mode) { + err = grib_get_float_array(h, cast_char(buf, key, len), val, &lsize); + } + else { + double* val8 = NULL; + size_t i; - if(!val8) return GRIB_OUT_OF_MEMORY; + if (*size) + val8 = (double*)grib_context_malloc(h->context, (*size) * (sizeof(double))); + else + val8 = (double*)grib_context_malloc(h->context, sizeof(double)); - err = grib_get_double_array(h, cast_char(buf,key,len), val8, &lsize); - if (err) { - grib_context_free(h->context,val8); - return err; - } + if (!val8) return GRIB_OUT_OF_MEMORY; - for(i=0;icontext, val8); + return err; + } - grib_context_free(h->context,val8); + for (i = 0; i < lsize; i++) + val[i] = val8[i]; - return err; + grib_context_free(h->context, val8); + } + + return err; } + int grib_f_get_real4_array__(int* gid, char* key, float* val, int* size, int len){ return grib_f_get_real4_array_( gid, key, val, size, len); } diff --git a/fortran/grib_fortran_prototypes.h b/fortran/grib_fortran_prototypes.h index a6acd5b27..32920c521 100644 --- a/fortran/grib_fortran_prototypes.h +++ b/fortran/grib_fortran_prototypes.h @@ -199,9 +199,6 @@ int grib_f_release(int *hid); int grib_f_dump_(int *gid); int grib_f_dump__(int *gid); int grib_f_dump(int *gid); -int grib_f_print_(int *gid, char *key, int len); -int grib_f_print__(int *gid, char *key, int len); -int grib_f_print(int *gid, char *key, int len); int grib_f_get_api_version_(int* apiVersion,int len); int grib_f_get_api_version__(int* apiVersion,int len); @@ -228,6 +225,11 @@ int grib_f_get_int(int *gid, char *key, int *val, int len); int grib_f_get_long_(int *gid, char *key, long *val, int len); int grib_f_get_long__(int *gid, char *key, long *val, int len); int grib_f_get_long(int *gid, char *key, long *val, int len); + +int grib_f_get_native_type_(int* gid, char* key, int* val, int len); +int grib_f_get_native_type__(int* gid, char* key, int* val, int len); +int grib_f_get_native_type(int* gid, char* key, int* val, int len); + int grib_f_get_int_array_(int *gid, char *key, int *val, int *size, int len); int grib_f_get_int_array__(int *gid, char *key, int *val, int *size, int len); int grib_f_get_int_array(int *gid, char *key, int *val, int *size, int len); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 46172de97..332118567 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,7 +71,6 @@ list( APPEND eccodes_src_files grib_accessor_class_bufr_string_values.cc grib_accessor_class_pack_bufr_values.cc grib_accessor_class_unpack_bufr_values.cc - grib_accessor_class_apply_operators.cc grib_accessor_class_group.cc grib_accessor_class_non_alpha.cc grib_accessor_class_g1bitmap.cc @@ -138,7 +137,6 @@ list( APPEND eccodes_src_files grib_accessor_class_scale.cc grib_accessor_class_from_scale_factor_scaled_value.cc grib_accessor_class_times.cc - grib_accessor_class_forward.cc grib_accessor_class_g2bitmap_present.cc grib_accessor_class_ibmfloat.cc grib_accessor_class_ieeefloat.cc @@ -146,7 +144,6 @@ list( APPEND eccodes_src_files grib_accessor_class_iterator.cc grib_accessor_class_message.cc grib_accessor_class_nearest.cc - grib_accessor_class_box.cc grib_accessor_class_ksec1expver.cc grib_accessor_class_laplacian.cc grib_accessor_class_label.cc @@ -275,7 +272,6 @@ list( APPEND eccodes_src_files grib_dumper_class_serialize.cc grib_dumper_class_debug.cc grib_dumper_class_default.cc - grib_dumper_class_keys.cc grib_dumper_class_bufr_encode_C.cc grib_dumper_class_bufr_encode_filter.cc grib_dumper_class_bufr_encode_fortran.cc @@ -295,7 +291,6 @@ list( APPEND eccodes_src_files grib_filepool.cc grib_geography.cc grib_handle.cc - grib_header_compute.cc grib_hash_keys.cc grib_io.cc grib_trie.cc @@ -327,9 +322,6 @@ list( APPEND eccodes_src_files grib_expression_class_double.cc grib_expression_class_string.cc grib_expression_class_sub_string.cc - grib_box.cc - grib_box_class.cc - grib_box_class_gen.cc grib_nearest.cc grib_nearest_class.cc grib_nearest_class_gen.cc @@ -365,8 +357,6 @@ list( APPEND eccodes_src_files grib_accessor_factory.h grib_api_internal.h eccodes_prototypes.h - grib_box_class.h - grib_box_factory.h grib_dumper_class.h grib_dumper_factory.h grib_emoslib.h @@ -406,8 +396,7 @@ list( APPEND eccodes_extra_src_files grib_bits_fast_big_endian_omp.cc grib_bits_any_endian_omp.cc encode_double_array.cc grib_bits_ibmpow.cc - grib_bits_ibmpow_opt.cc - minmax_val.cc ) + grib_bits_ibmpow_opt.cc ) if(UNIX) ecbuild_get_date(eccodes_BUILD_DATE) diff --git a/src/accessor.class b/src/accessor.class index ff66f4760..c7d61efc4 100644 --- a/src/accessor.class +++ b/src/accessor.class @@ -24,7 +24,6 @@ static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); static void post_init(grib_accessor*); -static void init_class(grib_accessor_class*); static int notify_change(grib_accessor*, grib_accessor*); static void update_size(grib_accessor*, size_t); static size_t preferred_size(grib_accessor*, int); @@ -53,32 +52,32 @@ static grib_accessor_class _grib_accessor_class_NAME = { "NAME", /* name */ sizeof(grib_accessor_NAME), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ &post_init, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ &byte_count, /* get number of bytes */ &byte_offset, /* get offset to bytes */ &get_native_type, /* get native type */ &sub_section, /* get sub_section */ - &pack_missing, /* grib_pack procedures long */ - &is_missing, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - &pack_float, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - &unpack_float, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - &pack_string_array, /* grib_pack array procedures string */ - &unpack_string_array, /* grib_unpack array procedures string */ - &pack_bytes, /* grib_pack procedures bytes */ - &unpack_bytes, /* grib_unpack procedures bytes */ + &pack_missing, /* pack_missing */ + &is_missing, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + &pack_float, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + &pack_string_array, /* pack_string_array */ + &unpack_string_array, /* unpack_string_array */ + &pack_bytes, /* pack_bytes */ + &unpack_bytes, /* unpack_bytes */ &pack_expression, /* pack_expression */ ¬ify_change, /* notify_change */ &update_size, /* update_size */ @@ -87,10 +86,10 @@ static grib_accessor_class _grib_accessor_class_NAME = { &nearest_smaller_value, /* nearest_smaller_value */ &next, /* next accessor */ &compare, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - &unpack_float_element, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - &unpack_float_element_set, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + &unpack_float_element, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + &unpack_float_element_set, /* unpack a given set of elements (float) */ &unpack_double_subarray, /* unpack a subarray */ &clear, /* clear */ &make_clone, /* clone accessor */ @@ -102,9 +101,3 @@ grib_accessor_class* grib_accessor_class_NAME = &_grib_accessor_class_NAME; ADD_TO_FILE grib_accessor_class.h extern grib_accessor_class* grib_accessor_class_NAME; ADD_TO_FILE grib_accessor_factory.h { "NAME", &grib_accessor_class_NAME, }, ADD_TO_FILE grib_accessor_factory_hash_list NAME, &grib_accessor_class_NAME - -static void init_class(grib_accessor_class* c) -{ -INIT -} - diff --git a/src/accessor_class_hierarchy.txt b/src/accessor_class_hierarchy.txt index 2fdf983e3..c65364598 100644 --- a/src/accessor_class_hierarchy.txt +++ b/src/accessor_class_hierarchy.txt @@ -22,7 +22,6 @@ Generated by src/make_accessor_class_hierarchy_dirs.sh |---grib_accessor_class_assert |---grib_accessor_class_bits |---grib_accessor_class_blob - |---grib_accessor_class_box |---grib_accessor_class_bufr_data_array |---grib_accessor_class_bufr_data_element |---grib_accessor_class_bufr_elements_table @@ -105,7 +104,6 @@ Generated by src/make_accessor_class_hierarchy_dirs.sh |---grib_accessor_class_iterator |---grib_accessor_class_label |---grib_accessor_class_long - |-----grib_accessor_class_apply_operators |-----grib_accessor_class_bit |-----grib_accessor_class_bits_per_value |-----grib_accessor_class_budgdate diff --git a/src/action.cc b/src/action.cc index afc002077..b89cf74cf 100644 --- a/src/action.cc +++ b/src/action.cc @@ -60,30 +60,28 @@ static void init(grib_action_class* c) GRIB_MUTEX_UNLOCK(&mutex1); } -#if 0 -/* A non-recursive version */ -static void init(grib_action_class *c) -{ - if (!c) return; - - GRIB_MUTEX_INIT_ONCE(&once,&init_mutex); - GRIB_MUTEX_LOCK(&mutex1); - if(!c->inited) - { - if(c->super) { - grib_action_class *g = *(c->super); - if (g && !g->inited) { - Assert(g->super == NULL); - g->init_class(g); - g->inited = 1; - } - } - c->init_class(c); - c->inited = 1; - } - GRIB_MUTEX_UNLOCK(&mutex1); -} -#endif +// A non-recursive version +// static void init(grib_action_class *c) +// { +// if (!c) return; + +// GRIB_MUTEX_INIT_ONCE(&once,&init_mutex); +// GRIB_MUTEX_LOCK(&mutex1); +// if(!c->inited) +// { +// if(c->super) { +// grib_action_class *g = *(c->super); +// if (g && !g->inited) { +// Assert(g->super == NULL); +// g->init_class(g); +// g->inited = 1; +// } +// } +// c->init_class(c); +// c->inited = 1; +// } +// GRIB_MUTEX_UNLOCK(&mutex1); +// } void grib_dump(grib_action* a, FILE* f, int l) { @@ -97,7 +95,7 @@ void grib_dump(grib_action* a, FILE* f, int l) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); } void grib_xref(grib_action* a, FILE* f, const char* path) @@ -113,7 +111,7 @@ void grib_xref(grib_action* a, FILE* f, const char* path) c = c->super ? *(c->super) : NULL; } printf("xref not implemented for %s\n", a->cclass->name); - DebugAssert(0); + DEBUG_ASSERT(0); } @@ -146,7 +144,7 @@ int grib_create_accessor(grib_section* p, grib_action* a, grib_loader* h) c = c->super ? *(c->super) : NULL; } fprintf(stderr, "Cannot create accessor %s %s\n", a->name, a->cclass->name); - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -169,7 +167,7 @@ int grib_action_notify_change(grib_action* a, grib_accessor* observer, grib_acce c = c->super ? *(c->super) : NULL; } /*GRIB_MUTEX_UNLOCK(&mutex1);*/ - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -182,7 +180,7 @@ grib_action* grib_action_reparse(grib_action* a, grib_accessor* acc, int* doit) return c->reparse(a, acc, doit); c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -195,7 +193,7 @@ int grib_action_execute(grib_action* a, grib_handle* h) return c->execute(a, h); c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } diff --git a/src/action.class b/src/action.class index 5f82e6ab1..772c328c6 100644 --- a/src/action.class +++ b/src/action.class @@ -10,7 +10,7 @@ static int execute(grib_action* a,grib_handle* h); typedef struct grib_action_NAME { - grib_action act; + grib_action act; MEMBERS } grib_action_NAME; diff --git a/src/action_class_alias.cc b/src/action_class_alias.cc index 68d8ffff4..945d3aa7a 100644 --- a/src/action_class_alias.cc +++ b/src/action_class_alias.cc @@ -271,19 +271,18 @@ static void dump(grib_action* act, FILE* f, int lvl) static void xref(grib_action* act, FILE* f, const char* path) { Assert(!"xref is disabled"); -#if 0 - grib_action_alias* a = (grib_action_alias*)act; - if (a->target) { - fprintf(f, "bless({name=>'%s', target=>'%s', path=>'%s'},'xref::alias'),\n", act->name, a->target, path); - if (act->name_space) - fprintf(f, "bless({name=>'%s.%s', target=>'%s', path=>'%s'},'xref::alias'),\n", act->name_space, act->name, a->target, path); - } - else { - fprintf(f, "bless({name=>'%s', path=>'%s'},'xref::unalias'),\n", act->name, path); - if (act->name_space) - fprintf(f, "bless({name=>'%s.%s', path=>'%s'},'xref::unalias'),\n", act->name_space, act->name, path); - } -#endif + + // grib_action_alias* a = (grib_action_alias*)act; + // if (a->target) { + // fprintf(f, "bless({name=>'%s', target=>'%s', path=>'%s'},'xref::alias'),\n", act->name, a->target, path); + // if (act->name_space) + // fprintf(f, "bless({name=>'%s.%s', target=>'%s', path=>'%s'},'xref::alias'),\n", act->name_space, act->name, a->target, path); + // } + // else { + // fprintf(f, "bless({name=>'%s', path=>'%s'},'xref::unalias'),\n", act->name, path); + // if (act->name_space) + // fprintf(f, "bless({name=>'%s.%s', path=>'%s'},'xref::unalias'),\n", act->name_space, act->name, path); + // } } static void destroy(grib_context* context, grib_action* act) diff --git a/src/action_class_concept.cc b/src/action_class_concept.cc index 8631da30a..74fb25588 100644 --- a/src/action_class_concept.cc +++ b/src/action_class_concept.cc @@ -46,7 +46,7 @@ static void destroy (grib_context*,grib_action*); typedef struct grib_action_concept { - grib_action act; + grib_action act; /* Members defined in gen */ long len; grib_arguments* params; @@ -306,7 +306,7 @@ static grib_concept_value* get_concept_impl(grib_handle* h, grib_action_concept* static grib_concept_value* get_concept(grib_handle* h, grib_action_concept* self) { grib_concept_value* result = NULL; - GRIB_MUTEX_INIT_ONCE(&once, &init) + GRIB_MUTEX_INIT_ONCE(&once, &init); GRIB_MUTEX_LOCK(&mutex); result = get_concept_impl(h, self); diff --git a/src/action_class_gen.cc b/src/action_class_gen.cc index 30f2e0332..8c5945889 100644 --- a/src/action_class_gen.cc +++ b/src/action_class_gen.cc @@ -127,53 +127,9 @@ static void dump(grib_action* act, FILE* f, int lvl) grib_context_print(act->context, f, "%s[%d] %s \n", act->op, a->len, act->name); } -#if 0 -#define F(x) \ - if (flg & x) { \ - fprintf(f, "%s=>1,", #x); \ - flg &= !x; \ - } -static int count = 0; -static void xref(grib_action* act, FILE* f, const char* path) -{ - grib_action_gen* a = (grib_action_gen*)act; - unsigned long flg = act->flags; - int position = a->len > 0 ? count++ : -1; - - fprintf(f, "bless({path=>'%s',size => %ld, name=> '%s', position=> %d, ", path, (long)a->len, act->name, position); - - fprintf(f, " params=> ["); - grib_arguments_print(act->context, a->params, NULL); - fprintf(f, "], flags=> {"); - - F(GRIB_ACCESSOR_FLAG_READ_ONLY); - F(GRIB_ACCESSOR_FLAG_DUMP); - F(GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC); - F(GRIB_ACCESSOR_FLAG_CAN_BE_MISSING); - F(GRIB_ACCESSOR_FLAG_HIDDEN); - F(GRIB_ACCESSOR_FLAG_CONSTRAINT); - F(GRIB_ACCESSOR_FLAG_NO_COPY); - F(GRIB_ACCESSOR_FLAG_COPY_OK); - F(GRIB_ACCESSOR_FLAG_FUNCTION); - F(GRIB_ACCESSOR_FLAG_DATA); - F(GRIB_ACCESSOR_FLAG_NO_FAIL); - F(GRIB_ACCESSOR_FLAG_TRANSIENT); - F(GRIB_ACCESSOR_FLAG_STRING_TYPE); - F(GRIB_ACCESSOR_FLAG_LONG_TYPE); - F(GRIB_ACCESSOR_FLAG_DOUBLE_TYPE); - - /* make sure all flags are processed */ - if (flg) { - printf("FLG = %ld\n", (long)flg); - } - Assert(flg == 0); - - fprintf(f, "}, defaults=> ["); - grib_arguments_print(act->context, act->default_value, NULL); +// For xref implementation see +// src/deprecated/action_class_gen.cc - fprintf(f, "]}, 'xref::%s'),\n", act->op); -} -#endif static void xref(grib_action* act, FILE* f, const char* path) { Assert(!"xref is disabled"); diff --git a/src/action_class_section.cc b/src/action_class_section.cc index 6692175c8..fc64351df 100644 --- a/src/action_class_section.cc +++ b/src/action_class_section.cc @@ -74,20 +74,17 @@ static void init_class(grib_action_class* c) } /* END_CLASS_IMP */ -#if 0 -/* new GCC compiler v4.5.0 complains function is defined but not used*/ -static void check_sections(grib_section *s,grib_handle* h) -{ - grib_accessor *a = s?s->block->first:NULL; - if(s) Assert(s->h == h); - while(a) - { - Assert(grib_handle_of_accessor(a) == h); - check_sections(a->sub_section,h); - a = a->next; - } -} -#endif +// static void check_sections(grib_section *s,grib_handle* h) +// { +// grib_accessor *a = s?s->block->first:NULL; +// if(s) Assert(s->h == h); +// while(a) +// { +// Assert(grib_handle_of_accessor(a) == h); +// check_sections(a->sub_section,h); +// a = a->next; +// } +// } static int notify_change(grib_action* act, grib_accessor* notified, grib_accessor* changed) @@ -196,10 +193,8 @@ static int notify_change(grib_action* act, grib_accessor* notified, grib_get_block_length(tmp_handle->root, &len); grib_context_log(h->context, GRIB_LOG_DEBUG, "------------- TMP BLOCK IS sectlen=%d buffer=%d", len, tmp_handle->buffer->ulength); -#if 0 - if(h->context->debug > 10) - grib_dump_content(tmp_handle,stdout,NULL,0,NULL); -#endif + //if(h->context->debug > 10) + // grib_dump_content(tmp_handle,stdout,NULL,0,NULL); /* Assert(tmp_handle->buffer->ulength == len); */ /* grib_empty_section(h->context,old_section); */ diff --git a/src/action_class_set_darray.cc b/src/action_class_set_darray.cc index 4b87a719c..43d249594 100644 --- a/src/action_class_set_darray.cc +++ b/src/action_class_set_darray.cc @@ -8,9 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/*************************************************************************** - * Enrico Fucile * - ***************************************************************************/ #include "grib_api_internal.h" /* This is used by make_class.pl diff --git a/src/action_class_set_iarray.cc b/src/action_class_set_iarray.cc index 0c90c74d6..e5e83d291 100644 --- a/src/action_class_set_iarray.cc +++ b/src/action_class_set_iarray.cc @@ -8,9 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/*************************************************************************** - * Enrico Fucile * - ***************************************************************************/ #include "grib_api_internal.h" /* This is used by make_class.pl @@ -80,36 +77,34 @@ grib_action* grib_action_create_set_iarray(grib_context* context, const char* name, grib_iarray* iarray) { - char buf[1024]; - grib_action_set_iarray* a; - grib_action_class* c = grib_action_class_set_iarray; - grib_action* act = (grib_action*)grib_context_malloc_clear_persistent(context, c->size); - act->op = grib_context_strdup_persistent(context, "section"); - - act->cclass = c; - a = (grib_action_set_iarray*)act; - act->context = context; - - a->iarray = iarray; - a->name = grib_context_strdup_persistent(context, name); - - snprintf(buf, 1024, "set_iarray%p", (void*)iarray); - - act->name = grib_context_strdup_persistent(context, buf); - - return act; + Assert(!"grib_action_create_set_iarray: Not implemented"); + return NULL; + +// char buf[1024]; +// grib_action_set_iarray* a; +// grib_action_class* c = grib_action_class_set_iarray; +// grib_action* act = (grib_action*)grib_context_malloc_clear_persistent(context, c->size); +// act->op = grib_context_strdup_persistent(context, "section"); + +// act->cclass = c; +// a = (grib_action_set_iarray*)act; +// act->context = context; +// a->iarray = iarray; +// a->name = grib_context_strdup_persistent(context, name); +// snprintf(buf, 1024, "set_iarray%p", (void*)iarray); +// act->name = grib_context_strdup_persistent(context, buf); +// return act; } static int execute(grib_action* a, grib_handle* h) { grib_action_set_iarray* self = (grib_action_set_iarray*)a; - return grib_set_long_array(h, self->name, self->iarray->v, self->iarray->n); } static void dump(grib_action* act, FILE* f, int lvl) { - int i = 0; + int i = 0; grib_action_set_iarray* self = (grib_action_set_iarray*)act; for (i = 0; i < lvl; i++) grib_context_print(act->context, f, " "); diff --git a/src/action_class_trigger.cc b/src/action_class_trigger.cc index ebee1007d..82e4e9e43 100644 --- a/src/action_class_trigger.cc +++ b/src/action_class_trigger.cc @@ -10,7 +10,6 @@ /*************************************************************************** * Jean Baptiste Filippi - 01.11.2005 * - * Enrico Fucile * ***************************************************************************/ #include "grib_api_internal.h" @@ -88,66 +87,60 @@ static void init_class(grib_action_class* c) grib_action* grib_action_create_trigger(grib_context* context, grib_arguments* args, grib_action* block) { - char name[1024]; - const size_t nameLen = sizeof(name); - - grib_action_trigger* a = 0; - grib_action_class* c = grib_action_class_trigger; - grib_action* act = (grib_action*)grib_context_malloc_clear_persistent(context, c->size); - - snprintf(name, nameLen, "_trigger%p", (void*)act); - - act->name = grib_context_strdup_persistent(context, name); - act->op = grib_context_strdup_persistent(context, "section"); - act->cclass = c; - act->next = NULL; - act->context = context; - - a = (grib_action_trigger*)act; - a->trigger_on = args; - a->block = block; - - return act; + Assert(!"action_class_trigger::grib_action_create_trigger: 'trigger' statement is deprecated"); + return NULL; + +// char name[1024]; +// const size_t nameLen = sizeof(name); +// grib_action_trigger* a = 0; +// grib_action_class* c = grib_action_class_trigger; +// grib_action* act = (grib_action*)grib_context_malloc_clear_persistent(context, c->size); +// snprintf(name, nameLen, "_trigger%p", (void*)act); +// act->name = grib_context_strdup_persistent(context, name); +// act->op = grib_context_strdup_persistent(context, "section"); +// act->cclass = c; +// act->next = NULL; +// act->context = context; +// a = (grib_action_trigger*)act; +// a->trigger_on = args; +// a->block = block; +// return act; } static void dump(grib_action* act, FILE* f, int lvl) { - /* grib_action_trigger* a = ( grib_action_trigger*)act; */ - int i = 0; - for (i = 0; i < lvl; i++) - grib_context_print(act->context, f, " "); - grib_context_print(act->context, f, "Trigger\n"); + Assert(!"action_class_trigger::dump: 'trigger' statement is deprecated"); + + // int i = 0; + // for (i = 0; i < lvl; i++) + // grib_context_print(act->context, f, " "); + // grib_context_print(act->context, f, "Trigger\n"); } static int create_accessor(grib_section* p, grib_action* act, grib_loader* h) { - int ret = GRIB_SUCCESS; - grib_action_trigger* a = (grib_action_trigger*)act; - grib_action* next = NULL; - grib_accessor* as = NULL; - grib_section* gs = NULL; - - - as = grib_accessor_factory(p, act, 0, NULL); - - if (!as) - return GRIB_INTERNAL_ERROR; - - gs = as->sub_section; - gs->branch = 0; /* Force a reparse each time */ - - grib_push_accessor(as, p->block); - grib_dependency_observe_arguments(as, a->trigger_on); - - next = a->block; - - while (next) { - ret = grib_create_accessor(gs, next, h); - if (ret != GRIB_SUCCESS) - return ret; - next = next->next; - } - + Assert(!"action_class_trigger::create_accessor: 'trigger' statement is deprecated"); + +// int ret = GRIB_SUCCESS; +// grib_action_trigger* a = (grib_action_trigger*)act; +// grib_action* next = NULL; +// grib_accessor* as = NULL; +// grib_section* gs = NULL; +// as = grib_accessor_factory(p, act, 0, NULL); +// if (!as) +// return GRIB_INTERNAL_ERROR; + +// gs = as->sub_section; +// gs->branch = 0; /* Force a reparse each time */ +// grib_push_accessor(as, p->block); +// grib_dependency_observe_arguments(as, a->trigger_on); +// next = a->block; +// while (next) { +// ret = grib_create_accessor(gs, next, h); +// if (ret != GRIB_SUCCESS) +// return ret; +// next = next->next; +// } return GRIB_SUCCESS; } @@ -157,20 +150,18 @@ static grib_action* reparse(grib_action* a, grib_accessor* acc, int* doit) return self->block; } -/* COMEBACK */ static void destroy(grib_context* context, grib_action* act) { - grib_action_trigger* a = (grib_action_trigger*)act; - - grib_action* b = a->block; - - while (b) { - grib_action* n = b->next; - grib_action_delete(context, b); - b = n; - } - - grib_arguments_free(context, a->trigger_on); - grib_context_free_persistent(context, act->name); - grib_context_free_persistent(context, act->op); + Assert(!"action_class_trigger::destroy: 'trigger' statement is deprecated"); + +// grib_action_trigger* a = (grib_action_trigger*)act; +// grib_action* b = a->block; +// while (b) { +// grib_action* n = b->next; +// grib_action_delete(context, b); +// b = n; +// } +// grib_arguments_free(context, a->trigger_on); +// grib_context_free_persistent(context, act->name); +// grib_context_free_persistent(context, act->op); } diff --git a/src/action_class_while.cc b/src/action_class_while.cc index 17243bf06..0b5c7ca4c 100644 --- a/src/action_class_while.cc +++ b/src/action_class_while.cc @@ -82,95 +82,95 @@ static void init_class(grib_action_class* c) static void dump(grib_action* act, FILE* f, int lvl) { - grib_action_while* a = (grib_action_while*)act; - int i = 0; - for (i = 0; i < lvl; i++) - grib_context_print(act->context, f, " "); - grib_context_print(act->context, f, "Loop %s\n", act->name); - grib_dump_action_branch(f, a->block_while, lvl + 1); + Assert(!"action_class_while::dump: 'while' statement is deprecated"); + +// grib_action_while* a = (grib_action_while*)act; +// int i = 0; +// for (i = 0; i < lvl; i++) +// grib_context_print(act->context, f, " "); +// grib_context_print(act->context, f, "Loop %s\n", act->name); +// grib_dump_action_branch(f, a->block_while, lvl + 1); } static int create_accessor(grib_section* p, grib_action* act, grib_loader* h) { - grib_action_while* a = (grib_action_while*)act; + Assert(!"action_class_while::create_accessor: 'while' statement is deprecated"); + +// grib_action_while* a = (grib_action_while*)act; +// grib_accessor* ga = NULL; +// grib_section* gs = NULL; +// grib_action* la = NULL; +// grib_action* next = NULL; +// int ret = 0; +// ga = grib_accessor_factory(p, act, 0, NULL); +// if (!ga) +// return GRIB_BUFFER_TOO_SMALL; +// gs = ga->sub_section; + +// grib_push_accessor(ga, p->block); +// la = a->block_while; + +// for (;;) { +// long val = 0; + +// if ((ret = grib_expression_evaluate_long(p->h, a->expression, &val)) != GRIB_SUCCESS) { +// grib_context_log(p->h->context, GRIB_LOG_DEBUG, " List %s creating %d values unable to evaluate long \n", act->name, val); +// return ret; +// } +// if (!val) +// break; + +// next = la; +// while (next) { +// ret = grib_create_accessor(gs, next, h); +// if (ret != GRIB_SUCCESS) +// return ret; +// next = next->next; +// } +// } - grib_accessor* ga = NULL; - grib_section* gs = NULL; - grib_action* la = NULL; - grib_action* next = NULL; - int ret = 0; - /* long n = 0; */ - - ga = grib_accessor_factory(p, act, 0, NULL); - if (!ga) - return GRIB_BUFFER_TOO_SMALL; - gs = ga->sub_section; - - grib_push_accessor(ga, p->block); - - la = a->block_while; - - for (;;) { - long val = 0; - - if ((ret = grib_expression_evaluate_long(p->h, a->expression, &val)) != GRIB_SUCCESS) { - grib_context_log(p->h->context, GRIB_LOG_DEBUG, " List %s creating %d values unable to evaluate long \n", act->name, val); - return ret; - } - - /* printf("val=%ld %ld\n",val,n++); */ - - if (!val) - break; - - - next = la; - while (next) { - ret = grib_create_accessor(gs, next, h); - if (ret != GRIB_SUCCESS) - return ret; - next = next->next; - } - } return GRIB_SUCCESS; } grib_action* grib_action_create_while(grib_context* context, grib_expression* expression, grib_action* block) { - char name[80]; - const size_t nameLen = sizeof(name); - grib_action_while* a; - grib_action_class* c = grib_action_class_while; - grib_action* act = (grib_action*)grib_context_malloc_clear_persistent(context, c->size); - act->cclass = c; - act->context = context; - a = (grib_action_while*)act; - act->next = NULL; - - - snprintf(name, nameLen, "_while%p", (void*)a); - act->name = grib_context_strdup_persistent(context, name); - act->op = grib_context_strdup_persistent(context, "section"); - a->expression = expression; - - a->block_while = block; - - grib_context_log(context, GRIB_LOG_DEBUG, " Action List %s is created \n", act->name); - return act; + Assert(!"action_class_while::grib_action_create_while: 'while' statement is deprecated"); + return NULL; + +// char name[80]; +// const size_t nameLen = sizeof(name); +// grib_action_while* a; +// grib_action_class* c = grib_action_class_while; +// grib_action* act = (grib_action*)grib_context_malloc_clear_persistent(context, c->size); +// act->cclass = c; +// act->context = context; +// a = (grib_action_while*)act; +// act->next = NULL; + +// snprintf(name, nameLen, "_while%p", (void*)a); +// act->name = grib_context_strdup_persistent(context, name); +// act->op = grib_context_strdup_persistent(context, "section"); +// a->expression = expression; + +// a->block_while = block; + +// grib_context_log(context, GRIB_LOG_DEBUG, " Action List %s is created \n", act->name); +// return act; } static void destroy(grib_context* context, grib_action* act) { - grib_action_while* self = (grib_action_while*)act; - grib_action* a = self->block_while; - - while (a) { - grib_action* na = a->next; - grib_action_delete(context, a); - a = na; - } - - grib_context_free_persistent(context, act->name); - grib_context_free_persistent(context, act->op); - grib_expression_free(context, self->expression); + Assert(!"action_class_while::destroy: 'while' statement is deprecated"); + + // grib_action_while* self = (grib_action_while*)act; + // grib_action* a = self->block_while; + + // while (a) { + // grib_action* na = a->next; + // grib_action_delete(context, a); + // a = na; + // } + // grib_context_free_persistent(context, act->name); + // grib_context_free_persistent(context, act->op); + // grib_expression_free(context, self->expression); } diff --git a/src/bufr_keys_iterator.cc b/src/bufr_keys_iterator.cc index ed4219820..cc8b1b3ca 100644 --- a/src/bufr_keys_iterator.cc +++ b/src/bufr_keys_iterator.cc @@ -29,7 +29,7 @@ bufr_keys_iterator* codes_bufr_keys_iterator_new(grib_handle* h, unsigned long f ki->filter_flags = filter_flags; ki->handle = h; - DebugAssert(h->product_kind == PRODUCT_BUFR); + DEBUG_ASSERT(h->product_kind == PRODUCT_BUFR); ki->key_name = NULL; ki->i_curr_attribute = 0; ki->accessor_flags_only = GRIB_ACCESSOR_FLAG_DUMP; @@ -56,7 +56,7 @@ bufr_keys_iterator* codes_bufr_data_section_keys_iterator_new(grib_handle* h) return NULL; ki->handle = h; - DebugAssert(h->product_kind == PRODUCT_BUFR); + DEBUG_ASSERT(h->product_kind == PRODUCT_BUFR); ki->i_curr_attribute = 0; ki->accessor_flags_only = GRIB_ACCESSOR_FLAG_BUFR_DATA | GRIB_ACCESSOR_FLAG_DUMP; ki->accessor_flags_skip = GRIB_ACCESSOR_FLAG_HIDDEN | GRIB_ACCESSOR_FLAG_READ_ONLY; @@ -200,7 +200,7 @@ char* codes_bufr_keys_iterator_get_name(const bufr_keys_iterator* ckiter) int* r = 0; char* ret = 0; grib_context* c = kiter->handle->context; - DebugAssert(kiter->current); + DEBUG_ASSERT(kiter->current); if (kiter->prefix) { int iattribute = kiter->i_curr_attribute - 1; diff --git a/src/bufr_util.cc b/src/bufr_util.cc index fb7cea585..000435488 100644 --- a/src/bufr_util.cc +++ b/src/bufr_util.cc @@ -10,8 +10,8 @@ #include "grib_api_internal.h" -/* Return the rank of the key using list of keys (For BUFR keys) */ -/* The argument 'keys' is an input as well as output from each call */ +// Return the rank of the key using list of keys (For BUFR keys) +// The argument 'keys' is an input as well as output from each call int compute_bufr_key_rank(grib_handle* h, grib_string_list* keys, const char* key) { grib_string_list* next = keys; @@ -19,20 +19,20 @@ int compute_bufr_key_rank(grib_handle* h, grib_string_list* keys, const char* ke int theRank = 0; size_t size = 0; grib_context* c = h->context; - DebugAssert(h->product_kind == PRODUCT_BUFR); + DEBUG_ASSERT(h->product_kind == PRODUCT_BUFR); while (next && next->value && strcmp(next->value, key)) { prev = next; next = next->next; } if (!next) { - DebugAssert(prev); + DEBUG_ASSERT(prev); if (prev) { prev->next = (grib_string_list*)grib_context_malloc_clear(c, sizeof(grib_string_list)); next = prev->next; } } - DebugAssert(next); + DEBUG_ASSERT(next); if (!next) return 0; if (!next->value) { @@ -43,11 +43,11 @@ int compute_bufr_key_rank(grib_handle* h, grib_string_list* keys, const char* ke next->count++; theRank = next->count; if (theRank == 1) { - /* If the count is 1 it could mean two things: */ - /* This is the first instance of the key and there is another one */ - /* This is the first and only instance of the key */ - /* So we check if there is a second one of this key, */ - /* If not, then rank is zero i.e. this is the only instance */ + // If the count is 1 it could mean two things: + // This is the first instance of the key and there is another one + // This is the first and only instance of the key + // So we check if there is a second one of this key, + // If not, then rank is zero i.e. this is the only instance size_t slen = strlen(key) + 5; char* s = (char*)grib_context_malloc_clear(c, slen); snprintf(s, slen, "#2#%s", key); @@ -77,14 +77,13 @@ char** codes_bufr_copy_data_return_copied_keys(grib_handle* hin, grib_handle* ho while (codes_bufr_keys_iterator_next(kiter)) { char* name = codes_bufr_keys_iterator_get_name(kiter); - /* if the copy fails we want to keep copying without any errors. - This is because the copy can be between structures that are not - identical and we want to copy what can be copied and skip what - cannot be copied because is not in the output handle - */ + // if the copy fails we want to keep copying without any errors. + // This is because the copy can be between structures that are not + // identical and we want to copy what can be copied and skip what + // cannot be copied because is not in the output handle *err = codes_copy_key(hin, hout, name, 0); if (*err == 0) { - /* 'name' will be freed when we call codes_bufr_keys_iterator_delete so copy */ + // 'name' will be freed when we call codes_bufr_keys_iterator_delete so copy char* copied_name = strdup(name); k = grib_sarray_push(hin->context, k, copied_name); } @@ -93,7 +92,7 @@ char** codes_bufr_copy_data_return_copied_keys(grib_handle* hin, grib_handle* ho keys = grib_sarray_get_array(hin->context, k); grib_sarray_delete(hin->context, k); if (*nkeys > 0) { - /* Do the pack if something was copied */ + // Do the pack if something was copied *err = grib_set_long(hout, "pack", 1); } codes_bufr_keys_iterator_delete(kiter); @@ -116,18 +115,17 @@ int codes_bufr_copy_data(grib_handle* hin, grib_handle* hout) while (codes_bufr_keys_iterator_next(kiter)) { char* name = codes_bufr_keys_iterator_get_name(kiter); - /* if the copy fails we want to keep copying without any error messages. - This is because the copy can be between structures that are not - identical and we want to copy what can be copied and skip what - cannot be copied because is not in the output handle - */ + // if the copy fails we want to keep copying without any error messages. + // This is because the copy can be between structures that are not + // identical and we want to copy what can be copied and skip what + // cannot be copied because is not in the output handle err = codes_copy_key(hin, hout, name, GRIB_TYPE_UNDEFINED); if (err == 0) nkeys++; } if (nkeys > 0) { - /* Do the pack if something was copied */ + // Do the pack if something was copied err = grib_set_long(hout, "pack", 1); } @@ -135,7 +133,7 @@ int codes_bufr_copy_data(grib_handle* hin, grib_handle* hout) return err; } -#define BUFR_SECTION0_LEN 8 /* BUFR section 0 is always 8 bytes long */ +#define BUFR_SECTION0_LEN 8 // BUFR section 0 is always 8 bytes long static int bufr_extract_edition(const void* message, long* edition) { const long nbits_edition = 8; @@ -145,7 +143,7 @@ static int bufr_extract_edition(const void* message, long* edition) *edition = (long)grib_decode_unsigned_long(pMessage, &pos_edition, nbits_edition); return GRIB_SUCCESS; } -/* The ECMWF BUFR local use section */ +// The ECMWF BUFR local use section static int bufr_decode_rdb_keys(const void* message, long offset_section2, codes_bufr_header* hdr) { const unsigned char* pMessage = (const unsigned char*)message; @@ -168,7 +166,7 @@ static int bufr_decode_rdb_keys(const void* message, long offset_section2, codes unsigned char* p = (unsigned char*)message + offset_keyData; - DebugAssert(hdr->ecmwfLocalSectionPresent); + DEBUG_ASSERT(hdr->ecmwfLocalSectionPresent); hdr->rdbType = (long)grib_decode_unsigned_long(pMessage, &pos_rdbType, nbits_rdbType); hdr->oldSubtype = (long)grib_decode_unsigned_long(pMessage, &pos_oldSubtype, nbits_oldSubtype); @@ -181,7 +179,7 @@ static int bufr_decode_rdb_keys(const void* message, long offset_section2, codes hdr->localMinute = (long)grib_decode_unsigned_long(p, &start, 6); hdr->localSecond = (long)grib_decode_unsigned_long(p, &start, 6); - /* rdbtime */ + // rdbtime p = (unsigned char*)message + offset_rdbtime; start = 0; hdr->rdbtimeDay = (long)grib_decode_unsigned_long(p, &start, 6); @@ -189,7 +187,7 @@ static int bufr_decode_rdb_keys(const void* message, long offset_section2, codes hdr->rdbtimeMinute = (long)grib_decode_unsigned_long(p, &start, 6); hdr->rdbtimeSecond = (long)grib_decode_unsigned_long(p, &start, 6); - /* rectime */ + // rectime p = (unsigned char*)message + offset_rectime; start = 0; hdr->rectimeDay = (long)grib_decode_unsigned_long(p, &start, 6); @@ -206,21 +204,21 @@ static int bufr_decode_rdb_keys(const void* message, long offset_section2, codes return GRIB_SUCCESS; } -#define IDENT_LEN 9 /* 8 chars plus the final 0 terminator */ +#define IDENT_LEN 9 // 8 chars plus the final 0 terminator -/* The ECMWF BUFR local use section */ +// The ECMWF BUFR local use section static int bufr_decode_extra_rdb_keys(const void* message, long offset_section2, codes_bufr_header* hdr) { bool isSatelliteType = false; long start = 0; const long offset_keyData = offset_section2 + 6; - const long offset_keyMore = offset_section2 + 19; /* 8 bytes long */ - const long offset_keySat = offset_section2 + 27; /* 9 bytes long */ + const long offset_keyMore = offset_section2 + 19; // 8 bytes long + const long offset_keySat = offset_section2 + 27; // 9 bytes long unsigned char* pKeyData = (unsigned char*)message + offset_keyData; char* pKeyMore = (char*)message + offset_keyMore; - DebugAssert(hdr->ecmwfLocalSectionPresent); + DEBUG_ASSERT(hdr->ecmwfLocalSectionPresent); if (hdr->rdbType == 2 || hdr->rdbType == 3 || hdr->rdbType == 8 || hdr->rdbType == 12) { isSatelliteType = true; @@ -233,7 +231,7 @@ static int bufr_decode_extra_rdb_keys(const void* message, long offset_section2, } if (hdr->isSatellite) { - unsigned char* pKeyMoreLong = (unsigned char*)message + offset_keyMore; /* as an integer */ + unsigned char* pKeyMoreLong = (unsigned char*)message + offset_keyMore; // as an integer unsigned char* pKeySat = (unsigned char*)message + offset_keySat; unsigned long lValue = 0; start = 40; @@ -277,13 +275,13 @@ static int bufr_decode_extra_rdb_keys(const void* message, long offset_section2, lValue = grib_decode_unsigned_long(pKeyData, &start, 26); hdr->localLongitude = (lValue - 18000000.0) / 100000.0; - /* interpret keyMore as a string. Copy to a temporary */ + // interpret keyMore as a string. Copy to a temporary for (i = 0; i < IDENT_LEN - 1; ++i) { temp[i] = *pKeyMore++; } temp[i] = '\0'; pTemp = temp; - string_lrtrim(&pTemp, 1, 1); /* Trim left and right */ + string_lrtrim(&pTemp, 1, 1); // Trim left and right strncpy(hdr->ident, pTemp, IDENT_LEN - 1); } @@ -331,7 +329,7 @@ static int bufr_decode_edition3(const void* message, codes_bufr_header* hdr) long nbits_localTablesVersionNumber = 1 * 8; long pos_localTablesVersionNumber = 19 * 8; - const long typicalCentury = 21; /* This century */ + const long typicalCentury = 21; // This century long typicalYearOfCentury = 0; long nbits_typicalYearOfCentury = 1 * 8; long pos_typicalYearOfCentury = 20 * 8; @@ -352,11 +350,11 @@ static int bufr_decode_edition3(const void* message, codes_bufr_header* hdr) long offset_section2 = 0; long offset_section3 = 0; long nbits_numberOfSubsets = 2 * 8; - long pos_numberOfSubsets = 0; /*depends on offset_section3*/ + long pos_numberOfSubsets = 0; //depends on offset_section3 unsigned long section3Flags; long nbits_section3Flags = 1 * 8; - long pos_section3Flags = 0; /*depends on offset_section3*/ + long pos_section3Flags = 0; //depends on offset_section3 totalLength = grib_decode_unsigned_long(pMessage, &pos_totalLength, nbits_totalLength); if (totalLength != hdr->message_size) { @@ -383,7 +381,7 @@ static int bufr_decode_edition3(const void* message, codes_bufr_header* hdr) hdr->typicalDate = hdr->typicalYear * 10000 + hdr->typicalMonth * 100 + hdr->typicalDay; hdr->typicalTime = hdr->typicalHour * 10000 + hdr->typicalMinute * 100 + hdr->typicalSecond; - offset_section2 = BUFR_SECTION0_LEN + section1Length; /*bytes*/ + offset_section2 = BUFR_SECTION0_LEN + section1Length; //bytes section2Length = 0; hdr->localSectionPresent = (section1Flags != 0); if (hdr->localSectionPresent) { @@ -399,7 +397,7 @@ static int bufr_decode_edition3(const void* message, codes_bufr_header* hdr) } } - offset_section3 = BUFR_SECTION0_LEN + section1Length + section2Length; /*bytes*/ + offset_section3 = BUFR_SECTION0_LEN + section1Length + section2Length; //bytes pos_numberOfSubsets = (offset_section3 + 4) * 8; hdr->numberOfSubsets = grib_decode_unsigned_long(pMessage, &pos_numberOfSubsets, nbits_numberOfSubsets); @@ -459,7 +457,7 @@ static int bufr_decode_edition4(const void* message, codes_bufr_header* hdr) long nbits_localTablesVersionNumber = 1 * 8; long pos_localTablesVersionNumber = 22 * 8; - long typicalYear2 = 0; /* corrected */ + long typicalYear2 = 0; // corrected long nbits_typicalYear = 2 * 8; long pos_typicalYear = 23 * 8; @@ -482,11 +480,11 @@ static int bufr_decode_edition4(const void* message, codes_bufr_header* hdr) long offset_section2 = 0; long offset_section3 = 0; long nbits_numberOfSubsets = 2 * 8; - long pos_numberOfSubsets = 0; /*depends on offset_section3*/ + long pos_numberOfSubsets = 0; //depends on offset_section3 unsigned long section3Flags; long nbits_section3Flags = 1 * 8; - long pos_section3Flags = 0; /*depends on offset_section3*/ + long pos_section3Flags = 0; //depends on offset_section3 totalLength = grib_decode_unsigned_long(pMessage, &pos_totalLength, nbits_totalLength); if (totalLength != hdr->message_size) { @@ -505,7 +503,7 @@ static int bufr_decode_edition4(const void* message, codes_bufr_header* hdr) hdr->localTablesVersionNumber = (long)grib_decode_unsigned_long(pMessage, &pos_localTablesVersionNumber, nbits_localTablesVersionNumber); hdr->typicalYear = (long)grib_decode_unsigned_long(pMessage, &pos_typicalYear, nbits_typicalYear); - typicalYear2 = hdr->typicalYear < 100 ? 2000 + hdr->typicalYear : hdr->typicalYear; /*ECC-556*/ + typicalYear2 = hdr->typicalYear < 100 ? 2000 + hdr->typicalYear : hdr->typicalYear; //ECC-556 hdr->typicalMonth = (long)grib_decode_unsigned_long(pMessage, &pos_typicalMonth, nbits_typicalMonth); hdr->typicalDay = (long)grib_decode_unsigned_long(pMessage, &pos_typicalDay, nbits_typicalDay); hdr->typicalHour = (long)grib_decode_unsigned_long(pMessage, &pos_typicalHour, nbits_typicalHour); @@ -514,7 +512,7 @@ static int bufr_decode_edition4(const void* message, codes_bufr_header* hdr) hdr->typicalDate = typicalYear2 * 10000 + hdr->typicalMonth * 100 + hdr->typicalDay; hdr->typicalTime = hdr->typicalHour * 10000 + hdr->typicalMinute * 100 + hdr->typicalSecond; - offset_section2 = BUFR_SECTION0_LEN + section1Length; /*bytes*/ + offset_section2 = BUFR_SECTION0_LEN + section1Length; //bytes section2Length = 0; hdr->localSectionPresent = (section1Flags != 0); if (hdr->localSectionPresent) { @@ -530,7 +528,7 @@ static int bufr_decode_edition4(const void* message, codes_bufr_header* hdr) } } - offset_section3 = BUFR_SECTION0_LEN + section1Length + section2Length; /*bytes*/ + offset_section3 = BUFR_SECTION0_LEN + section1Length + section2Length; //bytes pos_numberOfSubsets = (offset_section3 + 4) * 8; hdr->numberOfSubsets = grib_decode_unsigned_long(pMessage, &pos_numberOfSubsets, nbits_numberOfSubsets); @@ -584,10 +582,10 @@ static int count_bufr_messages(grib_context* c, FILE* f, int* n, int strict_mode while (!done) { mesg = wmo_read_bufr_from_file_malloc(f, 0, &size, &offset, &err); - /*printf("Count so far=%d, mesg=%x, err=%d (%s)\n", *n, mesg, err, grib_get_error_message(err));*/ + //printf("Count so far=%d, mesg=%x, err=%d (%s)\n", *n, mesg, err, grib_get_error_message(err)); if (!mesg) { if (err == GRIB_END_OF_FILE || err == GRIB_PREMATURE_END_OF_FILE) { - done = 1; /* reached the end */ + done = 1; // reached the end break; } if (strict_mode) @@ -621,25 +619,25 @@ int codes_bufr_extract_headers_malloc(grib_context* c, const char* filename, cod if (!c) c = grib_context_get_default(); if (path_is_directory(filename)) { - grib_context_log(c, GRIB_LOG_ERROR, "codes_bufr_extract_headers_malloc: \"%s\" is a directory", filename); + grib_context_log(c, GRIB_LOG_ERROR, "%s: \"%s\" is a directory", __func__, filename); return GRIB_IO_PROBLEM; } fp = fopen(filename, "rb"); if (!fp) { - grib_context_log(c, GRIB_LOG_ERROR, "codes_bufr_extract_headers_malloc: Unable to read file \"%s\"", filename); + grib_context_log(c, GRIB_LOG_ERROR, "%s: Unable to read file \"%s\"", __func__, filename); perror(filename); return GRIB_IO_PROBLEM; } err = count_bufr_messages(c, fp, num_messages, strict_mode); if (err) { - grib_context_log(c, GRIB_LOG_ERROR, "codes_bufr_extract_headers_malloc: Unable to count BUFR messages in file \"%s\"", filename); + grib_context_log(c, GRIB_LOG_ERROR, "%s: Unable to count BUFR messages in file \"%s\"", __func__, filename); fclose(fp); return err; } size = *num_messages; if (size == 0) { - grib_context_log(c, GRIB_LOG_ERROR, "codes_bufr_extract_headers_malloc: No BUFR messages in file \"%s\"", filename); + grib_context_log(c, GRIB_LOG_ERROR, "%s: No BUFR messages in file \"%s\"", __func__, filename); return GRIB_INVALID_MESSAGE; } *result = (codes_bufr_header*)calloc(size, sizeof(codes_bufr_header)); @@ -669,8 +667,8 @@ int codes_bufr_extract_headers_malloc(grib_context* c, const char* filename, cod } if (!mesg) { if (err != GRIB_END_OF_FILE && err != GRIB_PREMATURE_END_OF_FILE) { - /* An error occurred */ - grib_context_log(c, GRIB_LOG_ERROR, "codes_bufr_extract_headers_malloc: Unable to read BUFR message"); + // An error occurred + grib_context_log(c, GRIB_LOG_ERROR, "%s: Unable to read BUFR message", __func__); if (strict_mode) { fclose(fp); return GRIB_DECODING_ERROR; @@ -742,6 +740,8 @@ static const char* codes_bufr_header_get_centre_name(long edition, long centre_c return "wiix"; case 204: return "niwa"; + case 213: + return "birk"; case 214: return "lemm"; case 215: @@ -783,8 +783,8 @@ static const char* codes_bufr_header_get_centre_name(long edition, long centre_c } } -#if 0 -/* TODO: Not efficient as it opens the code table every time */ +#if defined(BUFR_PROCESS_CODE_TABLE) +// TODO(masn): Not efficient as it opens the code table every time static char* codes_bufr_header_get_centre_name(long edition, long centre_code) { char full_path[2014] = {0,}; @@ -847,7 +847,7 @@ int codes_bufr_header_get_string(codes_bufr_header* bh, const char* key, char* v bool isEcmwfLocal = false; Assert(bh); Assert(key); - *len = strlen(NOT_FOUND); /*By default*/ + *len = strlen(NOT_FOUND); // By default isEcmwfLocal = (bh->ecmwfLocalSectionPresent == 1); Assert(!(isEcmwfLocal && bh->bufrHeaderCentre != 98)); @@ -911,7 +911,7 @@ int codes_bufr_header_get_string(codes_bufr_header* bh, const char* key, char* v else if (strcmp(key, "ecmwfLocalSectionPresent") == 0) *len = snprintf(val, 32, "%ld", bh->ecmwfLocalSectionPresent); - /* Local ECMWF keys. Can be absent so must return NOT_FOUND */ + // Local ECMWF keys. Can be absent so must return NOT_FOUND else if (strcmp(key, "rdbType") == 0) { if (isEcmwfLocal) *len = snprintf(val, 32, "%ld", bh->rdbType); @@ -1111,7 +1111,7 @@ int codes_bufr_header_get_string(codes_bufr_header* bh, const char* key, char* v return GRIB_SUCCESS; } -/* Returns 1 if the BUFR key is in the header and 0 if it is in the data section */ +// Returns 1 if the BUFR key is in the header and 0 if it is in the data section int codes_bufr_key_is_header(const grib_handle* h, const char* key, int* err) { grib_accessor* acc = grib_find_accessor(h, key); @@ -1119,5 +1119,18 @@ int codes_bufr_key_is_header(const grib_handle* h, const char* key, int* err) *err = GRIB_NOT_FOUND; return 0; } + *err = GRIB_SUCCESS; return ((acc->flags & GRIB_ACCESSOR_FLAG_BUFR_DATA) == 0); } + +// Returns 1 if the BUFR key is a coordinate descriptor +int codes_bufr_key_is_coordinate(const grib_handle* h, const char* key, int* err) +{ + grib_accessor* acc = grib_find_accessor(h, key); + if (!acc) { + *err = GRIB_NOT_FOUND; + return 0; + } + *err = GRIB_SUCCESS; + return ((acc->flags & GRIB_ACCESSOR_FLAG_BUFR_COORD) != 0); +} diff --git a/src/codes_util.cc b/src/codes_util.cc index b5c5ddd57..61174f2f9 100644 --- a/src/codes_util.cc +++ b/src/codes_util.cc @@ -10,8 +10,8 @@ #include "grib_api_internal.h" -/* Input lon must be in degrees not radians */ -/* Not to be used for latitudes as they can be -ve */ +// Input lon must be in degrees not radians +// Not to be used for latitudes as they can be -ve double normalise_longitude_in_degrees(double lon) { while (lon < 0) @@ -23,7 +23,7 @@ double normalise_longitude_in_degrees(double lon) #ifdef ECCODES_ON_WINDOWS -/* Replace C99/Unix rint() for Windows Visual C++ (only before VC++ 2013 versions) */ +// Replace C99/Unix rint() for Windows Visual C++ (only before VC++ 2013 versions) #if defined _MSC_VER && _MSC_VER < 1800 double rint(double x) { @@ -54,17 +54,17 @@ char get_dir_separator_char(void) return DIR_SEPARATOR_CHAR; } -/* Return 1 if the filepath is a regular file, 0 otherwise */ +// Return 1 if the filepath is a regular file, 0 otherwise int path_is_regular_file(const char* path) { struct stat s; int stat_val = stat(path, &s); if (stat_val != 0) - return 0; /*error doing stat*/ - return S_ISREG(s.st_mode); /* 1 if it's a regular file */ + return 0; // error doing stat + return S_ISREG(s.st_mode); // 1 if it's a regular file } -/* Return 1 if the filepath is a directory, 0 otherwise */ +// Return 1 if the filepath is a directory, 0 otherwise int path_is_directory(const char* path) { struct stat s; @@ -79,13 +79,13 @@ int path_is_directory(const char* path) char* codes_getenv(const char* name) { - /* Look for the new ecCodes environment variable names */ - /* if not found, then look for old grib_api ones for backward compatibility */ + // Look for the new ecCodes environment variable names + // if not found, then look for old grib_api ones for backward compatibility char* result = getenv(name); if (result == NULL) { const char* old_name = name; - /* Test the most commonly used variables first */ + // Test the most commonly used variables first if (STR_EQUAL(name, "ECCODES_SAMPLES_PATH")) old_name = "GRIB_SAMPLES_PATH"; else if (STR_EQUAL(name, "ECCODES_DEFINITION_PATH")) @@ -141,7 +141,7 @@ int codes_check_grib_ieee_packing_value(int value) return GRIB_SUCCESS; } -/* Note: To be called in cases where we are WRITING a file (Do not call when reading) */ +// Note: To be called in cases where we are WRITING a file (Do not call when reading) int codes_flush_sync_close_file(FILE* f) { int err = 0; @@ -155,19 +155,17 @@ int codes_flush_sync_close_file(FILE* f) return GRIB_IO_PROBLEM; } -#if 0 #ifdef HAVE_FCNTL_H - /* Heavy handed way of getting the file access mode: only proceed if writing */ - val = fcntl(fd, F_GETFL, 0); - if (val < 0) { - grib_context_log(c, GRIB_LOG_PERROR, "Call to fcntl failed"); - return err; - } - if ((val & O_ACCMODE) != O_WRONLY) { - /* File is not being written */ - return GRIB_SUCCESS; - } -#endif + // Heavy handed way of getting the file access mode: only proceed if writing + //val = fcntl(fd, F_GETFL, 0); + //if (val < 0) { + // grib_context_log(c, GRIB_LOG_PERROR, "Call to fcntl failed"); + // return err; + //} + //if ((val & O_ACCMODE) != O_WRONLY) { + // // File is not being written + // return GRIB_SUCCESS; + //} #endif err = fflush(f); @@ -214,3 +212,109 @@ int is_date_valid(long year, long month, long day, long hour, long minute, doubl return 1; } + +static float float_epsilon(void) +{ + float floatEps = 1.0; + while (1 + floatEps / 2 != 1) + floatEps /= 2; + return floatEps; +} + +static int is_approximately_equal(double a, double b, double epsilon) +{ + if (a == b) + return 1; + if (fabs(a - b) <= epsilon) + return 1; + return 0; +} + +static double eval_value_factor(int64_t value, int64_t factor) +{ + return (double)value * pow(10.0, -factor); +} + +static int compute_scaled_value_and_scale_factor_algorithm1( + double input, int64_t maximum_value, int64_t maximum_factor, + int64_t* ret_value, int64_t* ret_factor) +{ + int64_t factor = 0; + int64_t value = 0; + + if (input == 0) { + *ret_factor = *ret_value = 0; + return GRIB_SUCCESS; + } + + factor = floor(log10(maximum_value)) - floor(log10(input < 0 ? -input : input)); + value = (int64_t)round(input * pow(10, factor)); + while ((value % 10 == 0) && (factor > 0)) { + value /= 10; + factor--; + } + if (value >= maximum_value) + return GRIB_INTERNAL_ERROR; + if (factor > maximum_factor) + return GRIB_INTERNAL_ERROR; + + *ret_factor = factor; + *ret_value = value; + return GRIB_SUCCESS; +} + +static int compute_scaled_value_and_scale_factor_algorithm2( + double input, int64_t maximum_value, int64_t maximum_factor, + int64_t* ret_value, int64_t* ret_factor) +{ + int64_t factor = 0, prev_factor = 0; + int64_t value = 0, prev_value = 0; + double exact = input; + const float epsilon = float_epsilon(); + int is_negative = 0; + // Loop until we find a close enough approximation. Keep the last good values + if (exact < 0) { + is_negative = 1; + exact *= -1; + } + factor = prev_factor = 0; + value = prev_value = round(exact); + while (!is_approximately_equal(exact, eval_value_factor(value, factor), epsilon) && + value < maximum_value && + factor < maximum_factor) { + value = round(exact * pow(10., ++factor)); + if (value > maximum_value || factor > maximum_factor) { + // One or more maxima exceeded. So stop and use the previous values + value = prev_value; + factor = prev_factor; + break; + } + prev_factor = factor; + prev_value = value; + } + + if (is_negative) { + value *= -1; + } + + if (value == 0) + return GRIB_INTERNAL_ERROR; + + *ret_factor = factor; + *ret_value = value; + + return GRIB_SUCCESS; +} + +// Return GRIB_SUCCESS if no error and set the two outputs 'ret_value' and 'ret_factor'. +// ret_value cannot exceed scaled_value_max and ret_factor cannot exceed scale_factor_max +int compute_scaled_value_and_scale_factor( + double input, int64_t scaled_value_max, int64_t scale_factor_max, + int64_t* ret_value, int64_t* ret_factor) +{ + int err = compute_scaled_value_and_scale_factor_algorithm1(input, scaled_value_max, scale_factor_max, ret_value, ret_factor); + if (err) { + err = compute_scaled_value_and_scale_factor_algorithm2(input, scaled_value_max, scale_factor_max, ret_value, ret_factor); + } + return err; +} diff --git a/src/deprecated/action_class_gen.cc b/src/deprecated/action_class_gen.cc new file mode 100644 index 000000000..f2d33a390 --- /dev/null +++ b/src/deprecated/action_class_gen.cc @@ -0,0 +1,46 @@ +// #define F(x) if (flg & x) { fprintf(f, "%s=>1,", #x); flg &= !x; } +// static int count = 0; +// static void xref(grib_action* act, FILE* f, const char* path) +// { +// grib_action_gen* a = (grib_action_gen*)act; +// unsigned long flg = act->flags; +// int position = a->len > 0 ? count++ : -1; + +// fprintf(f, "bless({path=>'%s',size => %ld, name=> '%s', position=> %d, ", path, (long)a->len, act->name, position); + +// fprintf(f, " params=> ["); +// grib_arguments_print(act->context, a->params, NULL); +// fprintf(f, "], flags=> {"); + +// F(GRIB_ACCESSOR_FLAG_READ_ONLY); +// F(GRIB_ACCESSOR_FLAG_DUMP); +// F(GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC); +// F(GRIB_ACCESSOR_FLAG_CAN_BE_MISSING); +// F(GRIB_ACCESSOR_FLAG_HIDDEN); +// F(GRIB_ACCESSOR_FLAG_CONSTRAINT); +// F(GRIB_ACCESSOR_FLAG_NO_COPY); +// F(GRIB_ACCESSOR_FLAG_COPY_OK); +// F(GRIB_ACCESSOR_FLAG_FUNCTION); +// F(GRIB_ACCESSOR_FLAG_DATA); +// F(GRIB_ACCESSOR_FLAG_NO_FAIL); +// F(GRIB_ACCESSOR_FLAG_TRANSIENT); +// F(GRIB_ACCESSOR_FLAG_STRING_TYPE); +// F(GRIB_ACCESSOR_FLAG_LONG_TYPE); +// F(GRIB_ACCESSOR_FLAG_DOUBLE_TYPE); + +// /* make sure all flags are processed */ +// if (flg) { +// printf("FLG = %ld\n", (long)flg); +// } +// Assert(flg == 0); + +// fprintf(f, "}, defaults=> ["); +// grib_arguments_print(act->context, act->default_value, NULL); + +// fprintf(f, "]}, 'xref::%s'),\n", act->op); +// } + +static void xref(grib_action* act, FILE* f, const char* path) +{ + Assert(!"xref is disabled"); +} diff --git a/src/box.class b/src/deprecated/box.class similarity index 100% rename from src/box.class rename to src/deprecated/box.class diff --git a/src/build_jgribapi.sh b/src/deprecated/build_jgribapi.sh similarity index 100% rename from src/build_jgribapi.sh rename to src/deprecated/build_jgribapi.sh diff --git a/src/grib_accessor_class_apply_operators.cc b/src/deprecated/grib_accessor_class_apply_operators.cc similarity index 90% rename from src/grib_accessor_class_apply_operators.cc rename to src/deprecated/grib_accessor_class_apply_operators.cc index e03007b42..cfa384644 100644 --- a/src/grib_accessor_class_apply_operators.cc +++ b/src/deprecated/grib_accessor_class_apply_operators.cc @@ -8,7 +8,7 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ - +#include "grib_scaling.h" #include "grib_api_internal.h" /* This is used by make_class.pl @@ -69,7 +69,7 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); +//static void init_class(grib_accessor_class*); typedef struct grib_accessor_apply_operators { @@ -109,32 +109,32 @@ static grib_accessor_class _grib_accessor_class_apply_operators = { "apply_operators", /* name */ sizeof(grib_accessor_apply_operators), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - &unpack_string_array, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + &unpack_string_array, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -143,10 +143,10 @@ static grib_accessor_class _grib_accessor_class_apply_operators = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -156,38 +156,10 @@ static grib_accessor_class _grib_accessor_class_apply_operators = { grib_accessor_class* grib_accessor_class_apply_operators = &_grib_accessor_class_apply_operators; -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} +//static void init_class(grib_accessor_class* c) +//{ +// INIT +//} /* END_CLASS_IMP */ @@ -418,7 +390,7 @@ static int apply_operators(grib_accessor* a) self->types = (char**)grib_context_malloc_clear(c, sizeof(char*) * sizeAO); self->names = (char**)grib_context_malloc_clear(c, sizeof(char*) * sizeAO); self->units = (char**)grib_context_malloc_clear(c, sizeof(char*) * sizeAO); - +Assert(0); j = 0; ielement = 0; iassociatedInfoNumber = 0; @@ -451,7 +423,7 @@ static int apply_operators(grib_accessor* a) case 7: if (Y) { extraScale = Y; - referenceValueFactor = grib_power(Y, 10); + referenceValueFactor = grib_power(Y, 10); extraWidth = ((10 * Y) + 2) / 3; } else { diff --git a/src/deprecated/grib_accessor_class_box.cc b/src/deprecated/grib_accessor_class_box.cc new file mode 100644 index 000000000..3d99fa566 --- /dev/null +++ b/src/deprecated/grib_accessor_class_box.cc @@ -0,0 +1,145 @@ +/* + * (C) Copyright 2005- 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 "grib_api_internal.h" +/* + This is used by make_class.pl + + START_CLASS_DEF + CLASS = accessor + SUPER = grib_accessor_class_gen + IMPLEMENTS = init;dump + MEMBERS=grib_arguments* args + END_CLASS_DEF + + */ + +/* START_CLASS_IMP */ + +/* + +Don't edit anything between START_CLASS_IMP and END_CLASS_IMP +Instead edit values between START_CLASS_DEF and END_CLASS_DEF +or edit "accessor.class" and rerun ./make_class.pl + +*/ + +static void dump(grib_accessor*, grib_dumper*); +static void init(grib_accessor*, const long, grib_arguments*); +//static void init_class(grib_accessor_class*); + +typedef struct grib_accessor_box +{ + grib_accessor att; + /* Members defined in gen */ + /* Members defined in box */ + grib_arguments* args; +} grib_accessor_box; + +extern grib_accessor_class* grib_accessor_class_gen; + +static grib_accessor_class _grib_accessor_class_box = { + &grib_accessor_class_gen, /* super */ + "box", /* name */ + sizeof(grib_accessor_box), /* size */ + 0, /* inited */ + 0, /* init_class */ + &init, /* init */ + 0, /* post_init */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ + 0, /* get length of string */ + 0, /* get number of values */ + 0, /* get number of bytes */ + 0, /* get offset to bytes */ + 0, /* get native type */ + 0, /* get sub_section */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ + 0, /* pack_expression */ + 0, /* notify_change */ + 0, /* update_size */ + 0, /* preferred_size */ + 0, /* resize */ + 0, /* nearest_smaller_value */ + 0, /* next accessor */ + 0, /* compare vs. another accessor */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ + 0, /* unpack a subarray */ + 0, /* clear */ + 0, /* clone accessor */ +}; + + +grib_accessor_class* grib_accessor_class_box = &_grib_accessor_class_box; + + +//static void init_class(grib_accessor_class* c) +//{ +// INIT +//} + +/* END_CLASS_IMP */ + +static void init(grib_accessor* a, const long l, grib_arguments* args) +{ + grib_accessor_box* self = (grib_accessor_box*)a; + self->args = args; +} + +static void dump(grib_accessor* a, grib_dumper* dumper) +{ + /* TODO: pass args */ + grib_dump_label(dumper, a, NULL); +} + +#if 0 +grib_box* grib_box_new(grib_handle* h, int* error) +{ + grib_context_log(grib_context_get_default(), GRIB_LOG_ERROR, + "The grib_box_new function is deprecated and will be removed later."); + *error = GRIB_INTERNAL_ERROR; + return NULL; + + grib_accessor* a = NULL; + grib_accessor_box* na = NULL; + grib_box* n = NULL; + *error = GRIB_NOT_IMPLEMENTED; + a = grib_find_accessor(h, "BOX"); + na = (grib_accessor_box*)a; + + if (!a) + return NULL; + + n = grib_box_factory(h, na->args); + + if (n) + *error = GRIB_SUCCESS; + + return n; +} +#endif diff --git a/src/deprecated/grib_accessor_class_data_g1second_order_general_extended_packing.pack_double.cc b/src/deprecated/grib_accessor_class_data_g1second_order_general_extended_packing.pack_double.cc new file mode 100644 index 000000000..36fcc42a9 --- /dev/null +++ b/src/deprecated/grib_accessor_class_data_g1second_order_general_extended_packing.pack_double.cc @@ -0,0 +1,604 @@ +/* Old implementation. Now superseded. See ECC-441 and ECC-261 */ +static int pack_double_old(grib_accessor* a, const double* val, size_t *len) +{ + grib_accessor_data_g1second_order_general_extended_packing* self = (grib_accessor_data_g1second_order_general_extended_packing*)a; + int ret=0; + int grib2=0; + long bits_per_value,orderOfSPD,binary_scale_factor; + long numberOfValues; + double max,min; + double decimal,divisor; + double reference_value; + size_t size,sizebits; + long half_byte; + long* X; + long* Xp; + long i; + long incrementGroupLengthA,groupWidthA,prevGroupLength,offsetD,remainingValuesB,groupLengthB; + long maxB,minB,maxAB,minAB; + long offsetBeforeData,offsetSection4; + unsigned char* buffer = NULL; + long maxWidth,maxLength,widthOfWidths,NL,widthOfLengths,N1,N2,extraValues,codedNumberOfGroups,numberOfSecondOrderPackedValues; + long pos; + + long numberOfGroups; + long groupLengthC,groupLengthA,remainingValues,count; + long maxA=0,minA=0; + long maxC,minC,offsetC; + long maxAC,minAC; + long range,bias=0,maxSPD; + long firstOrderValuesMax,offset,groupLength,j,groupWidth,firstOrderValue,lengthOfSecondOrderValues; + long *groupLengths,*groupWidths,*firstOrderValues; + /* long groupLengths[MAX_NUMBER_OF_GROUPS],groupWidths[MAX_NUMBER_OF_GROUPS],firstOrderValues[MAX_NUMBER_OF_GROUPS]; */ + + /* TODO put these parameters in def file */ + long startGroupLength=15; + long incrementGroupLength=3; + long minGroupLength=3; + long widthOfSPD=0,widthOfBias=0; + long *offsets; + long widthOfFirstOrderValues; + int computeGroupA=1; + long dataHeadersLength,widthsLength,lengthsLength,firstOrderValuesLength; + long decimal_scale_factor; + grib_handle* handle = grib_handle_of_accessor(a); + + self->dirty=1; + + numberOfValues=*len; + + max = val[0]; + min = max; + for(i=1;i< numberOfValues;i++) { + if (val[i] > max ) max = val[i]; + else if (val[i] < min ) min = val[i]; + } + + /* For constant fields set decimal scale factor to 0 (See GRIB-165) */ + if (min==max) { + grib_set_long_internal(handle,self->decimal_scale_factor, 0); + } + + if((ret = grib_get_long_internal(handle,self->decimal_scale_factor, &decimal_scale_factor)) + != GRIB_SUCCESS) + return ret; + decimal = codes_power(decimal_scale_factor,10); + + max*=decimal; + min*=decimal; + + if (grib_get_nearest_smaller_value(handle,self->reference_value,min,&reference_value) + !=GRIB_SUCCESS) { + grib_context_log(a->context,GRIB_LOG_ERROR, + "unable to find nearest_smaller_value of %g for %s",min,self->reference_value); + return GRIB_INTERNAL_ERROR; + } + if((ret = grib_set_double_internal(handle,self->reference_value, reference_value)) != + GRIB_SUCCESS) + return ret; + + if((ret=grib_get_long_internal(handle,self->bits_per_value,&bits_per_value)) != GRIB_SUCCESS) + return ret; + + if((ret=grib_get_long_internal(handle,self->offsetdata,&offsetBeforeData)) != GRIB_SUCCESS) + return ret; + + if((ret=grib_get_long_internal(handle,self->offsetsection,&offsetSection4)) != GRIB_SUCCESS) + return ret; + + if((ret=grib_get_long_internal(handle,self->orderOfSPD,&orderOfSPD)) != GRIB_SUCCESS) + return ret; + + binary_scale_factor = grib_get_binary_scale_fact(max,reference_value,bits_per_value,&ret); + if (ret != GRIB_SUCCESS) return ret; + + if((ret = grib_set_long_internal(handle,self->binary_scale_factor, binary_scale_factor)) != + GRIB_SUCCESS) + return ret; + + divisor = codes_power(-binary_scale_factor,2); + X=(long*)grib_context_malloc_clear(a->context,sizeof(long)*numberOfValues); + for(i=0;i< numberOfValues;i++){ + X[i] = (((val[i]*decimal)-reference_value)*divisor)+0.5; + } + + groupLengths=(long*)grib_context_malloc_clear(a->context,sizeof(long)*numberOfValues); + groupWidths=(long*)grib_context_malloc_clear(a->context,sizeof(long)*numberOfValues); + firstOrderValues=(long*)grib_context_malloc_clear(a->context,sizeof(long)*numberOfValues); + + /* spatial differencing */ + switch (orderOfSPD) { + case 1: + for (i=numberOfValues-1;i>0;i--) { + X[i]-=X[i-1]; + } + break; + case 2: + for (i=numberOfValues-1;i>1;i--) { + X[i]-=2*X[i-1]-X[i-2]; + } + break; + case 3: + for (i=numberOfValues-1;i>2;i--) { + X[i]-=3*(X[i-1]-X[i-2])+X[i-3]; + } + break; + } + if (orderOfSPD) { + Assert(orderOfSPD >=0 && orderOfSPD < numberOfValues); + bias=X[orderOfSPD]; + for (i=orderOfSPD+1;i X[i] ) bias=X[i]; + } + for (i=orderOfSPD;iX[count+i]) minA=X[count+i]; + } + } + groupWidthA=number_of_bits(handle, maxA-minA); + range=(long)codes_power(groupWidthA,2)-1; + + offsetC=count+groupLengthA; + if (offsetC==numberOfValues) { + /* no more values close group A and end loop */ + groupLengths[numberOfGroups]=groupLengthA; + groupWidths[numberOfGroups]=groupWidthA; + /* firstOrderValues[numberOfGroups]=minA; */ + /* to optimise the width of first order variable */ + firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; + numberOfGroups++; + break; + } + + /* group C created with length=incrementGroupLength (fixed) + or remaining values if close to end + */ + groupLengthC=incrementGroupLength; + if ( groupLengthC + offsetC > numberOfValues - startGroupLength/2) { + groupLengthC=numberOfValues-offsetC; + } + maxC=X[offsetC]; + minC=X[offsetC]; + for (i=1;iX[offsetC+i]) minC=X[offsetC+i]; + } + + maxAC= maxA > maxC ? maxA : maxC; + minAC= minA < minC ? minA : minC; + + /* check if A+C can be represented with the same width as A*/ + if (maxAC-minAC > range) { + /* A could not be expanded adding C. Check if A could be expanded taking + some elements from preceding group. The condition is always that width of + A doesn't increase. + */ + if (numberOfGroups>0 && groupWidths[numberOfGroups-1] > groupWidthA ) { + prevGroupLength=groupLengths[numberOfGroups-1]-incrementGroupLength; + offsetC=count-incrementGroupLength; + /* preceding group length cannot be less than a minimum value */ + while (prevGroupLength >= minGroupLength) { + maxAC=maxA; + minAC=minA; + for (i=0;iX[offsetC+i]) minAC=X[offsetC+i]; + } + + /* no more elements can be transfered, exit loop*/ + if (maxAC-minAC > range) break; + + maxA=maxAC; + minA=minAC; + groupLengths[numberOfGroups-1]-=incrementGroupLength; + groupLengthA+=incrementGroupLength; + count-=incrementGroupLength; + remainingValues+=incrementGroupLength; + + offsetC-=incrementGroupLength; + prevGroupLength-=incrementGroupLength; + } + } + /* close group A*/ + groupLengths[numberOfGroups]=groupLengthA; + groupWidths[numberOfGroups]=groupWidthA; + /* firstOrderValues[numberOfGroups]=minA; */ + /* to optimise the width of first order variable */ + firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; + count+=groupLengthA; + remainingValues-=groupLengthA; + numberOfGroups++; + /* incrementGroupLengthA is reset to the fixed startGroupLength as it + could have been changed after the A+C or A+B ok condition. + */ + incrementGroupLengthA=startGroupLength; + computeGroupA=1; +#if 0 + if (numberOfGroups==MAX_NUMBER_OF_GROUPS) { + groupLengthA= remainingValues ; + maxA=X[count]; + minA=X[count]; + for (i=1;iX[count+i]) minA=X[count+i]; + } + groupWidthA=number_of_bits(maxA-minA); + range=(long)codes_power(groupWidthA,2)-1; + groupLengths[numberOfGroups]=groupLengthA; + groupWidths[numberOfGroups]=groupWidthA; + firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; + break; + } +#endif + continue; + } + + /* A+C could be coded with the same width as A*/ + offsetD=offsetC+groupLengthC; + if (offsetD==numberOfValues) { + groupLengths[numberOfGroups]=groupLengthA+groupLengthC; + groupWidths[numberOfGroups]=groupWidthA; + + /* range of AC is the same as A*/ + /* firstOrderValues[numberOfGroups]=minAC; */ + /* to optimise the width of first order variable */ + firstOrderValues[numberOfGroups] = maxAC-range > 0 ? maxAC-range : 0; + numberOfGroups++; + break; + } + + /* group B is created with length startGroupLength, starting at the + same offset as C. + */ + remainingValuesB=numberOfValues-offsetC; + groupLengthB= startGroupLength < remainingValuesB ? startGroupLength : remainingValuesB ; + maxB=maxC; + minB=minC; + for (i=groupLengthC;iX[offsetC+i]) minB=X[offsetC+i]; + } + + /* check if group B can be coded with a smaller width than A */ + if (maxB-minB <= range/2 && range>0 ) { + + /* TODO Add code to try if A can be expanded taking some elements + from the left (preceding) group. + A possible variation is to do this left check (and the previous one) + in the final loop when checking that the width of each group. + */ + + /* close group A and continue loop*/ + groupLengths[numberOfGroups]=groupLengthA; + groupWidths[numberOfGroups]=groupWidthA; + /* firstOrderValues[numberOfGroups]=minA; */ + /* to optimise the width of first order variable */ + firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; + count+=groupLengthA; + remainingValues-=groupLengthA; + numberOfGroups++; +#if 0 + if (numberOfGroups==MAX_NUMBER_OF_GROUPS) { + groupLengthA= remainingValues ; + maxA=X[count]; + minA=X[count]; + for (i=1;iX[count+i]) minA=X[count+i]; + } + groupWidthA=number_of_bits(maxA-minA); + range=(long)codes_power(groupWidthA,2)-1; + groupLengths[numberOfGroups]=groupLengthA; + groupWidths[numberOfGroups]=groupWidthA; + firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; + break; + } +#endif + incrementGroupLengthA=startGroupLength; + computeGroupA=1; + continue; + } + + /* check if A+B can be coded with same with as A */ + maxAB= maxA > maxB ? maxA : maxB; + minAB= minA < minB ? minA : minB; + if (maxAB-minAB <= range) { + /* A+B can be merged. The increment used at the beginning of the loop to + build group C is increased to the size of group B + */ + incrementGroupLengthA+=groupLengthB; + maxA=maxAB; + minA=minAB; + computeGroupA=0; + continue; + } + + /* A+B cannot be merged, A+C can be merged*/ + incrementGroupLengthA+=groupLengthC; + computeGroupA=1; + + } /* end of the while*/ + + /* computing bitsPerValue as the number of bits needed to represent + the firstOrderValues. + */ + max=firstOrderValues[0]; + min=firstOrderValues[0]; + for (i=1;ifirstOrderValues[i]) min=firstOrderValues[i]; + } + widthOfFirstOrderValues=number_of_bits(handle, max-min); + firstOrderValuesMax=(long)codes_power(widthOfFirstOrderValues,2)-1; + + if (numberOfGroups>2) { + /* loop through all the groups except the last in reverse order to + check if each group width is still appropriate for the group. + Focus on groups which have been shrank as left groups of an A group taking + some of their elements. + */ + offsets=(long*)grib_context_malloc_clear(a->context,sizeof(long)*numberOfGroups); + offsets[0]=orderOfSPD; + for (i=1;i=0;i--) { + offset=offsets[i]; + groupLength=groupLengths[i]; + + if (groupLength >= startGroupLength) continue; + + max=X[offset]; + min=X[offset]; + for (j=1;jX[offset+j]) min=X[offset+j]; + } + groupWidth=number_of_bits(handle, max-min); + range=(long)codes_power(groupWidth,2)-1; + + /* width of first order values has to be unchanged.*/ + for (j=groupWidth;jrange ? max-range : 0; + if (firstOrderValue <= firstOrderValuesMax ) { + groupWidths[i]=j; + firstOrderValues[i]=firstOrderValue; + break; + } + } + + offsetC=offset; + /* group width of the current group (i) can have been reduced + and it is worth to try to expand the group to get some elements + from the left group if it has bigger width. + */ + if (i>0 && (groupWidths[i-1] > groupWidths[i]) ) { + prevGroupLength=groupLengths[i-1]-incrementGroupLength; + offsetC-=incrementGroupLength; + while (prevGroupLength >= minGroupLength) { + for (j=0;jX[offsetC+j]) min=X[offsetC+j]; + } + + /* width of first order values has to be unchanged*/ + firstOrderValue=max>range ? max-range : 0; + if (max-min > range || firstOrderValue > firstOrderValuesMax ) break; + + groupLengths[i-1]-=incrementGroupLength; + groupLengths[i]+=incrementGroupLength; + firstOrderValues[i]=firstOrderValue; + + offsetC-=incrementGroupLength; + prevGroupLength-=incrementGroupLength; + } + } + + } + grib_context_free(a->context,offsets); + } + + maxWidth=groupWidths[0]; + maxLength=groupLengths[0]; + for (i=1;iparent->h->context, GRIB_LOG_ERROR, "Cannot compute parameters for second order packing."); + return GRIB_ENCODING_ERROR; + } + widthOfWidths=number_of_bits(handle, maxWidth); + widthOfLengths=number_of_bits(handle, maxLength); + + lengthOfSecondOrderValues=0; + for ( i=0; icontext->no_big_group_split) { + grib_split_long_groups(handle, a->context,&numberOfGroups,&lengthOfSecondOrderValues, + groupLengths,&widthOfLengths,groupWidths,widthOfWidths, + firstOrderValues,widthOfFirstOrderValues); + } + + Xp=X+orderOfSPD; + for ( i=0; iwidthOfSPD, widthOfSPD)) + != GRIB_SUCCESS) + return ret; + } + + /* end writing SPD */ + if((ret = grib_set_long_internal(handle,self->widthOfFirstOrderValues, widthOfFirstOrderValues)) + != GRIB_SUCCESS) + return ret; + + dataHeadersLength=25; + if (orderOfSPD) dataHeadersLength+=1+((orderOfSPD+1)*widthOfSPD+7)/8; + widthsLength=(widthOfWidths*numberOfGroups+7)/8; + lengthsLength=(widthOfLengths*numberOfGroups+7)/8; + firstOrderValuesLength=(widthOfFirstOrderValues*numberOfGroups+7)/8; + + NL=widthsLength+dataHeadersLength+1; + N1=NL+lengthsLength; + N2=N1+firstOrderValuesLength; + + NL= NL > 65535 ? 65535 : NL; + N2= N2 > 65535 ? 65535 : N2; + N1= N1 > 65535 ? 65535 : N1; + + grib_set_long(handle,self->NL, NL); + grib_set_long(handle,self->N1, N1); + grib_set_long(handle,self->N2, N2); + + if (numberOfGroups > 65535 ) { + extraValues=numberOfGroups/65536; + codedNumberOfGroups=numberOfGroups%65536; + } else { + extraValues=0; + codedNumberOfGroups=numberOfGroups; + } + + /* if no extraValues key present it is a GRIB2*/ + grib2=0; + if((ret = grib_set_long(handle,self->extraValues, extraValues)) != GRIB_SUCCESS) { + codedNumberOfGroups=numberOfGroups; + grib2=1; + } + + if((ret = grib_set_long_internal(handle,self->codedNumberOfGroups, codedNumberOfGroups)) != GRIB_SUCCESS) + return ret; + + numberOfSecondOrderPackedValues=numberOfValues-orderOfSPD; + if (!grib2 && numberOfSecondOrderPackedValues > 65535 ) + numberOfSecondOrderPackedValues= 65535; + + if((ret = grib_set_long_internal(handle,self->numberOfSecondOrderPackedValues, numberOfSecondOrderPackedValues)) + != GRIB_SUCCESS) + return ret; + + if (grib2) { + if((ret = grib_set_long_internal(handle,self->bits_per_value, bits_per_value)) != GRIB_SUCCESS) + return ret; + } else { + if((ret = grib_set_long_internal(handle,self->bits_per_value, 0)) != GRIB_SUCCESS) + return ret; + } + + if((ret = grib_set_long_internal(handle,self->widthOfWidths, widthOfWidths)) != GRIB_SUCCESS) + return ret; + + if((ret = grib_set_long_internal(handle,self->widthOfLengths, widthOfLengths)) != GRIB_SUCCESS) + return ret; + + lengthOfSecondOrderValues=0; + for ( i=0; ihalf_byte, half_byte)) != GRIB_SUCCESS) + return ret; + + buffer=(unsigned char*)grib_context_malloc_clear(a->context,size); + + pos=0; + if (orderOfSPD) { + long SPD[4]={0,}; + size_t nSPD=orderOfSPD+1; + Assert(orderOfSPD<=3); + for (i=0;iSPD,SPD,nSPD); + if(ret) return ret; + } + + ret=grib_set_long_array_internal(handle,self->groupWidths,groupWidths,(size_t)numberOfGroups); + if(ret) return ret; + + ret=grib_set_long_array_internal(handle,self->groupLengths,groupLengths,(size_t)numberOfGroups); + if(ret) return ret; + + ret=grib_set_long_array_internal(handle,self->firstOrderValues,firstOrderValues,(size_t)numberOfGroups); + if(ret) return ret; + + Xp=X+orderOfSPD; + pos=0; + count=0; + for (i=0;i0) { + for (j=0;jparent->h,self->number_of_values, *len); + if(ret) return ret; + + grib_buffer_replace(a, buffer, size,1,1); + + grib_context_free(a->context,buffer); + grib_context_free(a->context,X); + grib_context_free(a->context,groupLengths); + grib_context_free(a->context,groupWidths); + grib_context_free(a->context,firstOrderValues); + + return ret; +} diff --git a/src/deprecated/grib_accessor_class_g2end_step.unpack_long.cc b/src/deprecated/grib_accessor_class_g2end_step.unpack_long.cc new file mode 100644 index 000000000..3bbd6916d --- /dev/null +++ b/src/deprecated/grib_accessor_class_g2end_step.unpack_long.cc @@ -0,0 +1,73 @@ + +static int unpack_long(grib_accessor* a, long* val, size_t *len) +{ + grib_accessor_g2end_step* self = (grib_accessor_g2end_step*)a; + int err = 0; + long start_step; + long unit; + long coded_unit; + long coded_time_range, typeOfTimeIncrement, numberOfTimeRange; + long coded_time_range_sec=0; + int factor; + long u2sf,u2sf_step_unit; + int add_time_range = 1; /* whether we add lengthOfTimeRange */ + + grib_handle* h=grib_handle_of_accessor(a); + + if((err = grib_get_long_internal(h,self->start_step,&start_step))) return err; + + /*point in time */ + if (self->year == NULL) { + *val=start_step; + return 0; + } + + if((err = grib_get_long_internal(h,self->unit,&unit))) return err; + + if((err = grib_get_long_internal(h,self->coded_unit,&coded_unit))) return err; + if((err = grib_get_long_internal(h,self->coded_time_range, &coded_time_range))) return err; + if((err = grib_get_long_internal(h,self->typeOfTimeIncrement, &typeOfTimeIncrement))) return err; + if((err = grib_get_long_internal(h,self->numberOfTimeRange, &numberOfTimeRange))) return err; + + Assert(numberOfTimeRange == 1 || numberOfTimeRange == 2); + + err = convert_time_range(h, unit, coded_unit, &coded_time_range); + if (err != GRIB_SUCCESS) return err; + +#if 0 + if (coded_unit!=unit) { + coded_time_range_sec=coded_time_range*u2s2[coded_unit]; + if (coded_time_range_sec<0) { + factor=60; + if (u2s2[coded_unit] % factor) return GRIB_DECODING_ERROR; + if (u2s[unit] % factor) return GRIB_DECODING_ERROR; + u2sf=u2s2[coded_unit]/factor; + coded_time_range_sec=coded_time_range*u2sf; + u2sf_step_unit=u2s[unit]/factor; + } else { + u2sf_step_unit=u2s[unit]; + } + if (coded_time_range_sec % u2sf_step_unit!=0) { + grib_context_log(h->context,GRIB_LOG_ERROR,"unable to convert endStep in stepUnits"); + return GRIB_WRONG_STEP_UNIT; + } + coded_time_range = coded_time_range_sec / u2sf_step_unit; + } +#endif + if (typeOfTimeIncrement == 1) { + /* See GRIB-488 */ + /* Note: For this case, lengthOfTimeRange is not related to step and should not be used to calculate step */ + add_time_range = 0; + if (is_special_expver(h)) { + add_time_range = 1; + } + } + if (add_time_range) { + *val = start_step + coded_time_range; + } else { + *val = start_step; + } + + return GRIB_SUCCESS; +} + diff --git a/src/deprecated/grib_accessor_class_gds_not_present_bitmap.cc b/src/deprecated/grib_accessor_class_gds_not_present_bitmap.cc new file mode 100644 index 000000000..068c31138 --- /dev/null +++ b/src/deprecated/grib_accessor_class_gds_not_present_bitmap.cc @@ -0,0 +1,273 @@ +/* + * (C) Copyright 2005- 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. + */ + +/****************************** + * Enrico Fucile + *****************************/ + +#include "grib_api_internal.h" + +/* + This is used by make_class.pl + + START_CLASS_DEF + CLASS = accessor + SUPER = grib_accessor_class_gen + IMPLEMENTS = init + IMPLEMENTS = unpack_double + IMPLEMENTS = pack_double + IMPLEMENTS = value_count + MEMBERS=const char* missing_value + MEMBERS=const char* number_of_values + MEMBERS=const char* number_of_points + MEMBERS=const char* latitude_of_first_point + MEMBERS=const char* ni + + END_CLASS_DEF + */ + +/* START_CLASS_IMP */ + +/* + +Don't edit anything between START_CLASS_IMP and END_CLASS_IMP +Instead edit values between START_CLASS_DEF and END_CLASS_DEF +or edit "accessor.class" and rerun ./make_class.pl + +*/ + +static int pack_double(grib_accessor*, const double* val, size_t* len); +static int unpack_double(grib_accessor*, double* val, size_t* len); +static int value_count(grib_accessor*, long*); +static void init(grib_accessor*, const long, grib_arguments*); +//static void init_class(grib_accessor_class*); + +typedef struct grib_accessor_gds_not_present_bitmap +{ + grib_accessor att; + /* Members defined in gen */ + /* Members defined in gds_not_present_bitmap */ + const char* missing_value; + const char* number_of_values; + const char* number_of_points; + const char* latitude_of_first_point; + const char* ni; +} grib_accessor_gds_not_present_bitmap; + +extern grib_accessor_class* grib_accessor_class_gen; + +static grib_accessor_class _grib_accessor_class_gds_not_present_bitmap = { + &grib_accessor_class_gen, /* super */ + "gds_not_present_bitmap", /* name */ + sizeof(grib_accessor_gds_not_present_bitmap), /* size */ + 0, /* inited */ + 0, /* init_class */ + &init, /* init */ + 0, /* post_init */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ + 0, /* get length of string */ + &value_count, /* get number of values */ + 0, /* get number of bytes */ + 0, /* get offset to bytes */ + 0, /* get native type */ + 0, /* get sub_section */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ + 0, /* pack_expression */ + 0, /* notify_change */ + 0, /* update_size */ + 0, /* preferred_size */ + 0, /* resize */ + 0, /* nearest_smaller_value */ + 0, /* next accessor */ + 0, /* compare vs. another accessor */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ + 0, /* unpack a subarray */ + 0, /* clear */ + 0, /* clone accessor */ +}; + + +grib_accessor_class* grib_accessor_class_gds_not_present_bitmap = &_grib_accessor_class_gds_not_present_bitmap; + + +//static void init_class(grib_accessor_class* c) +//{ +// INIT +//} + +/* END_CLASS_IMP */ + +static void init(grib_accessor* a, const long v, grib_arguments* args) +{ + int n = 0; + grib_accessor_gds_not_present_bitmap* self = (grib_accessor_gds_not_present_bitmap*)a; + + self->missing_value = grib_arguments_get_name(grib_handle_of_accessor(a), args, n++); + self->number_of_values = grib_arguments_get_name(grib_handle_of_accessor(a), args, n++); + self->number_of_points = grib_arguments_get_name(grib_handle_of_accessor(a), args, n++); + self->latitude_of_first_point = grib_arguments_get_name(grib_handle_of_accessor(a), args, n++); + self->ni = grib_arguments_get_name(grib_handle_of_accessor(a), args, n++); + a->length = 0; +} + +static int value_count(grib_accessor* a, long* number_of_points) +{ + grib_accessor_gds_not_present_bitmap* self = (grib_accessor_gds_not_present_bitmap*)a; + *number_of_points = 0; + return grib_get_long_internal(grib_handle_of_accessor(a), self->number_of_points, number_of_points); +} + +static int unpack_double(grib_accessor* a, double* val, size_t* len) +{ + grib_accessor_gds_not_present_bitmap* self = (grib_accessor_gds_not_present_bitmap*)a; + + long number_of_points = 0, number_of_values = 0, ni = 0; + long latitude_of_first_point = 0; + size_t i = 0; + size_t n_vals = 0; + long nn = 0; + long missing_value; + + int err = 0; + double* coded_vals = NULL; + err = grib_value_count(a, &nn); + n_vals = nn; + if (err) + return err; + + if ((err = grib_get_long(grib_handle_of_accessor(a), self->number_of_points, &number_of_points)) != GRIB_SUCCESS) + return err; + + if ((err = grib_get_long(grib_handle_of_accessor(a), self->number_of_values, &number_of_values)) != GRIB_SUCCESS) + return err; + + if ((err = grib_get_long(grib_handle_of_accessor(a), self->latitude_of_first_point, &latitude_of_first_point)) != GRIB_SUCCESS) + return err; + + if ((err = grib_get_long(grib_handle_of_accessor(a), self->missing_value, &missing_value)) != GRIB_SUCCESS) + return err; + + if ((err = grib_get_long(grib_handle_of_accessor(a), self->ni, &ni)) != GRIB_SUCCESS) + return err; + + if (*len < number_of_points) { + *len = n_vals; + return GRIB_ARRAY_TOO_SMALL; + } + + if (number_of_values > 0) { + coded_vals = (double*)grib_context_malloc(a->context, number_of_values * sizeof(double)); + + if (coded_vals == NULL) + return GRIB_OUT_OF_MEMORY; + } + + if (latitude_of_first_point == 0) { + for (i = 0; i < number_of_values; i++) + val[i] = 1; + for (i = number_of_values; i < number_of_points; i++) + val[i] = 0; + } + else { + for (i = 0; i < ni - 1; i++) + val[i] = 0; + for (i = ni - 1; i < number_of_points; i++) + val[i] = 1; + } + + *len = number_of_points; + + grib_context_free(a->context, coded_vals); + return err; +} + +#if 0 + +static void grib_set_bit_on( unsigned char* p, long *bitp){ + unsigned char o = 1; + p += (*bitp >> 3); + o <<= 7-((*bitp)%8); + *p |= o; + (*bitp)+=1; +} +static int pack_double(grib_accessor* a, const double* val,size_t *len) +{ + grib_accessor_gds_not_present_bitmap* self = (grib_accessor_gds_not_present_bitmap*)a; + + size_t tlen; + + unsigned char* buf = NULL; + long i; + int err = 0; + long pos = 0; + long bmaplen = 0; + const int bit_padding = 16; + double miss_values = 0; + tlen = ((*len+bit_padding-1)/bit_padding*bit_padding)/8; + + if((err = grib_get_double_internal(grib_handle_of_accessor(a), self->missing_value, &miss_values)) != GRIB_SUCCESS) + { + grib_context_log(a->context, GRIB_LOG_ERROR, "grib_accessor_class_bitmap : pack_double : Cannot unpack %s err=%d ",self->missing_value,err); + return err; + } + + buf = grib_context_malloc_clear(a->context,tlen); + if(!buf) return GRIB_OUT_OF_MEMORY; + pos=0; + for(i=0;i<*len;i++) + { + if (val[i] == miss_values) + pos++; + else{ + bmaplen++; + grib_set_bit_on(buf, &pos); + } + } + + if((err = grib_set_long_internal(grib_handle_of_accessor(a), self->unusedBits,tlen*8 - *len )) != GRIB_SUCCESS) { + grib_context_log(a->context, GRIB_LOG_ERROR, "grib_accessor_class_bitmap : pack_double : Cannot pack %s err=%d ",self->unusedBits,err); + grib_context_free(a->context,buf); + return err; + } + + + grib_buffer_replace(a, buf, tlen,1,1); + + grib_context_free(a->context,buf); + + return GRIB_SUCCESS; +} + +#else + +static int pack_double(grib_accessor* a, const double* val, size_t* len) +{ + return GRIB_NOT_IMPLEMENTED; +} + +#endif diff --git a/src/deprecated/grib_accessor_class_mars_param.cc b/src/deprecated/grib_accessor_class_mars_param.cc new file mode 100644 index 000000000..636993f49 --- /dev/null +++ b/src/deprecated/grib_accessor_class_mars_param.cc @@ -0,0 +1,192 @@ +/* + * (C) Copyright 2005- 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 "grib_api_internal.h" +/* + This is used by make_class.pl + + START_CLASS_DEF + CLASS = accessor + SUPER = grib_accessor_class_ascii + IMPLEMENTS = pack_string;unpack_string + IMPLEMENTS = init; string_length + MEMBERS= const char* paramId + MEMBERS= const char* table + MEMBERS= const char* param + END_CLASS_DEF + + */ + +/* START_CLASS_IMP */ + +/* + +Don't edit anything between START_CLASS_IMP and END_CLASS_IMP +Instead edit values between START_CLASS_DEF and END_CLASS_DEF +or edit "accessor.class" and rerun ./make_class.pl + +*/ + +static int pack_string(grib_accessor*, const char*, size_t* len); +static int unpack_string(grib_accessor*, char*, size_t* len); +static size_t string_length(grib_accessor*); +static void init(grib_accessor*, const long, grib_arguments*); +//static void init_class(grib_accessor_class*); + +typedef struct grib_accessor_mars_param +{ + grib_accessor att; + /* Members defined in gen */ + /* Members defined in ascii */ + /* Members defined in mars_param */ + const char* paramId; + const char* table; + const char* param; +} grib_accessor_mars_param; + +extern grib_accessor_class* grib_accessor_class_ascii; + +static grib_accessor_class _grib_accessor_class_mars_param = { + &grib_accessor_class_ascii, /* super */ + "mars_param", /* name */ + sizeof(grib_accessor_mars_param), /* size */ + 0, /* inited */ + 0, /* init_class */ + &init, /* init */ + 0, /* post_init */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ + &string_length, /* get length of string */ + 0, /* get number of values */ + 0, /* get number of bytes */ + 0, /* get offset to bytes */ + 0, /* get native type */ + 0, /* get sub_section */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ + 0, /* pack_expression */ + 0, /* notify_change */ + 0, /* update_size */ + 0, /* preferred_size */ + 0, /* resize */ + 0, /* nearest_smaller_value */ + 0, /* next accessor */ + 0, /* compare vs. another accessor */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ + 0, /* unpack a subarray */ + 0, /* clear */ + 0, /* clone accessor */ +}; + + +grib_accessor_class* grib_accessor_class_mars_param = &_grib_accessor_class_mars_param; + + +//static void init_class(grib_accessor_class* c) +//{ +// INIT +//} + +/* END_CLASS_IMP */ + +static void init(grib_accessor* a, const long l, grib_arguments* c) +{ + int n = 0; + grib_accessor_mars_param* self = (grib_accessor_mars_param*)a; + self->paramId = grib_arguments_get_name(grib_handle_of_accessor(a), c, n++); + self->table = grib_arguments_get_name(grib_handle_of_accessor(a), c, n++); + self->param = grib_arguments_get_name(grib_handle_of_accessor(a), c, n++); +} + +static int pack_string(grib_accessor* a, const char* val, size_t* len) +{ +#if 1 + return GRIB_NOT_IMPLEMENTED; +#else + grib_accessor_mars_param* self = (grib_accessor_mars_param*)a; + long paramId = 0; + long param = 0; + long table = 0; + char* p = (char*)val; + char* q = NULL; + + param = strtol(val, &p, 10); + if (*p != 0) + table = strtol(++p, &q, 10); + else + table = 128; + + paramId = table * 1000 + param; + + return grib_set_long_internal(grib_handle_of_accessor(a), self->paramId, paramId); +#endif +} + +static int unpack_string(grib_accessor* a, char* val, size_t* len) +{ + grib_accessor_mars_param* self = (grib_accessor_mars_param*)a; + long param = 0; + long table = 0; + int ret = 0; + +#if 1 + if (self->table != NULL && (ret = grib_get_long_internal(grib_handle_of_accessor(a), self->table, &table)) != GRIB_SUCCESS) + return ret; + if (self->param != NULL && (ret = grib_get_long_internal(grib_handle_of_accessor(a), self->param, ¶m)) != GRIB_SUCCESS) + return ret; +#else + { + long paramId = 0; + grib_get_long(grib_handle_of_accessor(a), self->paramId, ¶mId); + + if (paramId == 0 || (paramId < 4000 && paramId > 1000)) { + if (self->table != NULL && (ret = grib_get_long_internal(grib_handle_of_accessor(a), self->table, &table)) != GRIB_SUCCESS) + return ret; + if (self->param != NULL && (ret = grib_get_long_internal(grib_handle_of_accessor(a), self->param, ¶m)) != GRIB_SUCCESS) + return ret; + } + else if (paramId < 1000) { + table = 128; + param = paramId; + } + else { + table = paramId / 1000; + param = paramId - table * 1000; + } + } +#endif + + /*if (table==200) table=128;*/ + snprintf(val, 32, "%ld.%ld", param, table); + *len = strlen(val) + 1; + + return GRIB_SUCCESS; +} + +static size_t string_length(grib_accessor* a) +{ + return 7; +} diff --git a/src/deprecated/grib_accessor_class_number_of_points_gaussian.cc b/src/deprecated/grib_accessor_class_number_of_points_gaussian.cc new file mode 100644 index 000000000..0f586926b --- /dev/null +++ b/src/deprecated/grib_accessor_class_number_of_points_gaussian.cc @@ -0,0 +1,67 @@ +#if 0 +/*Legacy mode*/ +static long num_points_reduced_gauss_old(grib_handle* h, long nj, long pl[], + long max_pl, double lats[], + double angular_precision, + double lat_first, double lat_last, + double lon_first, double lon_last) +{ + long result=0; + int is_global=0; + size_t plsize=0; + long ilon_first=0,ilon_last=0; + double lon_first_row=0,lon_last_row=0; + float d = 0; + is_global=is_gaussian_global(lat_first,lat_last,lon_first,lon_last,max_pl,lats,angular_precision); + d=fabs(lats[0]-lats[1]); + if ( !is_global ) { + long j = 0; + /*sub area*/ + (void)d; +#if EFDEBUG + printf("-------- subarea fabs(lat_first-lats[0])=%g d=%g\n",fabs(lat_first-lats[0]),d); + printf("-------- subarea fabs(lat_last+lats[0])=%g d=%g\n",fabs(lat_last+lats[0]),d); + printf("-------- subarea lon_last=%g order=%ld 360.0-90.0/order=%g\n", + lon_last,order,360.0-90.0/order); + printf("-------- subarea lon_first=%g fabs(lon_last -( 360.0-90.0/order))=%g 90.0/order=%g\n", + lon_first,fabs(lon_last - (360.0-90.0/order)),90.0/order); +#endif + for (j=0;j +/* + This is used by make_class.pl + + START_CLASS_DEF + CLASS = dumper + IMPLEMENTS = dump_long;dump_bits + IMPLEMENTS = dump_double;dump_string + IMPLEMENTS = dump_bytes;dump_values + IMPLEMENTS = dump_label;dump_section + IMPLEMENTS = init;destroy + MEMBERS = long section_offset + MEMBERS = long begin + MEMBERS = long theEnd + END_CLASS_DEF + + */ + + +/* START_CLASS_IMP */ + +/* + +Don't edit anything between START_CLASS_IMP and END_CLASS_IMP +Instead edit values between START_CLASS_DEF and END_CLASS_DEF +or edit "dumper.class" and rerun ./make_class.pl + +*/ + +static void init_class (grib_dumper_class*); +static int init (grib_dumper* d); +static int destroy (grib_dumper*); +static void dump_long (grib_dumper* d, grib_accessor* a,const char* comment); +static void dump_bits (grib_dumper* d, grib_accessor* a,const char* comment); +static void dump_double (grib_dumper* d, grib_accessor* a,const char* comment); +static void dump_string (grib_dumper* d, grib_accessor* a,const char* comment); +static void dump_bytes (grib_dumper* d, grib_accessor* a,const char* comment); +static void dump_values (grib_dumper* d, grib_accessor* a); +static void dump_label (grib_dumper* d, grib_accessor* a,const char* comment); +static void dump_section (grib_dumper* d, grib_accessor* a,grib_block_of_accessors* block); + +typedef struct grib_dumper_keys { + grib_dumper dumper; + /* Members defined in keys */ + long section_offset; + long begin; + long theEnd; +} grib_dumper_keys; + + +static grib_dumper_class _grib_dumper_class_keys = { + 0, /* super */ + "keys", /* name */ + sizeof(grib_dumper_keys), /* size */ + 0, /* inited */ + &init_class, /* init_class */ + &init, /* init */ + &destroy, /* free mem */ + &dump_long, /* dump long */ + &dump_double, /* dump double */ + &dump_string, /* dump string */ + 0, /* dump string array */ + &dump_label, /* dump labels */ + &dump_bytes, /* dump bytes */ + &dump_bits, /* dump bits */ + &dump_section, /* dump section */ + &dump_values, /* dump values */ + 0, /* header */ + 0, /* footer */ +}; + +grib_dumper_class* grib_dumper_class_keys = &_grib_dumper_class_keys; + +/* END_CLASS_IMP */ + +static void init_class(grib_dumper_class* c) {} + +static int init(grib_dumper* d) +{ + grib_dumper_keys* self = (grib_dumper_keys*)d; + self->section_offset = 0; + + return GRIB_SUCCESS; +} + +static int destroy(grib_dumper* d) +{ + return GRIB_SUCCESS; +} + +// static void aliases(grib_dumper* d, grib_accessor* a) +// { +// int i; +// grib_dumper_keys* self = (grib_dumper_keys*)d; + +// if ((d->option_flags & GRIB_DUMP_FLAG_ALIASES) == 0) +// return; + +// if (a->all_names[1]) { +// const char* sep = ""; +// fprintf(self->dumper.out, " ( ALIASES: "); + +// for (i = 1; i < MAX_ACCESSOR_NAMES; i++) { +// if (a->all_names[i]) { +// if (a->all_name_spaces[i]) +// fprintf(self->dumper.out, "%s%s.%s", sep, a->all_name_spaces[i], a->all_names[i]); +// else +// fprintf(self->dumper.out, "%s%s", sep, a->all_names[i]); +// } +// sep = ", "; +// } +// printf(") "); +// } +// } + +static void dump_name_only(grib_dumper* d, grib_accessor* a, const char* comment) +{ +// grib_dumper_keys* self = (grib_dumper_keys*)d; +// print_offset(self->dumper.out, d, a); + +// if (a->flags & GRIB_ACCESSOR_FLAG_HIDDEN) { +// return; +// } + +// if (a->length == 0 && +// (d->option_flags & GRIB_DUMP_FLAG_CODED) != 0) +// return; + +// if ((a->flags & GRIB_ACCESSOR_FLAG_DUMP) == 0 && +// (d->option_flags & GRIB_DUMP_FLAG_DUMP_OK) != 0) +// return; + +// fprintf(self->dumper.out, "%s", a->name); + +// if (a->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) { +// fprintf(self->dumper.out, " (read only)"); +// } +// if ((d->option_flags & GRIB_DUMP_FLAG_TYPE) != 0) { +// fprintf(self->dumper.out, " (type %s) ", a->creator->op); +// } +// aliases(d, a); +// fprintf(self->dumper.out, "\n"); +} + +static void dump_long(grib_dumper* d, grib_accessor* a, const char* comment) +{ + dump_name_only(d, a, comment); +} + +static void dump_bits(grib_dumper* d, grib_accessor* a, const char* comment) +{ + dump_name_only(d, a, comment); +} + +static void dump_double(grib_dumper* d, grib_accessor* a, const char* comment) +{ + dump_name_only(d, a, comment); +} + +static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment) +{ + dump_name_only(d, a, comment); +} + +static void dump_bytes(grib_dumper* d, grib_accessor* a, const char* comment) +{ +// grib_dumper_keys *self = (grib_dumper_keys*)d; +// int i,k,err =0; +// size_t more = 0; +// size_t size = a->length; +// unsigned char* buf = grib_context_malloc(d->handle->context,size); + +// if ( (a->flags & GRIB_ACCESSOR_FLAG_DUMP) == 0) +// return; + +// if (a->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) +// fprintf(self->dumper.out,"-READ ONLY- "); + +// /*for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," ");*/ +// /*print_offset(self->dumper.out,self->begin,self->theEnd);*/ +// if ((d->option_flags & GRIB_DUMP_FLAG_TYPE) != 0) +// fprintf(self->dumper.out,"%s ",a->creator->op); + +// fprintf(self->dumper.out,"%s = %ld",a->name,a->length); +// aliases(d,a); +// fprintf(self->dumper.out," {"); + +// if(!buf) +// { +// if(size == 0) +// fprintf(self->dumper.out,"}\n"); +// else +// fprintf(self->dumper.out," *** ERR cannot malloc(%ld) }\n",(long)size); +// return; +// } + +// fprintf(self->dumper.out,"\n"); + +// err = grib_unpack_bytes(a,buf,&size); +// if(err){ +// grib_context_free(d->handle->context,buf); +// fprintf(self->dumper.out," *** ERR=%d (%s) \n}",err,grib_get_error_message(err)); +// return ; +// } + +// if(size > 100) { +// more = size - 100; +// size = 100; +// } + +// k = 0; +// /* if(size > 100) size = 100; */ +// while(k < size) +// { +// int j; +// for(i = 0; i < d->depth + 3 ; i++) fprintf(self->dumper.out," "); +// for(j = 0; j < 16 && k < size; j++, k++) +// { +// fprintf(self->dumper.out,"%02x",buf[k]); +// if(k != size-1) +// fprintf(self->dumper.out,", "); +// } +// fprintf(self->dumper.out,"\n"); +// } + +// if(more) +// { +// for(i = 0; i < d->depth + 3 ; i++) fprintf(self->dumper.out," "); +// fprintf(self->dumper.out,"... %lu more values\n", (unsigned long)more); +// } + +// for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," "); +// fprintf(self->dumper.out,"} # %s %s \n",a->creator->op, a->name); +// grib_context_free(d->handle->context,buf); +} + +static void dump_values(grib_dumper* d, grib_accessor* a) +{ + dump_name_only(d, a, 0); +} + +static void dump_label(grib_dumper* d, grib_accessor* a, const char* comment) +{ + /*grib_dumper_keys *self = (grib_dumper_keys*)d; + + for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," "); + fprintf(self->dumper.out,"----> %s %s %s\n",a->creator->op, a->name,comment?comment:"");*/ +} + +static void dump_section(grib_dumper* d, grib_accessor* a, grib_block_of_accessors* block) +{ +// grib_dumper_keys* self = (grib_dumper_keys*)d; +// /*grib_section* s = grib_get_sub_section(a);*/ +// int is_default_section = 0; +// char* upper = NULL; +// char *p = NULL, *q = NULL; +// if (!strncmp(a->name, "section", 7)) +// is_default_section = 1; + +// /*for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," ");*/ +// if (is_default_section) { +// upper = (char*)malloc(strlen(a->name) + 1); +// Assert(upper); +// p = (char*)a->name; +// q = upper; +// while (*p != '\0') { +// *q = toupper(*p); +// if (*q == '_') +// *q = ' '; +// q++; +// p++; +// } +// *q = '\0'; + +// /*snprintf(tmp,1024,"%s ",upper,(long)s->length,(long)s->padding);*/ +// fprintf(self->dumper.out, "====> %s <==== \n", upper); + +// free(upper); +// self->section_offset = a->offset; +// } +// else { +// } + +// /*printf("------------- section_offset = %ld\n",self->section_offset);*/ +// d->depth += 3; +// grib_dump_accessors_block(d, block); +// d->depth -= 3; + +// /*for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," ");*/ +// /*fprintf(self->dumper.out,"<===== %s %s\n",a->creator->op, a->name);*/ +} diff --git a/src/grib_header_compute.cc b/src/deprecated/grib_header_compute.cc similarity index 94% rename from src/grib_header_compute.cc rename to src/deprecated/grib_header_compute.cc index da68f004e..d8723742e 100644 --- a/src/grib_header_compute.cc +++ b/src/deprecated/grib_header_compute.cc @@ -15,34 +15,11 @@ */ #include "grib_api_internal.h" -#include +#include #include -#include +#include #include -#if 0 -GRIB_INLINE static int strcmp(const char* a,const char* b) { - if (*a != *b) return 1; - while((*a!=0 && *b!=0) && *(a) == *(b) ) {a++;b++;} - return (*a==0 && *b==0) ? 0 : 1; -} -#endif - -#ifndef NUMBER -#define NUMBER(a) (sizeof(a) / sizeof(a[0])) /* number of elem. of an array */ -#endif -#ifndef MAX -#define MAX(a, b) (((a) > (b)) ? (a) : (b)) -#endif -#ifndef MIN -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) -#endif -#define ABS(a) ((a) < 0 ? -(a) : (a)) -#define ROUND(a) ((long)((a) + 0.5)) -#define EQ(a, b) ((*(a) == *(b)) && (strcmp(a, b) == 0)) -#define LT(a, b) ((*(a) < *(b)) || (strcmp(a, b) < 0)) - - static grib_math* readpower(grib_context* c, char** form, int* err); static grib_math* readatom(grib_context* c, char** form, int* err); static grib_math* readfactor(grib_context* c, char** form, int* err); @@ -71,7 +48,7 @@ static long op_neg(long a) {return -a;} static double op_neg_d(double a) {return -a;} -static long op_pow(long a, long b) {return grib_power(a,b);} +static long op_pow(long a, long b) {return codes_power(a,b);} static long op_add(long a, long b) {return a+b;} static long op_sub(long a, long b) {return a-b;} static long op_div(long a, long b) {return a/b;} diff --git a/src/deprecated/grib_nearest_class_regular.cc b/src/deprecated/grib_nearest_class_regular.cc new file mode 100644 index 000000000..766dcc039 --- /dev/null +++ b/src/deprecated/grib_nearest_class_regular.cc @@ -0,0 +1,109 @@ +static int find(grib_nearest* nearest, grib_handle* h, + double inlat, double inlon,unsigned long flags, + double* outlats,double* outlons, + double *values,double *distances,int* indexes, size_t *len) { + grib_nearest_regular* self = (grib_nearest_regular*) nearest; + int ret=0,kk=0,ii=0,jj=0; + size_t nvalues=0; + double radiusInKm; + + if ((ret = grib_nearest_get_radius(h, &radiusInKm)) != GRIB_SUCCESS) + return ret; + + if (!nearest->h || (flags & GRIB_NEAREST_SAME_DATA)==0 || nearest->h!=h) { + grib_iterator* iter=NULL; + double lat=0,lon=0; + + if( (ret = grib_get_size(h,self->values_key,&nvalues))!= GRIB_SUCCESS) + return ret; + nearest->values_count = nvalues; + if (nearest->values) grib_context_free(nearest->context,nearest->values); + nearest->values = grib_context_malloc(h->context,nvalues*sizeof(double)); + if (!nearest->values) return GRIB_OUT_OF_MEMORY; + + ret=grib_get_double_array_internal( h,self->values_key, + nearest->values,&(nearest->values_count)); + if (ret!=GRIB_SUCCESS) grib_context_log(nearest->context,GRIB_LOG_ERROR, + "nearest: unable to get values array"); + + if (!nearest->h || (flags & GRIB_NEAREST_SAME_GRID)==0) { + double dummy=0; + double olat=1.e10, olon=1.e10; + int ilat=0,ilon=0; + long n=0; + + if( (ret = grib_get_long(h,self->Ni,&n))!= GRIB_SUCCESS) + return ret; + self->lons_count=n; + + if( (ret = grib_get_long(h,self->Nj,&n))!= GRIB_SUCCESS) + return ret; + self->lats_count=n; + + if (self->lats) grib_context_free(nearest->context,self->lats); + self->lats=grib_context_malloc( nearest->context, + self->lats_count* sizeof(double)); + if (!self->lats) return GRIB_OUT_OF_MEMORY; + + if (self->lons) grib_context_free(nearest->context,self->lons); + self->lons=grib_context_malloc( nearest->context, + self->lons_count*sizeof(double)); + if (!self->lons) return GRIB_OUT_OF_MEMORY; + + iter=grib_iterator_new(h,0,&ret); + if (ret) { + grib_context_log(nearest->context,GRIB_LOG_ERROR,"unable to create iterator"); + return ret; + } + while(grib_iterator_next(iter,&lat,&lon,&dummy)) { + if (olat != lat) { + self->lats[ilat++]=lat; + olat=lat; + } + if (ilonlons_count && olon != lon) { + self->lons[ilon++]=lon; + olon=lon; + } + } + grib_iterator_delete(iter); + + } + nearest->h=h; + } + + if (!self->distances || (flags & GRIB_NEAREST_SAME_POINT)==0 + || (flags & GRIB_NEAREST_SAME_GRID)==0) { + + grib_binary_search(self->lats,self->lats_count-1,inlat, + &(self->j[0]),&(self->j[1])); + grib_binary_search(self->lons,self->lons_count-1,inlon, + &(self->i[0]),&(self->i[1])); + if (!self->distances) + self->distances=(double*)grib_context_malloc( nearest->context,NUM_NEIGHBOURS*sizeof(double)); + if (!self->k) + self->k=(int*)grib_context_malloc( nearest->context,NUM_NEIGHBOURS*sizeof(int)); + kk=0; + for (ii=0;ii<2;ii++) { + for (jj=0;jj<2;jj++) { + self->k[kk]=self->i[ii]+self->lons_count*self->j[jj]-1; + self->distances[kk]=geographic_distance_spherical(radius,inlon,inlat, + self->lons[self->i[ii]],self->lats[self->j[jj]]); + kk++; + } + } + } + + kk=0; + for (ii=0;ii<2;ii++) { + for (jj=0;jj<2;jj++) { + distances[kk]=self->distances[kk]; + outlats[kk]=self->lats[self->j[jj]]; + outlons[kk]=self->lons[self->i[ii]]; + values[kk]=nearest->values[self->k[kk]]; + indexes[kk]=self->k[kk]; + kk++; + } + } + + return GRIB_SUCCESS; +} diff --git a/src/grib_templates.h b/src/deprecated/grib_templates.h similarity index 100% rename from src/grib_templates.h rename to src/deprecated/grib_templates.h diff --git a/src/deprecated/md5.grib_md5_flush.cc b/src/deprecated/md5.grib_md5_flush.cc new file mode 100644 index 000000000..525387bd5 --- /dev/null +++ b/src/deprecated/md5.grib_md5_flush.cc @@ -0,0 +1,178 @@ +#define ROT(x, c) ((x << c) | (x >> (32 - c))) + +#define ECC_F(x, y, z) ((x & y) | ((~x) & z)) +#define ECC_G(x, y, z) ((x & z) | (y & (~z))) +#define ECC_H(x, y, z) (x ^ y ^ z) +#define ECC_I(x, y, z) (y ^ (x | (~z))) + +#define F_(A, B, C, D, g, i) \ + A += ECC_F(B, C, D) + w[g] + k[i]; \ + A &= 0xffffffff; \ + A = ROT(A, r[i]); \ + A += B; +#define G_(A, B, C, D, g, i) \ + A += ECC_G(B, C, D) + w[g] + k[i]; \ + A &= 0xffffffff; \ + A = ROT(A, r[i]); \ + A += B; +#define H_(A, B, C, D, g, i) \ + A += ECC_H(B, C, D) + w[g] + k[i]; \ + A &= 0xffffffff; \ + A = ROT(A, r[i]); \ + A += B; +#define I_(A, B, C, D, g, i) \ + A += ECC_I(B, C, D) + w[g] + k[i]; \ + A &= 0xffffffff; \ + A = ROT(A, r[i]); \ + A += B; + +static void grib_md5_flush(grib_md5_state* s) +{ +#if 1 + unsigned long a = s->h0; + unsigned long b = s->h1; + unsigned long c = s->h2; + unsigned long d = s->h3; + unsigned long* w = &s->words[0]; + + F_(a, b, c, d, 0, 0); + F_(d, a, b, c, 1, 1); + F_(c, d, a, b, 2, 2); + F_(b, c, d, a, 3, 3); + + F_(a, b, c, d, 4, 4); + F_(d, a, b, c, 5, 5); + F_(c, d, a, b, 6, 6); + F_(b, c, d, a, 7, 7); + + F_(a, b, c, d, 8, 8); + F_(d, a, b, c, 9, 9); + F_(c, d, a, b, 10, 10); + F_(b, c, d, a, 11, 11); + + F_(a, b, c, d, 12, 12); + F_(d, a, b, c, 13, 13); + F_(c, d, a, b, 14, 14); + F_(b, c, d, a, 15, 15); + + G_(a, b, c, d, 1, 16); + G_(d, a, b, c, 6, 17); + G_(c, d, a, b, 11, 18); + G_(b, c, d, a, 0, 19); + + G_(a, b, c, d, 5, 20); + G_(d, a, b, c, 10, 21); + G_(c, d, a, b, 15, 22); + G_(b, c, d, a, 4, 23); + + G_(a, b, c, d, 9, 24); + G_(d, a, b, c, 14, 25); + G_(c, d, a, b, 3, 26); + G_(b, c, d, a, 8, 27); + + G_(a, b, c, d, 13, 28); + G_(d, a, b, c, 2, 29); + G_(c, d, a, b, 7, 30); + G_(b, c, d, a, 12, 31); + + H_(a, b, c, d, 5, 32); + H_(d, a, b, c, 8, 33); + H_(c, d, a, b, 11, 34); + H_(b, c, d, a, 14, 35); + + H_(a, b, c, d, 1, 36); + H_(d, a, b, c, 4, 37); + H_(c, d, a, b, 7, 38); + H_(b, c, d, a, 10, 39); + + H_(a, b, c, d, 13, 40); + H_(d, a, b, c, 0, 41); + H_(c, d, a, b, 3, 42); + H_(b, c, d, a, 6, 43); + + H_(a, b, c, d, 9, 44); + H_(d, a, b, c, 12, 45); + H_(c, d, a, b, 15, 46); + H_(b, c, d, a, 2, 47); + + I_(a, b, c, d, 0, 48); + I_(d, a, b, c, 7, 49); + I_(c, d, a, b, 14, 50); + I_(b, c, d, a, 5, 51); + + I_(a, b, c, d, 12, 52); + I_(d, a, b, c, 3, 53); + I_(c, d, a, b, 10, 54); + I_(b, c, d, a, 1, 55); + + I_(a, b, c, d, 8, 56); + I_(d, a, b, c, 15, 57); + I_(c, d, a, b, 6, 58); + I_(b, c, d, a, 13, 59); + + I_(a, b, c, d, 4, 60); + I_(d, a, b, c, 11, 61); + I_(c, d, a, b, 2, 62); + I_(b, c, d, a, 9, 63); + +#else + unsigned long i, g; + unsigned long a = s->h0; + unsigned long b = s->h1; + unsigned long c = s->h2; + unsigned long d = s->h3; + unsigned long f; + unsigned long temp; + unsigned long* w = &s->words[0]; + unsigned long h; + for (i = 0; i < 16; i++) { + f = F(b, c, d); + g = i; + temp = d; + d = c; + c = b; + h = a + f + k[i] + w[g]; + b = b + rotate(h, r[i]); + a = temp; + } + + for (i = 16; i < 32; i++) { + f = G(b, c, d); + g = (5 * i + 1) % 16; + temp = d; + d = c; + c = b; + h = a + f + k[i] + w[g]; + b = b + rotate(h, r[i]); + a = temp; + } + for (i = 32; i < 48; i++) { + f = H(b, c, d); + g = (3 * i + 5) % 16; + temp = d; + d = c; + c = b; + h = a + f + k[i] + w[g]; + b = b + rotate(h, r[i]); + a = temp; + } + for (i = 48; i < 64; i++) { + f = I(b, c, d); + g = (7 * i) % 16; + temp = d; + d = c; + c = b; + h = a + f + k[i] + w[g]; + b = b + rotate(h, r[i]); + a = temp; + } + +#endif + + s->h0 += a; + s->h1 += b; + s->h2 += c; + s->h3 += d; + + s->word_count = 0; +} diff --git a/src/minmax_val.cc b/src/deprecated/minmax_val.cc similarity index 94% rename from src/minmax_val.cc rename to src/deprecated/minmax_val.cc index 097747991..4cf1e8117 100644 --- a/src/minmax_val.cc +++ b/src/deprecated/minmax_val.cc @@ -8,6 +8,9 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include +#include +#include #ifdef __PGI #undef __AVX__ @@ -20,18 +23,12 @@ #endif #ifdef __AVX__ -#include -#include -#include #include #ifdef _GET_X86_COUNTER #include #endif #else #ifdef __SSE2__ -#include -#include -#include #include #ifdef _GET_X86_COUNTER #include @@ -229,7 +226,7 @@ static void minmax_val(const double* restrict data, long datasize, double* fmin, #else #ifdef _ARCH_PWR6 -#define __UNROLL_DEPTH_1 6 +#define kUNROLL_DEPTH_1 6 /* to allow pipelining we have to unroll */ @@ -238,18 +235,18 @@ static void minmax_val(const double* restrict data, long datasize, double* fmin, #endif { long i, j; - long residual = datasize % __UNROLL_DEPTH_1; + long residual = datasize % kUNROLL_DEPTH_1; long ofs = datasize - residual; - double dmin[__UNROLL_DEPTH_1]; - double dmax[__UNROLL_DEPTH_1]; + double dmin[kUNROLL_DEPTH_1]; + double dmax[kUNROLL_DEPTH_1]; - for (j = 0; j < __UNROLL_DEPTH_1; j++) { + for (j = 0; j < kUNROLL_DEPTH_1; j++) { dmin[j] = data[0]; dmax[j] = data[0]; } - for (i = 0; i < datasize - residual; i += __UNROLL_DEPTH_1) { - for (j = 0; j < __UNROLL_DEPTH_1; j++) { + for (i = 0; i < datasize - residual; i += kUNROLL_DEPTH_1) { + for (j = 0; j < kUNROLL_DEPTH_1; j++) { dmin[j] = __fsel(dmin[j] - data[i + j], data[i + j], dmin[j]); dmax[j] = __fsel(data[i + j] - dmax[j], data[i + j], dmax[j]); } @@ -260,7 +257,7 @@ static void minmax_val(const double* restrict data, long datasize, double* fmin, dmax[j] = __fsel(data[ofs + j] - dmax[j], data[ofs + j], dmax[j]); } - for (j = 0; j < __UNROLL_DEPTH_1; j++) { + for (j = 0; j < kUNROLL_DEPTH_1; j++) { *fmin = __fsel(*fmin - dmin[j], dmin[j], *fmin); *fmax = __fsel(dmax[j] - *fmax, dmax[j], *fmax); } @@ -269,7 +266,7 @@ static void minmax_val(const double* restrict data, long datasize, double* fmin, hpmStop(1); #endif -#undef __UNROLL_DEPTH_1 +#undef kUNROLL_DEPTH_1 #else #ifdef _GET_IBM_COUNTER diff --git a/src/dumper.class b/src/dumper.class index e0c879c68..62bc265db 100644 --- a/src/dumper.class +++ b/src/dumper.class @@ -14,8 +14,8 @@ static void header (grib_dumper*,grib_handle*); static void footer (grib_dumper*,grib_handle*); typedef struct grib_dumper_NAME { - grib_dumper dumper; -MEMBERS + grib_dumper dumper; +MEMBERS } grib_dumper_NAME; extern grib_dumper_class* SUPER; diff --git a/src/eccodes.h b/src/eccodes.h index cb47d8ca0..f0e670775 100644 --- a/src/eccodes.h +++ b/src/eccodes.h @@ -156,7 +156,6 @@ typedef struct grib_iterator codes_iterator; \struct codes_nearest */ typedef struct grib_nearest codes_nearest; -typedef struct grib_points codes_points; /*! Codes keys iterator. Iterator over keys. \ingroup keys_iterator @@ -1360,6 +1359,10 @@ int codes_is_defined(const codes_handle* h, const char* key); The error code is the final argument */ int codes_bufr_key_is_header(const codes_handle* h, const char* key, int* err); +/* Returns 1 if the BUFR key is a coordinate descriptor and 0 otherwise. + The error code is the final argument */ +int codes_bufr_key_is_coordinate(const codes_handle* h, const char* key, int* err); + int codes_set_missing(codes_handle* h, const char* key); /* The truncation is the Gaussian number (or order) */ int codes_get_gaussian_latitudes(long truncation, double* latitudes); diff --git a/src/eccodes_prototypes.h b/src/eccodes_prototypes.h index 4aced8486..76960b58e 100644 --- a/src/eccodes_prototypes.h +++ b/src/eccodes_prototypes.h @@ -267,8 +267,6 @@ grib_viarray* grib_viarray_new(grib_context* c, size_t size, size_t incsize); grib_viarray* grib_viarray_push(grib_context* c, grib_viarray* v, grib_iarray* val); void grib_viarray_delete(grib_context* c, grib_viarray* v); void grib_viarray_delete_content(grib_context* c, grib_viarray* v); -grib_iarray** grib_viarray_get_array(grib_context* c, grib_viarray* v); -size_t grib_viarray_used_size(grib_viarray* v); /* grib_accessor_class_array.cc*/ @@ -319,9 +317,6 @@ bufr_descriptor* accessor_bufr_elements_table_get_descriptor(grib_accessor* a, i /* grib_accessor_class_unpack_bufr_values.cc*/ -/* grib_accessor_class_apply_operators.cc*/ -size_t compute_size_AO(const long* descriptors, size_t numberOfDescriptors); - /* grib_accessor_class_non_alpha.cc*/ /* grib_accessor_class_g1bitmap.cc*/ @@ -491,8 +486,6 @@ int grib_g1_step_get_steps(grib_accessor* a, long* start, long* theEnd); /* grib_accessor_class_times.cc*/ -/* grib_accessor_class_forward.cc*/ - /* grib_accessor_class_g2bitmap_present.cc*/ /* grib_accessor_class_ibmfloat.cc*/ @@ -500,8 +493,6 @@ int grib_g1_step_get_steps(grib_accessor* a, long* start, long* theEnd); /* grib_accessor_class_ieeefloat.cc*/ /* grib_accessor_class_constant.cc*/ -void accessor_constant_set_type(grib_accessor* a, int type); -void accessor_constant_set_dval(grib_accessor* a, double dval); /* grib_accessor_class_iterator.cc*/ grib_iterator* grib_iterator_new(const grib_handle* h, unsigned long flags, int* error); @@ -889,8 +880,6 @@ void grib_dump_footer(grib_dumper* d, const grib_handle* h); /* grib_dumper_class_default.cc*/ -/* grib_dumper_class_keys.cc*/ - /* grib_dumper_class_bufr_encode_C.cc*/ /* grib_dumper_class_bufr_encode_filter.cc*/ @@ -1077,11 +1066,6 @@ int grib_handle_prepare_action(grib_handle* h, grib_action* a); void grib_multi_support_reset_file(grib_context* c, FILE* f); void grib_multi_support_reset(grib_context* c); -/* grib_header_compute.cc*/ -void print_math(grib_math* m); -void grib_math_delete(grib_context* c, grib_math* m); -grib_math* grib_math_new(grib_context* c, const char* formula, int* err); - /* grib_hash_keys.cc*/ const struct grib_keys_hash* grib_keys_hash_get(const char* str, size_t len); grib_itrie* grib_hash_keys_new(grib_context* c, int* count); @@ -1100,6 +1084,10 @@ int wmo_read_bufr_from_file(FILE* f, void* buffer, size_t* len); int wmo_read_gts_from_file(FILE* f, void* buffer, size_t* len); int wmo_read_taf_from_file(FILE* f, void* buffer, size_t* len); int wmo_read_metar_from_file(FILE* f, void* buffer, size_t* len); +int wmo_read_any_from_file_fast(FILE* f, size_t* msg_len, off_t* msg_offset); +int wmo_read_grib_from_file_fast(FILE* f, size_t* msg_len, off_t* msg_offset); +int wmo_read_bufr_from_file_fast(FILE* f, size_t* msg_len, off_t* msg_offset); +int wmo_read_gts_from_file_fast(FILE* f, size_t* msg_len, off_t* msg_offset); int wmo_read_any_from_stream(void* stream_data, long (*stream_proc)(void*, void* buffer, long len), void* buffer, size_t* len); void* wmo_read_any_from_stream_malloc(void* stream_data, long (*stream_proc)(void*, void* buffer, long len), size_t* size, int* err); void* wmo_read_gts_from_file_malloc(FILE* f, int headers_only, size_t* size, off_t* offset, int* err); @@ -1255,7 +1243,6 @@ int grib_get_double_element_set(const grib_handle* h, const char* name, const si int grib_get_float_element_set_internal(grib_handle* h, const char* name, const size_t* index_array, size_t len, float* val_array); int grib_get_float_element_set(const grib_handle* h, const char* name, const size_t* index_array, size_t len, float* val_array); -int grib_points_get_values(grib_handle* h, grib_points* points, double* val); int grib_get_double_elements(const grib_handle* h, const char* name, const int* index_array, long len, double* val_array); int grib_get_float_elements(const grib_handle* h, const char* name, const int* index_array, long len, float* val_array); int grib_get_string_internal(grib_handle* h, const char* name, char* val, size_t* length); @@ -1346,15 +1333,6 @@ grib_expression* new_string_expression(grib_context* c, const char* value); /* grib_expression_class_sub_string.cc*/ grib_expression* new_sub_string_expression(grib_context* c, const char* value, size_t start, size_t length); -/* grib_box.cc*/ -int grib_box_init(grib_box* box, grib_handle* h, grib_arguments* args); -void grib_points_delete(grib_points* points); - -/* grib_box_class.cc*/ -grib_box* grib_box_factory(grib_handle* h, grib_arguments* args); - -/* grib_box_class_gen.cc*/ - /* grib_nearest.cc*/ int grib_nearest_find(grib_nearest* nearest, const grib_handle* h, double inlat, double inlon, unsigned long flags, double* outlats, double* outlons, double* values, double* distances, int* indexes, size_t* len); int grib_nearest_init(grib_nearest* i, grib_handle* h, grib_arguments* args); @@ -1450,6 +1428,7 @@ char* codes_getenv(const char* name); int codes_check_grib_ieee_packing_value(int value); int codes_flush_sync_close_file(FILE* f); int is_date_valid(long year, long month, long day, long hour, long minute, double second); +int compute_scaled_value_and_scale_factor(double input, int64_t scaled_value_max, int64_t scale_factor_max, int64_t* ret_value, int64_t* ret_factor); /* grib_util.cc*/ grib_handle* grib_util_sections_copy(grib_handle* hfrom, grib_handle* hto, int what, int* err); @@ -1478,6 +1457,7 @@ int codes_bufr_copy_data(grib_handle* hin, grib_handle* hout); int codes_bufr_extract_headers_malloc(grib_context* c, const char* filename, codes_bufr_header** result, int* num_messages, int strict_mode); int codes_bufr_header_get_string(codes_bufr_header* bh, const char* key, char* val, size_t* len); int codes_bufr_key_is_header(const grib_handle* h, const char* key, int* err); +int codes_bufr_key_is_coordinate(const grib_handle* h, const char* key, int* err); /* string_util.cc*/ int strcmp_nocase(const char* s1, const char* s2); diff --git a/src/expression.class b/src/expression.class index ccd113b4c..9c11d39db 100644 --- a/src/expression.class +++ b/src/expression.class @@ -26,20 +26,18 @@ extern grib_expression_class* SUPER; static grib_expression_class _grib_expression_class_NAME = { &SUPER, /* super */ "NAME", /* name */ - sizeof(grib_expression_NAME),/* size of instance */ + sizeof(grib_expression_NAME),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ &init, /* constructor */ &destroy, /* destructor */ - &print, - &add_dependency, - - &native_type, - &get_name, - - &evaluate_long, - &evaluate_double, - &evaluate_string, + &print, + &add_dependency, + &native_type, + &get_name, + &evaluate_long, + &evaluate_double, + &evaluate_string, }; grib_expression_class* grib_expression_class_NAME = &_grib_expression_class_NAME; diff --git a/src/functions.cc b/src/functions.cc index ed749c159..9680d07bd 100644 --- a/src/functions.cc +++ b/src/functions.cc @@ -8,6 +8,7 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" long grib_op_eq(long a, long b) @@ -69,7 +70,7 @@ double grib_op_neg_d(double a) long grib_op_pow(long a, long b) { /* Note: This is actually 'a' to the power 'b' */ - return grib_power(b, a); + return codes_power(b, a); } long grib_op_add(long a, long b) @@ -136,73 +137,68 @@ double grib_op_le_d(double a, double b) return a <= b; } -#if 0 -#define LOOKUP(a) \ - if (proc == a) { \ - return "&" #a; \ - } -const char* grib_binop_long_proc_name(const grib_binop_long_proc proc) -{ - if (!proc) - return "NULL"; - LOOKUP(grib_op_eq); - LOOKUP(grib_op_ne); - LOOKUP(grib_op_lt); - LOOKUP(grib_op_gt); - LOOKUP(grib_op_and); - LOOKUP(grib_op_or); - LOOKUP(grib_op_ge); - LOOKUP(grib_op_le); - LOOKUP(grib_op_bit); - LOOKUP(grib_op_bitoff); - LOOKUP(grib_op_pow); - LOOKUP(grib_op_add); - LOOKUP(grib_op_sub); - LOOKUP(grib_op_div); - LOOKUP(grib_op_mul); - LOOKUP(grib_op_modulo); - fprintf(stderr, "Cannot find grib_binop_long_proc\n"); - Assert(0); - return NULL; -} +// #define LOOKUP(a) if (proc == a) { return "&" #a; } +// const char* grib_binop_long_proc_name(const grib_binop_long_proc proc) +// { +// if (!proc) +// return "NULL"; +// LOOKUP(grib_op_eq); +// LOOKUP(grib_op_ne); +// LOOKUP(grib_op_lt); +// LOOKUP(grib_op_gt); +// LOOKUP(grib_op_and); +// LOOKUP(grib_op_or); +// LOOKUP(grib_op_ge); +// LOOKUP(grib_op_le); +// LOOKUP(grib_op_bit); +// LOOKUP(grib_op_bitoff); +// LOOKUP(grib_op_pow); +// LOOKUP(grib_op_add); +// LOOKUP(grib_op_sub); +// LOOKUP(grib_op_div); +// LOOKUP(grib_op_mul); +// LOOKUP(grib_op_modulo); +// fprintf(stderr, "Cannot find grib_binop_long_proc\n"); +// Assert(0); +// return NULL; +// } -const char* grib_binop_double_proc_name(const grib_binop_double_proc proc) -{ - if (!proc) - return "NULL"; - LOOKUP(grib_op_mul_d); - LOOKUP(grib_op_div_d); - LOOKUP(grib_op_add_d); - LOOKUP(grib_op_sub_d); - LOOKUP(grib_op_eq_d); - LOOKUP(grib_op_ne_d); - LOOKUP(grib_op_lt_d); - LOOKUP(grib_op_gt_d); - LOOKUP(grib_op_ge_d); - LOOKUP(grib_op_le_d); - fprintf(stderr, "Cannot find grib_binop_double_proc_name\n"); - Assert(0); - return NULL; -} +// const char* grib_binop_double_proc_name(const grib_binop_double_proc proc) +// { +// if (!proc) +// return "NULL"; +// LOOKUP(grib_op_mul_d); +// LOOKUP(grib_op_div_d); +// LOOKUP(grib_op_add_d); +// LOOKUP(grib_op_sub_d); +// LOOKUP(grib_op_eq_d); +// LOOKUP(grib_op_ne_d); +// LOOKUP(grib_op_lt_d); +// LOOKUP(grib_op_gt_d); +// LOOKUP(grib_op_ge_d); +// LOOKUP(grib_op_le_d); +// fprintf(stderr, "Cannot find grib_binop_double_proc_name\n"); +// Assert(0); +// return NULL; +// } -const char* grib_unop_long_proc_name(const grib_unop_long_proc proc) -{ - if (!proc) - return "NULL"; - LOOKUP(grib_op_not); - LOOKUP(grib_op_neg); - fprintf(stderr, "Cannot find grib_unop_long_proc_name\n"); - Assert(0); - return NULL; -} +// const char* grib_unop_long_proc_name(const grib_unop_long_proc proc) +// { +// if (!proc) +// return "NULL"; +// LOOKUP(grib_op_not); +// LOOKUP(grib_op_neg); +// fprintf(stderr, "Cannot find grib_unop_long_proc_name\n"); +// Assert(0); +// return NULL; +// } -const char* grib_unop_double_proc_name(const grib_unop_double_proc proc) -{ - if (!proc) - return "NULL"; - LOOKUP(grib_op_neg_d); - fprintf(stderr, "Cannot find grib_unop_double_proc_name\n"); - Assert(0); - return NULL; -} -#endif +// const char* grib_unop_double_proc_name(const grib_unop_double_proc proc) +// { +// if (!proc) +// return "NULL"; +// LOOKUP(grib_op_neg_d); +// fprintf(stderr, "Cannot find grib_unop_double_proc_name\n"); +// Assert(0); +// return NULL; +// } diff --git a/src/grib_accessor.cc b/src/grib_accessor.cc index 44e5fe0ea..673eb2dcd 100644 --- a/src/grib_accessor.cc +++ b/src/grib_accessor.cc @@ -11,7 +11,6 @@ /*************************************************************************** * Jean Baptiste Filippi - 01.11.2005 * Enrico Fucile - * * ***************************************************************************/ #include "grib_accessor.h" @@ -39,7 +38,7 @@ void grib_accessor_dump(grib_accessor* a, grib_dumper* f) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); } int grib_pack_missing(grib_accessor* a) @@ -52,7 +51,7 @@ int grib_pack_missing(grib_accessor* a) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -66,7 +65,7 @@ int grib_pack_zero(grib_accessor* a) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -80,7 +79,7 @@ int grib_is_missing_internal(grib_accessor* a) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -94,7 +93,7 @@ int grib_pack_double(grib_accessor* a, const double* v, size_t* len) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -107,7 +106,7 @@ int grib_pack_float(grib_accessor* a, const float* v, size_t* len) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -121,7 +120,7 @@ int grib_pack_expression(grib_accessor* a, grib_expression* e) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -135,7 +134,7 @@ int grib_pack_string(grib_accessor* a, const char* v, size_t* len) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -149,7 +148,7 @@ int grib_pack_string_array(grib_accessor* a, const char** v, size_t* len) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -163,7 +162,7 @@ int grib_pack_long(grib_accessor* a, const long* v, size_t* len) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -177,7 +176,7 @@ int grib_pack_bytes(grib_accessor* a, const unsigned char* v, size_t* len) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -191,7 +190,7 @@ int grib_unpack_bytes(grib_accessor* a, unsigned char* v, size_t* len) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -204,7 +203,7 @@ int grib_unpack_double_subarray(grib_accessor* a, double* v, size_t start, size_ } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -218,7 +217,7 @@ int grib_unpack_double(grib_accessor* a, double* v, size_t* len) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -232,7 +231,7 @@ int grib_unpack_float(grib_accessor* a, float* v, size_t* len) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -278,7 +277,7 @@ int grib_unpack_float_element(grib_accessor* a, size_t i, float* v) int grib_unpack_double_element_set(grib_accessor* a, const size_t* index_array, size_t len, double* val_array) { grib_accessor_class* c = a->cclass; - DebugAssert(len > 0); + DEBUG_ASSERT(len > 0); while (c) { if (c->unpack_double_element_set) { return c->unpack_double_element_set(a, index_array, len, val_array); @@ -291,7 +290,7 @@ int grib_unpack_float_element_set(grib_accessor* a, const size_t* index_array, s { /* *grib_accessor_class* c = a->cclass; - *DebugAssert(len > 0); + *DEBUG_ASSERT(len > 0); *while (c) { * if (c->unpack_float_element_set) { * return c->unpack_float_element_set(a, index_array, len, val_array); @@ -312,7 +311,7 @@ int grib_unpack_string(grib_accessor* a, char* v, size_t* len) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -325,7 +324,7 @@ int grib_unpack_string_array(grib_accessor* a, char** v, size_t* len) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -407,7 +406,7 @@ int grib_unpack_long(grib_accessor* a, long* v, size_t* len) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -422,7 +421,7 @@ long grib_accessor_get_native_type(grib_accessor* a) return c->get_native_type(a); c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -438,7 +437,7 @@ long grib_get_next_position_offset(grib_accessor* a) return c->next_offset(a); c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -453,7 +452,7 @@ long grib_string_length(grib_accessor* a) return c->string_length(a); c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -468,7 +467,7 @@ long grib_byte_offset(grib_accessor* a) return c->byte_offset(a); c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -483,7 +482,7 @@ long grib_byte_count(grib_accessor* a) return c->byte_count(a); c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -501,7 +500,7 @@ int grib_value_count(grib_accessor* a, long* count) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -530,7 +529,7 @@ int grib_accessor_notify_change(grib_accessor* a, grib_accessor* changed) } if (a && a->cclass) printf("notify_change not implemented for %s %s\n", a->cclass->name, a->name); - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -551,17 +550,6 @@ void grib_init_accessor(grib_accessor* a, const long len, grib_arguments* args) init_accessor(a->cclass, a, len, args); } -#if 0 -static void post_init_accessor(grib_accessor_class* c,grib_accessor* a) -{ - if(c) { - grib_accessor_class *s = c->super ? *(c->super) : NULL; - post_init_accessor(s,a); - if(c->post_init) c->post_init(a); - } -} -#endif - /* For this one, ALL destroy are called */ void grib_accessor_delete(grib_context* ct, grib_accessor* a) @@ -605,7 +593,7 @@ void grib_update_size(grib_accessor* a, size_t len) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); } int grib_nearest_smaller_value(grib_accessor* a, double val, double* nearest) @@ -617,7 +605,7 @@ int grib_nearest_smaller_value(grib_accessor* a, double val, double* nearest) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -632,7 +620,7 @@ size_t grib_preferred_size(grib_accessor* a, int from_handle) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -645,7 +633,7 @@ grib_accessor* grib_next_accessor(grib_accessor* a) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return 0; } @@ -660,7 +648,7 @@ void grib_resize(grib_accessor* a, size_t new_size) } c = c->super ? *(c->super) : NULL; } - DebugAssert(0); + DEBUG_ASSERT(0); return; } @@ -894,18 +882,3 @@ void grib_accessors_list_delete(grib_context* c, grib_accessors_list* al) al = tmp; } } - - -#if 0 -void grib_print_accessor_flags(const grib_accessor* acc) -{ - const unsigned long f = acc->flags; - if (f & GRIB_ACCESSOR_FLAG_READ_ONLY) printf("READ_ONLY "); - if (f & GRIB_ACCESSOR_FLAG_DUMP) printf("DUMP "); - if (f & GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC) printf("EDITION_SPECIFIC "); - if (f & GRIB_ACCESSOR_FLAG_CAN_BE_MISSING) printf("CAN_BE_MISSING "); - if (f & GRIB_ACCESSOR_FLAG_LOWERCASE) printf("LOWERCASE "); - if (f & GRIB_ACCESSOR_FLAG_HIDDEN) printf("HIDDEN "); - /* TODO: the rest */ -} -#endif diff --git a/src/grib_accessor.h b/src/grib_accessor.h index f91b6312b..10fa228f7 100644 --- a/src/grib_accessor.h +++ b/src/grib_accessor.h @@ -1,4 +1,14 @@ -# pragma once +/* + * (C) Copyright 2005- 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. + */ + +#pragma once #include "grib_api_internal.h" diff --git a/src/grib_accessor_class.cc b/src/grib_accessor_class.cc index 0e1ef31da..127f1ec7d 100644 --- a/src/grib_accessor_class.cc +++ b/src/grib_accessor_class.cc @@ -162,11 +162,11 @@ grib_accessor* grib_accessor_factory(grib_section* p, grib_action* creator, if (p->block->last) { a->offset = grib_get_next_position_offset(p->block->last); -#if 0 - printf("offset: p->block->last %s %s %ld %ld\n", - p->block->last->cclass->name, - p->block->last->name,(long)p->block->last->offset,(long)p->block->last->length); -#endif + + //printf("offset: p->block->last %s %s %ld %ld\n", + // p->block->last->cclass->name, + // p->block->last->name,(long)p->block->last->offset,(long)p->block->last->length); + } else { if (p->owner) { @@ -248,11 +248,11 @@ void grib_push_accessor(grib_accessor* a, grib_block_of_accessors* l) l->last = a; if (hand->use_trie) { - DebugAssert( a->all_names[0] ); + DEBUG_ASSERT( a->all_names[0] ); if (*(a->all_names[0]) != '_') { id = grib_hash_keys_get_id(a->context->keys, a->all_names[0]); - DebugAssert(id >= 0 && id < ACCESSORS_ARRAY_SIZE); + DEBUG_ASSERT(id >= 0 && id < ACCESSORS_ARRAY_SIZE); a->same = hand->accessors[id]; link_same_attributes(a, a->same); @@ -354,54 +354,41 @@ int grib_get_block_length(grib_section* s, size_t* l) { *l = s->length; return GRIB_SUCCESS; -#if 0 - - /* TODO: Because grib_pack_long takes a SIGNED value, we may have problems */ - - if(s->aclength) - { - size_t len = 1; - long plen = 0; - - int ret = grib_unpack_long(s->aclength, &plen, &len); - if(ret == GRIB_SUCCESS && plen != 0) - { - *l = plen; - return GRIB_SUCCESS; - } - } - - /* empty block */ - if(s->block->first == NULL) - { - *l = 0; - return GRIB_SUCCESS; - } - /* no accessor for block length */ - if(s->owner) - *l = grib_get_next_position_offset(s->block->last) - s->owner->offset; - else - *l = grib_get_next_position_offset(s->block->last); - - if(s->aclength) - { - size_t len = 1; - long plen = *l; - - int ret = grib_pack_long(s->aclength, &plen, &len); - if(ret != GRIB_SUCCESS) - ; - if(s->h->context->debug) - printf("SECTION updating length %ld %s\n",plen,s->owner->name); - } - - /* - if(s->aclength) - Assert(*l == plen);*/ - - return GRIB_SUCCESS; -#endif +// TODO: Because grib_pack_long takes a SIGNED value, we may have problems +// if(s->aclength) { +// size_t len = 1; +// long plen = 0; + +// int ret = grib_unpack_long(s->aclength, &plen, &len); +// if(ret == GRIB_SUCCESS && plen != 0) +// { +// *l = plen; +// return GRIB_SUCCESS; +// } +// } + +// // empty block +// if(s->block->first == NULL) { +// *l = 0; +// return GRIB_SUCCESS; +// } +// // no accessor for block length +// if(s->owner) *l = grib_get_next_position_offset(s->block->last) - s->owner->offset; +// else *l = grib_get_next_position_offset(s->block->last); + +// if(s->aclength) { +// size_t len = 1; +// long plen = *l; + +// int ret = grib_pack_long(s->aclength, &plen, &len); +// if(ret != GRIB_SUCCESS) +// ; +// if(s->h->context->debug) +// printf("SECTION updating length %ld %s\n",plen,s->owner->name); +// } +// // if(s->aclength) Assert(*l == plen); +// return GRIB_SUCCESS; } grib_accessor* find_paddings(grib_section* s) diff --git a/src/grib_accessor_class.h b/src/grib_accessor_class.h index a86c2a71d..6aca52e29 100644 --- a/src/grib_accessor_class.h +++ b/src/grib_accessor_class.h @@ -1,7 +1,6 @@ /* This file is automatically generated by ./make_class.pl, do not edit */ extern grib_accessor_class* grib_accessor_class_abstract_long_vector; extern grib_accessor_class* grib_accessor_class_abstract_vector; -extern grib_accessor_class* grib_accessor_class_apply_operators; extern grib_accessor_class* grib_accessor_class_array; extern grib_accessor_class* grib_accessor_class_ascii; extern grib_accessor_class* grib_accessor_class_assert; @@ -10,7 +9,6 @@ extern grib_accessor_class* grib_accessor_class_bitmap; extern grib_accessor_class* grib_accessor_class_bits; extern grib_accessor_class* grib_accessor_class_bits_per_value; extern grib_accessor_class* grib_accessor_class_blob; -extern grib_accessor_class* grib_accessor_class_box; extern grib_accessor_class* grib_accessor_class_budgdate; extern grib_accessor_class* grib_accessor_class_bufr_data_array; extern grib_accessor_class* grib_accessor_class_bufr_data_element; @@ -76,7 +74,6 @@ extern grib_accessor_class* grib_accessor_class_double; extern grib_accessor_class* grib_accessor_class_element; extern grib_accessor_class* grib_accessor_class_evaluate; extern grib_accessor_class* grib_accessor_class_expanded_descriptors; -extern grib_accessor_class* grib_accessor_class_forward; extern grib_accessor_class* grib_accessor_class_from_scale_factor_scaled_value; extern grib_accessor_class* grib_accessor_class_g1_half_byte_codeflag; extern grib_accessor_class* grib_accessor_class_g1_message_length; diff --git a/src/grib_accessor_class_abstract_long_vector.cc b/src/grib_accessor_class_abstract_long_vector.cc index b411df584..523e0a740 100644 --- a/src/grib_accessor_class_abstract_long_vector.cc +++ b/src/grib_accessor_class_abstract_long_vector.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl */ -static void init_class(grib_accessor_class*); typedef struct grib_accessor_abstract_long_vector { @@ -55,32 +54,32 @@ static grib_accessor_class _grib_accessor_class_abstract_long_vector = { "abstract_long_vector", /* name */ sizeof(grib_accessor_abstract_long_vector), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -89,10 +88,10 @@ static grib_accessor_class _grib_accessor_class_abstract_long_vector = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -101,46 +100,4 @@ static grib_accessor_class _grib_accessor_class_abstract_long_vector = { grib_accessor_class* grib_accessor_class_abstract_long_vector = &_grib_accessor_class_abstract_long_vector; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_abstract_vector.cc b/src/grib_accessor_class_abstract_vector.cc index 1e15ee282..1353aeffc 100644 --- a/src/grib_accessor_class_abstract_vector.cc +++ b/src/grib_accessor_class_abstract_vector.cc @@ -8,10 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/****************************************************************** - * Enrico Fucile - ******************************************************************/ - #include "grib_api_internal.h" /* This is used by make_class.pl @@ -35,7 +31,6 @@ or edit "accessor.class" and rerun ./make_class.pl */ -static void init_class(grib_accessor_class*); typedef struct grib_accessor_abstract_vector { @@ -54,32 +49,32 @@ static grib_accessor_class _grib_accessor_class_abstract_vector = { "abstract_vector", /* name */ sizeof(grib_accessor_abstract_vector), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -88,10 +83,10 @@ static grib_accessor_class _grib_accessor_class_abstract_vector = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -100,46 +95,4 @@ static grib_accessor_class _grib_accessor_class_abstract_vector = { grib_accessor_class* grib_accessor_class_abstract_vector = &_grib_accessor_class_abstract_vector; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_array.cc b/src/grib_accessor_class_array.cc index 321411730..a132c8218 100644 --- a/src/grib_accessor_class_array.cc +++ b/src/grib_accessor_class_array.cc @@ -37,7 +37,6 @@ or edit "accessor.class" and rerun ./make_class.pl static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_array { @@ -55,32 +54,32 @@ static grib_accessor_class _grib_accessor_class_array = { "array", /* name */ sizeof(grib_accessor_array), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -89,10 +88,10 @@ static grib_accessor_class _grib_accessor_class_array = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -101,47 +100,6 @@ static grib_accessor_class _grib_accessor_class_array = { grib_accessor_class* grib_accessor_class_array = &_grib_accessor_class_array; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_ascii.cc b/src/grib_accessor_class_ascii.cc index ccac8bbd5..e2901d2d7 100644 --- a/src/grib_accessor_class_ascii.cc +++ b/src/grib_accessor_class_ascii.cc @@ -50,7 +50,6 @@ static size_t string_length(grib_accessor*); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_ascii @@ -67,32 +66,32 @@ static grib_accessor_class _grib_accessor_class_ascii = { "ascii", /* name */ sizeof(grib_accessor_ascii), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -101,10 +100,10 @@ static grib_accessor_class _grib_accessor_class_ascii = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -113,37 +112,6 @@ static grib_accessor_class _grib_accessor_class_ascii = { grib_accessor_class* grib_accessor_class_ascii = &_grib_accessor_class_ascii; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_assert.cc b/src/grib_accessor_class_assert.cc index 9a73a67ae..eb7bf9a87 100644 --- a/src/grib_accessor_class_assert.cc +++ b/src/grib_accessor_class_assert.cc @@ -38,7 +38,6 @@ or edit "accessor.class" and rerun ./make_class.pl static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int notify_change(grib_accessor*, grib_accessor*); typedef struct grib_accessor_assert @@ -55,32 +54,32 @@ static grib_accessor_class _grib_accessor_class_assert = { "assert", /* name */ sizeof(grib_accessor_assert), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ ¬ify_change, /* notify_change */ 0, /* update_size */ @@ -89,10 +88,10 @@ static grib_accessor_class _grib_accessor_class_assert = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -101,46 +100,6 @@ static grib_accessor_class _grib_accessor_class_assert = { grib_accessor_class* grib_accessor_class_assert = &_grib_accessor_class_assert; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_bit.cc b/src/grib_accessor_class_bit.cc index 5a646ddaf..f48d8c3ad 100644 --- a/src/grib_accessor_class_bit.cc +++ b/src/grib_accessor_class_bit.cc @@ -38,7 +38,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_bit { @@ -57,32 +56,32 @@ static grib_accessor_class _grib_accessor_class_bit = { "bit", /* name */ sizeof(grib_accessor_bit), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -91,10 +90,10 @@ static grib_accessor_class _grib_accessor_class_bit = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -103,45 +102,6 @@ static grib_accessor_class _grib_accessor_class_bit = { grib_accessor_class* grib_accessor_class_bit = &_grib_accessor_class_bit; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_bitmap.cc b/src/grib_accessor_class_bitmap.cc index 5a16b0ef1..e5a43668c 100644 --- a/src/grib_accessor_class_bitmap.cc +++ b/src/grib_accessor_class_bitmap.cc @@ -49,7 +49,6 @@ static int unpack_string(grib_accessor*, char*, size_t* len); static long next_offset(grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); static int unpack_double_element(grib_accessor*, size_t i, double* val); static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array); @@ -73,32 +72,32 @@ static grib_accessor_class _grib_accessor_class_bitmap = { "bitmap", /* name */ sizeof(grib_accessor_bitmap), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - &unpack_float, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -107,10 +106,10 @@ static grib_accessor_class _grib_accessor_class_bitmap = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -119,39 +118,6 @@ static grib_accessor_class _grib_accessor_class_bitmap = { grib_accessor_class* grib_accessor_class_bitmap = &_grib_accessor_class_bitmap; - -static void init_class(grib_accessor_class* c) -{ - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ @@ -178,10 +144,7 @@ static void compute_size(grib_accessor* a) } } -#if 0 - printf("compute_size off=%ld slen=%ld a->offset=%ld\n", - (long)off,(long)slen,(long)a->offset); -#endif + // printf("compute_size off=%ld slen=%ld a->offset=%ld\n", (long)off,(long)slen,(long)a->offset); a->length = off + (slen - a->offset); @@ -237,7 +200,7 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) return err; if (*len < tlen) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size for %s it contains %ld values", a->name, tlen); + grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size for %s, it contains %ld values", a->name, tlen); *len = 0; return GRIB_ARRAY_TOO_SMALL; } @@ -315,7 +278,7 @@ static int unpack_string(grib_accessor* a, char* val, size_t* len) grib_handle* hand = grib_handle_of_accessor(a); if (len[0] < (a->length)) { - grib_context_log(a->context, GRIB_LOG_ERROR, "unpack_string: Wrong size (%lu) for %s it contains %ld values", + grib_context_log(a->context, GRIB_LOG_ERROR, "unpack_string: Wrong size (%lu) for %s, it contains %ld values", len[0], a->name, a->length); len[0] = 0; return GRIB_ARRAY_TOO_SMALL; diff --git a/src/grib_accessor_class_bits.cc b/src/grib_accessor_class_bits.cc index 62a21bdb3..5e86e2fef 100644 --- a/src/grib_accessor_class_bits.cc +++ b/src/grib_accessor_class_bits.cc @@ -57,7 +57,6 @@ static int unpack_long(grib_accessor*, long* val, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); static long byte_count(grib_accessor*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_bits { @@ -79,32 +78,32 @@ static grib_accessor_class _grib_accessor_class_bits = { "bits", /* name */ sizeof(grib_accessor_bits), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ &byte_count, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - &unpack_bytes, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + &unpack_bytes, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -113,10 +112,10 @@ static grib_accessor_class _grib_accessor_class_bits = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -125,40 +124,6 @@ static grib_accessor_class _grib_accessor_class_bits = { grib_accessor_class* grib_accessor_class_bits = &_grib_accessor_class_bits; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_bits_per_value.cc b/src/grib_accessor_class_bits_per_value.cc index f6b69cda6..5648a9a69 100644 --- a/src/grib_accessor_class_bits_per_value.cc +++ b/src/grib_accessor_class_bits_per_value.cc @@ -39,7 +39,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_bits_per_value { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_bits_per_value = { "bits_per_value", /* name */ sizeof(grib_accessor_bits_per_value), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_bits_per_value = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,46 +103,6 @@ static grib_accessor_class _grib_accessor_class_bits_per_value = { grib_accessor_class* grib_accessor_class_bits_per_value = &_grib_accessor_class_bits_per_value; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* args) diff --git a/src/grib_accessor_class_blob.cc b/src/grib_accessor_class_blob.cc index 13c49cc27..7e1c1de62 100644 --- a/src/grib_accessor_class_blob.cc +++ b/src/grib_accessor_class_blob.cc @@ -35,7 +35,6 @@ static int get_native_type(grib_accessor*); static int unpack_bytes(grib_accessor*, unsigned char*, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_blob { @@ -51,32 +50,32 @@ static grib_accessor_class _grib_accessor_class_blob = { "blob", /* name */ sizeof(grib_accessor_blob), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - &unpack_bytes, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + &unpack_bytes, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -85,10 +84,10 @@ static grib_accessor_class _grib_accessor_class_blob = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -97,45 +96,6 @@ static grib_accessor_class _grib_accessor_class_blob = { grib_accessor_class* grib_accessor_class_blob = &_grib_accessor_class_blob; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_box.cc b/src/grib_accessor_class_box.cc deleted file mode 100644 index 4b31b9889..000000000 --- a/src/grib_accessor_class_box.cc +++ /dev/null @@ -1,180 +0,0 @@ -/* - * (C) Copyright 2005- 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 "grib_api_internal.h" -/* - This is used by make_class.pl - - START_CLASS_DEF - CLASS = accessor - SUPER = grib_accessor_class_gen - IMPLEMENTS = init;dump - MEMBERS=grib_arguments* args - END_CLASS_DEF - - */ - -/* START_CLASS_IMP */ - -/* - -Don't edit anything between START_CLASS_IMP and END_CLASS_IMP -Instead edit values between START_CLASS_DEF and END_CLASS_DEF -or edit "accessor.class" and rerun ./make_class.pl - -*/ - -static void dump(grib_accessor*, grib_dumper*); -static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); - -typedef struct grib_accessor_box -{ - grib_accessor att; - /* Members defined in gen */ - /* Members defined in box */ - grib_arguments* args; -} grib_accessor_box; - -extern grib_accessor_class* grib_accessor_class_gen; - -static grib_accessor_class _grib_accessor_class_box = { - &grib_accessor_class_gen, /* super */ - "box", /* name */ - sizeof(grib_accessor_box), /* size */ - 0, /* inited */ - &init_class, /* init_class */ - &init, /* init */ - 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ - 0, /* get length of string */ - 0, /* get number of values */ - 0, /* get number of bytes */ - 0, /* get offset to bytes */ - 0, /* get native type */ - 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ - 0, /* pack_expression */ - 0, /* notify_change */ - 0, /* update_size */ - 0, /* preferred_size */ - 0, /* resize */ - 0, /* nearest_smaller_value */ - 0, /* next accessor */ - 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ - 0, /* unpack a subarray */ - 0, /* clear */ - 0, /* clone accessor */ -}; - - -grib_accessor_class* grib_accessor_class_box = &_grib_accessor_class_box; - - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - -/* END_CLASS_IMP */ - -static void init(grib_accessor* a, const long l, grib_arguments* args) -{ - grib_accessor_box* self = (grib_accessor_box*)a; - self->args = args; -} - -static void dump(grib_accessor* a, grib_dumper* dumper) -{ - /* TODO: pass args */ - grib_dump_label(dumper, a, NULL); -} - -#if 0 -grib_box* grib_box_new(grib_handle* h, int* error) -{ - grib_context_log(grib_context_get_default(), GRIB_LOG_ERROR, - "The grib_box_new function is deprecated and will be removed later."); - *error = GRIB_INTERNAL_ERROR; - return NULL; - - grib_accessor* a = NULL; - grib_accessor_box* na = NULL; - grib_box* n = NULL; - *error = GRIB_NOT_IMPLEMENTED; - a = grib_find_accessor(h, "BOX"); - na = (grib_accessor_box*)a; - - if (!a) - return NULL; - - n = grib_box_factory(h, na->args); - - if (n) - *error = GRIB_SUCCESS; - - return n; -} -#endif diff --git a/src/grib_accessor_class_budgdate.cc b/src/grib_accessor_class_budgdate.cc index 24d354b7b..15fc9b4bd 100644 --- a/src/grib_accessor_class_budgdate.cc +++ b/src/grib_accessor_class_budgdate.cc @@ -38,7 +38,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_budgdate { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_budgdate = { "budgdate", /* name */ sizeof(grib_accessor_budgdate), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_budgdate = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,46 +103,6 @@ static grib_accessor_class _grib_accessor_class_budgdate = { grib_accessor_class* grib_accessor_class_budgdate = &_grib_accessor_class_budgdate; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_bufr_data_array.cc b/src/grib_accessor_class_bufr_data_array.cc index 222de3299..6433ffcaf 100644 --- a/src/grib_accessor_class_bufr_data_array.cc +++ b/src/grib_accessor_class_bufr_data_array.cc @@ -8,6 +8,7 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" /* @@ -97,7 +98,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_bufr_data_array @@ -161,32 +161,32 @@ static grib_accessor_class _grib_accessor_class_bufr_data_array = { "bufr_data_array", /* name */ sizeof(grib_accessor_bufr_data_array), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ &byte_count, /* get number of bytes */ &byte_offset, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -195,10 +195,10 @@ static grib_accessor_class _grib_accessor_class_bufr_data_array = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -207,38 +207,6 @@ static grib_accessor_class _grib_accessor_class_bufr_data_array = { grib_accessor_class* grib_accessor_class_bufr_data_array = &_grib_accessor_class_bufr_data_array; - -static void init_class(grib_accessor_class* c) -{ - c->string_length = (*(c->super))->string_length; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ #define MAX_NESTED_REPLICATIONS 8 @@ -312,6 +280,7 @@ static void tableB_override_store_ref_val(grib_context* c, grib_accessor_bufr_da q->next = tb; } } + /* Operator 203YYY: Retrieve changed reference value from linked list */ static int tableB_override_get_ref_val(grib_accessor_bufr_data_array* self, int code, long* out_ref_val) { @@ -325,6 +294,7 @@ static int tableB_override_get_ref_val(grib_accessor_bufr_data_array* self, int } return GRIB_NOT_FOUND; } + /* Operator 203YYY: Clear and free linked list */ static void tableB_override_clear(grib_context* c, grib_accessor_bufr_data_array* self) { @@ -336,6 +306,7 @@ static void tableB_override_clear(grib_context* c, grib_accessor_bufr_data_array } self->tableb_override = NULL; } + /* Operator 203YYY: Copy contents of linked list to the transient array key */ static int tableB_override_set_key(grib_handle* h, grib_accessor_bufr_data_array* self) { @@ -373,18 +344,17 @@ static int check_overridden_reference_values(const grib_context* c, long* refVal } return GRIB_SUCCESS; } -/* -static void tableB_override_dump(grib_accessor_bufr_data_array *self) -{ - bufr_tableb_override* p = self->tableb_override; - int i = 1; - while (p) { - printf("ECCODES DEBUG: Table B Override: [%d] code=%d, rv=%ld\n", i, p->code, p->new_ref_val); - p = p->next; - ++i; - } -} - */ + +// static void tableB_override_dump(grib_accessor_bufr_data_array *self) +// { +// bufr_tableb_override* p = self->tableb_override; +// int i = 1; +// while (p) { +// printf("ECCODES DEBUG: Table B Override: [%d] code=%d, rv=%ld\n", i, p->code, p->new_ref_val); +// p = p->next; +// ++i; +// } +// } #define DYN_ARRAY_SIZE_INIT 1000 /* Initial size for grib_iarray_new and grib_darray_new */ #define DYN_ARRAY_SIZE_INCR 1000 /* Increment size for grib_iarray_new and grib_darray_new */ @@ -429,17 +399,15 @@ static void init(grib_accessor* a, const long v, grib_arguments* params) /* Assert(a->length>=0); */ } -/* -static void clean_string(char* s,int len) -{ - int i=len-1; - while (i) { - if (!isalnum(s[i])) s[i]=0; - else break; - i--; - } -} - */ +// static void clean_string(char* s,int len) +// { +// int i=len-1; +// while (i) { +// if (!isalnum(s[i])) s[i]=0; +// else break; +// i--; +// } +// } static int check_end_data(grib_context* c, bufr_descriptor* bd, grib_accessor_bufr_data_array* self, int size) { @@ -795,7 +763,7 @@ static int descriptor_get_min_max(bufr_descriptor* bd, long width, long referenc if (width <= 0) return GRIB_MISSING_BUFR_ENTRY; /* ECC-1395 */ - DebugAssert(width > 0 && width < 64); + DEBUG_ASSERT(width > 0 && width < 64); *maxAllowed = (max1 + reference) * factor; *minAllowed = reference * factor; @@ -829,7 +797,7 @@ static int encode_double_array(grib_context* c, grib_buffer* buff, long* pos, bu modifiedReference = bd->reference; modifiedFactor = bd->factor; - inverseFactor = grib_power(bd->scale, 10); + inverseFactor = codes_power(bd->scale, 10); modifiedWidth = bd->width; err = descriptor_get_min_max(bd, modifiedWidth, modifiedReference, modifiedFactor, &minAllowed, &maxAllowed); @@ -971,10 +939,10 @@ static int encode_double_array(grib_context* c, grib_buffer* buff, long* pos, bu localRange = (max - min) * inverseFactor + 1; localWidth = ceil(log(localRange) / log(2.0)); lval = round(max * inverseFactor) - reference; - allone = grib_power(localWidth, 2) - 1; + allone = codes_power(localWidth, 2) - 1; while (allone <= lval) { localWidth++; - allone = grib_power(localWidth, 2) - 1; + allone = codes_power(localWidth, 2) - 1; } if (localWidth == 1) localWidth++; @@ -1412,7 +1380,7 @@ static int encode_new_replication(grib_context* c, grib_accessor_bufr_data_array int err = 0; unsigned long repetitions = 1; bufr_descriptor** descriptors = self->expanded->v; - DebugAssert( buff->data == data ); + DEBUG_ASSERT( buff->data == data ); switch (descriptors[i]->code) { case 31000: @@ -1546,7 +1514,7 @@ static int encode_replication(grib_context* c, grib_accessor_bufr_data_array* se { /* Assert( buff->data == data); */ if (self->compressedData) { - DebugAssert(grib_darray_used_size(self->numericValues->v[elementIndex]) == 1); + DEBUG_ASSERT(grib_darray_used_size(self->numericValues->v[elementIndex]) == 1); *numberOfRepetitions = self->numericValues->v[elementIndex]->v[0]; } else { @@ -1782,7 +1750,7 @@ static int get_next_bitmap_descriptor_index_new_bitmap(grib_accessor_bufr_data_a i = self->bitmapCurrent; if (self->compressedData) { - DebugAssert(i < self->nInputBitmap); + DEBUG_ASSERT(i < self->nInputBitmap); if (i >= self->nInputBitmap) return GRIB_WRONG_BITMAP_SIZE; while (self->inputBitmap[i] == 1) { @@ -1822,7 +1790,7 @@ static int get_next_bitmap_descriptor_index(grib_accessor_bufr_data_array* self, self->bitmapCurrent++; self->bitmapCurrentElementsDescriptorsIndex++; i = self->bitmapCurrent + self->bitmapStart; - DebugAssert(i < self->numericValues->n); + DEBUG_ASSERT(i < self->numericValues->n); while (self->numericValues->v[i]->v[0] == 1) { self->bitmapCurrent++; self->bitmapCurrentElementsDescriptorsIndex++; @@ -1838,7 +1806,7 @@ static int get_next_bitmap_descriptor_index(grib_accessor_bufr_data_array* self, self->bitmapCurrent++; self->bitmapCurrentElementsDescriptorsIndex++; i = self->bitmapCurrent + self->bitmapStart; - DebugAssert(i < numericValues->n); + DEBUG_ASSERT(i < numericValues->n); while (numericValues->v[i] == 1) { self->bitmapCurrent++; self->bitmapCurrentElementsDescriptorsIndex++; @@ -1987,7 +1955,8 @@ static int adding_extra_key_attributes(grib_handle* h) } static grib_accessor* create_accessor_from_descriptor(const grib_accessor* a, grib_accessor* attribute, grib_section* section, - long ide, long subset, int add_dump_flag, int count, int add_extra_attributes) + long ide, long subset, int add_dump_flag, int add_coord_flag, + int count, int add_extra_attributes) { grib_accessor_bufr_data_array* self = (grib_accessor_bufr_data_array*)a; char code[10] = {0,}; @@ -2008,13 +1977,16 @@ static grib_accessor* create_accessor_from_descriptor(const grib_accessor* a, gr operatorCreator.name = (char*)"operator"; if (attribute) { - DebugAssert(attribute->parent == NULL); + DEBUG_ASSERT(attribute->parent == NULL); } if (add_dump_flag) { creator.flags = GRIB_ACCESSOR_FLAG_DUMP; operatorCreator.flags |= GRIB_ACCESSOR_FLAG_DUMP; } + if (add_coord_flag) { + creator.flags |= GRIB_ACCESSOR_FLAG_BUFR_COORD; // ECC-1611 + } idx = self->compressedData ? self->elementsDescriptorsIndex->v[0]->v[ide] : self->elementsDescriptorsIndex->v[subset]->v[ide]; @@ -2022,6 +1994,7 @@ static grib_accessor* create_accessor_from_descriptor(const grib_accessor* a, gr case 0: case 1: creator.name = grib_context_strdup(a->context, self->expanded->v[idx]->shortName); + /* ECC-325: store alloc'd string (due to strdup) for clean up later */ grib_sarray_push(a->context, self->tempStrings, creator.name); elementAccessor = grib_accessor_factory(section, &creator, 0, NULL); @@ -2228,14 +2201,12 @@ static grib_accessor* get_element_from_bitmap(const grib_accessor* a, bitmap_s* return bitmap->referredElement ? bitmap->referredElement->prev->accessor : NULL; } -/* -static GRIB_INLINE void reset_qualifiers(grib_accessor* significanceQualifierGroup[]) -{ - int i; - for (i=0;iaccessor,"index"); - grib_unpack_long(anindex,index,&l); -#endif + //long index[1]; + //grib_accessor* anindex=grib_accessor_get_attribute(al->accessor,"index"); + //grib_unpack_long(anindex,index,&l); return 1; } } @@ -2433,20 +2402,19 @@ static grib_accessor* accessor_or_attribute_with_same_name(grib_accessor* a, con return ok; } } -#if 0 -static int get_key_rank(grib_trie* accessorsRank,grib_accessor* a) -{ - int* r=(int*)grib_trie_get(accessorsRank,a->name); - if (r) (*r)++; - else { - r=(int*)grib_context_malloc(a->context,sizeof(int)); - *r=1; - grib_trie_insert(accessorsRank,a->name,(void*)r); - } - return *r; -} -#endif +// static int get_key_rank(grib_trie* accessorsRank,grib_accessor* a) +// { +// int* r=(int*)grib_trie_get(accessorsRank,a->name); +// if (r) (*r)++; +// else { +// r=(int*)grib_context_malloc(a->context,sizeof(int)); +// *r=1; +// grib_trie_insert(accessorsRank,a->name,(void*)r); +// } +// return *r; +// } + static int grib_data_accessors_trie_push(grib_trie_with_rank* accessorsTrie, grib_accessor* a) { return grib_trie_with_rank_insert(accessorsTrie, a->name, a); @@ -2492,7 +2460,7 @@ static int create_keys(const grib_accessor* a, long onlySubset, long startSubset grib_accessor* elementFromBitmap = NULL; grib_handle* hand = grib_handle_of_accessor(a); /*int reuseBitmap=0;*/ - int add_dump_flag = 1, count = 0; + int add_dump_flag = 1, add_coord_flag = 0, count = 0; /*int forceGroupClosure=0;*/ creatorGroup.op = (char*)"bufr_group"; @@ -2528,8 +2496,8 @@ static int create_keys(const grib_accessor* a, long onlySubset, long startSubset section = gaGroup->sub_section; /*rootSection=section;*/ /*sectionUp=self->dataKeys;*/ - accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG); - accessor_constant_set_dval(gaGroup, groupNumber); + //accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG); + //accessor_constant_set_dval(gaGroup, groupNumber); /* ECC-765: Don't empty out the section_4 keys otherwise there will be memory leaks. */ /* Setting first and last to zero effectively masks out those section 4 keys! */ /* self->dataKeys->block->first=0; */ @@ -2559,11 +2527,13 @@ static int create_keys(const grib_accessor* a, long onlySubset, long startSubset continue; /* Descriptor does not have an associated key e.g. inside op 203YYY */ } elementFromBitmap = NULL; + add_coord_flag = 0; if (descriptor->F == 0 && IS_COORDINATE_DESCRIPTOR(descriptor->X) && self->unpackMode == CODES_BUFR_UNPACK_STRUCTURE) { const int sidx = descriptor->Y + significanceQualifierIndexArray[descriptor->X] * NUMBER_OF_QUALIFIERS_PER_CATEGORY; - DebugAssert(sidx > 0); + DEBUG_ASSERT(sidx > 0); groupNumber++; + add_coord_flag = 1; if (significanceQualifierGroup[sidx]) { groupSection = significanceQualifierGroup[sidx]->parent; @@ -2588,8 +2558,9 @@ static int create_keys(const grib_accessor* a, long onlySubset, long startSubset gaGroup = grib_accessor_factory(groupSection, &creatorGroup, 0, NULL); gaGroup->sub_section = grib_section_create(hand, gaGroup); gaGroup->bufr_group_number = groupNumber; - accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG); - accessor_constant_set_dval(gaGroup, groupNumber); + + //accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG); + //accessor_constant_set_dval(gaGroup, groupNumber); grib_push_accessor(gaGroup, groupSection->block); section = gaGroup->sub_section; @@ -2632,8 +2603,8 @@ static int create_keys(const grib_accessor* a, long onlySubset, long startSubset gaGroup = grib_accessor_factory(groupSection, &creatorGroup, 0, NULL); gaGroup->sub_section = grib_section_create(hand, gaGroup); gaGroup->bufr_group_number = groupNumber; - accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG); - accessor_constant_set_dval(gaGroup, groupNumber); + //accessor_constant_set_type(gaGroup, GRIB_TYPE_LONG); + //accessor_constant_set_dval(gaGroup, groupNumber); grib_push_accessor(gaGroup, groupSection->block); section = gaGroup->sub_section; @@ -2701,7 +2672,8 @@ static int create_keys(const grib_accessor* a, long onlySubset, long startSubset grib_accessors_list_push(self->dataAccessors, asn, rank); } count++; - elementAccessor = create_accessor_from_descriptor(a, associatedFieldAccessor, section, ide, iss, add_dump_flag, count, add_extra_attributes); + elementAccessor = create_accessor_from_descriptor(a, associatedFieldAccessor, section, ide, iss, + add_dump_flag, add_coord_flag, count, add_extra_attributes); if (!elementAccessor) { err = GRIB_DECODING_ERROR; return err; @@ -2896,7 +2868,7 @@ static int process_elements(grib_accessor* a, int flag, long onlySubset, long st decoding = 1; do_clean = 1; dataAccessor = grib_find_accessor(grib_handle_of_accessor(a), self->bufrDataEncodedName); - DebugAssert(dataAccessor); + DEBUG_ASSERT(dataAccessor); dataOffset = accessor_raw_get_offset(dataAccessor); pos = dataOffset * 8; codec_element = &decode_element; @@ -3057,7 +3029,7 @@ static int process_elements(grib_accessor* a, int flag, long onlySubset, long st /* Delayed replication */ inr = numberOfNestedRepetitions; numberOfNestedRepetitions++; - DebugAssert(numberOfNestedRepetitions <= MAX_NESTED_REPLICATIONS); + DEBUG_ASSERT(numberOfNestedRepetitions <= MAX_NESTED_REPLICATIONS); numberOfElementsToRepeat[inr] = descriptors[i]->X; n[inr] = numberOfElementsToRepeat[inr]; i++; @@ -3253,7 +3225,7 @@ static int process_elements(grib_accessor* a, int flag, long onlySubset, long st return err; } bd = grib_bufr_descriptor_clone(self->expanded->v[index]); - bd->reference = -grib_power(bd->width, 2); + bd->reference = -codes_power(bd->width, 2); bd->width++; err = codec_element(c, self, iss, buffer, data, &pos, index, bd, elementIndex, dval, sval); @@ -3409,10 +3381,9 @@ static int process_elements(grib_accessor* a, int flag, long onlySubset, long st static void dump(grib_accessor* a, grib_dumper* dumper) { - /* grib_accessor_bufr_data_array *self =(grib_accessor_bufr_data_array*)a; */ - /* int err=process_elements(a,PROCESS_DECODE); */ - - /* grib_dump_section(dumper,a,self->dataKeys->block); */ + // grib_accessor_bufr_data_array *self =(grib_accessor_bufr_data_array*)a; + // int err=process_elements(a,PROCESS_DECODE); + // grib_dump_section(dumper,a,self->dataKeys->block); return; } diff --git a/src/grib_accessor_class_bufr_data_element.cc b/src/grib_accessor_class_bufr_data_element.cc index 5dbd0ef96..65c4cecfb 100644 --- a/src/grib_accessor_class_bufr_data_element.cc +++ b/src/grib_accessor_class_bufr_data_element.cc @@ -65,7 +65,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int unpack_double_element(grib_accessor*, size_t i, double* val); static grib_accessor* make_clone(grib_accessor*, grib_section*, int*); @@ -93,32 +92,32 @@ static grib_accessor_class _grib_accessor_class_bufr_data_element = { "bufr_data_element", /* name */ sizeof(grib_accessor_bufr_data_element), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - &pack_missing, /* grib_pack procedures long */ - &is_missing, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - &pack_string_array, /* grib_pack array procedures string */ - &unpack_string_array, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + &pack_missing, /* pack_missing */ + &is_missing, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + &pack_string_array, /* pack_string_array */ + &unpack_string_array, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -127,10 +126,10 @@ static grib_accessor_class _grib_accessor_class_bufr_data_element = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ &make_clone, /* clone accessor */ @@ -139,33 +138,6 @@ static grib_accessor_class _grib_accessor_class_bufr_data_element = { grib_accessor_class* grib_accessor_class_bufr_data_element = &_grib_accessor_class_bufr_data_element; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; -} - /* END_CLASS_IMP */ static grib_accessor* make_clone(grib_accessor* a, grib_section* s, int* err) @@ -305,9 +277,9 @@ static int unpack_string_array(grib_accessor* a, char** val, size_t* len) grib_context* c = a->context; if (self->compressedData) { - DebugAssert(self->index < self->numericValues->n); + DEBUG_ASSERT(self->index < self->numericValues->n); idx = ((int)self->numericValues->v[self->index]->v[0] / 1000 - 1) / self->numberOfSubsets; - DebugAssert(idx < self->stringValues->n); + DEBUG_ASSERT(idx < self->stringValues->n); count = grib_sarray_used_size(self->stringValues->v[idx]); for (i = 0; i < count; i++) { val[i] = grib_context_strdup(c, self->stringValues->v[idx]->v[i]); @@ -315,8 +287,8 @@ static int unpack_string_array(grib_accessor* a, char** val, size_t* len) *len = count; } else { - DebugAssert(self->subsetNumber < self->numericValues->n); - DebugAssert(self->index < self->numericValues->v[self->subsetNumber]->n); + DEBUG_ASSERT(self->subsetNumber < self->numericValues->n); + DEBUG_ASSERT(self->index < self->numericValues->v[self->subsetNumber]->n); idx = (int)self->numericValues->v[self->subsetNumber]->v[self->index] / 1000 - 1; val[0] = grib_context_strdup(c, self->stringValues->v[idx]->v[0]); *len = 1; @@ -350,7 +322,19 @@ static int pack_string_array(grib_accessor* a, const char** v, size_t* len) } } else { - ret = GRIB_NOT_IMPLEMENTED; + //ECC-1623 + if (*len != self->numberOfSubsets) { + grib_context_log(c, GRIB_LOG_ERROR, + "Number of values mismatch for '%s': %zu strings provided but expected %ld (=number of subsets)", + a->name, *len, self->numberOfSubsets); + return GRIB_WRONG_ARRAY_SIZE; + } + for (i = 0; i < *len; i++) { + //idx = (int)self->numericValues->v[self->subsetNumber]->v[self->index] / 1000 - 1; + idx = (int)self->numericValues->v[i]->v[self->index] / 1000 - 1; + self->stringValues->v[idx]->v[0] = strdup(v[i]); + } + *len=1; } return ret; @@ -380,18 +364,18 @@ static int unpack_string(grib_accessor* a, char* val, size_t* len) } if (self->compressedData) { - DebugAssert(self->index < self->numericValues->n); + DEBUG_ASSERT(self->index < self->numericValues->n); idx = ((int)self->numericValues->v[self->index]->v[0] / 1000 - 1) / self->numberOfSubsets; if (idx < 0) return GRIB_INTERNAL_ERROR; str = grib_context_strdup(c, self->stringValues->v[idx]->v[0]); } else { - DebugAssert(self->subsetNumber < self->numericValues->n); + DEBUG_ASSERT(self->subsetNumber < self->numericValues->n); idx = (int)self->numericValues->v[self->subsetNumber]->v[self->index] / 1000 - 1; if (idx < 0) return GRIB_INTERNAL_ERROR; - DebugAssert(idx < self->stringValues->n); + DEBUG_ASSERT(idx < self->stringValues->n); str = grib_context_strdup(c, self->stringValues->v[idx]->v[0]); } @@ -461,15 +445,15 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) if (self->compressedData) { for (i = 0; i < count; i++) { - DebugAssert(self->index < self->numericValues->n); - DebugAssert(i < self->numericValues->v[self->index]->n); + DEBUG_ASSERT(self->index < self->numericValues->n); + DEBUG_ASSERT(i < self->numericValues->v[self->index]->n); val[i] = self->numericValues->v[self->index]->v[i] == GRIB_MISSING_DOUBLE ? GRIB_MISSING_LONG : (long)self->numericValues->v[self->index]->v[i]; } *len = count; } else { - DebugAssert(self->subsetNumber < self->numericValues->n); - DebugAssert(self->index < self->numericValues->v[self->subsetNumber]->n); + DEBUG_ASSERT(self->subsetNumber < self->numericValues->n); + DEBUG_ASSERT(self->index < self->numericValues->v[self->subsetNumber]->n); val[0] = self->numericValues->v[self->subsetNumber]->v[self->index] == GRIB_MISSING_DOUBLE ? GRIB_MISSING_LONG : (long)self->numericValues->v[self->subsetNumber]->v[self->index]; *len = 1; } @@ -490,15 +474,15 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) if (self->compressedData) { for (i = 0; i < count; i++) { - DebugAssert(self->index < self->numericValues->n); - DebugAssert(i < self->numericValues->v[self->index]->n); + DEBUG_ASSERT(self->index < self->numericValues->n); + DEBUG_ASSERT(i < self->numericValues->v[self->index]->n); val[i] = self->numericValues->v[self->index]->v[i]; } *len = count; } else { - DebugAssert(self->subsetNumber < self->numericValues->n); - DebugAssert(self->index < self->numericValues->v[self->subsetNumber]->n); + DEBUG_ASSERT(self->subsetNumber < self->numericValues->n); + DEBUG_ASSERT(self->index < self->numericValues->v[self->subsetNumber]->n); val[0] = self->numericValues->v[self->subsetNumber]->v[self->index]; *len = 1; } @@ -579,12 +563,12 @@ static int value_count(grib_accessor* a, long* count) type = get_native_type(a); if (type == GRIB_TYPE_STRING) { - DebugAssert(self->index < self->numericValues->n); + DEBUG_ASSERT(self->index < self->numericValues->n); idx = ((int)self->numericValues->v[self->index]->v[0] / 1000 - 1) / self->numberOfSubsets; size = grib_sarray_used_size(self->stringValues->v[idx]); } else { - DebugAssert(self->index < self->numericValues->n); + DEBUG_ASSERT(self->index < self->numericValues->n); size = grib_darray_used_size(self->numericValues->v[self->index]); } @@ -618,7 +602,7 @@ static int get_native_type(grib_accessor* a) { grib_accessor_bufr_data_element* self = (grib_accessor_bufr_data_element*)a; int ret = GRIB_TYPE_DOUBLE; - DebugAssert(self); + DEBUG_ASSERT(self); switch (self->type) { case BUFR_DESCRIPTOR_TYPE_STRING: ret = GRIB_TYPE_STRING; diff --git a/src/grib_accessor_class_bufr_elements_table.cc b/src/grib_accessor_class_bufr_elements_table.cc index 14fb769e2..603e1ce25 100644 --- a/src/grib_accessor_class_bufr_elements_table.cc +++ b/src/grib_accessor_class_bufr_elements_table.cc @@ -12,6 +12,7 @@ * Enrico Fucile ****************************************/ +#include "grib_scaling.h" #include "grib_api_internal.h" #if GRIB_PTHREADS @@ -73,7 +74,6 @@ static int unpack_long(grib_accessor*, long* val, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_bufr_elements_table { @@ -92,32 +92,32 @@ static grib_accessor_class _grib_accessor_class_bufr_elements_table = { "bufr_elements_table", /* name */ sizeof(grib_accessor_bufr_elements_table), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -126,10 +126,10 @@ static grib_accessor_class _grib_accessor_class_bufr_elements_table = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -138,43 +138,6 @@ static grib_accessor_class _grib_accessor_class_bufr_elements_table = { grib_accessor_class* grib_accessor_class_bufr_elements_table = &_grib_accessor_class_bufr_elements_table; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* params) @@ -271,7 +234,7 @@ static grib_trie* load_bufr_elements_table(grib_accessor* a, int* err) dictionary = grib_trie_new(c); while (fgets(line, sizeof(line) - 1, f)) { - DebugAssert( strlen(line) > 0 ); + DEBUG_ASSERT( strlen(line) > 0 ); if (line[0] == '#') continue; /* Ignore first line with column titles */ list = string_split(line, "|"); grib_trie_insert(dictionary, list[0], list); @@ -288,7 +251,7 @@ static grib_trie* load_bufr_elements_table(grib_accessor* a, int* err) } while (fgets(line, sizeof(line) - 1, f)) { - DebugAssert( strlen(line) > 0 ); + DEBUG_ASSERT( strlen(line) > 0 ); if (line[0] == '#') continue; /* Ignore first line with column titles */ list = string_split(line, "|"); /* Look for the descriptor code in the trie. It might be there from before */ @@ -381,7 +344,7 @@ static int bufr_get_from_table(grib_accessor* a, bufr_descriptor* v) /* ECC-985: Scale and reference are often 0 so we can reduce calls to atol */ v->scale = atol_fast(list[5]); - v->factor = grib_power(-v->scale, 10); + v->factor = codes_power(-v->scale, 10); v->reference = atol_fast(list[6]); v->width = atol(list[7]); @@ -413,7 +376,7 @@ bufr_descriptor* accessor_bufr_elements_table_get_descriptor(grib_accessor* a, i return NULL; c = a->context; - DebugAssert(c); + DEBUG_ASSERT(c); v = (bufr_descriptor*)grib_context_malloc_clear(c, sizeof(bufr_descriptor)); if (!v) { grib_context_log(c, GRIB_LOG_ERROR, diff --git a/src/grib_accessor_class_bufr_extract_area_subsets.cc b/src/grib_accessor_class_bufr_extract_area_subsets.cc index 5d2176daa..5659ace91 100644 --- a/src/grib_accessor_class_bufr_extract_area_subsets.cc +++ b/src/grib_accessor_class_bufr_extract_area_subsets.cc @@ -44,7 +44,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int pack_long(grib_accessor*, const long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_bufr_extract_area_subsets { @@ -70,32 +69,32 @@ static grib_accessor_class _grib_accessor_class_bufr_extract_area_subsets = { "bufr_extract_area_subsets", /* name */ sizeof(grib_accessor_bufr_extract_area_subsets), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -104,10 +103,10 @@ static grib_accessor_class _grib_accessor_class_bufr_extract_area_subsets = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -116,46 +115,6 @@ static grib_accessor_class _grib_accessor_class_bufr_extract_area_subsets = { grib_accessor_class* grib_accessor_class_bufr_extract_area_subsets = &_grib_accessor_class_bufr_extract_area_subsets; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_bufr_extract_datetime_subsets.cc b/src/grib_accessor_class_bufr_extract_datetime_subsets.cc index 8a2aee911..d5ec98bf6 100644 --- a/src/grib_accessor_class_bufr_extract_datetime_subsets.cc +++ b/src/grib_accessor_class_bufr_extract_datetime_subsets.cc @@ -37,7 +37,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int pack_long(grib_accessor*, const long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_bufr_extract_datetime_subsets { @@ -56,32 +55,32 @@ static grib_accessor_class _grib_accessor_class_bufr_extract_datetime_subsets = "bufr_extract_datetime_subsets", /* name */ sizeof(grib_accessor_bufr_extract_datetime_subsets), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -90,10 +89,10 @@ static grib_accessor_class _grib_accessor_class_bufr_extract_datetime_subsets = 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -102,46 +101,6 @@ static grib_accessor_class _grib_accessor_class_bufr_extract_datetime_subsets = grib_accessor_class* grib_accessor_class_bufr_extract_datetime_subsets = &_grib_accessor_class_bufr_extract_datetime_subsets; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_bufr_extract_subsets.cc b/src/grib_accessor_class_bufr_extract_subsets.cc index d618e9f4d..599d1d7b4 100644 --- a/src/grib_accessor_class_bufr_extract_subsets.cc +++ b/src/grib_accessor_class_bufr_extract_subsets.cc @@ -38,7 +38,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int pack_long(grib_accessor*, const long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_bufr_extract_subsets { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_bufr_extract_subsets = { "bufr_extract_subsets", /* name */ sizeof(grib_accessor_bufr_extract_subsets), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_bufr_extract_subsets = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,46 +103,6 @@ static grib_accessor_class _grib_accessor_class_bufr_extract_subsets = { grib_accessor_class* grib_accessor_class_bufr_extract_subsets = &_grib_accessor_class_bufr_extract_subsets; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void get_accessors(grib_accessor* a) diff --git a/src/grib_accessor_class_bufr_group.cc b/src/grib_accessor_class_bufr_group.cc index 350ce034b..3f7aa745c 100644 --- a/src/grib_accessor_class_bufr_group.cc +++ b/src/grib_accessor_class_bufr_group.cc @@ -32,7 +32,6 @@ or edit "accessor.class" and rerun ./make_class.pl */ static void dump(grib_accessor*, grib_dumper*); -static void init_class(grib_accessor_class*); static grib_accessor* next(grib_accessor*, int); typedef struct grib_accessor_bufr_group @@ -54,32 +53,32 @@ static grib_accessor_class _grib_accessor_class_bufr_group = { "bufr_group", /* name */ sizeof(grib_accessor_bufr_group), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -88,10 +87,10 @@ static grib_accessor_class _grib_accessor_class_bufr_group = { 0, /* nearest_smaller_value */ &next, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -100,46 +99,6 @@ static grib_accessor_class _grib_accessor_class_bufr_group = { grib_accessor_class* grib_accessor_class_bufr_group = &_grib_accessor_class_bufr_group; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void dump(grib_accessor* a, grib_dumper* dumper) diff --git a/src/grib_accessor_class_bufr_simple_thinning.cc b/src/grib_accessor_class_bufr_simple_thinning.cc index 9d3544122..e4d110262 100644 --- a/src/grib_accessor_class_bufr_simple_thinning.cc +++ b/src/grib_accessor_class_bufr_simple_thinning.cc @@ -40,7 +40,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int pack_long(grib_accessor*, const long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_bufr_simple_thinning { @@ -62,32 +61,32 @@ static grib_accessor_class _grib_accessor_class_bufr_simple_thinning = { "bufr_simple_thinning", /* name */ sizeof(grib_accessor_bufr_simple_thinning), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -96,10 +95,10 @@ static grib_accessor_class _grib_accessor_class_bufr_simple_thinning = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -108,46 +107,6 @@ static grib_accessor_class _grib_accessor_class_bufr_simple_thinning = { grib_accessor_class* grib_accessor_class_bufr_simple_thinning = &_grib_accessor_class_bufr_simple_thinning; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_bufr_string_values.cc b/src/grib_accessor_class_bufr_string_values.cc index ba78d3c77..94e0f2216 100644 --- a/src/grib_accessor_class_bufr_string_values.cc +++ b/src/grib_accessor_class_bufr_string_values.cc @@ -51,7 +51,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_bufr_string_values { @@ -70,32 +69,32 @@ static grib_accessor_class _grib_accessor_class_bufr_string_values = { "bufr_string_values", /* name */ sizeof(grib_accessor_bufr_string_values), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - &pack_string_array, /* grib_pack array procedures string */ - &unpack_string_array, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + &pack_string_array, /* pack_string_array */ + &unpack_string_array, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -104,10 +103,10 @@ static grib_accessor_class _grib_accessor_class_bufr_string_values = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -116,42 +115,6 @@ static grib_accessor_class _grib_accessor_class_bufr_string_values = { grib_accessor_class* grib_accessor_class_bufr_string_values = &_grib_accessor_class_bufr_string_values; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* args) diff --git a/src/grib_accessor_class_bufrdc_expanded_descriptors.cc b/src/grib_accessor_class_bufrdc_expanded_descriptors.cc index 77115dfe1..496666651 100644 --- a/src/grib_accessor_class_bufrdc_expanded_descriptors.cc +++ b/src/grib_accessor_class_bufrdc_expanded_descriptors.cc @@ -49,7 +49,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_bufrdc_expanded_descriptors { @@ -68,32 +67,32 @@ static grib_accessor_class _grib_accessor_class_bufrdc_expanded_descriptors = { "bufrdc_expanded_descriptors", /* name */ sizeof(grib_accessor_bufrdc_expanded_descriptors), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - &unpack_string_array, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + &unpack_string_array, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -102,10 +101,10 @@ static grib_accessor_class _grib_accessor_class_bufrdc_expanded_descriptors = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -114,44 +113,6 @@ static grib_accessor_class _grib_accessor_class_bufrdc_expanded_descriptors = { grib_accessor_class* grib_accessor_class_bufrdc_expanded_descriptors = &_grib_accessor_class_bufrdc_expanded_descriptors; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* args) diff --git a/src/grib_accessor_class_bytes.cc b/src/grib_accessor_class_bytes.cc index 4dd770a06..158714998 100644 --- a/src/grib_accessor_class_bytes.cc +++ b/src/grib_accessor_class_bytes.cc @@ -35,7 +35,6 @@ static int get_native_type(grib_accessor*); static int pack_string(grib_accessor*, const char*, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_bytes @@ -52,32 +51,32 @@ static grib_accessor_class _grib_accessor_class_bytes = { "bytes", /* name */ sizeof(grib_accessor_bytes), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -86,10 +85,10 @@ static grib_accessor_class _grib_accessor_class_bytes = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -98,44 +97,6 @@ static grib_accessor_class _grib_accessor_class_bytes = { grib_accessor_class* grib_accessor_class_bytes = &_grib_accessor_class_bytes; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_change_alternative_row_scanning.cc b/src/grib_accessor_class_change_alternative_row_scanning.cc index c561e4818..394bb8409 100644 --- a/src/grib_accessor_class_change_alternative_row_scanning.cc +++ b/src/grib_accessor_class_change_alternative_row_scanning.cc @@ -40,7 +40,6 @@ static int get_native_type(grib_accessor*); static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_change_alternative_row_scanning { @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_change_alternative_row_scanning "change_alternative_row_scanning", /* name */ sizeof(grib_accessor_change_alternative_row_scanning), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_change_alternative_row_scanning 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,45 +105,6 @@ static grib_accessor_class _grib_accessor_class_change_alternative_row_scanning grib_accessor_class* grib_accessor_class_change_alternative_row_scanning = &_grib_accessor_class_change_alternative_row_scanning; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* args) diff --git a/src/grib_accessor_class_change_scanning_direction.cc b/src/grib_accessor_class_change_scanning_direction.cc index dd480fb77..91e597135 100644 --- a/src/grib_accessor_class_change_scanning_direction.cc +++ b/src/grib_accessor_class_change_scanning_direction.cc @@ -44,7 +44,6 @@ static int get_native_type(grib_accessor*); static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_change_scanning_direction { @@ -68,32 +67,32 @@ static grib_accessor_class _grib_accessor_class_change_scanning_direction = { "change_scanning_direction", /* name */ sizeof(grib_accessor_change_scanning_direction), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -102,10 +101,10 @@ static grib_accessor_class _grib_accessor_class_change_scanning_direction = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -114,45 +113,6 @@ static grib_accessor_class _grib_accessor_class_change_scanning_direction = { grib_accessor_class* grib_accessor_class_change_scanning_direction = &_grib_accessor_class_change_scanning_direction; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* args) @@ -187,17 +147,18 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) grib_accessor_change_scanning_direction* self = (grib_accessor_change_scanning_direction*)a; grib_context* c = a->context; grib_handle* h = grib_handle_of_accessor(a); + const char* cclass_name = a->cclass->name; if (*val == 0) return 0; /* Make sure Ni / Nj are not missing */ if (grib_is_missing(h, self->Ni, &err) && !err) { - grib_context_log(c, GRIB_LOG_ERROR, "change_scanning_direction: Key %s cannot be 'missing'!", self->Ni); + grib_context_log(c, GRIB_LOG_ERROR, "%s: Key %s cannot be 'missing'!", cclass_name, self->Ni); return GRIB_WRONG_GRID; } if (grib_is_missing(h, self->Nj, &err) && !err) { - grib_context_log(c, GRIB_LOG_ERROR, "change_scanning_direction: Key %s cannot be 'missing'!", self->Nj); + grib_context_log(c, GRIB_LOG_ERROR, "%s: Key %s cannot be 'missing'!", cclass_name, self->Nj); return GRIB_WRONG_GRID; } @@ -220,7 +181,7 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) return err; if (size > Ni * Nj) { - grib_context_log(c, GRIB_LOG_ERROR, "change_scanning_direction: wrong values size!=Ni*Nj (%ld!=%ld*%ld)", size, Ni, Nj); + grib_context_log(c, GRIB_LOG_ERROR, "%s: Wrong values size!=Ni*Nj (%ld!=%ld*%ld)", cclass_name, size, Ni, Nj); return GRIB_WRONG_ARRAY_SIZE; } diff --git a/src/grib_accessor_class_check_internal_version.cc b/src/grib_accessor_class_check_internal_version.cc index 6e7e1d9ba..d59f353de 100644 --- a/src/grib_accessor_class_check_internal_version.cc +++ b/src/grib_accessor_class_check_internal_version.cc @@ -34,7 +34,6 @@ or edit "accessor.class" and rerun ./make_class.pl static size_t string_length(grib_accessor*); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_check_internal_version { @@ -51,32 +50,32 @@ static grib_accessor_class _grib_accessor_class_check_internal_version = { "check_internal_version", /* name */ sizeof(grib_accessor_check_internal_version), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -85,10 +84,10 @@ static grib_accessor_class _grib_accessor_class_check_internal_version = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -97,46 +96,6 @@ static grib_accessor_class _grib_accessor_class_check_internal_version = { grib_accessor_class* grib_accessor_class_check_internal_version = &_grib_accessor_class_check_internal_version; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ /* This is the internal engine version number */ diff --git a/src/grib_accessor_class_closest_date.cc b/src/grib_accessor_class_closest_date.cc index b735e3aed..b4729822f 100644 --- a/src/grib_accessor_class_closest_date.cc +++ b/src/grib_accessor_class_closest_date.cc @@ -48,7 +48,6 @@ static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_closest_date { @@ -74,32 +73,32 @@ static grib_accessor_class _grib_accessor_class_closest_date = { "closest_date", /* name */ sizeof(grib_accessor_closest_date), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -108,10 +107,10 @@ static grib_accessor_class _grib_accessor_class_closest_date = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -120,45 +119,6 @@ static grib_accessor_class _grib_accessor_class_closest_date = { grib_accessor_class* grib_accessor_class_closest_date = &_grib_accessor_class_closest_date; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_codeflag.cc b/src/grib_accessor_class_codeflag.cc index 4f2eba341..77789389d 100644 --- a/src/grib_accessor_class_codeflag.cc +++ b/src/grib_accessor_class_codeflag.cc @@ -39,7 +39,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_codeflag { @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_codeflag = { "codeflag", /* name */ sizeof(grib_accessor_codeflag), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_codeflag = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,46 +105,6 @@ static grib_accessor_class _grib_accessor_class_codeflag = { grib_accessor_class* grib_accessor_class_codeflag = &_grib_accessor_class_codeflag; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* param) @@ -158,7 +117,7 @@ static void init(grib_accessor* a, const long len, grib_arguments* param) static int test_bit(long a, long b) { - DebugAssert(b>=0); + DEBUG_ASSERT(b>=0); return a & (1 << b); } @@ -194,11 +153,9 @@ static int grib_get_codeflag(grib_accessor* a, long code, char* codename) return GRIB_FILE_NOT_FOUND; } -#if 0 - strcpy(codename, self->tablename); - strcat(codename,": "); - j = strlen(codename); -#endif + // strcpy(codename, self->tablename); + // strcat(codename,": "); + // j = strlen(codename); while (fgets(line, sizeof(line) - 1, f)) { sscanf(line, "%49s %49s", num, bval); diff --git a/src/grib_accessor_class_codetable.cc b/src/grib_accessor_class_codetable.cc index 8b525e246..0f594456c 100644 --- a/src/grib_accessor_class_codetable.cc +++ b/src/grib_accessor_class_codetable.cc @@ -13,7 +13,7 @@ ****************************************/ #include "grib_api_internal.h" -#include +#include #if GRIB_PTHREADS static pthread_once_t once = PTHREAD_ONCE_INIT; @@ -79,7 +79,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_codetable { @@ -104,32 +103,32 @@ static grib_accessor_class _grib_accessor_class_codetable = { "codetable", /* name */ sizeof(grib_accessor_codetable), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ &pack_expression, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -138,10 +137,10 @@ static grib_accessor_class _grib_accessor_class_codetable = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -150,41 +149,6 @@ static grib_accessor_class _grib_accessor_class_codetable = { grib_accessor_class* grib_accessor_class_codetable = &_grib_accessor_class_codetable; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int grib_load_codetable(grib_context* c, const char* filename, @@ -197,7 +161,7 @@ static void init(grib_accessor* a, const long len, grib_arguments* params) grib_handle* hand = grib_handle_of_accessor(a); grib_accessor_codetable* self = (grib_accessor_codetable*)a; grib_action* act = (grib_action*)(a->creator); - DebugAssert(len == self->nbytes); + DEBUG_ASSERT(len == self->nbytes); if (new_len == 0) { /* ECC-485: When the codetable length is 0, it means we are passing @@ -642,11 +606,7 @@ static int unpack_string(grib_accessor* a, char* buffer, size_t* len) strcpy(tmp, table->entries[value].abbreviation); } else { -#if 1 snprintf(tmp, sizeof(tmp), "%d", (int)value); -#else - return GRIB_DECODING_ERROR; -#endif } l = strlen(tmp) + 1; diff --git a/src/grib_accessor_class_codetable_title.cc b/src/grib_accessor_class_codetable_title.cc index 897a7b2b2..88d2a0e91 100644 --- a/src/grib_accessor_class_codetable_title.cc +++ b/src/grib_accessor_class_codetable_title.cc @@ -35,7 +35,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int unpack_string(grib_accessor*, char*, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_codetable_title { @@ -52,32 +51,32 @@ static grib_accessor_class _grib_accessor_class_codetable_title = { "codetable_title", /* name */ sizeof(grib_accessor_codetable_title), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -86,10 +85,10 @@ static grib_accessor_class _grib_accessor_class_codetable_title = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -98,46 +97,6 @@ static grib_accessor_class _grib_accessor_class_codetable_title = { grib_accessor_class* grib_accessor_class_codetable_title = &_grib_accessor_class_codetable_title; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ typedef struct grib_accessor_codetable @@ -191,11 +150,7 @@ static int unpack_string(grib_accessor* a, char* buffer, size_t* len) strcpy(tmp, table->entries[value].title); } else { -#if 1 snprintf(tmp, sizeof(tmp), "%d", (int)value); -#else - return GRIB_DECODING_ERROR; -#endif } l = strlen(tmp) + 1; diff --git a/src/grib_accessor_class_codetable_units.cc b/src/grib_accessor_class_codetable_units.cc index 9f1d40e0a..55faaa0bb 100644 --- a/src/grib_accessor_class_codetable_units.cc +++ b/src/grib_accessor_class_codetable_units.cc @@ -35,7 +35,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int unpack_string(grib_accessor*, char*, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_codetable_units { @@ -52,32 +51,32 @@ static grib_accessor_class _grib_accessor_class_codetable_units = { "codetable_units", /* name */ sizeof(grib_accessor_codetable_units), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -86,10 +85,10 @@ static grib_accessor_class _grib_accessor_class_codetable_units = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -98,46 +97,6 @@ static grib_accessor_class _grib_accessor_class_codetable_units = { grib_accessor_class* grib_accessor_class_codetable_units = &_grib_accessor_class_codetable_units; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ typedef struct grib_accessor_codetable diff --git a/src/grib_accessor_class_concept.cc b/src/grib_accessor_class_concept.cc index f89072177..a0204b1ad 100644 --- a/src/grib_accessor_class_concept.cc +++ b/src/grib_accessor_class_concept.cc @@ -52,7 +52,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_concept @@ -69,32 +68,32 @@ static grib_accessor_class _grib_accessor_class_concept = { "concept", /* name */ sizeof(grib_accessor_concept), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -103,10 +102,10 @@ static grib_accessor_class _grib_accessor_class_concept = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -115,37 +114,6 @@ static grib_accessor_class _grib_accessor_class_concept = { grib_accessor_class* grib_accessor_class_concept = &_grib_accessor_class_concept; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ #define MAX_CONCEPT_STRING_LENGTH 255 @@ -388,7 +356,7 @@ static int grib_concept_apply(grib_accessor* a, const char* name) grib_action* act = a->creator; int nofail = action_concept_get_nofail(a); - DebugAssert(concepts); + DEBUG_ASSERT(concepts); c = (grib_concept_value*)grib_trie_get(concepts->index, name); @@ -410,9 +378,16 @@ static int grib_concept_apply(grib_accessor* a, const char* name) grib_get_string(h, "centre", centre_s, ¢re_len) == GRIB_SUCCESS) { grib_context_log(h->context, GRIB_LOG_ERROR, "concept: input handle edition=%ld, centre=%s", editionNumber, centre_s); } - if (strcmp(act->name, "paramId") == 0 && string_to_long(name, &dummy) == GRIB_SUCCESS) { - grib_context_log(h->context, GRIB_LOG_ERROR, + if (strcmp(act->name, "paramId") == 0) { + if (string_to_long(name, &dummy) == GRIB_SUCCESS) { + // The paramId value is an integer. Show them the param DB + grib_context_log(h->context, GRIB_LOG_ERROR, "Please check the Parameter Database 'https://codes.ecmwf.int/grib/param-db/?id=%s'", name); + } else { + // paramId being set to a non-integer + grib_context_log(h->context, GRIB_LOG_ERROR, + "The paramId value should be an integer. Are you trying to set the shortName?"); + } } if (strcmp(act->name, "shortName") == 0) { grib_context_log(h->context, GRIB_LOG_ERROR, @@ -473,10 +448,10 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) char buf[80]; size_t s; snprintf(buf, sizeof(buf), "%ld", *val); -#if 0 - if(*len > 1) - return GRIB_NOT_IMPLEMENTED; -#endif + + //if(*len > 1) + // return GRIB_NOT_IMPLEMENTED; + s = strlen(buf) + 1; return pack_string(a, buf, &s); } @@ -607,62 +582,9 @@ static int get_native_type(grib_accessor* a) static void destroy(grib_context* c, grib_accessor* a) { - /* - * grib_accessor_concept *self = (grib_accessor_concept*)a; - * grib_context_free(c,self->cval); - */ -} - -#if 0 -static int is_local_ecmwf_grib2_param_key(grib_accessor* a, long edition, long centre) -{ - if (edition == 2 && centre == 98) { - if (a->parent->owner && a->parent->owner->name && strcmp(a->parent->owner->name, "parameters") == 0) - return 1; - } - return 0; + //grib_accessor_concept *self = (grib_accessor_concept*)a; + //grib_context_free(c,self->cval); } -#endif - -#if 0 -/* Try to get the name, shortName, units etc for a GRIB2 message with - * local ECMWF coding i.e. discipline=192 etc - */ -static const char* get_ECMWF_local_parameter(grib_accessor* a, grib_handle* h) -{ - int err = 0; - const char* key_name = a->name; /*this is the key whose value we want*/ - long edition, centre; - if (h->product_kind != PRODUCT_GRIB) - return NULL; - err = grib_get_long(h, "centre", ¢re); - if (err) - return NULL; - err = grib_get_long(h, "edition", &edition); - if (err) - return NULL; - if (is_local_ecmwf_grib2_param_key(a, edition, centre)) { - /* Must be one of: 'name', 'shortName', 'units', 'cfName' etc */ - grib_accessor* a2 = NULL; - const long pid_guess = guess_paramId(h); - if (pid_guess == -1) - return NULL; - - /* Change the paramId so we can get the other string key*/ - err = grib_set_long(h, "paramId", pid_guess); - if (err) - return NULL; - /* Get the string value of key. Do not call grib_get_string() to avoid - * dangers of infinite recursion as that calls unpack_string()! - */ - a2 = grib_find_accessor(h, key_name); - if (!a2) - return NULL; - return concept_evaluate(a2); - } - return NULL; -} -#endif static int unpack_string(grib_accessor* a, char* val, size_t* len) { @@ -687,14 +609,14 @@ static int unpack_string(grib_accessor* a, char* val, size_t* len) } strcpy(val, p); /* NOLINT: CWE-119 clang-analyzer-security.insecureAPI.strcpy */ *len = slen; -#if 0 - if (a->context->debug==1) { - int err = 0; - char result[1024] = {0,}; - err = get_concept_condition_string(grib_handle_of_accessor(a), a->name, val, result); - if (!err) fprintf(stderr, "ECCODES DEBUG concept name=%s, value=%s, conditions=%s\n", a->name, val, result); - } -#endif + +// if (a->context->debug==1) { +// int err = 0; +// char result[1024] = {0,}; +// err = get_concept_condition_string(grib_handle_of_accessor(a), a->name, val, result); +// if (!err) fprintf(stderr, "ECCODES DEBUG concept name=%s, value=%s, conditions=%s\n", a->name, val, result); +// } + return GRIB_SUCCESS; } diff --git a/src/grib_accessor_class_constant.cc b/src/grib_accessor_class_constant.cc index 6c5bbda84..0c98a2d4d 100644 --- a/src/grib_accessor_class_constant.cc +++ b/src/grib_accessor_class_constant.cc @@ -40,7 +40,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int pack_long(grib_accessor*, const long* val, size_t* len); static int pack_string(grib_accessor*, const char*, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_constant { @@ -61,32 +60,32 @@ static grib_accessor_class _grib_accessor_class_constant = { "constant", /* name */ sizeof(grib_accessor_constant), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - &pack_bytes, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + &pack_bytes, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -95,10 +94,10 @@ static grib_accessor_class _grib_accessor_class_constant = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -107,58 +106,8 @@ static grib_accessor_class _grib_accessor_class_constant = { grib_accessor_class* grib_accessor_class_constant = &_grib_accessor_class_constant; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ -void accessor_constant_set_type(grib_accessor* a, int type) -{ - grib_accessor_constant* self = (grib_accessor_constant*)a; - self->type = type; -} - -void accessor_constant_set_dval(grib_accessor* a, double dval) -{ - grib_accessor_constant* self = (grib_accessor_constant*)a; - self->dval = dval; -} - static void init(grib_accessor* a, const long len, grib_arguments* arg) { a->flags |= GRIB_ACCESSOR_FLAG_READ_ONLY; diff --git a/src/grib_accessor_class_count_file.cc b/src/grib_accessor_class_count_file.cc index ad40e2cbe..196a48038 100644 --- a/src/grib_accessor_class_count_file.cc +++ b/src/grib_accessor_class_count_file.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_count_file { @@ -53,32 +52,32 @@ static grib_accessor_class _grib_accessor_class_count_file = { "count_file", /* name */ sizeof(grib_accessor_count_file), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -87,10 +86,10 @@ static grib_accessor_class _grib_accessor_class_count_file = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -99,47 +98,6 @@ static grib_accessor_class _grib_accessor_class_count_file = { grib_accessor_class* grib_accessor_class_count_file = &_grib_accessor_class_count_file; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_count_missing.cc b/src/grib_accessor_class_count_missing.cc index b7c2b66e3..32f7f16c8 100644 --- a/src/grib_accessor_class_count_missing.cc +++ b/src/grib_accessor_class_count_missing.cc @@ -39,7 +39,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_count_missing { @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_count_missing = { "count_missing", /* name */ sizeof(grib_accessor_count_missing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_count_missing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,46 +105,6 @@ static grib_accessor_class _grib_accessor_class_count_missing = { grib_accessor_class* grib_accessor_class_count_missing = &_grib_accessor_class_count_missing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static const unsigned char bitsoff[] = { @@ -167,26 +126,6 @@ static const unsigned char bitsoff[] = { 0 }; -/* -static const unsigned char bitson[]={ -0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, -2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, -2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, -4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, -2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, -4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, -4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, -6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, -2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, -4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, -4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, -6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, -4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, -6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, -6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, -8 }; -*/ - static void init(grib_accessor* a, const long len, grib_arguments* arg) { int n = 0; diff --git a/src/grib_accessor_class_count_total.cc b/src/grib_accessor_class_count_total.cc index cf5ed7972..022cc4998 100644 --- a/src/grib_accessor_class_count_total.cc +++ b/src/grib_accessor_class_count_total.cc @@ -38,7 +38,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_count_total { @@ -55,32 +54,32 @@ static grib_accessor_class _grib_accessor_class_count_total = { "count_total", /* name */ sizeof(grib_accessor_count_total), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -89,10 +88,10 @@ static grib_accessor_class _grib_accessor_class_count_total = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -101,47 +100,6 @@ static grib_accessor_class _grib_accessor_class_count_total = { grib_accessor_class* grib_accessor_class_count_total = &_grib_accessor_class_count_total; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_data_2order_packing.cc b/src/grib_accessor_class_data_2order_packing.cc index 5d93ef8f8..59f50d2ea 100644 --- a/src/grib_accessor_class_data_2order_packing.cc +++ b/src/grib_accessor_class_data_2order_packing.cc @@ -8,6 +8,7 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" /* @@ -62,7 +63,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_2order_packing { @@ -107,32 +107,32 @@ static grib_accessor_class _grib_accessor_class_data_2order_packing = { "data_2order_packing", /* name */ sizeof(grib_accessor_data_2order_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -141,10 +141,10 @@ static grib_accessor_class _grib_accessor_class_data_2order_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -153,45 +153,6 @@ static grib_accessor_class _grib_accessor_class_data_2order_packing = { grib_accessor_class* grib_accessor_class_data_2order_packing = &_grib_accessor_class_data_2order_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -654,8 +615,8 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) if (boustrophedonic) reverse_rows(sec_val, n_vals, Ni, bitmap, bitmap_len); - s = grib_power(binary_scale_factor, 2); - d = grib_power(-decimal_scale_factor, 10); + s = codes_power(binary_scale_factor, 2); + d = codes_power(-decimal_scale_factor, 10); for (i = 0; i < n_vals; i++) val[i] = (double)((((double)sec_val[i]) * s) + reference_value) * d; @@ -682,6 +643,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) { grib_accessor_data_2order_packing* self = (grib_accessor_data_2order_packing*)a; grib_handle* gh = grib_handle_of_accessor(a); + const char* cclass_name = a->cclass->name; size_t i = 0; size_t j = 0; @@ -796,7 +758,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) /* calculation of integer array */ sec_val = (unsigned long*)grib_context_malloc(a->context, (n_vals) * sizeof(long)); - d = grib_power(decimal_scale_factor, 10); + d = codes_power(decimal_scale_factor, 10); max = val[0]; min = max; for (i = 0; i < n_vals; i++) { @@ -818,7 +780,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) /* the scale factor in Grib 1 is adjusted in gribex, for "normalization purpose" ... ?*/ binary_scale_factor = grib_get_binary_scale_fact(max, reference_value, bits_per_value, &err); - divisor = grib_power(-binary_scale_factor, 2); + divisor = codes_power(-binary_scale_factor, 2); for (i = 0; i < n_vals; i++) @@ -946,10 +908,14 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) return err; { - /* Make sure we can decode it again */ + // Make sure we can decode it again double ref = 1e-100; grib_get_double_internal(gh, self->reference_value, &ref); - Assert(ref == reference_value); + if (ref != reference_value) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s %s: %s (ref=%.10e != reference_value=%.10e)", + cclass_name, __func__, self->reference_value, ref, reference_value); + return GRIB_INTERNAL_ERROR; + } } if ((err = grib_set_long_internal(gh, self->binary_scale_factor, binary_scale_factor)) != GRIB_SUCCESS) diff --git a/src/grib_accessor_class_data_apply_bitmap.cc b/src/grib_accessor_class_data_apply_bitmap.cc index 91686bafc..b8e77e9d0 100644 --- a/src/grib_accessor_class_data_apply_bitmap.cc +++ b/src/grib_accessor_class_data_apply_bitmap.cc @@ -8,9 +8,7 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -#include "grib_api_internal_cpp.h" -#include -#include +#include "grib_value.h" /* This is used by make_class.pl @@ -50,7 +48,6 @@ static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int unpack_double_element(grib_accessor*, size_t i, double* val); static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array); @@ -74,32 +71,32 @@ static grib_accessor_class _grib_accessor_class_data_apply_bitmap = { "data_apply_bitmap", /* name */ sizeof(grib_accessor_data_apply_bitmap), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - &unpack_float, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -108,10 +105,10 @@ static grib_accessor_class _grib_accessor_class_data_apply_bitmap = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -120,40 +117,6 @@ static grib_accessor_class _grib_accessor_class_data_apply_bitmap = { grib_accessor_class* grib_accessor_class_data_apply_bitmap = &_grib_accessor_class_data_apply_bitmap; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -473,8 +436,8 @@ static int unpack_float(grib_accessor* a, float* val, size_t* len) static int get_native_type(grib_accessor* a) { - /* grib_accessor_data_apply_bitmap* self = (grib_accessor_data_apply_bitmap*)a; - return grib_accessor_get_native_type(grib_find_accessor(grib_handle_of_accessor(a),self->coded_values));*/ + //grib_accessor_data_apply_bitmap* self = (grib_accessor_data_apply_bitmap*)a; + //return grib_accessor_get_native_type(grib_find_accessor(grib_handle_of_accessor(a),self->coded_values)); return GRIB_TYPE_DOUBLE; } diff --git a/src/grib_accessor_class_data_apply_boustrophedonic.cc b/src/grib_accessor_class_data_apply_boustrophedonic.cc index c512cc4a3..1f10885e0 100644 --- a/src/grib_accessor_class_data_apply_boustrophedonic.cc +++ b/src/grib_accessor_class_data_apply_boustrophedonic.cc @@ -47,7 +47,6 @@ static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int unpack_double_element(grib_accessor*, size_t i, double* val); static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array); @@ -70,32 +69,32 @@ static grib_accessor_class _grib_accessor_class_data_apply_boustrophedonic = { "data_apply_boustrophedonic", /* name */ sizeof(grib_accessor_data_apply_boustrophedonic), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - &unpack_float, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -104,10 +103,10 @@ static grib_accessor_class _grib_accessor_class_data_apply_boustrophedonic = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -116,40 +115,6 @@ static grib_accessor_class _grib_accessor_class_data_apply_boustrophedonic = { grib_accessor_class* grib_accessor_class_data_apply_boustrophedonic = &_grib_accessor_class_data_apply_boustrophedonic; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) diff --git a/src/grib_accessor_class_data_apply_boustrophedonic_bitmap.cc b/src/grib_accessor_class_data_apply_boustrophedonic_bitmap.cc index a1aa5c812..b68e362db 100644 --- a/src/grib_accessor_class_data_apply_boustrophedonic_bitmap.cc +++ b/src/grib_accessor_class_data_apply_boustrophedonic_bitmap.cc @@ -48,7 +48,6 @@ static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int unpack_double_element(grib_accessor*, size_t i, double* val); static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array); @@ -73,32 +72,32 @@ static grib_accessor_class _grib_accessor_class_data_apply_boustrophedonic_bitma "data_apply_boustrophedonic_bitmap", /* name */ sizeof(grib_accessor_data_apply_boustrophedonic_bitmap), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -107,10 +106,10 @@ static grib_accessor_class _grib_accessor_class_data_apply_boustrophedonic_bitma 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -119,41 +118,6 @@ static grib_accessor_class _grib_accessor_class_data_apply_boustrophedonic_bitma grib_accessor_class* grib_accessor_class_data_apply_boustrophedonic_bitmap = &_grib_accessor_class_data_apply_boustrophedonic_bitmap; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -533,8 +497,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) static int get_native_type(grib_accessor* a) { - /* grib_accessor_data_apply_boustrophedonic_bitmap* self = (grib_accessor_data_apply_boustrophedonic_bitmap*)a; - return grib_accessor_get_native_type(grib_find_accessor(grib_handle_of_accessor(a),self->coded_values));*/ + //grib_accessor_data_apply_boustrophedonic_bitmap* self = (grib_accessor_data_apply_boustrophedonic_bitmap*)a; + //return grib_accessor_get_native_type(grib_find_accessor(grib_handle_of_accessor(a),self->coded_values)); return GRIB_TYPE_DOUBLE; } diff --git a/src/grib_accessor_class_data_apply_gdsnotpresent.cc b/src/grib_accessor_class_data_apply_gdsnotpresent.cc index 1e7c38e57..417e39067 100644 --- a/src/grib_accessor_class_data_apply_gdsnotpresent.cc +++ b/src/grib_accessor_class_data_apply_gdsnotpresent.cc @@ -53,7 +53,6 @@ static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_apply_gdsnotpresent { @@ -77,32 +76,32 @@ static grib_accessor_class _grib_accessor_class_data_apply_gdsnotpresent = { "data_apply_gdsnotpresent", /* name */ sizeof(grib_accessor_data_apply_gdsnotpresent), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -111,10 +110,10 @@ static grib_accessor_class _grib_accessor_class_data_apply_gdsnotpresent = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -123,43 +122,6 @@ static grib_accessor_class _grib_accessor_class_data_apply_gdsnotpresent = { grib_accessor_class* grib_accessor_class_data_apply_gdsnotpresent = &_grib_accessor_class_data_apply_gdsnotpresent; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -261,17 +223,17 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) if (latitude_of_first_point == 0) { for (i = 0; i < number_of_values; i++) { - DebugAssert(coded_vals); + DEBUG_ASSERT(coded_vals); if (coded_vals) val[i] = coded_vals[i]; } for (i = number_of_values; i < number_of_points; i++) { - DebugAssert(coded_vals); + DEBUG_ASSERT(coded_vals); if (coded_vals) val[i] = coded_vals[number_of_values - 1]; } } else { for (i = 0; i < ni - 1; i++) { - DebugAssert(coded_vals); + DEBUG_ASSERT(coded_vals); if (coded_vals) val[i] = coded_vals[0]; } for (i = ni - 1; i < number_of_points; i++) { @@ -302,13 +264,11 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) return ret; } -#if 0 - if(!grib_find_accessor(grib_handle_of_accessor(a),self->bitmap)){ - grib_context_log(a->context, GRIB_LOG_ERROR, - "Accessor %s cannot access bitmap \n", a->name, self->bitmap_present, ret); - return ret; - } -#endif +// if(!grib_find_accessor(grib_handle_of_accessor(a),self->bitmap)){ +// grib_context_log(a->context, GRIB_LOG_ERROR, +// "Accessor %s cannot access bitmap \n", a->name, self->bitmap_present, ret); +// return ret; +// } ret = grib_set_double_array_internal(grib_handle_of_accessor(a), self->coded_values, val, *len); if (ret) { @@ -322,8 +282,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) static int get_native_type(grib_accessor* a) { - /* grib_accessor_data_apply_gdsnotpresent* self = (grib_accessor_data_apply_gdsnotpresent*)a; - return grib_accessor_get_native_type(grib_find_accessor(grib_handle_of_accessor(a),self->coded_values));*/ + // grib_accessor_data_apply_gdsnotpresent* self = (grib_accessor_data_apply_gdsnotpresent*)a; + // return grib_accessor_get_native_type(grib_find_accessor(grib_handle_of_accessor(a),self->coded_values)); return GRIB_TYPE_DOUBLE; } diff --git a/src/grib_accessor_class_data_ccsds_packing.cc b/src/grib_accessor_class_data_ccsds_packing.cc index d465a7d58..3b5cee87d 100644 --- a/src/grib_accessor_class_data_ccsds_packing.cc +++ b/src/grib_accessor_class_data_ccsds_packing.cc @@ -8,9 +8,10 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -#include "grib_api_internal_cpp.h" -#include +#include "grib_bits_any_endian_simple.h" +#include "grib_scaling.h" #include +#include /* This is used by make_class.pl @@ -28,10 +29,9 @@ MEMBERS=const char* reference_value MEMBERS=const char* binary_scale_factor MEMBERS=const char* decimal_scale_factor + MEMBERS=const char* optimize_scaling_factor MEMBERS=const char* bits_per_value - MEMBERS=const char* number_of_data_points - MEMBERS=const char* ccsds_flags MEMBERS=const char* ccsds_block_size MEMBERS=const char* ccsds_rsi @@ -55,7 +55,6 @@ static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int unpack_double_element(grib_accessor*, size_t i, double* val); static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array); @@ -74,6 +73,7 @@ typedef struct grib_accessor_data_ccsds_packing const char* reference_value; const char* binary_scale_factor; const char* decimal_scale_factor; + const char* optimize_scaling_factor; const char* bits_per_value; const char* number_of_data_points; const char* ccsds_flags; @@ -88,32 +88,32 @@ static grib_accessor_class _grib_accessor_class_data_ccsds_packing = { "data_ccsds_packing", /* name */ sizeof(grib_accessor_data_ccsds_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - &unpack_float, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -122,10 +122,10 @@ static grib_accessor_class _grib_accessor_class_data_ccsds_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -134,59 +134,23 @@ static grib_accessor_class _grib_accessor_class_data_ccsds_packing = { grib_accessor_class* grib_accessor_class_data_ccsds_packing = &_grib_accessor_class_data_ccsds_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) { grib_accessor_data_ccsds_packing* self = (grib_accessor_data_ccsds_packing*)a; - - self->number_of_values = grib_arguments_get_name(grib_handle_of_accessor(a), args, self->carg++); - self->reference_value = grib_arguments_get_name(grib_handle_of_accessor(a), args, self->carg++); - self->binary_scale_factor = grib_arguments_get_name(grib_handle_of_accessor(a), args, self->carg++); - self->decimal_scale_factor = grib_arguments_get_name(grib_handle_of_accessor(a), args, self->carg++); - self->bits_per_value = grib_arguments_get_name(grib_handle_of_accessor(a), args, self->carg++); - - self->number_of_data_points = grib_arguments_get_name(grib_handle_of_accessor(a), args, self->carg++); - - self->ccsds_flags = grib_arguments_get_name(grib_handle_of_accessor(a), args, self->carg++); - self->ccsds_block_size = grib_arguments_get_name(grib_handle_of_accessor(a), args, self->carg++); - self->ccsds_rsi = grib_arguments_get_name(grib_handle_of_accessor(a), args, self->carg++); + grib_handle* h = grib_handle_of_accessor(a); + + self->number_of_values = grib_arguments_get_name(h, args, self->carg++); + self->reference_value = grib_arguments_get_name(h, args, self->carg++); + self->binary_scale_factor = grib_arguments_get_name(h, args, self->carg++); + self->decimal_scale_factor = grib_arguments_get_name(h, args, self->carg++); + self->optimize_scaling_factor = grib_arguments_get_name(h, args, self->carg++); + self->bits_per_value = grib_arguments_get_name(h, args, self->carg++); + self->number_of_data_points = grib_arguments_get_name(h, args, self->carg++); + self->ccsds_flags = grib_arguments_get_name(h, args, self->carg++); + self->ccsds_block_size = grib_arguments_get_name(h, args, self->carg++); + self->ccsds_rsi = grib_arguments_get_name(h, args, self->carg++); a->flags |= GRIB_ACCESSOR_FLAG_DATA; } @@ -194,7 +158,7 @@ static void init(grib_accessor* a, const long v, grib_arguments* args) static int value_count(grib_accessor* a, long* count) { grib_accessor_data_ccsds_packing* self = (grib_accessor_data_ccsds_packing*)a; - *count = 0; + *count = 0; return grib_get_long_internal(grib_handle_of_accessor(a), self->number_of_values, count); } @@ -206,7 +170,24 @@ static int value_count(grib_accessor* a, long* count) #error Version of libaec appears to be too old. Please upgrade. #endif -const char* aec_get_error_message(int code) +static bool is_big_endian() +{ + unsigned char is_big_endian = 0; + unsigned short endianess_test = 1; + return reinterpret_cast(&endianess_test)[0] == is_big_endian; +} + +static void modify_aec_flags(long* flags) +{ + // ECC-1602: Performance improvement: enabled the use of native data types + *flags &= ~AEC_DATA_3BYTE; // disable support for 3-bytes per value + if (is_big_endian()) + *flags |= AEC_DATA_MSB; // enable big-endian + else + *flags &= ~AEC_DATA_MSB; // enable little-endian +} + +static const char* aec_get_error_message(int code) { if (code == AEC_MEM_ERROR) return "AEC_MEM_ERROR"; if (code == AEC_DATA_ERROR) return "AEC_DATA_ERROR"; @@ -216,7 +197,7 @@ const char* aec_get_error_message(int code) return "Unknown error code"; } -void print_aec_stream_info(struct aec_stream* strm, const char* func) +static void print_aec_stream_info(struct aec_stream* strm, const char* func) { fprintf(stderr, "ECCODES DEBUG CCSDS %s aec_stream.flags=%u\n", func, strm->flags); fprintf(stderr, "ECCODES DEBUG CCSDS %s aec_stream.bits_per_sample=%u\n", func, strm->bits_per_sample); @@ -231,6 +212,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) grib_accessor_data_ccsds_packing* self = (grib_accessor_data_ccsds_packing*)a; grib_handle* hand = grib_handle_of_accessor(a); + const char* cclass_name = a->cclass->name; int err = GRIB_SUCCESS; size_t buflen = 0, i = 0; bool is_constant_field = false; @@ -241,6 +223,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) long binary_scale_factor = 0; long decimal_scale_factor = 0; + //long optimize_scaling_factor = 0; double reference_value = 0; long bits_per_value = 0; double max, min, d, divisor; @@ -266,6 +249,9 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if ((err = grib_get_long_internal(hand, self->decimal_scale_factor, &decimal_scale_factor)) != GRIB_SUCCESS) return err; + //if ((err = grib_get_long_internal(gh, self->optimize_scaling_factor, &optimize_scaling_factor)) != GRIB_SUCCESS) + // return err; + if ((err = grib_get_long_internal(hand, self->ccsds_flags, &ccsds_flags)) != GRIB_SUCCESS) return err; if ((err = grib_get_long_internal(hand, self->ccsds_block_size, &ccsds_block_size)) != GRIB_SUCCESS) @@ -273,12 +259,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if ((err = grib_get_long_internal(hand, self->ccsds_rsi, &ccsds_rsi)) != GRIB_SUCCESS) return err; - // ECC-1602: Performance improvement - ccsds_flags &= ~AEC_DATA_MSB; // set little-endian flag - ccsds_flags &= ~AEC_DATA_3BYTE; // disable support for 3-bytes per value - unsigned short is_little_endian = 1; - if (reinterpret_cast(&is_little_endian)[0] == 0) - ccsds_flags |= AEC_DATA_MSB; + modify_aec_flags(&ccsds_flags); // Special case if (*len == 0) { @@ -314,7 +295,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) #endif if (grib_get_nearest_smaller_value(hand, self->reference_value, val[0], &reference_value) != GRIB_SUCCESS) { grib_context_log(a->context, GRIB_LOG_ERROR, - "CCSDS pack_double: unable to find nearest_smaller_value of %g for %s", min, self->reference_value); + "%s %s: unable to find nearest_smaller_value of %g for %s", cclass_name, __func__, min, self->reference_value); return GRIB_INTERNAL_ERROR; } if ((err = grib_set_double_internal(hand, self->reference_value, reference_value)) != GRIB_SUCCESS) @@ -335,20 +316,20 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) return err; if (bits_per_value == 0 || (binary_scale_factor == 0 && decimal_scale_factor != 0)) { - d = grib_power(decimal_scale_factor, 10); + d = codes_power(decimal_scale_factor, 10); min *= d; max *= d; if (grib_get_nearest_smaller_value(hand, self->reference_value, min, &reference_value) != GRIB_SUCCESS) { grib_context_log(a->context, GRIB_LOG_ERROR, - "CCSDS pack_double: unable to find nearest_smaller_value of %g for %s", min, self->reference_value); + "%s %s: unable to find nearest_smaller_value of %g for %s", cclass_name, __func__, min, self->reference_value); return GRIB_INTERNAL_ERROR; } if (reference_value > min) { grib_context_log(a->context, GRIB_LOG_ERROR, - "CCSDS pack_double: reference_value=%g min_value=%g diff=%g", reference_value, min, reference_value - min); - DebugAssert(reference_value <= min); + "%s %s: reference_value=%g min_value=%g diff=%g", cclass_name, __func__, reference_value, min, reference_value - min); + DEBUG_ASSERT(reference_value <= min); return GRIB_INTERNAL_ERROR; } } @@ -361,12 +342,13 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) double f = 0; double decimal = 1; - range = (max - min); - unscaled_min = min; - unscaled_max = max; - f = (grib_power(bits_per_value, 2) - 1); - minrange = grib_power(-last, 2) * f; - maxrange = grib_power(last, 2) * f; + decimal_scale_factor = 0; + range = (max - min); + unscaled_min = min; + unscaled_max = max; + f = (codes_power(bits_per_value, 2) - 1); + minrange = codes_power(-last, 2) * f; + maxrange = codes_power(last, 2) * f; while (range < minrange) { decimal_scale_factor += 1; @@ -382,28 +364,47 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) max = unscaled_max * decimal; range = (max - min); } + if (grib_get_nearest_smaller_value(hand, self->reference_value, min, &reference_value) != GRIB_SUCCESS) { grib_context_log(a->context, GRIB_LOG_ERROR, - "CCSDS pack_double: unable to find nearest_smaller_value of %g for %s", min, self->reference_value); + "%s %s: unable to find nearest_smaller_value of %g for %s", cclass_name, __func__, min, self->reference_value); return GRIB_INTERNAL_ERROR; } - d = grib_power(decimal_scale_factor, 10); + d = codes_power(decimal_scale_factor, 10); } binary_scale_factor = grib_get_binary_scale_fact(max, reference_value, bits_per_value, &err); - divisor = grib_power(-binary_scale_factor, 2); + divisor = codes_power(-binary_scale_factor, 2); size_t nbytes = (bits_per_value + 7) / 8; + // ECC-1602: use native a data type (4 bytes for uint32_t) for values that require only 3 bytes if (nbytes == 3) nbytes = 4; - encoded = (unsigned char*)grib_context_buffer_malloc_clear(a->context, nbytes * n_vals); + encoded = reinterpret_cast(grib_context_buffer_malloc_clear(a->context, nbytes * n_vals)); if (!encoded) { err = GRIB_OUT_OF_MEMORY; goto cleanup; } + /* + // Original code is memory efficient and supports 3 bytes per value + // replaced by ECC-1602 for performance reasons + buflen = 0; + p = encoded; + for (i = 0; i < n_vals; i++) { + long blen = bits8; + unsigned long unsigned_val = (unsigned long)((((val[i] * d) - reference_value) * divisor) + 0.5); + while (blen >= 8) { + blen -= 8; + *p = (unsigned_val >> blen); + p++; + buflen++; + } + } + */ + // ECC-1602: Performance improvement switch (nbytes) { case 1: @@ -422,13 +423,13 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) } break; default: - grib_context_log(a->context, GRIB_LOG_ERROR,"CCSDS pack_double: packing %s, bits_per_value=%ld (max 32)", - a->name, bits_per_value); + grib_context_log(a->context, GRIB_LOG_ERROR,"%s pack_double: packing %s, bits_per_value=%ld (max 32)", + cclass_name, a->name, bits_per_value); err = GRIB_INVALID_BPV; goto cleanup; } - grib_context_log(a->context, GRIB_LOG_DEBUG,"CCSDS pack_double: packing %s, %d values", a->name, n_vals); + grib_context_log(a->context, GRIB_LOG_DEBUG,"%s pack_double: packing %s, %zu values", cclass_name, a->name, n_vals); // ECC-1431: GRIB2: CCSDS encoding failure AEC_STREAM_ERROR buflen = (nbytes * n_vals) * 67 / 64 + 256; @@ -445,7 +446,11 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) // Make sure we can decode it again double ref = 1e-100; grib_get_double_internal(hand, self->reference_value, &ref); - Assert(ref == reference_value); + if (ref != reference_value) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s %s: %s (ref=%.10e != reference_value=%.10e)", + cclass_name, __func__, self->reference_value, ref, reference_value); + return GRIB_INTERNAL_ERROR; + } } if ((err = grib_set_long_internal(hand, self->binary_scale_factor, binary_scale_factor)) != GRIB_SUCCESS) @@ -464,20 +469,19 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) strm.next_in = encoded; strm.avail_in = nbytes * n_vals; + // This does not support spherical harmonics, and treats 24 differently than: // see http://cdo.sourcearchive.com/documentation/1.5.1.dfsg.1-1/cgribexlib_8c_source.html if (hand->context->debug) print_aec_stream_info(&strm, "pack_double"); if ((err = aec_buffer_encode(&strm)) != AEC_OK) { - grib_context_log(a->context, GRIB_LOG_ERROR, "CCSDS pack_double: aec_buffer_encode error %d (%s)\n", - err, aec_get_error_message(err)); + grib_context_log(a->context, GRIB_LOG_ERROR, "%s %s: aec_buffer_encode error %d (%s)", + cclass_name, __func__, err, aec_get_error_message(err)); err = GRIB_ENCODING_ERROR; goto cleanup; } - //printf("n_vals = %ld, bits8 = %ld\n", n_vals, bits8); - //printf("in %ld out => %zu\n", bits8/8*n_vals, buflen); buflen = strm.total_out; grib_buffer_replace(a, buf, buflen, 1, 1); @@ -499,7 +503,8 @@ static int unpack(grib_accessor* a, T* val, size_t* len) { static_assert(std::is_floating_point::value, "Requires floating point numbers"); grib_accessor_data_ccsds_packing* self = (grib_accessor_data_ccsds_packing*)a; - grib_handle* hand = grib_handle_of_accessor(a); + grib_handle* hand = grib_handle_of_accessor(a); + const char* cclass_name = a->cclass->name; int err = GRIB_SUCCESS, i = 0; size_t buflen = 0; @@ -547,12 +552,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len) if ((err = grib_get_long_internal(hand, self->ccsds_rsi, &ccsds_rsi)) != GRIB_SUCCESS) return err; - // ECC-1602: Performance improvement - ccsds_flags &= ~AEC_DATA_MSB; // set little-endian flag - ccsds_flags &= ~AEC_DATA_3BYTE; // disable support for 3-bytes per value - unsigned short is_little_endian = 1; - if (reinterpret_cast(&is_little_endian)[0] == 0) - ccsds_flags |= AEC_DATA_MSB; + modify_aec_flags(&ccsds_flags); // TODO(masn): This should be called upstream if (*len < n_vals) @@ -566,8 +566,8 @@ static int unpack(grib_accessor* a, T* val, size_t* len) return GRIB_SUCCESS; } - bscale = grib_power(binary_scale_factor, 2); - dscale = grib_power(-decimal_scale_factor, 10); + bscale = codes_power(binary_scale_factor, 2); + dscale = codes_power(-decimal_scale_factor, 10); buflen = grib_byte_count(a); buf = (unsigned char*)hand->buffer->data; @@ -586,7 +586,6 @@ static int unpack(grib_accessor* a, T* val, size_t* len) nbytes = 4; size = n_vals * nbytes; - decoded = (unsigned char*)grib_context_buffer_malloc_clear(a->context, size); if (!decoded) { err = GRIB_OUT_OF_MEMORY; @@ -598,13 +597,13 @@ static int unpack(grib_accessor* a, T* val, size_t* len) if (hand->context->debug) print_aec_stream_info(&strm, "unpack_*"); if ((err = aec_buffer_decode(&strm)) != AEC_OK) { - grib_context_log(a->context, GRIB_LOG_ERROR, "CCSDS %s: aec_buffer_decode error %d (%s)\n", - __func__, err, aec_get_error_message(err)); - err = GRIB_ENCODING_ERROR; + grib_context_log(a->context, GRIB_LOG_ERROR, "%s %s: aec_buffer_decode error %d (%s)", + cclass_name, __func__, err, aec_get_error_message(err)); + err = GRIB_DECODING_ERROR; goto cleanup; } - // ECC-1427: Performance improvement + // ECC-1427: Performance improvement (replaced by ECC-1602) //grib_decode_array(decoded, &pos, bits8 , reference_value, bscale, dscale, n_vals, val); // ECC-1602: Performance improvement @@ -625,8 +624,8 @@ static int unpack(grib_accessor* a, T* val, size_t* len) } break; default: - grib_context_log(a->context, GRIB_LOG_ERROR, "CCSDS %s: unpacking %s, bits_per_value=%d (max 32)", - __func__, a->name, bits_per_value); + grib_context_log(a->context, GRIB_LOG_ERROR, "%s %s: unpacking %s, bits_per_value=%d (max 32)", + cclass_name, __func__, a->name, bits_per_value); err = GRIB_INVALID_BPV; goto cleanup; } diff --git a/src/grib_accessor_class_data_complex_packing.cc b/src/grib_accessor_class_data_complex_packing.cc index 3b45cb480..f10640b6e 100644 --- a/src/grib_accessor_class_data_complex_packing.cc +++ b/src/grib_accessor_class_data_complex_packing.cc @@ -8,9 +8,10 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -#include "grib_api_internal_cpp.h" -#include -#include +#include "grib_ieeefloat.h" +#include "grib_scaling.h" +#include +#include /* This is used by make_class.pl @@ -52,7 +53,6 @@ static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_complex_packing { @@ -95,32 +95,32 @@ static grib_accessor_class _grib_accessor_class_data_complex_packing = { "data_complex_packing", /* name */ sizeof(grib_accessor_data_complex_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - &unpack_float, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -129,10 +129,10 @@ static grib_accessor_class _grib_accessor_class_data_complex_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -141,44 +141,6 @@ static grib_accessor_class _grib_accessor_class_data_complex_packing = { grib_accessor_class* grib_accessor_class_data_complex_packing = &_grib_accessor_class_data_complex_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ typedef unsigned long (*encode_float_proc)(double); @@ -234,8 +196,6 @@ static int value_count(grib_accessor* a, long* count) return ret; } -#define MAXVAL(a, b) a > b ? a : b - static double calculate_pfactor(grib_context* ctx, const double* spectralField, long fieldTruncation, long subsetTruncation) { /*long n_vals = ((fieldTruncation+1)*(fieldTruncation+2));*/ @@ -276,8 +236,8 @@ static double calculate_pfactor(grib_context* ctx, const double* spectralField, for (n = m; n <= fieldTruncation; n++) { index += 2; if (n >= subsetTruncation) { - norms[n] = MAXVAL(norms[n], fabs(spectralField[index])); - norms[n] = MAXVAL(norms[n], fabs(spectralField[index + 1])); + norms[n] = std::max(norms[n], fabs(spectralField[index])); + norms[n] = std::max(norms[n], fabs(spectralField[index + 1])); } } } @@ -289,8 +249,8 @@ static double calculate_pfactor(grib_context* ctx, const double* spectralField, for (m = subsetTruncation; m <= fieldTruncation; m++) { for (n = m; n <= fieldTruncation; n++) { index += 2; - norms[n] = MAXVAL(norms[n], fabs(spectralField[index])); - norms[n] = MAXVAL(norms[n], fabs(spectralField[index + 1])); + norms[n] = std::max(norms[n], fabs(spectralField[index])); + norms[n] = std::max(norms[n], fabs(spectralField[index + 1])); } } @@ -299,7 +259,7 @@ static double calculate_pfactor(grib_context* ctx, const double* spectralField, * problems with math functions (e.g. LOG). */ for (loop = ismin; loop <= ismax; loop++) { - norms[loop] = MAXVAL(norms[loop], zeps); + norms[loop] = std::max(norms[loop], zeps); if (norms[loop] == zeps) weights[loop] = 100.0 * zeps; } @@ -347,6 +307,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) { grib_accessor_data_complex_packing* self = (grib_accessor_data_complex_packing*)a; grib_handle* gh = grib_handle_of_accessor(a); + const char* cclass_name = a->cclass->name; size_t i = 0; int ret = GRIB_SUCCESS; @@ -463,8 +424,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) n_vals = (pen_j + 1) * (pen_j + 2); if (*len != n_vals) { - grib_context_log(a->context, GRIB_LOG_ERROR, "COMPLEX_PACKING: wrong number of values, expected %ld - got %lu", - n_vals, *len); + grib_context_log(a->context, GRIB_LOG_ERROR, "%s: Wrong number of values, expected %ld - got %zu", + cclass_name, n_vals, *len); return GRIB_INTERNAL_ERROR; } @@ -479,7 +440,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if (pen_j == sub_j) { double* values; - d = grib_power(decimal_scale_factor, 10); + d = codes_power(decimal_scale_factor, 10); if (d) { values = (double*)grib_context_malloc_clear(a->context, sizeof(double) * n_vals); for (i = 0; i < n_vals; i++) @@ -520,7 +481,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) hpos = 0; scals = (double*)grib_context_malloc(a->context, maxv * sizeof(double)); - Assert(scals); + if (!scals) return GRIB_OUT_OF_MEMORY; scals[0] = 0; for (i = 1; i < maxv; i++) @@ -576,16 +537,16 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) &reference_value); if (ret != GRIB_SUCCESS) { grib_context_log(gh->context, GRIB_LOG_ERROR, - "unable to find nearest_smaller_value of %g for %s", min, self->reference_value); + "%s: unable to find nearest_smaller_value of %g for %s", cclass_name, min, self->reference_value); return GRIB_INTERNAL_ERROR; } - d = grib_power(+decimal_scale_factor, 10); + d = codes_power(+decimal_scale_factor, 10); } else { - d = grib_power(+decimal_scale_factor, 10); + d = codes_power(+decimal_scale_factor, 10); if (grib_get_nearest_smaller_value(gh, self->reference_value, d * min, &reference_value) != GRIB_SUCCESS) { grib_context_log(gh->context, GRIB_LOG_ERROR, - "unable to find nearest_smaller_value of %g for %s", d * min, self->reference_value); + "%s: unable to find nearest_smaller_value of %g for %s", cclass_name, d * min, self->reference_value); return GRIB_INTERNAL_ERROR; } binary_scale_factor = grib_get_binary_scale_fact(d * max, reference_value, bits_per_value, &ret); @@ -597,12 +558,12 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) } else { if (ret != GRIB_SUCCESS) { - grib_context_log(a->context, GRIB_LOG_ERROR, "COMPLEX_PACKING : Cannot compute binary_scale_factor"); + grib_context_log(a->context, GRIB_LOG_ERROR, "%s: Cannot compute binary_scale_factor", cclass_name); return ret; } } } - s = grib_power(-binary_scale_factor, 2); + s = codes_power(-binary_scale_factor, 2); i = 0; @@ -642,13 +603,13 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) current_val = (((((val[i++] * d) * scals[lup]) - reference_value) * s) + 0.5); if (current_val < 0) grib_context_log(a->context, GRIB_LOG_ERROR, - "COMPLEX_PACKING : negative coput before packing (%g)", current_val); + "%s: negative coput before packing (%g)", cclass_name, current_val); grib_encode_unsigned_longb(lres, current_val, &lpos, bits_per_value); current_val = (((((val[i++] * d) * scals[lup]) - reference_value) * s) + 0.5); if (current_val < 0) grib_context_log(a->context, GRIB_LOG_ERROR, - "COMPLEX_PACKING : negative coput before packing (%g)", current_val); + "%s: negative coput before packing (%g)", cclass_name, current_val); grib_encode_unsigned_longb(lres, current_val, &lpos, bits_per_value); lup++; } @@ -658,13 +619,13 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) current_val = (((((val[i++] * d) * scals[lup]) - reference_value) * s) + 0.5); if (current_val < 0) grib_context_log(a->context, GRIB_LOG_ERROR, - "COMPLEX_PACKING : negative coput before packing (%g)", current_val); + "%s: negative coput before packing (%g)", cclass_name, current_val); grib_encode_unsigned_long(lres, current_val, &lpos, bits_per_value); current_val = (((((val[i++] * d) * scals[lup]) - reference_value) * s) + 0.5); if (current_val < 0) grib_context_log(a->context, GRIB_LOG_ERROR, - "COMPLEX_PACKING : negative coput before packing (%g)", current_val); + "%s: negative coput before packing (%g)", cclass_name, current_val); grib_encode_unsigned_long(lres, current_val, &lpos, bits_per_value); lup++; } @@ -678,7 +639,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if (((hpos / 8) != hsize) && ((lpos / 8) != lsize)) { grib_context_log(a->context, GRIB_LOG_ERROR, - "COMPLEX_PACKING : Mismatch in packing between high resolution and low resolution part"); + "%s: Mismatch in packing between high resolution and low resolution part", cclass_name); grib_context_free(a->context, buf); grib_context_free(a->context, scals); return GRIB_INTERNAL_ERROR; @@ -689,10 +650,14 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if ((ret = grib_set_double_internal(gh, self->reference_value, reference_value)) != GRIB_SUCCESS) return ret; { - /* Make sure we can decode it again */ + // Make sure we can decode it again double ref = 1e-100; grib_get_double_internal(gh, self->reference_value, &ref); - Assert(ref == reference_value); + if (ref != reference_value) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s %s: %s (ref=%.10e != reference_value=%.10e)", + cclass_name, __func__, self->reference_value, ref, reference_value); + return GRIB_INTERNAL_ERROR; + } } if ((ret = grib_set_long_internal(gh, self->binary_scale_factor, binary_scale_factor)) != GRIB_SUCCESS) @@ -714,6 +679,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len) static_assert(std::is_floating_point::value, "Requires floating point numbers"); grib_accessor_data_complex_packing* self = (grib_accessor_data_complex_packing*)a; grib_handle* gh = grib_handle_of_accessor(a); + const char* cclass_name = a->cclass->name; size_t i = 0; int ret = GRIB_SUCCESS; @@ -726,9 +692,9 @@ static int unpack(grib_accessor* a, T* val, size_t* len) T* scals = NULL; T* pscals = NULL, *pval = NULL; - double s = 0; - double d = 0; - double laplacianOperator = 0; + T s = 0; + T d = 0; + T laplacianOperator = 0; unsigned char* buf = NULL; unsigned char* hres = NULL; unsigned char* lres = NULL; @@ -741,7 +707,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len) long offsetdata = 0; long bits_per_value = 0; - double reference_value = 0; + T reference_value = 0; long binary_scale_factor = 0; long decimal_scale_factor = 0; @@ -755,6 +721,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len) T operat = 0; int bytes; int err = 0; + double tmp; decode_float_proc decode_float = NULL; @@ -771,8 +738,9 @@ static int unpack(grib_accessor* a, T* val, size_t* len) return ret; if ((ret = grib_get_long_internal(gh, self->bits_per_value, &bits_per_value)) != GRIB_SUCCESS) return ret; - if ((ret = grib_get_double_internal(gh, self->reference_value, &reference_value)) != GRIB_SUCCESS) + if ((ret = grib_get_double_internal(gh, self->reference_value, &tmp)) != GRIB_SUCCESS) return ret; + reference_value = tmp; if ((ret = grib_get_long_internal(gh, self->binary_scale_factor, &binary_scale_factor)) != GRIB_SUCCESS) return ret; @@ -786,8 +754,10 @@ static int unpack(grib_accessor* a, T* val, size_t* len) if ((ret = grib_get_long(gh, self->ieee_floats, &ieee_floats)) != GRIB_SUCCESS) return ret; - if ((ret = grib_get_double_internal(gh, self->laplacianOperator, &laplacianOperator)) != GRIB_SUCCESS) + if ((ret = grib_get_double_internal(gh, self->laplacianOperator, &tmp)) != GRIB_SUCCESS) return ret; + laplacianOperator = tmp; + if ((ret = grib_get_long_internal(gh, self->sub_j, &sub_j)) != GRIB_SUCCESS) return ret; if ((ret = grib_get_long_internal(gh, self->sub_k, &sub_k)) != GRIB_SUCCESS) @@ -835,7 +805,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len) if (pen_j == sub_j) { n_vals = (pen_j + 1) * (pen_j + 2); - d = grib_power(-decimal_scale_factor, 10); + d = codes_power(-decimal_scale_factor, 10); grib_ieee_decode_array(a->context, buf, n_vals, bytes, val); if (d) { @@ -845,16 +815,15 @@ static int unpack(grib_accessor* a, T* val, size_t* len) return 0; } - packed_offset = grib_byte_offset(a) + bytes * (sub_k + 1) * (sub_k + 2); lpos = 8 * (packed_offset - offsetdata); - s = grib_power(binary_scale_factor, 2); - d = grib_power(-decimal_scale_factor, 10); + s = codes_power(binary_scale_factor, 2); + d = codes_power(-decimal_scale_factor, 10); scals = (T*)grib_context_malloc(a->context, maxv * sizeof(T)); - Assert(scals); + if (!scals) return GRIB_OUT_OF_MEMORY; scals[0] = 0; for (i = 1; i < maxv; i++) { @@ -863,8 +832,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len) scals[i] = (1.0 / operat); else { grib_context_log(a->context, GRIB_LOG_WARNING, - "COMPLEX_PACKING : problem with operator div by zero at index %d of %d \n", - i, maxv); + "%s: Problem with operator div by zero at index %d of %d", cclass_name, i, maxv); scals[i] = 0; } } @@ -935,5 +903,27 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) static int unpack_float(grib_accessor* a, float* val, size_t* len) { - return unpack(a, val, len); + // TODO(maee): See ECC-1579 + // Investigate why results are not bit-identical + + // return unpack(a, val, len); + + int err = 0; + size_t i = 0; + size_t size = *len; + double* val8 = NULL; + val8 = (double*)grib_context_malloc(a->context, size*(sizeof(double))); + if (!val8) return GRIB_OUT_OF_MEMORY; + + err = unpack(a, val8, len); + if (err) { + grib_context_free(a->context,val8); + return err; + } + + for(i=0; icontext,val8); + + return GRIB_SUCCESS; } diff --git a/src/grib_accessor_class_data_dummy_field.cc b/src/grib_accessor_class_data_dummy_field.cc index 0ca1b5508..a599bc3e7 100644 --- a/src/grib_accessor_class_data_dummy_field.cc +++ b/src/grib_accessor_class_data_dummy_field.cc @@ -41,7 +41,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_dummy_field { @@ -82,32 +81,32 @@ static grib_accessor_class _grib_accessor_class_data_dummy_field = { "data_dummy_field", /* name */ sizeof(grib_accessor_data_dummy_field), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -116,10 +115,10 @@ static grib_accessor_class _grib_accessor_class_data_dummy_field = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -128,45 +127,6 @@ static grib_accessor_class _grib_accessor_class_data_dummy_field = { grib_accessor_class* grib_accessor_class_data_dummy_field = &_grib_accessor_class_data_dummy_field; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) diff --git a/src/grib_accessor_class_data_g1complex_packing.cc b/src/grib_accessor_class_data_g1complex_packing.cc index e7a57cd85..549a0e1f1 100644 --- a/src/grib_accessor_class_data_g1complex_packing.cc +++ b/src/grib_accessor_class_data_g1complex_packing.cc @@ -40,7 +40,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_g1complex_packing { @@ -89,32 +88,32 @@ static grib_accessor_class _grib_accessor_class_data_g1complex_packing = { "data_g1complex_packing", /* name */ sizeof(grib_accessor_data_g1complex_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -123,10 +122,10 @@ static grib_accessor_class _grib_accessor_class_data_g1complex_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -135,47 +134,6 @@ static grib_accessor_class _grib_accessor_class_data_g1complex_packing = { grib_accessor_class* grib_accessor_class_data_g1complex_packing = &_grib_accessor_class_data_g1complex_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -208,29 +166,27 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if (*len == 0) return GRIB_NO_VALUES; -#if 0 - /* TODO: spectral_ieee does not work */ - if (c->ieee_packing && self->ieee_packing) { - grib_handle* h = grib_handle_of_accessor(a); - grib_context* c = a->context; - char* packingType_s = NULL; - char* ieee_packing_s = NULL; - long precision = c->ieee_packing == 32 ? 1 : 2; - size_t lenstr = strlen(self->ieee_packing); - - packingType_s = grib_context_strdup(c, self->packingType); - ieee_packing_s = grib_context_strdup(c, self->ieee_packing); - precision_s = grib_context_strdup(c, self->precision); - - grib_set_string(h, packingType_s, ieee_packing_s, &lenstr); - grib_set_long(h, precision_s, precision); - - grib_context_free(c, packingType_s); - grib_context_free(c, ieee_packing_s); - grib_context_free(c, precision_s); - return grib_set_double_array(h, "values", val, *len); - } -#endif +// /* TODO: spectral_ieee does not work */ +// if (c->ieee_packing && self->ieee_packing) { +// grib_handle* h = grib_handle_of_accessor(a); +// grib_context* c = a->context; +// char* packingType_s = NULL; +// char* ieee_packing_s = NULL; +// long precision = c->ieee_packing == 32 ? 1 : 2; +// size_t lenstr = strlen(self->ieee_packing); + +// packingType_s = grib_context_strdup(c, self->packingType); +// ieee_packing_s = grib_context_strdup(c, self->ieee_packing); +// precision_s = grib_context_strdup(c, self->precision); + +// grib_set_string(h, packingType_s, ieee_packing_s, &lenstr); +// grib_set_long(h, precision_s, precision); + +// grib_context_free(c, packingType_s); +// grib_context_free(c, ieee_packing_s); +// grib_context_free(c, precision_s); +// return grib_set_double_array(h, "values", val, *len); +// } if ((ret = grib_get_long_internal(grib_handle_of_accessor(a), self->sub_j, &sub_j)) != GRIB_SUCCESS) return ret; @@ -247,17 +203,17 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if (ret == GRIB_SUCCESS) { n = a->offset + 4 * ((sub_k + 1) * (sub_k + 2)); -#if 1 + /* Octet number starts from beginning of message but shouldn't */ if ((ret = grib_set_long_internal(grib_handle_of_accessor(a), self->N, n)) != GRIB_SUCCESS) return ret; -#else - ret = grib_get_long_internal(grib_handle_of_accessor(a), self->offsetsection, &offsetsection); - if (ret != GRIB_SUCCESS) - return ret; - if ((ret = grib_set_long_internal(grib_handle_of_accessor(a), self->N, n - offsetsection)) != GRIB_SUCCESS) - return ret; -#endif + + // ret = grib_get_long_internal(grib_handle_of_accessor(a), self->offsetsection, &offsetsection); + // if (ret != GRIB_SUCCESS) + // return ret; + // if ((ret = grib_set_long_internal(grib_handle_of_accessor(a), self->N, n - offsetsection)) != GRIB_SUCCESS) + // return ret; + ret = grib_get_long_internal(grib_handle_of_accessor(a), self->bits_per_value, &bits_per_value); if (ret != GRIB_SUCCESS) return ret; diff --git a/src/grib_accessor_class_data_g1second_order_constant_width_packing.cc b/src/grib_accessor_class_data_g1second_order_constant_width_packing.cc index 23220df88..a18ef2d2d 100644 --- a/src/grib_accessor_class_data_g1second_order_constant_width_packing.cc +++ b/src/grib_accessor_class_data_g1second_order_constant_width_packing.cc @@ -8,6 +8,7 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" /* @@ -18,7 +19,7 @@ SUPER = grib_accessor_class_data_simple_packing IMPLEMENTS = init IMPLEMENTS = pack_double - IMPLEMENTS = unpack_double + IMPLEMENTS = unpack_double;unpack_float IMPLEMENTS = unpack_double_element;unpack_double_element_set IMPLEMENTS = value_count MEMBERS=const char* half_byte @@ -54,9 +55,9 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); +static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int unpack_double_element(grib_accessor*, size_t i, double* val); static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array); @@ -107,32 +108,32 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_constant_wid "data_g1second_order_constant_width_packing", /* name */ sizeof(grib_accessor_data_g1second_order_constant_width_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -141,10 +142,10 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_constant_wid 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -153,43 +154,6 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_constant_wid grib_accessor_class* grib_accessor_class_data_g1second_order_constant_width_packing = &_grib_accessor_class_data_g1second_order_constant_width_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -228,6 +192,11 @@ static int value_count(grib_accessor* a, long* numberOfSecondOrderPackedValues) return err; } +static int unpack_float(grib_accessor*, float* val, size_t* len) +{ + return GRIB_NOT_IMPLEMENTED; +} + static int unpack_double(grib_accessor* a, double* values, size_t* len) { grib_accessor_data_g1second_order_constant_width_packing* self = (grib_accessor_data_g1second_order_constant_width_packing*)a; @@ -323,8 +292,8 @@ static int unpack_double(grib_accessor* a, double* values, size_t* len) printf("XXXXXXX extrabits=%ld pos=%ld\n",extrabits,pos); }*/ - s = grib_power(binary_scale_factor, 2); - d = grib_power(-decimal_scale_factor, 10); + s = codes_power(binary_scale_factor, 2); + d = codes_power(-decimal_scale_factor, 10); for (i = 0; i < numberOfSecondOrderPackedValues; i++) { values[i] = (double)(((X[i] * s) + reference_value) * d); } diff --git a/src/grib_accessor_class_data_g1second_order_general_extended_packing.cc b/src/grib_accessor_class_data_g1second_order_general_extended_packing.cc index df99452a0..2f1946b7b 100644 --- a/src/grib_accessor_class_data_g1second_order_general_extended_packing.cc +++ b/src/grib_accessor_class_data_g1second_order_general_extended_packing.cc @@ -8,6 +8,7 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" #include "grib_optimize_decimal_factor.h" @@ -19,7 +20,7 @@ SUPER = grib_accessor_class_data_simple_packing IMPLEMENTS = init IMPLEMENTS = pack_double - IMPLEMENTS = unpack_double + IMPLEMENTS = unpack_double;unpack_float IMPLEMENTS = unpack_double_element;unpack_double_element_set IMPLEMENTS = value_count IMPLEMENTS = destroy @@ -45,10 +46,12 @@ MEMBERS=const char* orderOfSPD MEMBERS=const char* numberOfPoints MEMBERS=const char* dataFlag - MEMBERS=double* values + MEMBERS=double* dvalues + MEMBERS=float* fvalues + MEMBERS=int double_dirty + MEMBERS=int float_dirty MEMBERS=size_t size - END_CLASS_DEF */ @@ -65,10 +68,10 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); +static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int unpack_double_element(grib_accessor*, size_t i, double* val); static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array); @@ -116,7 +119,10 @@ typedef struct grib_accessor_data_g1second_order_general_extended_packing const char* orderOfSPD; const char* numberOfPoints; const char* dataFlag; - double* values; + double* dvalues; + float* fvalues; + int double_dirty; + int float_dirty; size_t size; } grib_accessor_data_g1second_order_general_extended_packing; @@ -127,32 +133,32 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_general_exte "data_g1second_order_general_extended_packing", /* name */ sizeof(grib_accessor_data_g1second_order_general_extended_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -161,10 +167,10 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_general_exte 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -173,43 +179,6 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_general_exte grib_accessor_class* grib_accessor_class_data_g1second_order_general_extended_packing = &_grib_accessor_class_data_g1second_order_general_extended_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ #define MAX_NUMBER_OF_GROUPS 65534 @@ -280,7 +249,9 @@ static void init(grib_accessor* a, const long v, grib_arguments* args) self->dataFlag = grib_arguments_get_name(handle, args, self->carg++); self->edition = 1; self->dirty = 1; - self->values = NULL; + self->dvalues = NULL; + self->fvalues = NULL; + self->double_dirty = self->float_dirty = 1; self->size = 0; a->flags |= GRIB_ACCESSOR_FLAG_DATA; } @@ -374,11 +345,10 @@ static int unpack_double_element_set(grib_accessor* a, const size_t* index_array return GRIB_SUCCESS; } - -static int unpack_double(grib_accessor* a, double* values, size_t* len) +static int unpack(grib_accessor* a, double* dvalues, float* fvalues, size_t* len) { grib_accessor_data_g1second_order_general_extended_packing* self = (grib_accessor_data_g1second_order_general_extended_packing*)a; - int ret = 0; + int ret = 0; long numberOfGroups, numberOfSecondOrderPackedValues; long* firstOrderValues = 0; long* X = 0; @@ -389,7 +359,6 @@ static int unpack_double(grib_accessor* a, double* values, size_t* len) double reference_value; long binary_scale_factor; long decimal_scale_factor; - double s, d; long j, count = 0; long *groupWidths = NULL, *groupLengths = NULL; long orderOfSPD = 0; @@ -398,19 +367,33 @@ static int unpack_double(grib_accessor* a, double* values, size_t* len) long bias = 0; long y = 0, z = 0, w = 0; size_t k, ngroups; + Assert(!(dvalues && fvalues)); - if (!self->dirty) { - if (*len < self->size) { - return GRIB_ARRAY_TOO_SMALL; + if (dvalues) { + if (!self->double_dirty) { + if (*len < self->size) { + return GRIB_ARRAY_TOO_SMALL; + } + for (k = 0; k < self->size; k++) + dvalues[k] = self->dvalues[k]; + *len = self->size; + return GRIB_SUCCESS; } - for (k = 0; k < self->size; k++) - values[k] = self->values[k]; - - *len = self->size; - return GRIB_SUCCESS; + self->double_dirty = 0; } - self->dirty = 0; + if (fvalues) { + if (!self->float_dirty) { + if (*len < self->size) { + return GRIB_ARRAY_TOO_SMALL; + } + for (k = 0; k < self->size; k++) + fvalues[k] = self->fvalues[k]; + *len = self->size; + return GRIB_SUCCESS; + } + self->float_dirty = 0; + } buf += grib_byte_offset(a); ret = value_count(a, &numberOfValues); @@ -476,17 +459,15 @@ static int unpack_double(grib_accessor* a, double* values, size_t* len) count++; n++; } -#if 0 - for (j=0;jvalues) { - if (numberOfValues != self->size) { - grib_context_free(a->context, self->values); - self->values = (double*)grib_context_malloc_clear(a->context, sizeof(double) * numberOfValues); + if (dvalues) { // double-precision + if (self->dvalues) { + if (numberOfValues != self->size) { + grib_context_free(a->context, self->dvalues); + self->dvalues = (double*)grib_context_malloc_clear(a->context, sizeof(double) * numberOfValues); + } + } + else { + self->dvalues = (double*)grib_context_malloc_clear(a->context, sizeof(double) * numberOfValues); + } + + double s = codes_power(binary_scale_factor, 2); + double d = codes_power(-decimal_scale_factor, 10); + for (i = 0; i < numberOfValues; i++) { + dvalues[i] = (double)(((X[i] * s) + reference_value) * d); + self->dvalues[i] = dvalues[i]; } } else { - self->values = (double*)grib_context_malloc_clear(a->context, sizeof(double) * numberOfValues); - } + // single-precision + if (self->fvalues) { + if (numberOfValues != self->size) { + grib_context_free(a->context, self->fvalues); + self->fvalues = (float*)grib_context_malloc_clear(a->context, sizeof(float) * numberOfValues); + } + } + else { + self->fvalues = (float*)grib_context_malloc_clear(a->context, sizeof(float) * numberOfValues); + } - s = grib_power(binary_scale_factor, 2); - d = grib_power(-decimal_scale_factor, 10); - for (i = 0; i < numberOfValues; i++) { - values[i] = (double)(((X[i] * s) + reference_value) * d); - self->values[i] = values[i]; + float s = codes_power(binary_scale_factor, 2); + float d = codes_power(-decimal_scale_factor, 10); + for (i = 0; i < numberOfValues; i++) { + fvalues[i] = (float)(((X[i] * s) + reference_value) * d); + self->fvalues[i] = fvalues[i]; + } } *len = numberOfValues; @@ -562,6 +564,16 @@ static int unpack_double(grib_accessor* a, double* values, size_t* len) return ret; } +static int unpack_float(grib_accessor* a, float* values, size_t* len) +{ + return unpack(a, NULL, values, len); +} + +static int unpack_double(grib_accessor* a, double* values, size_t* len) +{ + return unpack(a, values, NULL, len); +} + static void grib_split_long_groups(grib_handle* hand, grib_context* c, long* numberOfGroups, long* lengthOfSecondOrderValues, long* groupLengths, long* widthOfLengths, long* groupWidths, long widthOfWidths, @@ -671,613 +683,6 @@ static void grib_split_long_groups(grib_handle* hand, grib_context* c, long* num grib_context_free(c, localFirstOrderValues); } -#if 0 -/* Old implementation. Now superseded. See ECC-441 and ECC-261 */ -static int pack_double_old(grib_accessor* a, const double* val, size_t *len) -{ - grib_accessor_data_g1second_order_general_extended_packing* self = (grib_accessor_data_g1second_order_general_extended_packing*)a; - int ret=0; - int grib2=0; - long bits_per_value,orderOfSPD,binary_scale_factor; - long numberOfValues; - double max,min; - double decimal,divisor; - double reference_value; - size_t size,sizebits; - long half_byte; - long* X; - long* Xp; - long i; - long incrementGroupLengthA,groupWidthA,prevGroupLength,offsetD,remainingValuesB,groupLengthB; - long maxB,minB,maxAB,minAB; - long offsetBeforeData,offsetSection4; - unsigned char* buffer = NULL; - long maxWidth,maxLength,widthOfWidths,NL,widthOfLengths,N1,N2,extraValues,codedNumberOfGroups,numberOfSecondOrderPackedValues; - long pos; - - long numberOfGroups; - long groupLengthC,groupLengthA,remainingValues,count; - long maxA=0,minA=0; - long maxC,minC,offsetC; - long maxAC,minAC; - long range,bias=0,maxSPD; - long firstOrderValuesMax,offset,groupLength,j,groupWidth,firstOrderValue,lengthOfSecondOrderValues; - long *groupLengths,*groupWidths,*firstOrderValues; - /* long groupLengths[MAX_NUMBER_OF_GROUPS],groupWidths[MAX_NUMBER_OF_GROUPS],firstOrderValues[MAX_NUMBER_OF_GROUPS]; */ - - /* TODO put these parameters in def file */ - long startGroupLength=15; - long incrementGroupLength=3; - long minGroupLength=3; - long widthOfSPD=0,widthOfBias=0; - long *offsets; - long widthOfFirstOrderValues; - int computeGroupA=1; - long dataHeadersLength,widthsLength,lengthsLength,firstOrderValuesLength; - long decimal_scale_factor; - grib_handle* handle = grib_handle_of_accessor(a); - - self->dirty=1; - - numberOfValues=*len; - - max = val[0]; - min = max; - for(i=1;i< numberOfValues;i++) { - if (val[i] > max ) max = val[i]; - else if (val[i] < min ) min = val[i]; - } - - /* For constant fields set decimal scale factor to 0 (See GRIB-165) */ - if (min==max) { - grib_set_long_internal(handle,self->decimal_scale_factor, 0); - } - - if((ret = grib_get_long_internal(handle,self->decimal_scale_factor, &decimal_scale_factor)) - != GRIB_SUCCESS) - return ret; - decimal = grib_power(decimal_scale_factor,10); - - max*=decimal; - min*=decimal; - - if (grib_get_nearest_smaller_value(handle,self->reference_value,min,&reference_value) - !=GRIB_SUCCESS) { - grib_context_log(a->context,GRIB_LOG_ERROR, - "unable to find nearest_smaller_value of %g for %s",min,self->reference_value); - return GRIB_INTERNAL_ERROR; - } - if((ret = grib_set_double_internal(handle,self->reference_value, reference_value)) != - GRIB_SUCCESS) - return ret; - - if((ret=grib_get_long_internal(handle,self->bits_per_value,&bits_per_value)) != GRIB_SUCCESS) - return ret; - - if((ret=grib_get_long_internal(handle,self->offsetdata,&offsetBeforeData)) != GRIB_SUCCESS) - return ret; - - if((ret=grib_get_long_internal(handle,self->offsetsection,&offsetSection4)) != GRIB_SUCCESS) - return ret; - - if((ret=grib_get_long_internal(handle,self->orderOfSPD,&orderOfSPD)) != GRIB_SUCCESS) - return ret; - - binary_scale_factor = grib_get_binary_scale_fact(max,reference_value,bits_per_value,&ret); - if (ret != GRIB_SUCCESS) return ret; - - if((ret = grib_set_long_internal(handle,self->binary_scale_factor, binary_scale_factor)) != - GRIB_SUCCESS) - return ret; - - divisor = grib_power(-binary_scale_factor,2); - X=(long*)grib_context_malloc_clear(a->context,sizeof(long)*numberOfValues); - for(i=0;i< numberOfValues;i++){ - X[i] = (((val[i]*decimal)-reference_value)*divisor)+0.5; - } - - groupLengths=(long*)grib_context_malloc_clear(a->context,sizeof(long)*numberOfValues); - groupWidths=(long*)grib_context_malloc_clear(a->context,sizeof(long)*numberOfValues); - firstOrderValues=(long*)grib_context_malloc_clear(a->context,sizeof(long)*numberOfValues); - - /* spatial differencing */ - switch (orderOfSPD) { - case 1: - for (i=numberOfValues-1;i>0;i--) { - X[i]-=X[i-1]; - } - break; - case 2: - for (i=numberOfValues-1;i>1;i--) { - X[i]-=2*X[i-1]-X[i-2]; - } - break; - case 3: - for (i=numberOfValues-1;i>2;i--) { - X[i]-=3*(X[i-1]-X[i-2])+X[i-3]; - } - break; - } - if (orderOfSPD) { - Assert(orderOfSPD >=0 && orderOfSPD < numberOfValues); - bias=X[orderOfSPD]; - for (i=orderOfSPD+1;i X[i] ) bias=X[i]; - } - for (i=orderOfSPD;iX[count+i]) minA=X[count+i]; - } - } - groupWidthA=number_of_bits(handle, maxA-minA); - range=(long)grib_power(groupWidthA,2)-1; - - offsetC=count+groupLengthA; - if (offsetC==numberOfValues) { - /* no more values close group A and end loop */ - groupLengths[numberOfGroups]=groupLengthA; - groupWidths[numberOfGroups]=groupWidthA; - /* firstOrderValues[numberOfGroups]=minA; */ - /* to optimise the width of first order variable */ - firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; - numberOfGroups++; - break; - } - - /* group C created with length=incrementGroupLength (fixed) - or remaining values if close to end - */ - groupLengthC=incrementGroupLength; - if ( groupLengthC + offsetC > numberOfValues - startGroupLength/2) { - groupLengthC=numberOfValues-offsetC; - } - maxC=X[offsetC]; - minC=X[offsetC]; - for (i=1;iX[offsetC+i]) minC=X[offsetC+i]; - } - - maxAC= maxA > maxC ? maxA : maxC; - minAC= minA < minC ? minA : minC; - - /* check if A+C can be represented with the same width as A*/ - if (maxAC-minAC > range) { - /* A could not be expanded adding C. Check if A could be expanded taking - some elements from preceding group. The condition is always that width of - A doesn't increase. - */ - if (numberOfGroups>0 && groupWidths[numberOfGroups-1] > groupWidthA ) { - prevGroupLength=groupLengths[numberOfGroups-1]-incrementGroupLength; - offsetC=count-incrementGroupLength; - /* preceding group length cannot be less than a minimum value */ - while (prevGroupLength >= minGroupLength) { - maxAC=maxA; - minAC=minA; - for (i=0;iX[offsetC+i]) minAC=X[offsetC+i]; - } - - /* no more elements can be transfered, exit loop*/ - if (maxAC-minAC > range) break; - - maxA=maxAC; - minA=minAC; - groupLengths[numberOfGroups-1]-=incrementGroupLength; - groupLengthA+=incrementGroupLength; - count-=incrementGroupLength; - remainingValues+=incrementGroupLength; - - offsetC-=incrementGroupLength; - prevGroupLength-=incrementGroupLength; - } - } - /* close group A*/ - groupLengths[numberOfGroups]=groupLengthA; - groupWidths[numberOfGroups]=groupWidthA; - /* firstOrderValues[numberOfGroups]=minA; */ - /* to optimise the width of first order variable */ - firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; - count+=groupLengthA; - remainingValues-=groupLengthA; - numberOfGroups++; - /* incrementGroupLengthA is reset to the fixed startGroupLength as it - could have been changed after the A+C or A+B ok condition. - */ - incrementGroupLengthA=startGroupLength; - computeGroupA=1; -#if 0 - if (numberOfGroups==MAX_NUMBER_OF_GROUPS) { - groupLengthA= remainingValues ; - maxA=X[count]; - minA=X[count]; - for (i=1;iX[count+i]) minA=X[count+i]; - } - groupWidthA=number_of_bits(maxA-minA); - range=(long)grib_power(groupWidthA,2)-1; - groupLengths[numberOfGroups]=groupLengthA; - groupWidths[numberOfGroups]=groupWidthA; - firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; - break; - } -#endif - continue; - } - - /* A+C could be coded with the same width as A*/ - offsetD=offsetC+groupLengthC; - if (offsetD==numberOfValues) { - groupLengths[numberOfGroups]=groupLengthA+groupLengthC; - groupWidths[numberOfGroups]=groupWidthA; - - /* range of AC is the same as A*/ - /* firstOrderValues[numberOfGroups]=minAC; */ - /* to optimise the width of first order variable */ - firstOrderValues[numberOfGroups] = maxAC-range > 0 ? maxAC-range : 0; - numberOfGroups++; - break; - } - - /* group B is created with length startGroupLength, starting at the - same offset as C. - */ - remainingValuesB=numberOfValues-offsetC; - groupLengthB= startGroupLength < remainingValuesB ? startGroupLength : remainingValuesB ; - maxB=maxC; - minB=minC; - for (i=groupLengthC;iX[offsetC+i]) minB=X[offsetC+i]; - } - - /* check if group B can be coded with a smaller width than A */ - if (maxB-minB <= range/2 && range>0 ) { - - /* TODO Add code to try if A can be expanded taking some elements - from the left (preceding) group. - A possible variation is to do this left check (and the previous one) - in the final loop when checking that the width of each group. - */ - - /* close group A and continue loop*/ - groupLengths[numberOfGroups]=groupLengthA; - groupWidths[numberOfGroups]=groupWidthA; - /* firstOrderValues[numberOfGroups]=minA; */ - /* to optimise the width of first order variable */ - firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; - count+=groupLengthA; - remainingValues-=groupLengthA; - numberOfGroups++; -#if 0 - if (numberOfGroups==MAX_NUMBER_OF_GROUPS) { - groupLengthA= remainingValues ; - maxA=X[count]; - minA=X[count]; - for (i=1;iX[count+i]) minA=X[count+i]; - } - groupWidthA=number_of_bits(maxA-minA); - range=(long)grib_power(groupWidthA,2)-1; - groupLengths[numberOfGroups]=groupLengthA; - groupWidths[numberOfGroups]=groupWidthA; - firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; - break; - } -#endif - incrementGroupLengthA=startGroupLength; - computeGroupA=1; - continue; - } - - /* check if A+B can be coded with same with as A */ - maxAB= maxA > maxB ? maxA : maxB; - minAB= minA < minB ? minA : minB; - if (maxAB-minAB <= range) { - /* A+B can be merged. The increment used at the beginning of the loop to - build group C is increased to the size of group B - */ - incrementGroupLengthA+=groupLengthB; - maxA=maxAB; - minA=minAB; - computeGroupA=0; - continue; - } - - /* A+B cannot be merged, A+C can be merged*/ - incrementGroupLengthA+=groupLengthC; - computeGroupA=1; - - } /* end of the while*/ - - /* computing bitsPerValue as the number of bits needed to represent - the firstOrderValues. - */ - max=firstOrderValues[0]; - min=firstOrderValues[0]; - for (i=1;ifirstOrderValues[i]) min=firstOrderValues[i]; - } - widthOfFirstOrderValues=number_of_bits(handle, max-min); - firstOrderValuesMax=(long)grib_power(widthOfFirstOrderValues,2)-1; - - if (numberOfGroups>2) { - /* loop through all the groups except the last in reverse order to - check if each group width is still appropriate for the group. - Focus on groups which have been shrank as left groups of an A group taking - some of their elements. - */ - offsets=(long*)grib_context_malloc_clear(a->context,sizeof(long)*numberOfGroups); - offsets[0]=orderOfSPD; - for (i=1;i=0;i--) { - offset=offsets[i]; - groupLength=groupLengths[i]; - - if (groupLength >= startGroupLength) continue; - - max=X[offset]; - min=X[offset]; - for (j=1;jX[offset+j]) min=X[offset+j]; - } - groupWidth=number_of_bits(handle, max-min); - range=(long)grib_power(groupWidth,2)-1; - - /* width of first order values has to be unchanged.*/ - for (j=groupWidth;jrange ? max-range : 0; - if (firstOrderValue <= firstOrderValuesMax ) { - groupWidths[i]=j; - firstOrderValues[i]=firstOrderValue; - break; - } - } - - offsetC=offset; - /* group width of the current group (i) can have been reduced - and it is worth to try to expand the group to get some elements - from the left group if it has bigger width. - */ - if (i>0 && (groupWidths[i-1] > groupWidths[i]) ) { - prevGroupLength=groupLengths[i-1]-incrementGroupLength; - offsetC-=incrementGroupLength; - while (prevGroupLength >= minGroupLength) { - for (j=0;jX[offsetC+j]) min=X[offsetC+j]; - } - - /* width of first order values has to be unchanged*/ - firstOrderValue=max>range ? max-range : 0; - if (max-min > range || firstOrderValue > firstOrderValuesMax ) break; - - groupLengths[i-1]-=incrementGroupLength; - groupLengths[i]+=incrementGroupLength; - firstOrderValues[i]=firstOrderValue; - - offsetC-=incrementGroupLength; - prevGroupLength-=incrementGroupLength; - } - } - - } - grib_context_free(a->context,offsets); - } - - maxWidth=groupWidths[0]; - maxLength=groupLengths[0]; - for (i=1;iparent->h->context, GRIB_LOG_ERROR, "Cannot compute parameters for second order packing."); - return GRIB_ENCODING_ERROR; - } - widthOfWidths=number_of_bits(handle, maxWidth); - widthOfLengths=number_of_bits(handle, maxLength); - - lengthOfSecondOrderValues=0; - for ( i=0; icontext->no_big_group_split) { - grib_split_long_groups(handle, a->context,&numberOfGroups,&lengthOfSecondOrderValues, - groupLengths,&widthOfLengths,groupWidths,widthOfWidths, - firstOrderValues,widthOfFirstOrderValues); - } - - Xp=X+orderOfSPD; - for ( i=0; iwidthOfSPD, widthOfSPD)) - != GRIB_SUCCESS) - return ret; - } - - /* end writing SPD */ - if((ret = grib_set_long_internal(handle,self->widthOfFirstOrderValues, widthOfFirstOrderValues)) - != GRIB_SUCCESS) - return ret; - - dataHeadersLength=25; - if (orderOfSPD) dataHeadersLength+=1+((orderOfSPD+1)*widthOfSPD+7)/8; - widthsLength=(widthOfWidths*numberOfGroups+7)/8; - lengthsLength=(widthOfLengths*numberOfGroups+7)/8; - firstOrderValuesLength=(widthOfFirstOrderValues*numberOfGroups+7)/8; - - NL=widthsLength+dataHeadersLength+1; - N1=NL+lengthsLength; - N2=N1+firstOrderValuesLength; - - NL= NL > 65535 ? 65535 : NL; - N2= N2 > 65535 ? 65535 : N2; - N1= N1 > 65535 ? 65535 : N1; - - grib_set_long(handle,self->NL, NL); - grib_set_long(handle,self->N1, N1); - grib_set_long(handle,self->N2, N2); - - if (numberOfGroups > 65535 ) { - extraValues=numberOfGroups/65536; - codedNumberOfGroups=numberOfGroups%65536; - } else { - extraValues=0; - codedNumberOfGroups=numberOfGroups; - } - - /* if no extraValues key present it is a GRIB2*/ - grib2=0; - if((ret = grib_set_long(handle,self->extraValues, extraValues)) != GRIB_SUCCESS) { - codedNumberOfGroups=numberOfGroups; - grib2=1; - } - - if((ret = grib_set_long_internal(handle,self->codedNumberOfGroups, codedNumberOfGroups)) != GRIB_SUCCESS) - return ret; - - numberOfSecondOrderPackedValues=numberOfValues-orderOfSPD; - if (!grib2 && numberOfSecondOrderPackedValues > 65535 ) - numberOfSecondOrderPackedValues= 65535; - - if((ret = grib_set_long_internal(handle,self->numberOfSecondOrderPackedValues, numberOfSecondOrderPackedValues)) - != GRIB_SUCCESS) - return ret; - - if (grib2) { - if((ret = grib_set_long_internal(handle,self->bits_per_value, bits_per_value)) != GRIB_SUCCESS) - return ret; - } else { - if((ret = grib_set_long_internal(handle,self->bits_per_value, 0)) != GRIB_SUCCESS) - return ret; - } - - if((ret = grib_set_long_internal(handle,self->widthOfWidths, widthOfWidths)) != GRIB_SUCCESS) - return ret; - - if((ret = grib_set_long_internal(handle,self->widthOfLengths, widthOfLengths)) != GRIB_SUCCESS) - return ret; - - lengthOfSecondOrderValues=0; - for ( i=0; ihalf_byte, half_byte)) != GRIB_SUCCESS) - return ret; - - buffer=(unsigned char*)grib_context_malloc_clear(a->context,size); - - pos=0; - if (orderOfSPD) { - long SPD[4]={0,}; - size_t nSPD=orderOfSPD+1; - Assert(orderOfSPD<=3); - for (i=0;iSPD,SPD,nSPD); - if(ret) return ret; - } - - ret=grib_set_long_array_internal(handle,self->groupWidths,groupWidths,(size_t)numberOfGroups); - if(ret) return ret; - - ret=grib_set_long_array_internal(handle,self->groupLengths,groupLengths,(size_t)numberOfGroups); - if(ret) return ret; - - ret=grib_set_long_array_internal(handle,self->firstOrderValues,firstOrderValues,(size_t)numberOfGroups); - if(ret) return ret; - - Xp=X+orderOfSPD; - pos=0; - count=0; - for (i=0;i0) { - for (j=0;jparent->h,self->number_of_values, *len); - if(ret) return ret; - - grib_buffer_replace(a, buffer, size,1,1); - - grib_context_free(a->context,buffer); - grib_context_free(a->context,X); - grib_context_free(a->context,groupLengths); - grib_context_free(a->context,groupWidths); - grib_context_free(a->context,firstOrderValues); - - return ret; -} -#endif - static int get_bits_per_value(grib_handle* h, const char* bits_per_value_str, long* bits_per_value) { int err = 0; @@ -1299,6 +704,9 @@ static int get_bits_per_value(grib_handle* h, const char* bits_per_value_str, lo return err; } +// For the old implementation of pack_double, see +// src/deprecated/grib_accessor_class_data_g1second_order_general_extended_packing.pack_double.cc +// See ECC-441 and ECC-261 static int pack_double(grib_accessor* a, const double* val, size_t* len) { grib_accessor_data_g1second_order_general_extended_packing* self = (grib_accessor_data_g1second_order_general_extended_packing*)a; @@ -1344,7 +752,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) grib_handle* handle = grib_handle_of_accessor(a); long optimize_scaling_factor = 0; - self->dirty = 1; + self->double_dirty = 1; numberOfValues = *len; @@ -1372,8 +780,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) &decimal_scale_factor, &binary_scale_factor, &reference_value)) != GRIB_SUCCESS) return ret; - decimal = grib_power(decimal_scale_factor, 10); - divisor = grib_power(-binary_scale_factor, 2); + decimal = codes_power(decimal_scale_factor, 10); + divisor = codes_power(-binary_scale_factor, 2); /*min = min * decimal;*/ /*max = max * decimal;*/ @@ -1390,7 +798,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if ((ret = grib_get_long_internal(handle, self->decimal_scale_factor, &decimal_scale_factor)) != GRIB_SUCCESS) return ret; - decimal = grib_power(decimal_scale_factor, 10); + decimal = codes_power(decimal_scale_factor, 10); min = min * decimal; max = max * decimal; @@ -1401,7 +809,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) } binary_scale_factor = grib_get_binary_scale_fact(max, reference_value, bits_per_value, &ret); - divisor = grib_power(-binary_scale_factor, 2); + divisor = codes_power(-binary_scale_factor, 2); } if ((ret = grib_set_long_internal(handle, self->binary_scale_factor, binary_scale_factor)) != @@ -1487,7 +895,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) maxA = X[count]; minA = X[count]; for (i = 1; i < groupLengthA; i++) { - DebugAssertAccess(X, count + i, numberOfValues); + DEBUG_ASSERT_ACCESS(X, count + i, numberOfValues); if (maxA < X[count + i]) maxA = X[count + i]; if (minA > X[count + i]) @@ -1495,7 +903,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) } } groupWidthA = number_of_bits(handle, maxA - minA); - range = (long)grib_power(groupWidthA, 2) - 1; + range = (long)codes_power(groupWidthA, 2) - 1; offsetC = count + groupLengthA; if (offsetC == numberOfValues) { @@ -1519,7 +927,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) maxC = X[offsetC]; minC = X[offsetC]; for (i = 1; i < groupLengthC; i++) { - DebugAssertAccess(X, offsetC + i, numberOfValues); + DEBUG_ASSERT_ACCESS(X, offsetC + i, numberOfValues); if (maxC < X[offsetC + i]) maxC = X[offsetC + i]; if (minC > X[offsetC + i]) @@ -1578,23 +986,23 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) */ incrementGroupLengthA = startGroupLength; computeGroupA = 1; -#if 0 - if (numberOfGroups==MAX_NUMBER_OF_GROUPS) { - groupLengthA= remainingValues ; - maxA=X[count]; - minA=X[count]; - for (i=1;iX[count+i]) minA=X[count+i]; - } - groupWidthA=number_of_bits(maxA-minA); - range=(long)grib_power(groupWidthA,2)-1; - groupLengths[numberOfGroups]=groupLengthA; - groupWidths[numberOfGroups]=groupWidthA; - firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; - break; - } -#endif + + // if (numberOfGroups==MAX_NUMBER_OF_GROUPS) { + // groupLengthA= remainingValues ; + // maxA=X[count]; + // minA=X[count]; + // for (i=1;iX[count+i]) minA=X[count+i]; + // } + // groupWidthA=number_of_bits(maxA-minA); + // range=(long)codes_power(groupWidthA,2)-1; + // groupLengths[numberOfGroups]=groupLengthA; + // groupWidths[numberOfGroups]=groupWidthA; + // firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; + // break; + // } + continue; } @@ -1643,23 +1051,23 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) count += groupLengthA; remainingValues -= groupLengthA; numberOfGroups++; -#if 0 - if (numberOfGroups==MAX_NUMBER_OF_GROUPS) { - groupLengthA= remainingValues ; - maxA=X[count]; - minA=X[count]; - for (i=1;iX[count+i]) minA=X[count+i]; - } - groupWidthA=number_of_bits(maxA-minA); - range=(long)grib_power(groupWidthA,2)-1; - groupLengths[numberOfGroups]=groupLengthA; - groupWidths[numberOfGroups]=groupWidthA; - firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; - break; - } -#endif + + // if (numberOfGroups==MAX_NUMBER_OF_GROUPS) { + // groupLengthA= remainingValues ; + // maxA=X[count]; + // minA=X[count]; + // for (i=1;iX[count+i]) minA=X[count+i]; + // } + // groupWidthA=number_of_bits(maxA-minA); + // range=(long)codes_power(groupWidthA,2)-1; + // groupLengths[numberOfGroups]=groupLengthA; + // groupWidths[numberOfGroups]=groupWidthA; + // firstOrderValues[numberOfGroups] = maxA-range > 0 ? maxA-range : 0; + // break; + // } + incrementGroupLengthA = startGroupLength; computeGroupA = 1; continue; @@ -1697,7 +1105,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) min = firstOrderValues[i]; } widthOfFirstOrderValues = number_of_bits(handle, max - min); - firstOrderValuesMax = (long)grib_power(widthOfFirstOrderValues, 2) - 1; + firstOrderValuesMax = (long)codes_power(widthOfFirstOrderValues, 2) - 1; if (numberOfGroups > 2) { /* loop through all the groups except the last in reverse order to @@ -1725,7 +1133,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) min = X[offset + j]; } groupWidth = number_of_bits(handle, max - min); - range = (long)grib_power(groupWidth, 2) - 1; + range = (long)codes_power(groupWidth, 2) - 1; /* width of first order values has to be unchanged.*/ for (j = groupWidth; j < groupWidths[i]; j++) { @@ -1917,8 +1325,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if (ret) return ret; - Xp = X + orderOfSPD; - pos = 0; + Xp = X + orderOfSPD; + pos = 0; #if EFDEBUG count = 0; #endif @@ -1959,8 +1367,12 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) static void destroy(grib_context* context, grib_accessor* a) { grib_accessor_data_g1second_order_general_extended_packing* self = (grib_accessor_data_g1second_order_general_extended_packing*)a; - if (self->values != NULL) { - grib_context_free(context, self->values); - self->values = NULL; + if (self->dvalues != NULL) { + grib_context_free(context, self->dvalues); + self->dvalues = NULL; + } + if (self->fvalues != NULL) { + grib_context_free(context, self->fvalues); + self->fvalues = NULL; } } diff --git a/src/grib_accessor_class_data_g1second_order_general_packing.cc b/src/grib_accessor_class_data_g1second_order_general_packing.cc index fe16c187d..3e41fd3e0 100644 --- a/src/grib_accessor_class_data_g1second_order_general_packing.cc +++ b/src/grib_accessor_class_data_g1second_order_general_packing.cc @@ -8,7 +8,10 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" +#include + /* This is used by make_class.pl @@ -18,7 +21,7 @@ SUPER = grib_accessor_class_data_simple_packing IMPLEMENTS = init IMPLEMENTS = pack_double - IMPLEMENTS = unpack_double + IMPLEMENTS = unpack_double;unpack_float IMPLEMENTS = value_count MEMBERS=const char* half_byte MEMBERS=const char* packingType @@ -53,9 +56,9 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); +static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_g1second_order_general_packing { @@ -104,32 +107,32 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_general_pack "data_g1second_order_general_packing", /* name */ sizeof(grib_accessor_data_g1second_order_general_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -138,10 +141,10 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_general_pack 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -150,45 +153,6 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_general_pack grib_accessor_class* grib_accessor_class_data_g1second_order_general_packing = &_grib_accessor_class_data_g1second_order_general_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -227,8 +191,10 @@ static int value_count(grib_accessor* a, long* numberOfSecondOrderPackedValues) return err; } -static int unpack_double(grib_accessor* a, double* values, size_t* len) +template +static int unpack(grib_accessor* a, T* values, size_t* len) { + static_assert(std::is_floating_point::value, "Requires floating point numbers"); grib_accessor_data_g1second_order_general_packing* self = (grib_accessor_data_g1second_order_general_packing*)a; int ret = 0; long numberOfGroups, numberOfSecondOrderPackedValues; @@ -315,10 +281,10 @@ static int unpack_double(grib_accessor* a, double* values, size_t* len) } } - s = grib_power(binary_scale_factor, 2); - d = grib_power(-decimal_scale_factor, 10); + s = codes_power(binary_scale_factor, 2); + d = codes_power(-decimal_scale_factor, 10); for (i = 0; i < numberOfSecondOrderPackedValues; i++) { - values[i] = (double)(((X[i] * s) + reference_value) * d); + values[i] = (T)(((X[i] * s) + reference_value) * d); } *len = numberOfSecondOrderPackedValues; @@ -330,6 +296,16 @@ static int unpack_double(grib_accessor* a, double* values, size_t* len) return ret; } +static int unpack_float(grib_accessor* a, float* values, size_t* len) +{ + return unpack(a, values, len); +} + +static int unpack_double(grib_accessor* a, double* values, size_t* len) +{ + return unpack(a, values, len); +} + static int pack_double(grib_accessor* a, const double* cval, size_t* len) { /* return GRIB_NOT_IMPLEMENTED; */ diff --git a/src/grib_accessor_class_data_g1second_order_row_by_row_packing.cc b/src/grib_accessor_class_data_g1second_order_row_by_row_packing.cc index 4eb575515..b801b3b1c 100644 --- a/src/grib_accessor_class_data_g1second_order_row_by_row_packing.cc +++ b/src/grib_accessor_class_data_g1second_order_row_by_row_packing.cc @@ -8,6 +8,7 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" /* @@ -18,7 +19,7 @@ SUPER = grib_accessor_class_data_simple_packing IMPLEMENTS = init IMPLEMENTS = pack_double - IMPLEMENTS = unpack_double + IMPLEMENTS = unpack_double;unpack_float IMPLEMENTS = value_count MEMBERS=const char* half_byte MEMBERS=const char* packingType @@ -53,9 +54,9 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); +static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_g1second_order_row_by_row_packing { @@ -104,32 +105,32 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_row_by_row_p "data_g1second_order_row_by_row_packing", /* name */ sizeof(grib_accessor_data_g1second_order_row_by_row_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -138,10 +139,10 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_row_by_row_p 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -150,45 +151,6 @@ static grib_accessor_class _grib_accessor_class_data_g1second_order_row_by_row_p grib_accessor_class* grib_accessor_class_data_g1second_order_row_by_row_packing = &_grib_accessor_class_data_g1second_order_row_by_row_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -291,7 +253,8 @@ static int value_count(grib_accessor* a, long* count) return ret; } -static int unpack_double(grib_accessor* a, double* values, size_t* len) +template +static int unpack(grib_accessor* a, T* values, size_t* len) { grib_accessor_data_g1second_order_row_by_row_packing* self = (grib_accessor_data_g1second_order_row_by_row_packing*)a; grib_handle* gh = grib_handle_of_accessor(a); @@ -442,10 +405,10 @@ static int unpack_double(grib_accessor* a, double* values, size_t* len) k++; } - s = grib_power(binary_scale_factor, 2); - d = grib_power(-decimal_scale_factor, 10); + s = codes_power(binary_scale_factor, 2); + d = codes_power(-decimal_scale_factor, 10); for (i = 0; i < n; i++) { - values[i] = (double)(((X[i] * s) + reference_value) * d); + values[i] = (T)(((X[i] * s) + reference_value) * d); } grib_context_free(a->context, firstOrderValues); grib_context_free(a->context, X); @@ -458,6 +421,16 @@ static int unpack_double(grib_accessor* a, double* values, size_t* len) return ret; } +static int unpack_float(grib_accessor* a, float* values, size_t* len) +{ + return unpack(a, values, len); +} + +static int unpack_double(grib_accessor* a, double* values, size_t* len) +{ + return unpack(a, values, len); +} + static int pack_double(grib_accessor* a, const double* cval, size_t* len) { int err = 0; diff --git a/src/grib_accessor_class_data_g1secondary_bitmap.cc b/src/grib_accessor_class_data_g1secondary_bitmap.cc index aa34acbd7..4ae89c576 100644 --- a/src/grib_accessor_class_data_g1secondary_bitmap.cc +++ b/src/grib_accessor_class_data_g1secondary_bitmap.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_g1secondary_bitmap { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_data_g1secondary_bitmap = { "data_g1secondary_bitmap", /* name */ sizeof(grib_accessor_data_g1secondary_bitmap), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_data_g1secondary_bitmap = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,46 +103,6 @@ static grib_accessor_class _grib_accessor_class_data_g1secondary_bitmap = { grib_accessor_class* grib_accessor_class_data_g1secondary_bitmap = &_grib_accessor_class_data_g1secondary_bitmap; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) diff --git a/src/grib_accessor_class_data_g1shsimple_packing.cc b/src/grib_accessor_class_data_g1shsimple_packing.cc index c519f3deb..332b0af0c 100644 --- a/src/grib_accessor_class_data_g1shsimple_packing.cc +++ b/src/grib_accessor_class_data_g1shsimple_packing.cc @@ -33,7 +33,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_g1shsimple_packing { @@ -53,32 +52,32 @@ static grib_accessor_class _grib_accessor_class_data_g1shsimple_packing = { "data_g1shsimple_packing", /* name */ sizeof(grib_accessor_data_g1shsimple_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -87,10 +86,10 @@ static grib_accessor_class _grib_accessor_class_data_g1shsimple_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -99,46 +98,6 @@ static grib_accessor_class _grib_accessor_class_data_g1shsimple_packing = { grib_accessor_class* grib_accessor_class_data_g1shsimple_packing = &_grib_accessor_class_data_g1shsimple_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_data_g1simple_packing.cc b/src/grib_accessor_class_data_g1simple_packing.cc index e423de516..cd3e6ab38 100644 --- a/src/grib_accessor_class_data_g1simple_packing.cc +++ b/src/grib_accessor_class_data_g1simple_packing.cc @@ -8,6 +8,7 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" /* @@ -40,7 +41,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_g1simple_packing { @@ -77,32 +77,32 @@ static grib_accessor_class _grib_accessor_class_data_g1simple_packing = { "data_g1simple_packing", /* name */ sizeof(grib_accessor_data_g1simple_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -111,10 +111,10 @@ static grib_accessor_class _grib_accessor_class_data_g1simple_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -123,46 +123,6 @@ static grib_accessor_class _grib_accessor_class_data_g1simple_packing = { grib_accessor_class* grib_accessor_class_data_g1simple_packing = &_grib_accessor_class_data_g1simple_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -324,8 +284,8 @@ static int pack_double(grib_accessor* a, const double* cval, size_t* len) if ((ret = grib_get_long_internal(grib_handle_of_accessor(a), self->offsetsection, &offsetsection)) != GRIB_SUCCESS) return ret; - decimal = grib_power(decimal_scale_factor, 10); - divisor = grib_power(-binary_scale_factor, 2); + decimal = codes_power(decimal_scale_factor, 10); + divisor = codes_power(-binary_scale_factor, 2); buflen = (((bits_per_value * n_vals) + 7) / 8) * sizeof(unsigned char); if ((buflen + (offsetdata - offsetsection)) % 2) { diff --git a/src/grib_accessor_class_data_g22order_packing.cc b/src/grib_accessor_class_data_g22order_packing.cc index 96a047673..84f32b3e3 100644 --- a/src/grib_accessor_class_data_g22order_packing.cc +++ b/src/grib_accessor_class_data_g22order_packing.cc @@ -9,6 +9,7 @@ */ +#include "grib_scaling.h" #include "grib_api_internal.h" #include @@ -29,6 +30,7 @@ MEMBERS=const char* reference_value MEMBERS=const char* binary_scale_factor MEMBERS=const char* decimal_scale_factor + MEMBERS=const char* optimize_scale_factor MEMBERS=const char* typeOfOriginalFieldValues MEMBERS=const char* groupSplittingMethodUsed MEMBERS=const char* missingValueManagementUsed @@ -63,7 +65,6 @@ static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int unpack_double_element(grib_accessor*, size_t i, double* val); static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array); @@ -83,6 +84,7 @@ typedef struct grib_accessor_data_g22order_packing const char* reference_value; const char* binary_scale_factor; const char* decimal_scale_factor; + const char* optimize_scale_factor; const char* typeOfOriginalFieldValues; const char* groupSplittingMethodUsed; const char* missingValueManagementUsed; @@ -106,32 +108,32 @@ static grib_accessor_class _grib_accessor_class_data_g22order_packing = { "data_g22order_packing", /* name */ sizeof(grib_accessor_data_g22order_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - &unpack_float, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -140,10 +142,10 @@ static grib_accessor_class _grib_accessor_class_data_g22order_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -152,47 +154,11 @@ static grib_accessor_class _grib_accessor_class_data_g22order_packing = { grib_accessor_class* grib_accessor_class_data_g22order_packing = &_grib_accessor_class_data_g22order_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) { - grib_accessor_data_g22order_packing* self = (grib_accessor_data_g22order_packing*)a; + grib_accessor_data_g22order_packing* self = reinterpret_cast(a); grib_handle* gh = grib_handle_of_accessor(a); self->numberOfValues = grib_arguments_get_name(gh, args, self->carg++); @@ -200,6 +166,7 @@ static void init(grib_accessor* a, const long v, grib_arguments* args) self->reference_value = grib_arguments_get_name(gh, args, self->carg++); self->binary_scale_factor = grib_arguments_get_name(gh, args, self->carg++); self->decimal_scale_factor = grib_arguments_get_name(gh, args, self->carg++); + self->optimize_scale_factor = grib_arguments_get_name(gh, args, self->carg++); self->typeOfOriginalFieldValues = grib_arguments_get_name(gh, args, self->carg++); self->groupSplittingMethodUsed = grib_arguments_get_name(gh, args, self->carg++); @@ -219,144 +186,268 @@ static void init(grib_accessor* a, const long v, grib_arguments* args) a->flags |= GRIB_ACCESSOR_FLAG_DATA; } -#if 0 -static int reverse_rows (unsigned long* data, long len, long number_along_parallel){ - long count = 0; - long i = 0; - long left = 0; - long right = number_along_parallel-1; - long tmp = 0; - data += number_along_parallel; - count = number_along_parallel; +#define ONES (~(int)0) - while(count < len){ - left = 0; - right = number_along_parallel-1; +// #define UNDEFINED 9.999e20 +// #define UNDEFINED_LOW 9.9989e20 +// #define UNDEFINED_HIGH 9.9991e20 +#define UNDEFINED 9999.0 +#define UNDEFINED_LOW 9998.9 +#define UNDEFINED_HIGH 9999.1 +#define UNDEFINED_VAL(x) ((x) >= UNDEFINED_LOW && (x) <= UNDEFINED_HIGH) +#define DEFINED_VAL(x) ((x) < UNDEFINED_LOW || (x) > UNDEFINED_HIGH) +#define UNDEFINED_ANGLE 999.0 - for (i = 0;ibitstream = new_bitstream; + ctx->n_bitstream = ctx->reg = ctx->rbits = 0; +} - data += number_along_parallel*2; - count += number_along_parallel*2; +static void finish_bitstream(bitstream_context *ctx) +{ + if (ctx->rbits) { + ctx->n_bitstream++; + *ctx->bitstream++ = (ctx->reg << (8 - ctx->rbits)) & 255; + ctx->rbits = 0; } - - return 0; } -#endif -static unsigned long calc_pow_2(unsigned long op) +static void add_many_bitstream(bitstream_context *ctx, grib_accessor* a, int* t, int n, int n_bits) { - unsigned long a = 1; - while (op--) - a *= 2; - return a; + unsigned int jmask; + int i; + const int max_numbits = 25; + + if (n_bits > max_numbits) { + grib_context_log(a->context, GRIB_LOG_FATAL, "grid_complex packing: n_bits=%d exceeds the maximum=%d", n_bits, max_numbits); + } + jmask = (1 << n_bits) - 1; + + for (i = 0; i < n; i++) { + unsigned int tt = (unsigned int)*t++; + ctx->rbits += n_bits; + ctx->reg = (ctx->reg << n_bits) | (tt & jmask); + + while (ctx->rbits >= 8) { + ctx->rbits -= 8; + *ctx->bitstream++ = (ctx->reg >> ctx->rbits) & 255; + ctx->n_bitstream++; + } + } } -static int calc_bits_needed(unsigned long spread) +static void add_bitstream(bitstream_context *ctx, grib_accessor* a, int t, int n_bits) { - int nbit = 0; - if (spread == 0) - return nbit; - while (spread > 0) { - spread /= 2; - nbit++; - } - return nbit; + unsigned int jmask; + const int max_numbits = 25; + + if (n_bits > 16) { + add_bitstream(ctx, a, t >> 16, n_bits - 16); + n_bits = 16; + } + if (n_bits > max_numbits) { + grib_context_log(a->context, GRIB_LOG_FATAL, "grid_complex packing: n_bits=%d exceeds the maximum=%d", n_bits, max_numbits); + } + jmask = (1 << n_bits) - 1; + ctx->rbits += n_bits; + ctx->reg = (ctx->reg << n_bits) | (t & jmask); + while (ctx->rbits >= 8) { + *ctx->bitstream++ = (ctx->reg >> (ctx->rbits = ctx->rbits - 8)) & 255; + ctx->n_bitstream++; + } + return; } -static int find_next_group(const unsigned long* vals, size_t len, unsigned long w, unsigned long l, long* nbits, long* groupsize, long* r_val) +/* + * find min/max of an integer array + * return 0: if min max found + * return 1: if min max not found, min = max = 0 + */ +static int int_min_max_array(int* data, unsigned int n, int* min, int* max) { - unsigned long lmin = 0; - unsigned long lmax = 0; + unsigned int first; + int mn, mx; - size_t i = 0; + if (n == 0) { + return 1; + } - if (len == 0) - return GRIB_ARRAY_TOO_SMALL; - lmin = vals[0]; - lmax = lmin; - - while (i < len) { - if (vals[i] > lmax) - lmax = vals[i]; - else if (vals[i] < lmin) - lmin = vals[i]; - /*Assert((lmax-lmin) >= 0);*/ - *nbits = calc_bits_needed(lmax - lmin); - *r_val = lmin; - i++; - *groupsize = i; - - if (*groupsize > l - 2) - return GRIB_SUCCESS; - if (*nbits > w - 2) - return GRIB_SUCCESS; + for (first = 0; first < n; first++) { + if (data[first] != INT_MAX) { + mx = mn = data[first]; + break; + } } + if (first >= n) return 1; - return GRIB_SUCCESS; -} + mn = mx = data[first]; -#if 0 -static int spatial_difference (grib_context *c, unsigned long* vals, long len, long order, long* bias){ + { + int max_val; + int min_val; + min_val = max_val = data[first]; + + for (unsigned int i = first + 1; i < n; i++) { + if (data[i] != INT_MAX) { + min_val = (min_val > data[i]) ? data[i] : min_val; + max_val = (max_val < data[i]) ? data[i] : max_val; + } + } - long j = 3; + { + if (min_val < mn) mn = min_val; + if (max_val > mx) mx = max_val; + } + } + *min = mn; + *max = mx; + return 0; +} - long *v = grib_context_malloc(c,(len)*sizeof(long)); +static double Int_Power(double x, int y) +{ + double value; - for(j = 0; j< len;j++) - v[j] = vals[j]; + if (y < 0) { + y = -y; + x = 1.0 / x; + } + value = 1.0; - if (order == 1){ - grib_context_free(c,v); - return GRIB_NOT_IMPLEMENTED; - *bias=v[order]; - for(j = order; j< len;j++){ - v[j] -= vals [j-1]; - if(*bias>v[j]) - *bias = v[j]; + while (y) { + if (y & 1) { + value *= x; } + x = x * x; + y >>= 1; } + return value; +} - if (order == 2){ - *bias=v[order]; - for(j = order; j< len;j++){ - v[j] -= vals [j-1]; - v[j] -= vals [j-1] - vals[j-2]; - if(*bias>v[j]) - *bias = v[j]; - } +static int min_max_array(double* data, unsigned int n, double* min, double* max) +{ + unsigned int first; + double mn, mx; + + if (n == 0) { + *min = *max = 0.0; + return GRIB_DECODING_ERROR; } - if (order == 3){ - grib_context_free(c,v); - return GRIB_NOT_IMPLEMENTED; - *bias=v[order]; - for(j = order; j< len;j++){ - v[j] -= vals[j-1]; - v[j] -= vals[j-1] - vals[j-2]; - v[j] -= vals[j-2] - vals[j-3]; - if(*bias>v[j]) - *bias = v[j]; - } + + for (first = 0; first < n; first++) { + if (DEFINED_VAL(data[first])) break; } - for(j = order; j< len;j++){ - Assert(v[j]-*bias >=0); - vals[j] = v[j]-*bias; + if (first >= n) { + *min = *max = 0.0; + return GRIB_DECODING_ERROR; } - grib_context_free(c,v); - return 0; + mn = mx = data[first]; + + { + double min_val; + double max_val; + min_val = max_val = data[first]; + + for (unsigned int i = first + 1; i < n; i++) { + if (DEFINED_VAL(data[i])) { + min_val = (min_val > data[i]) ? data[i] : min_val; + max_val = (max_val < data[i]) ? data[i] : max_val; + } + } + + { + if (min_val < mn) mn = min_val; + if (max_val > mx) mx = max_val; + } + } + + *min = mn; + *max = mx; + return GRIB_SUCCESS; } -#endif -int post_process(grib_context* c, long* vals, long len, long order, long bias, const unsigned long extras[2]) +// static void uint_char(unsigned int i, unsigned char* p) +// { +// p[0] = (i >> 24) & 255; +// p[1] = (i >> 16) & 255; +// p[2] = (i >> 8) & 255; +// p[3] = (i)&255; +// } + +// static unsigned char* mk_bms(grib_accessor* a, double* data, unsigned int* ndata) +// { +// int bms_size; +// unsigned char *bms, *cbits; +// unsigned int nn, i, start, c, imask, i0; + +// nn = *ndata; + +// /* find first grid point with undefined data */ +// for (i = 0; i < nn; i++) { +// if (UNDEFINED_VAL(data[i])) break; +// } + +// if (i == nn) { /* all defined values, no need for bms */ +// bms = reinterpret_cast(grib_context_malloc(a->context, 6)); +// if (bms == NULL) +// grib_context_log(a->context, GRIB_LOG_ERROR, "mk_bms: memory allocation problem", ""); +// uint_char(6, bms); // length of section 6 +// bms[4] = 6; // section 6 +// bms[5] = 255; // no bitmap +// return bms; +// } + +// bms_size = 6 + (nn + 7) / 8; +// bms = reinterpret_cast(grib_context_malloc(a->context, bms_size)); +// if (bms == NULL) +// grib_context_log(a->context, GRIB_LOG_ERROR, "mk_bms: memory allocation problem", ""); + +// uint_char(bms_size, bms); // length of section 6 +// bms[4] = 6; // section 6 +// bms[5] = 0; // has bitmap + +// /* bitmap is accessed by bytes, make i0=i/8 bytes of bitmap */ +// cbits = bms + 6; +// i0 = i >> 3; // Number of bytes, required to store the bitmap +// for (i = 0; i < i0; i++) { +// // Set all bits in the bitmap to 1 +// *cbits++ = 255; +// } + +// /* start processing data, skip i0*8 */ + +// c = 0; // counter: c += imask +// imask = 128; // 100.0000 +// i0 = i0 << 3; // Number of bits in the bitmap +// start = i0; +// for (i = i0; i < nn; i++) { +// if (DEFINED_VAL(data[i])) { +// c += imask; +// data[start++] = data[i]; +// } +// if ((imask >>= 1) == 0) { +// *cbits++ = c; +// c = 0; +// imask = 128; +// } +// } +// if (imask != 128) *cbits = c; +// *ndata = start; +// return bms; +// } + +static int post_process(grib_context* c, long* vals, long len, long order, long bias, const unsigned long extras[2]) { unsigned long last, penultimate = 0, j = 0; Assert(order > 0); @@ -367,16 +458,18 @@ int post_process(grib_context* c, long* vals, long len, long order, long bias, c if (order == 1) { last = extras[0]; while (j < len) { - if (vals[j] == LONG_MAX) + if (vals[j] == LONG_MAX) { j++; + } else { vals[j++] = extras[0]; break; } } while (j < len) { - if (vals[j] == LONG_MAX) + if (vals[j] == LONG_MAX) { j++; + } else { vals[j] += last + bias; last = vals[j++]; @@ -387,16 +480,18 @@ int post_process(grib_context* c, long* vals, long len, long order, long bias, c penultimate = extras[0]; last = extras[1]; while (j < len) { - if (vals[j] == LONG_MAX) + if (vals[j] == LONG_MAX) { j++; + } else { vals[j++] = extras[0]; break; } } while (j < len) { - if (vals[j] == LONG_MAX) + if (vals[j] == LONG_MAX) { j++; + } else { vals[j++] = extras[1]; break; @@ -413,317 +508,21 @@ int post_process(grib_context* c, long* vals, long len, long order, long bias, c return GRIB_SUCCESS; } -#if 0 -static int de_spatial_difference (grib_context *c, unsigned long* vals, long len, long order, long bias) -{ - long j = 0; - - long i_origin = 0; - long i_first_diff = 0; - long i_second_diff = 0; - - Assert(order > 0); - Assert(order <= 3); - - i_origin=vals[order-1]; - - if (order == 1) { - for(j = 1; j< len;j++){ - i_origin=i_origin+(vals[j]+bias); - vals[j]=i_origin; - } - } - - if (order == 2){ - i_first_diff=vals[1]-vals[0]; - for(j = 2; j< len;j++){ - i_first_diff=i_first_diff+(vals[j]+bias); - i_origin=i_origin+i_first_diff; - vals[j]=i_origin; - } - } - - if (order == 3){ - i_first_diff=vals[2]-vals[1]; - i_second_diff=i_first_diff-(vals[1]-vals[0]); - for(j = 3; j< len;j++){ - i_second_diff=i_second_diff+(vals[j]+bias); - i_first_diff=i_first_diff+i_second_diff; - i_origin=i_origin+i_first_diff; - vals[j]=i_origin; - } - } - return 0; -} -#endif - - -static int pack_double(grib_accessor* a, const double* val, size_t* len) -{ - grib_accessor_data_g22order_packing* self = (grib_accessor_data_g22order_packing*)a; - grib_handle* gh = grib_handle_of_accessor(a); - - size_t i = 0; - size_t j = 0; - size_t n_vals = *len; - - int err = 0; - - unsigned char* buf = NULL; - unsigned char* buf_ref = NULL; - unsigned char* buf_width = NULL; - unsigned char* buf_length = NULL; - unsigned char* buf_vals = NULL; - - double d = 0; - double divisor = 0; - - unsigned long* sec_val = NULL; - unsigned long* group_val = NULL; - - double max; - double min; - - long length_p = 0; - long ref_p = 0; - long width_p = 0; - long vals_p = 0; - - size_t nv = 0; - size_t buf_size = 0; - - long bits_per_value = 0; - - double reference_value = 0; - - long nvals_per_group = 0; - long nbits_per_group_val = 0; - long group_ref_val = 0; - - long binary_scale_factor; - long decimal_scale_factor; - long typeOfOriginalFieldValues; - long groupSplittingMethodUsed; - long missingValueManagementUsed; - long primaryMissingValueSubstitute; - long secondaryMissingValueSubstitute; - long numberOfGroupsOfDataValues; - long referenceForGroupWidths; - long numberOfBitsUsedForTheGroupWidths; - long referenceForGroupLengths; - long lengthIncrementForTheGroupLengths; - long trueLengthOfLastGroup; - long numberOfBitsUsedForTheScaledGroupLengths; - long orderOfSpatialDifferencing; - long numberOfOctetsExtraDescriptors; - - long maxgrw; - long maxgrl; - char packingType[254] = {0,}; - size_t slen = 254; - - if (*len == 0) - return GRIB_NO_VALUES; - - if ((err = grib_get_long_internal(gh, self->bits_per_value, &bits_per_value)) != GRIB_SUCCESS) - return err; - if ((err = grib_get_long_internal(gh, self->decimal_scale_factor, &decimal_scale_factor)) != GRIB_SUCCESS) - return err; - if ((err = grib_get_long_internal(gh, self->typeOfOriginalFieldValues, &typeOfOriginalFieldValues)) != GRIB_SUCCESS) - return err; - - //if((err = grib_get_long_internal(gh,self->groupSplittingMethodUsed,&groupSplittingMethodUsed )) != GRIB_SUCCESS) return err; - //Key groupSplittingMethodUsed uses Code table 5.4 which has two entries: - // * 0 Row by row splitting - // * 1 General group splitting - // * We only support General group splitting - groupSplittingMethodUsed = 1; - - if ((err = grib_get_long_internal(gh, self->missingValueManagementUsed, &missingValueManagementUsed)) != GRIB_SUCCESS) - return err; - if ((err = grib_get_long_internal(gh, self->primaryMissingValueSubstitute, &primaryMissingValueSubstitute)) != GRIB_SUCCESS) - return err; - if ((err = grib_get_long_internal(gh, self->secondaryMissingValueSubstitute, &secondaryMissingValueSubstitute)) != GRIB_SUCCESS) - return err; - if ((err = grib_get_long_internal(gh, self->numberOfBitsUsedForTheGroupWidths, &numberOfBitsUsedForTheGroupWidths)) != GRIB_SUCCESS) - return err; - if ((err = grib_get_long_internal(gh, self->numberOfBitsUsedForTheScaledGroupLengths, &numberOfBitsUsedForTheScaledGroupLengths)) != GRIB_SUCCESS) - return err; - if ((err = grib_get_long_internal(gh, self->orderOfSpatialDifferencing, &orderOfSpatialDifferencing)) != GRIB_SUCCESS) - return err; - if ((err = grib_get_long_internal(gh, self->numberOfOctetsExtraDescriptors, &numberOfOctetsExtraDescriptors)) != GRIB_SUCCESS) - return err; - - self->dirty = 1; - - referenceForGroupWidths = 0; - referenceForGroupLengths = 0; - lengthIncrementForTheGroupLengths = 1; - numberOfBitsUsedForTheGroupWidths = 4; - numberOfBitsUsedForTheScaledGroupLengths = 10; - - /* calculation of integer array */ - sec_val = (unsigned long*)grib_context_malloc(a->context, (n_vals) * sizeof(long)); - if (!sec_val) - return GRIB_OUT_OF_MEMORY; - - d = grib_power(decimal_scale_factor, 10); - - max = val[0]; - min = max; - for (i = 0; i < n_vals; i++) { - if (val[i] > max) - max = val[i]; - else if (val[i] < min) - min = val[i]; - } - min *= d; - max *= d; - - if (grib_get_nearest_smaller_value(gh, self->reference_value, min, &reference_value) != GRIB_SUCCESS) { - grib_context_log(a->context, GRIB_LOG_ERROR, - "unable to find nearest_smaller_value of %g for %s", min, self->reference_value); - return GRIB_INTERNAL_ERROR; - } - - binary_scale_factor = grib_get_binary_scale_fact(max, reference_value, bits_per_value, &err); - if (err != GRIB_SUCCESS) - return err; - divisor = grib_power(-binary_scale_factor, 2); - - for (i = 0; i < n_vals; i++) - sec_val[i] = (unsigned long)((((val[i] * d) - reference_value) * divisor) + 0.5); - - group_val = sec_val; - - maxgrw = calc_pow_2(numberOfBitsUsedForTheGroupWidths); - maxgrl = calc_pow_2(numberOfBitsUsedForTheScaledGroupLengths); - - numberOfGroupsOfDataValues = 0; - nv = n_vals; - vals_p = 0; - - while (find_next_group(group_val, nv, maxgrw, maxgrl, &nbits_per_group_val, &nvals_per_group, &group_ref_val) == GRIB_SUCCESS) { - numberOfGroupsOfDataValues++; - nv -= nvals_per_group; - group_val += nvals_per_group; - vals_p += nbits_per_group_val * nvals_per_group; - } - - trueLengthOfLastGroup = nvals_per_group; - - buf_size = (7 + (numberOfGroupsOfDataValues * bits_per_value)) / 8; - buf_size += (7 + (numberOfGroupsOfDataValues * numberOfBitsUsedForTheGroupWidths)) / 8; - buf_size += (7 + (numberOfGroupsOfDataValues * numberOfBitsUsedForTheScaledGroupLengths)) / 8; - - buf_size += (vals_p / 8) + ((vals_p % 8) ? 1 : 0); - - buf = (unsigned char*)grib_context_malloc_clear(a->context, buf_size); - - buf_ref = buf; - buf_width = buf_ref + (7 + (numberOfGroupsOfDataValues * bits_per_value)) / 8; - buf_length = buf_width + (7 + (numberOfGroupsOfDataValues * numberOfBitsUsedForTheGroupWidths)) / 8; - buf_vals = buf_length + (7 + (numberOfGroupsOfDataValues * numberOfBitsUsedForTheScaledGroupLengths)) / 8; - - nv = n_vals; - group_val = sec_val; - vals_p = 0; - ref_p = 0; - width_p = 0; - length_p = 0; - i = 0; - - while (find_next_group(group_val, nv, maxgrw, maxgrl, &nbits_per_group_val, &nvals_per_group, &group_ref_val) == GRIB_SUCCESS) { - grib_encode_unsigned_longb(buf_ref, group_ref_val, &ref_p, bits_per_value); - grib_encode_unsigned_longb(buf_width, nbits_per_group_val, &width_p, numberOfBitsUsedForTheGroupWidths); - grib_encode_unsigned_longb(buf_length, nvals_per_group, &length_p, numberOfBitsUsedForTheScaledGroupLengths); - - if (nbits_per_group_val) - for (j = 0; j < nvals_per_group; j++) { - grib_encode_unsigned_longb(buf_vals, sec_val[i + j] - group_ref_val, &vals_p, nbits_per_group_val); - } - i += nvals_per_group; - group_val += nvals_per_group; - nv -= nvals_per_group; - } - - /*fprintf(stdout,"spatial pack_double:: %ld bytes %lu marked\n", (ref_p+7)/8 + (width_p+7)/8 + (length_p+7)/8 + (vals_p+7)/8, buf_size);*/ - - grib_buffer_replace(a, buf, buf_size, 1, 1); - grib_context_free(a->context, buf); - grib_context_free(a->context, sec_val); - - if ((err = grib_set_long_internal(gh, self->bits_per_value, bits_per_value)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_double_internal(gh, self->reference_value, reference_value)) != GRIB_SUCCESS) - return err; - { - /* Make sure we can decode it again */ - double ref = 1e-100; - grib_get_double_internal(gh, self->reference_value, &ref); - Assert(ref == reference_value); - } - if ((err = grib_set_long_internal(gh, self->binary_scale_factor, binary_scale_factor)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->decimal_scale_factor, decimal_scale_factor)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->typeOfOriginalFieldValues, typeOfOriginalFieldValues)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->groupSplittingMethodUsed, groupSplittingMethodUsed)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->missingValueManagementUsed, missingValueManagementUsed)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->primaryMissingValueSubstitute, primaryMissingValueSubstitute)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->secondaryMissingValueSubstitute, secondaryMissingValueSubstitute)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->numberOfGroupsOfDataValues, numberOfGroupsOfDataValues)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->referenceForGroupWidths, referenceForGroupWidths)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->numberOfBitsUsedForTheGroupWidths, numberOfBitsUsedForTheGroupWidths)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->referenceForGroupLengths, referenceForGroupLengths)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->lengthIncrementForTheGroupLengths, lengthIncrementForTheGroupLengths)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->trueLengthOfLastGroup, trueLengthOfLastGroup)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->numberOfBitsUsedForTheScaledGroupLengths, numberOfBitsUsedForTheScaledGroupLengths)) != GRIB_SUCCESS) - return err; - - err = grib_get_string(gh, "packingType", packingType, &slen); - if (!err && strcmp(packingType, "grid_complex_spatial_differencing") == 0) { - if ((err = grib_set_long_internal(gh, self->orderOfSpatialDifferencing, 0)) != GRIB_SUCCESS) - return err; - if ((err = grib_set_long_internal(gh, self->numberOfOctetsExtraDescriptors, 0)) != GRIB_SUCCESS) - return err; - } - - /* ECC-259: Set correct number of values */ - if ((err = grib_set_long_internal(gh, self->numberOfValues, *len)) != GRIB_SUCCESS) - return err; - - return GRIB_SUCCESS; -} - - template -static int unpack(grib_accessor* a, T* val, size_t* len) +static int unpack(grib_accessor* a, T* val, const size_t* len) { static_assert(std::is_floating_point::value, "Requires floating points numbers"); - grib_accessor_data_g22order_packing* self = (grib_accessor_data_g22order_packing*)a; + grib_accessor_data_g22order_packing* self = reinterpret_cast(a); + const char* cclass_name = a->cclass->name; + grib_handle* gh = grib_handle_of_accessor(a); size_t i = 0; size_t j = 0; long n_vals = 0; long vcount = 0; int err = GRIB_SUCCESS; - - long* sec_val = NULL; - grib_handle* gh = grib_handle_of_accessor(a); - - unsigned char* buf = (unsigned char*)gh->buffer->data; + long* sec_val = NULL; + unsigned char* buf = reinterpret_cast(gh->buffer->data); unsigned char* buf_ref = NULL; unsigned char* buf_width = NULL; unsigned char* buf_length = NULL; @@ -733,7 +532,6 @@ static int unpack(grib_accessor* a, T* val, size_t* len) long ref_p = 0; long width_p = 0; long vals_p = 0; - long nvals_per_group = 0; long nbits_per_group_val = 0; long group_ref_val = 0; @@ -757,15 +555,15 @@ static int unpack(grib_accessor* a, T* val, size_t* len) long lengthIncrementForTheGroupLengths; long trueLengthOfLastGroup; long numberOfBitsUsedForTheScaledGroupLengths; - long orderOfSpatialDifferencing; - long numberOfOctetsExtraDescriptors; + long orderOfSpatialDifferencing = 0; + long numberOfOctetsExtraDescriptors = 0; double missingValue = 0; err = grib_value_count(a, &n_vals); if (err) return err; - if (*len < (size_t)n_vals) + if (*len < static_cast(n_vals)) return GRIB_ARRAY_TOO_SMALL; if ((err = grib_get_long_internal(gh, self->bits_per_value, &bits_per_value)) != GRIB_SUCCESS) @@ -779,7 +577,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len) if ((err = grib_get_long_internal(gh, self->typeOfOriginalFieldValues, &typeOfOriginalFieldValues)) != GRIB_SUCCESS) return err; - /* Don't call grib_get_long_internal to suppress error message being output */ + // Don't call grib_get_long_internal to suppress error message being output if ((err = grib_get_long(gh, self->groupSplittingMethodUsed, &groupSplittingMethodUsed)) != GRIB_SUCCESS) return err; @@ -814,9 +612,8 @@ static int unpack(grib_accessor* a, T* val, size_t* len) self->dirty = 0; sec_val = (long*)grib_context_malloc(a->context, (n_vals) * sizeof(long)); - if (!sec_val) - return GRIB_OUT_OF_MEMORY; - memset(sec_val, 0, (n_vals) * sizeof(long)); /* See SUP-718 */ + if (!sec_val) return GRIB_OUT_OF_MEMORY; + memset(sec_val, 0, (n_vals) * sizeof(long)); // See SUP-718 buf_ref = buf + a->offset; @@ -850,26 +647,27 @@ static int unpack(grib_accessor* a, T* val, size_t* len) if (i == numberOfGroupsOfDataValues - 1) nvals_per_group = trueLengthOfLastGroup; - Assert(n_vals >= vcount + nvals_per_group); + if (n_vals < vcount + nvals_per_group) { + return GRIB_DECODING_ERROR; + } - /*grib_decode_long_array(buf_vals, &vals_p, nbits_per_group_val, nvals_per_group, - &sec_val[vcount]); */ + // grib_decode_long_array(buf_vals, &vals_p, nbits_per_group_val, nvals_per_group, &sec_val[vcount]); if (missingValueManagementUsed == 0) { - /* No explicit missing values included within data values */ + // No explicit missing values included within data values for (j = 0; j < nvals_per_group; j++) { - DebugAssertAccess(sec_val, (long)(vcount + j), n_vals); + DEBUG_ASSERT_ACCESS(sec_val, (long)(vcount + j), n_vals); sec_val[vcount + j] = group_ref_val + grib_decode_unsigned_long(buf_vals, &vals_p, nbits_per_group_val); - /*printf("sec_val[%ld]=%ld\n", vcount+j, sec_val[vcount+j]);*/ + // printf("sec_val[%ld]=%ld\n", vcount+j, sec_val[vcount+j]); } } else if (missingValueManagementUsed == 1) { - /* Primary missing values included within data values */ - long maxn = 0; /* (1 << bits_per_value) - 1; */ + // Primary missing values included within data values + long maxn = 0; // (1 << bits_per_value) - 1; for (j = 0; j < nvals_per_group; j++) { if (nbits_per_group_val == 0) { maxn = (1 << bits_per_value) - 1; if (group_ref_val == maxn) { - sec_val[vcount + j] = LONG_MAX; /* missing value */ + sec_val[vcount + j] = LONG_MAX; // missing value } else { long temp = grib_decode_unsigned_long(buf_vals, &vals_p, nbits_per_group_val); @@ -880,7 +678,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len) long temp = grib_decode_unsigned_long(buf_vals, &vals_p, nbits_per_group_val); maxn = (1 << nbits_per_group_val) - 1; if (temp == maxn) { - sec_val[vcount + j] = LONG_MAX; /* missing value */ + sec_val[vcount + j] = LONG_MAX; // missing value } else { sec_val[vcount + j] = group_ref_val + temp; @@ -889,14 +687,14 @@ static int unpack(grib_accessor* a, T* val, size_t* len) } } else if (missingValueManagementUsed == 2) { - /* Primary and secondary missing values included within data values */ + // Primary and secondary missing values included within data values long maxn = (1 << bits_per_value) - 1; - long maxn2 = 0; /* maxn - 1; */ + long maxn2 = 0; // maxn - 1 for (j = 0; j < nvals_per_group; j++) { if (nbits_per_group_val == 0) { maxn2 = maxn - 1; if (group_ref_val == maxn || group_ref_val == maxn2) { - sec_val[vcount + j] = LONG_MAX; /* missing value */ + sec_val[vcount + j] = LONG_MAX; // missing value } else { long temp = grib_decode_unsigned_long(buf_vals, &vals_p, nbits_per_group_val); @@ -908,7 +706,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len) maxn = (1 << nbits_per_group_val) - 1; maxn2 = maxn - 1; if (temp == maxn || temp == maxn2) { - sec_val[vcount + j] = LONG_MAX; /* missing value */ + sec_val[vcount + j] = LONG_MAX; // missing value } else { sec_val[vcount + j] = group_ref_val + temp; @@ -922,13 +720,14 @@ static int unpack(grib_accessor* a, T* val, size_t* len) if (orderOfSpatialDifferencing) { long bias = 0; - unsigned long extras[2] = {0,}; + unsigned long extras[2] = {0, }; ref_p = 0; - /* For Complex packing, order == 0 */ - /* For Complex packing and spatial differencing, order == 1 or 2 (code table 5.6) */ + // For Complex packing, order == 0 + // For Complex packing and spatial differencing, order == 1 or 2 (code table 5.6) if (orderOfSpatialDifferencing != 1 && orderOfSpatialDifferencing != 2) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Unsupported order of spatial differencing %ld", orderOfSpatialDifferencing); + grib_context_log(a->context, GRIB_LOG_ERROR, + "%s unpacking: Unsupported order of spatial differencing %ld", cclass_name, orderOfSpatialDifferencing); return GRIB_INTERNAL_ERROR; } @@ -939,18 +738,18 @@ static int unpack(grib_accessor* a, T* val, size_t* len) bias = grib_decode_signed_longb(buf_ref, &ref_p, numberOfOctetsExtraDescriptors * 8); post_process(a->context, sec_val, n_vals, orderOfSpatialDifferencing, bias, extras); - /*de_spatial_difference (a->context, sec_val, n_vals, orderOfSpatialDifferencing, bias);*/ + // de_spatial_difference (a->context, sec_val, n_vals, orderOfSpatialDifferencing, bias); } - binary_s = grib_power(binary_scale_factor, 2); - decimal_s = grib_power(-decimal_scale_factor, 10); + binary_s = (T)codes_power(binary_scale_factor, 2); + decimal_s = (T)codes_power(-decimal_scale_factor, 10); for (i = 0; i < n_vals; i++) { if (sec_val[i] == LONG_MAX) { - val[i] = missingValue; + val[i] = (T)missingValue; } else { - val[i] = (double)((((double)sec_val[i]) * binary_s) + reference_value) * decimal_s; + val[i] = (T)((((T)sec_val[i]) * binary_s) + reference_value) * decimal_s; } } @@ -958,6 +757,1125 @@ static int unpack(grib_accessor* a, T* val, size_t* len) return err; } +static int find_nbits(unsigned int i) +{ +#if !defined __GNUC__ || __GNUC__ < 4 + int j; + j = 0; + + while (i > 65535) { + i = i >> 16; + j += 16; + } + // i = 16 bits + if (i > 255) { + i = i >> 8; + j += 8; + } + // i = 8 bits + if (i > 15) { + i = i >> 4; + j += 4; + } + // i = 4 bits + if (i > 3) { + i = i >> 2; + j += 2; + } + // i = 2 bits + return (i >= 2) ? j + 2 : j + i; +#else + return (i == 0) ? 0 : 8 * sizeof(unsigned int) - __builtin_clz(i); +#endif +} + +struct section +{ + int mn, mx, missing; // stats + int i0, i1; // pointers to data[] + struct section *head, *tail; +}; + +static int sizeofsection(struct section* s, int ref_bits, int width_bits, int has_undef) +{ + if (s->mn == INT_MAX) { // all undef + return ref_bits + width_bits; + } + + if (s->mn == s->mx) { + if (s->missing == 0) { // constant and no missings + return ref_bits + width_bits; + } + else { // constant and missing + return (s->i1 - s->i0 + 1) * has_undef + ref_bits + width_bits; + } + } + + return find_nbits(s->mx - s->mn + has_undef) * (s->i1 - s->i0 + 1) + ref_bits + width_bits; +} + +static int sizeofsection2(int mn, int mx, int n, int ref_bits, int width_bits, + int has_undef_sec, int has_undef) +{ + if (mn == INT_MAX) return ref_bits + width_bits; + if (mn == mx) { + if (has_undef_sec == 0) return ref_bits + width_bits; + return n * has_undef + ref_bits + width_bits; + } + return find_nbits(mx - mn + has_undef) * n + ref_bits + width_bits; +} + +static int size_all(struct section* s, int ref_bits, int width_bits, int has_undef) +{ + int bits; + + bits = 0; + while (s) { + bits += sizeofsection(s, ref_bits, width_bits, has_undef); + s = s->tail; + } + return (bits + 7) / 8; +} + +static void move_one_left(struct section* s, int* v) +{ + struct section* t; + int val, i, j, k; + + t = s->tail; + s->i1 += 1; + t->i0 += 1; + val = v[s->i1]; + + // update s statistics + if (val == INT_MAX) + s->missing = 1; + else { + s->mx = s->mx > val ? s->mx : val; + s->mn = s->mn < val ? s->mn : val; + } + + // remove t? + if (t->i0 > t->i1) { + s->tail = t->tail; + t = s->tail; + if (t) t->head = s; + return; + } + + // update s statistics + if (val == INT_MAX) { + for (i = t->i0; i <= t->i1; i++) { + if (v[i] == INT_MAX) return; + } + t->missing = 0; + return; + } + if (val == t->mx) { + k = INT_MAX; + for (j = 0, i = t->i0; i <= t->i1; i++) { + if (v[i] != INT_MAX) { + if (j == 0) { + k = v[i]; + j++; + } + else + k = k < v[i] ? v[i] : k; + } + } + t->mx = k; + return; + } + if (val == t->mn) { + k = INT_MAX; + for (j = 0, i = t->i0; i <= t->i1; i++) { + if (v[i] != INT_MAX) { + if (j == 0) { + k = v[i]; + j++; + } + else + k = k > v[i] ? v[i] : k; + } + } + t->mn = k; + return; + } +} + +static void move_one_right(struct section* s, int* v) +{ + struct section* t; + int val, i, j, k; + + t = s->tail; + s->i1 -= 1; + t->i0 -= 1; + val = v[t->i0]; + + // update t statistics + if (val == INT_MAX) + t->missing = 1; + else { + t->mx = t->mx > val ? t->mx : val; + t->mn = t->mn < val ? t->mn : val; + } + + // if s is empty, copy t to s and recalculate + if (s->i0 > s->i1) { + s->i0 = t->i0; + s->i1 = t->i1; + s->tail = t->tail; + + s->mx = s->mn = INT_MAX; + j = s->missing = 0; + for (i = s->i0; i <= s->i1; i++) { + if (v[i] == INT_MAX) + s->missing = 1; + else if (j == 0) { + s->mx = s->mn = v[i]; + j++; + } + else { + s->mx = s->mx > v[i] ? s->mx : v[i]; + s->mn = s->mn < v[i] ? s->mx : v[i]; + } + } + return; + } + + // update s statistics + if (val == INT_MAX) { + for (i = s->i0; i <= s->i1; i++) { + if (v[i] == INT_MAX) return; + } + s->missing = 0; + return; + } + if (val == s->mx) { + k = INT_MAX; + for (j = 0, i = s->i0; i <= s->i1; i++) { + if (v[i] != INT_MAX) { + if (j == 0) { + k = v[i]; + j++; + } + else + k = k < v[i] ? v[i] : k; + } + } + s->mx = k; + return; + } + if (val == s->mn) { + k = INT_MAX; + for (j = 0, i = s->i0; i <= s->i1; i++) { + if (v[i] != INT_MAX) { + if (j == 0) { + k = v[i]; + j++; + } + else + k = k > v[i] ? v[i] : k; + } + } + s->mn = k; + return; + } + return; +} + +static void exchange(struct section* s, int* v, int has_undef, int LEN_SEC_MAX) +{ + struct section* t; + int val0, val1, nbit_s, nbit_t; + + if (s == NULL) return; + while ((t = s->tail) != NULL) { + // nbit_s = find_nbits(s->mx - s->mn + has_undef); + // nbit_t = find_nbits(t->mx - t->mn + has_undef); + + if (s->mn == INT_MAX) + nbit_s = 0; + else if (s->mn == s->mx) + nbit_s = s->missing; + else + nbit_s = find_nbits(s->mx - s->mn + has_undef); + + if (t->mn == INT_MAX) + nbit_t = 0; + else if (t->mn == t->mx) + nbit_t = t->missing; + else + nbit_t = find_nbits(t->mx - t->mn + has_undef); + + if (nbit_s == nbit_t) { + s = t; + continue; + } + + val0 = v[s->i1]; + val1 = v[t->i0]; + + if (s->missing == 1 || t->missing == 1) { + s = t; + continue; + } + // if (val0 == INT_MAX || val1 == INT_MAX) { s=t; continue; } + + if (nbit_s < nbit_t && val1 == INT_MAX) { + if ((s->i1 - s->i0) < LEN_SEC_MAX && s->mx != s->mn) { + move_one_left(s, v); + } + else { + s = t; + } + continue; + } + + if (nbit_s > nbit_t && val0 == INT_MAX) { + if ((t->i1 - t->i0) < LEN_SEC_MAX && t->mn != t->mx) { + move_one_right(s, v); + } + else { + s = t; + } + continue; + } + + // if (s->missing == 1 || t->missing == 1) { s=t; continue; } + // 3/2014 val0 = v[s->i1]; + // 3/2014 val1 = v[t->i0]; + + if (nbit_s < nbit_t && (s->i1 - s->i0) < LEN_SEC_MAX && val1 >= s->mn && + val1 <= s->mx) { + move_one_left(s, v); + } + else if (nbit_s > nbit_t && (t->i1 - t->i0) < LEN_SEC_MAX && + val0 >= t->mn && val0 <= t->mx) { + move_one_right(s, v); + } + else { + s = s->tail; + } + } +} + +static void merge_j(struct section* h, int ref_bits, int width_bits, int has_undef, int param, int LEN_SEC_MAX) +{ + struct section *t, *m; + int size_head, size_mid, size_tail, saving_mt, saving_hm; + int min0, max0, min1, max1; + + size_head = size_mid = size_tail = 0; + + while (h && (m = h->tail)) { + t = m->tail; + + // h -> m -> t + + // find savings of merged h - m + saving_hm = -1; + min0 = max0 = min1 = max1 = 0; // turn off error warnings + if (m->i1 - h->i0 < LEN_SEC_MAX) { + if (m->mn == INT_MAX) { + max0 = h->mx; + min0 = h->mn; + } + else if (h->mn == INT_MAX) { + max0 = m->mx; + min0 = m->mn; + } + else { + min0 = h->mn < m->mn ? h->mn : m->mn; + max0 = h->mx > m->mx ? h->mx : m->mx; + } + if (max0 - min0 <= param) { + if (size_head == 0) + size_head = + sizeofsection(h, ref_bits, width_bits, has_undef); + if (size_mid == 0) + size_mid = + sizeofsection(m, ref_bits, width_bits, has_undef); + saving_hm = size_head + size_mid - + sizeofsection2(min0, max0, m->i1 - h->i0 + 1, + ref_bits, width_bits, + h->missing || m->missing, has_undef); + } + } + + // find savings of merged m-t + saving_mt = -1; + if (t && t->i1 - m->i0 < LEN_SEC_MAX) { + if (m->mn == INT_MAX) { + max1 = t->mx; + min1 = t->mn; + } + else if (t->mn == INT_MAX) { + max1 = m->mx; + min1 = m->mn; + } + else { + min1 = m->mn < t->mn ? m->mn : t->mn; + max1 = m->mx > t->mx ? m->mx : t->mx; + } + if (max1 - min1 <= param) { + if (size_mid == 0) + size_mid = + sizeofsection(m, ref_bits, width_bits, has_undef); + if (size_tail == 0) + size_tail = + sizeofsection(t, ref_bits, width_bits, has_undef); + saving_mt = size_mid + size_tail - + sizeofsection2(min1, max1, t->i1 - m->i0 + 1, + ref_bits, width_bits, + m->missing || t->missing, has_undef); + } + } + + if (saving_hm >= saving_mt && saving_hm >= 0) { + // merge h and m + h->i1 = m->i1; + h->tail = m->tail; + h->mn = min0; + h->mx = max0; + h->missing = h->missing || m->missing; + m = h->tail; + if (m) m->head = h; + if (h->head) h = h->head; + size_head = size_mid = size_tail = 0; + } + else if (saving_mt >= saving_hm && saving_mt >= 0) { + // merge m and t + m->i1 = t->i1; + m->tail = t->tail; + m->mn = min1; + m->mx = max1; + m->missing = m->missing || t->missing; + t = m->tail; + if (t) t->head = m; + size_head = size_mid = size_tail = 0; + } + else { + // no merging + h = h->tail; + size_head = size_mid; + size_mid = size_tail; + size_tail = 0; + } + } +} + +static int pack_double(grib_accessor* a, const double* val, size_t* len) +{ + unsigned char* sec7; + grib_accessor_data_g22order_packing* self = reinterpret_cast(a); + grib_handle* gh = grib_handle_of_accessor(a); + const char* cclass_name = a->cclass->name; + + int err = 0; + + long bits_per_value = 0; + + // double reference_value = 0; + // long nvals_per_group = 0; + // long nbits_per_group_val = 0; + + long binary_scale_factor; + long decimal_scale_factor; + long optimize_scale_factor; + long typeOfOriginalFieldValues; + // long groupSplittingMethodUsed, numberOfGroupsOfDataValues, referenceForGroupWidths; + long missingValueManagementUsed; + long primaryMissingValueSubstitute; + long secondaryMissingValueSubstitute; + long numberOfBitsUsedForTheGroupWidths; + long numberOfBitsUsedForTheScaledGroupLengths; + long orderOfSpatialDifferencing; + long numberOfOctetsExtraDescriptors; + + int dec_scale; + int bin_scale; + int wanted_bits; + int max_bits; + int use_bitmap; + + int j, j0, k, *v, binary_scale, nbits, has_undef, extra_0, extra_1; + size_t i, ii; + int vmn, vmx, vbits; + // Sections + double max_val, min_val, ref, frange, dec_factor, scale; + double mn, mx; + struct section start, *list, *list_backup, *s; + // Group + int ngroups, grefmx, glenmn, glenmx, gwidmn, gwidmx, len_last; + int size_sec7; + int *refs, *lens, *widths, *itmp, *itmp2; + // int est_group_width = 12; + int est_group_width = 6; + + size_t ndef = 0; + size_t nndata = 0; + size_t nstruct; + + long bitmap_present = 0; + + int LEN_SEC_MAX = 127; + int LEN_BITS = 7; + + if (*len == 0) + return GRIB_NO_VALUES; + + if ((err = grib_get_long_internal(gh, self->bits_per_value, &bits_per_value)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(gh, self->decimal_scale_factor, &decimal_scale_factor)) != GRIB_SUCCESS) + return err; + + optimize_scale_factor = 1; // TODO(masn): To be reviewed + + if ((err = grib_get_long_internal(gh, self->binary_scale_factor, &binary_scale_factor)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(gh, self->typeOfOriginalFieldValues, &typeOfOriginalFieldValues)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(gh, self->missingValueManagementUsed, &missingValueManagementUsed)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(gh, self->primaryMissingValueSubstitute, &primaryMissingValueSubstitute)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(gh, self->secondaryMissingValueSubstitute, &secondaryMissingValueSubstitute)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(gh, self->numberOfBitsUsedForTheGroupWidths, &numberOfBitsUsedForTheGroupWidths)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(gh, self->numberOfBitsUsedForTheScaledGroupLengths, &numberOfBitsUsedForTheScaledGroupLengths)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(gh, self->orderOfSpatialDifferencing, &orderOfSpatialDifferencing)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(gh, self->numberOfOctetsExtraDescriptors, &numberOfOctetsExtraDescriptors)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(gh, "bitmapPresent", &bitmap_present)) != GRIB_SUCCESS) + return err; + + max_bits = bits_per_value; // TODO(masn) + + // Note: + // orderOfSpatialDifferencing = 0 means "grid_complex" + // orderOfSpatialDifferencing = 1 means "grid_complex_spatial_differencing" with orderOfSpatialDifferencing=1 + // orderOfSpatialDifferencing = 2 means "grid_complex_spatial_differencing" with orderOfSpatialDifferencing=2 + + use_bitmap = bitmap_present; + wanted_bits = bits_per_value; + + for (i = 0; i < *len; i++) { + if (DEFINED_VAL(val[i])) { + ndef = ndef + 1; + } + } + + if (ndef == 0) { // Special case: All undefined values + // Section 5 + const char* packing_type = "grid_complex"; + size_t packing_type_len = strlen(packing_type); + grib_set_string_internal(gh, "packingType", packing_type, &packing_type_len); + + if ((err = grib_set_double_internal(gh, self->reference_value, grib_ieee_to_long(0.0))) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->binary_scale_factor, 0)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->decimal_scale_factor, 0)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->bits_per_value, 8)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->typeOfOriginalFieldValues, 0)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->groupSplittingMethodUsed, 1)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->missingValueManagementUsed, 1)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->primaryMissingValueSubstitute, grib_ieee_to_long(static_cast(9.999e20)))) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->secondaryMissingValueSubstitute, 0xFFFFFFFF)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->numberOfGroupsOfDataValues, 1)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->referenceForGroupWidths, grib_ieee_to_long(0.0))) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->numberOfBitsUsedForTheGroupWidths, 8)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->referenceForGroupLengths, *len)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->lengthIncrementForTheGroupLengths, 1)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->trueLengthOfLastGroup, *len)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->numberOfBitsUsedForTheScaledGroupLengths, 8)) != GRIB_SUCCESS) + return err; + + // Section 6 + if ((err = grib_set_long_internal(gh, "bitmapPresent", 0)) != GRIB_SUCCESS) return err; + + // Section 7 + constexpr size_t sec7_size = 3; + unsigned char empty_sec7[sec7_size] = {255, 0, 0}; // group reference, group width, group length + grib_buffer_replace(a, empty_sec7, sec7_size, 1, 1); + return GRIB_SUCCESS; + } + + size_t ndata = *len; + double* data = reinterpret_cast(grib_context_malloc_clear(a->context, ndata * sizeof(double))); + if (data == NULL) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: unable to allocate %zu bytes", cclass_name, ndata * sizeof(double)); + return GRIB_OUT_OF_MEMORY; + } + memcpy(data, val, sizeof(*data) * ndata); + + dec_scale = -decimal_scale_factor; + bin_scale = binary_scale_factor; + + //compute bitmap section + //if (use_bitmap == 0 || ndef == ndata) { + // if ((err = grib_set_long_internal(gh, "bitmapPresent", 0)) != GRIB_SUCCESS) return err; + //} else { + // if ((err = grib_set_long_internal(gh, "bitmapPresent", 1)) != GRIB_SUCCESS) return err; + //} + + nndata = use_bitmap ? ndef : ndata; + has_undef = use_bitmap ? 0 : ndata != ndef; + + v = reinterpret_cast(grib_context_malloc(a->context, nndata * sizeof(int))); + if (v == NULL) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: unable to allocate %zu bytes", cclass_name, nndata * sizeof(int)); + return GRIB_OUT_OF_MEMORY; + } + if (min_max_array(data, ndata, &mn, &mx) != GRIB_SUCCESS) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: failed to get min max of data", cclass_name); + return GRIB_ENCODING_ERROR; + } + min_val = static_cast(mn); + max_val = static_cast(mx); + + binary_scale = bin_scale; + + if (optimize_scale_factor == 0) { // ECMWF style + ref = min_val; + frange = max_val - ref; + dec_scale = 0; + if (frange != 0.0) { + frexp(frange, &j); // Required bits + binary_scale = j - wanted_bits; // Scale factor + nbits = wanted_bits; + scale = ldexp(1.0, -binary_scale); + frange = floor((max_val - ref) * scale + 0.5); + frexp(frange, &j); + if (j != nbits) binary_scale++; + } + else { + binary_scale = nbits = 0; + scale = 1; + } + } + else { + if (dec_scale) { + dec_factor = Int_Power(10.0, -dec_scale); + min_val *= dec_factor; + max_val *= dec_factor; + if (has_undef) { + for (i = 0; i < nndata; i++) { + if (DEFINED_VAL(data[i])) data[i] *= dec_factor; + } + } + else { + for (i = 0; i < nndata; i++) { + data[i] *= dec_factor; + } + } + } + scale = ldexp(1.0, -binary_scale); + // ref = floor(min_val*scale)/scale; + ref = min_val; + frange = floor((max_val - ref) * scale + 0.5); + frexp(frange, &nbits); + if (nbits > max_bits) { + binary_scale += (nbits - max_bits); + nbits = max_bits; + } + } + + if (binary_scale) { + scale = ldexp(1.0, -binary_scale); + if (has_undef) { + for (i = 0; i < nndata; i++) { + if (DEFINED_VAL(data[i])) { + v[i] = floor((data[i] - ref) * scale + 0.5); + v[i] = v[i] >= 0 ? v[i] : 0; + } + else + v[i] = INT_MAX; + } + } + else { + for (i = 0; i < nndata; i++) { + v[i] = floor((data[i] - ref) * scale + 0.5); + v[i] = v[i] >= 0 ? v[i] : 0; + } + } + } + else { + // scale = 1.0; + if (has_undef) { + for (i = 0; i < nndata; i++) { + if (DEFINED_VAL(data[i])) { + v[i] = floor(data[i] - ref + 0.5); + v[i] = v[i] >= 0 ? v[i] : 0; + } + else + v[i] = INT_MAX; + } + } + else { + for (i = 0; i < nndata; i++) { + v[i] = floor(data[i] - ref + 0.5); + v[i] = v[i] >= 0 ? v[i] : 0; + } + } + } + + vmx = vmn = 0; + extra_0 = extra_1 = 0; // turn off warnings + + if (orderOfSpatialDifferencing == 2) { + // delta_delta(v, nndata, &vmn, &vmx, &extra_0, &extra_1); + // single core version + { + int last, last0, penultimate = 0; + for (i = 0; i < nndata; i++) { + if (v[i] != INT_MAX) { + extra_0 = penultimate = v[i]; + v[i++] = 0; + break; + } + } + for (; i < nndata; i++) { + if (v[i] != INT_MAX) { + extra_1 = last = v[i]; + v[i++] = 0; + break; + } + } + + for (; i < nndata; i++) { + if (v[i] != INT_MAX) { + last0 = v[i]; + v[i] = v[i] - 2 * last + penultimate; + penultimate = last; + last = last0; + vmn = vmn > v[i] ? v[i] : vmn; + vmx = vmx < v[i] ? v[i] : vmx; + } + } + } + } + else if (orderOfSpatialDifferencing == 1) { + // delta(v, nndata, &vmn, &vmx, &extra_0); + // single core version + { + int last, last0; + + for (i = 0; i < nndata; i++) { + if (v[i] != INT_MAX) { + extra_0 = last = v[i]; + v[i++] = 0; + break; + } + } + for (; i < nndata; i++) { + if (v[i] != INT_MAX) { + last0 = v[i]; + v[i] = v[i] - last; + last = last0; + vmn = vmn > v[i] ? v[i] : vmn; + vmx = vmx < v[i] ? v[i] : vmx; + } + } + } + } + else if (orderOfSpatialDifferencing == 0) { + // find min/max + int_min_max_array(v, nndata, &vmn, &vmx); + } + +#ifdef DEBUG + grib_context_log(a->context, GRIB_LOG_DEBUG, "COMPLEX: 2: vmx %d vmn %d nbits %d", vmx, vmn, + find_nbits(vmx - vmn + has_undef)); +#endif + + for (i = 0; i < nndata; i++) { + v[i] = (v[i] != INT_MAX) ? v[i] - vmn : INT_MAX; + } + vmx = vmx - vmn; + vbits = find_nbits(vmx + has_undef); + + // size of merged struct + ii = 0; + nstruct = 1; + for (i = 1; i < nndata; i++) { + if (((i - ii + 1) > LEN_SEC_MAX) || (v[i] != v[ii])) { + nstruct++; + ii = i; + } + } + + list = reinterpret_cast(grib_context_malloc_clear(a->context, nstruct * sizeof(section))); + if (list == NULL) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: memory allocation of list failed",cclass_name); + return GRIB_OUT_OF_MEMORY; + } + + // initialize linked list + + // The first element in the list is initialized with the first element from v + ii = 0; // section counter + list[0].mn = list[0].mx = v[0]; + list[0].missing = (v[0] == INT_MAX); + list[0].i0 = list[0].i1 = 0; + for (i = 1; i < nndata; i++) { + // join last section + // where all values in the section are the same + if ((i - list[ii].i0 < LEN_SEC_MAX) && (v[i] == list[ii].mn)) { + list[ii].i1 = i; + } + // make new section + else { + ii++; + list[ii].mn = list[ii].mx = v[i]; + list[ii].missing = (v[i] == INT_MAX); + list[ii].i0 = list[ii].i1 = i; + } + } + list[0].head = NULL; + list[ii].tail = NULL; + start.tail = &list[0]; + + if (nstruct != ii + 1) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: nstruct=%zu wanted %zu", cclass_name, nstruct, ii + 1); + return GRIB_ENCODING_ERROR; + } + for (i = 1; i < nstruct; i++) { + list[i].head = &list[i - 1]; + list[i - 1].tail = &list[i]; + } + + // sequence : has_undef == 0 : 2**n - 1 1, 3, 7, .. + // sequence : has_undef == 1 : 2**n - 2 0, 2, 6 + + k = has_undef ? 2 : 1; + + while (k < vmx / 2) { + merge_j(start.tail, vbits, LEN_BITS + est_group_width, has_undef, k, + LEN_SEC_MAX); +#ifdef DEBUG + j = size_all(start.tail, vbits, LEN_BITS + est_group_width, has_undef); + grib_context_log(a->context, GRIB_LOG_DEBUG, "COMPLEX: complex start %d %d bytes", k, j); +#endif + k = 2 * k + 1 + has_undef; + } + + // try making segment sizes larger + // 12/2015 need to segment size less 25 bits, bitstream software limitation + + list_backup = reinterpret_cast(grib_context_malloc(a->context, nstruct * sizeof(section))); + if (list_backup == NULL) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: memory allocation of list_backup failed", cclass_name); + return GRIB_OUT_OF_MEMORY; + } + + j = size_all(start.tail, vbits, LEN_BITS + est_group_width, has_undef); + j0 = j + 1; +#ifdef DEBUG + grib_context_log(a->context, GRIB_LOG_DEBUG, "COMPLEX: complex start inc segments size0 %d segsize %d", j, LEN_SEC_MAX); +#endif + while (j < j0 && LEN_BITS < 25) { + j0 = j; + LEN_BITS++; + LEN_SEC_MAX = LEN_SEC_MAX + LEN_SEC_MAX + 1; + memcpy(list_backup, list, nstruct * sizeof(struct section)); + merge_j(start.tail, vbits, LEN_BITS + est_group_width, has_undef, k, + LEN_SEC_MAX); + j = size_all(start.tail, vbits, LEN_BITS + est_group_width, has_undef); +#ifdef DEBUG + grib_context_log(a->context, GRIB_LOG_DEBUG, + "COMPLEX: complex inc segments size size0 %d size1 %d segsize %d " + "LEN_BITS=%d", + j0, j, LEN_SEC_MAX, LEN_BITS); +#endif + if (j > j0) { + memcpy(list, list_backup, nstruct * sizeof(struct section)); + LEN_BITS--; + LEN_SEC_MAX = (LEN_SEC_MAX - 1) / 2; + } + } + grib_context_free(a->context,list_backup); + + exchange(start.tail, v, has_undef, LEN_SEC_MAX); +#ifdef DEBUG + j = size_all(start.tail, vbits, LEN_BITS + est_group_width, has_undef); + grib_context_log(a->context, GRIB_LOG_DEBUG, "COMPLEX: exchange %d bytes", j); +#endif + + merge_j(start.tail, vbits, LEN_BITS + est_group_width, has_undef, vmx, + LEN_SEC_MAX); +#ifdef DEBUG + j = size_all(start.tail, vbits, LEN_BITS + est_group_width, has_undef); + grib_context_log(a->context, GRIB_LOG_DEBUG, "COMPLEX: complex start %d %d bytes", vmx, j); +#endif + + // finished making segments + // find out number of bytes for extra info (orderOfSpatialDifferencing 2/3) + + if (orderOfSpatialDifferencing != 0) { // packing modes 2/3 + k = vmn >= 0 ? find_nbits(vmn) + 1 : find_nbits(-vmn) + 1; + // + 1 work around for NCEP bug + j = find_nbits(extra_0) + 1; + if (j > k) k = j; + + if (orderOfSpatialDifferencing == 2) { + // + 1 work around for NCEP bug + j = find_nbits(extra_1) + 1; + if (j > k) k = j; + } + numberOfOctetsExtraDescriptors = (k + 7) / 8; // number of bytes for extra and vmn + } + + // scale the linked list + s = start.tail; + if (s == NULL) { + return GRIB_INTERNAL_ERROR; + } + ngroups = 0; // number of groups + + while (s) { + ngroups++; + s = s->tail; + } + + lens = reinterpret_cast(grib_context_malloc(a->context, ngroups * sizeof(int))); + widths = reinterpret_cast(grib_context_malloc(a->context, ngroups * sizeof(int))); + refs = reinterpret_cast(grib_context_malloc(a->context, ngroups * sizeof(int))); + itmp = reinterpret_cast(grib_context_malloc(a->context, ngroups * sizeof(int))); + itmp2 = reinterpret_cast(grib_context_malloc(a->context, ngroups * sizeof(int))); + + if (lens == NULL || widths == NULL || refs == NULL || itmp == NULL || itmp2 == NULL) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: memory alloc of lens/widths/refs/itmp/itmp2 failed",cclass_name); + return GRIB_OUT_OF_MEMORY; + } + + // make vectors so we can OpenMP the loop + for (i = ii = 0, s = start.tail; ii < ngroups; ii++, s = s->tail) { + lens[ii] = s->i1 - s->i0 + 1; + i += lens[ii]; + refs[ii] = s->mn; + itmp[ii] = s->mx; + itmp2[ii] = s->missing; + } + if (i != nndata) + return GRIB_INTERNAL_ERROR; + + for (i = 0; i < ngroups; i++) { + if (refs[i] == INT_MAX) + widths[i] = 0; + else if (refs[i] == itmp[i]) + widths[i] = itmp2[i]; + else + widths[i] = find_nbits(itmp[i] - refs[i] + has_undef); + } + + // group lengths + len_last = lens[ngroups - 1]; // length of last segment + + glenmn = glenmx = lens[0]; + gwidmx = gwidmn = widths[0]; + grefmx = refs[0] != INT_MAX ? refs[0] : 0; + + { + int glenmn_thread, glenmx_thread, gwidmx_thread, gwidmn_thread, + grefmx_thread; + glenmn_thread = glenmx_thread = lens[0]; + gwidmn_thread = gwidmx_thread = widths[0]; + grefmx_thread = refs[0] != INT_MAX ? refs[0] : 0; + + for (i = 1; i < ngroups; i++) { + glenmx_thread = glenmx_thread >= lens[i] ? glenmx_thread : lens[i]; + glenmn_thread = glenmn_thread <= lens[i] ? glenmn_thread : lens[i]; + gwidmx_thread = + gwidmx_thread >= widths[i] ? gwidmx_thread : widths[i]; + gwidmn_thread = + gwidmn_thread <= widths[i] ? gwidmn_thread : widths[i]; + if (refs[i] != INT_MAX && refs[i] > grefmx_thread) + grefmx_thread = refs[i]; + } + { + glenmx = glenmx >= glenmx_thread ? glenmx : glenmx_thread; + glenmn = glenmn <= glenmn_thread ? glenmn : glenmn_thread; + gwidmx = gwidmx >= gwidmx_thread ? gwidmx : gwidmx_thread; + gwidmn = gwidmn <= gwidmn_thread ? gwidmn : gwidmn_thread; + grefmx = grefmx >= grefmx_thread ? grefmx : grefmx_thread; + } + } + + bits_per_value = find_nbits(grefmx + has_undef); + numberOfBitsUsedForTheGroupWidths = find_nbits(gwidmx - gwidmn + has_undef); + + if ((err = grib_set_long_internal(gh, self->bits_per_value, bits_per_value)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_double_internal(gh, self->reference_value, static_cast(ref))) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->binary_scale_factor, binary_scale)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->decimal_scale_factor, -dec_scale)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->typeOfOriginalFieldValues, 0)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->groupSplittingMethodUsed, 1)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->missingValueManagementUsed, has_undef)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->primaryMissingValueSubstitute, grib_ieee_to_long(static_cast(9.999e20)))) != GRIB_SUCCESS) + return err; + // if ((err = grib_set_long_internal(gh, self->secondaryMissingValueSubstitute, 0xFFFFFFFF)) != GRIB_SUCCESS) return err; + + if ((err = grib_set_long_internal(gh, self->numberOfGroupsOfDataValues, ngroups)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->referenceForGroupWidths, gwidmn)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->numberOfBitsUsedForTheGroupWidths, find_nbits(gwidmx - gwidmn + has_undef))) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->referenceForGroupLengths, glenmn)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->lengthIncrementForTheGroupLengths, 1)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->trueLengthOfLastGroup, len_last)) != GRIB_SUCCESS) + return err; + numberOfBitsUsedForTheScaledGroupLengths = find_nbits(glenmx - glenmn); + if ((err = grib_set_long_internal(gh, self->numberOfBitsUsedForTheScaledGroupLengths, numberOfBitsUsedForTheScaledGroupLengths)) != GRIB_SUCCESS) + return err; + + size_sec7 = 5; + + if (orderOfSpatialDifferencing == 1) { + size_sec7 += 2 * numberOfOctetsExtraDescriptors; + } + else if (orderOfSpatialDifferencing == 2) { + size_sec7 += 3 * numberOfOctetsExtraDescriptors; + } + if (orderOfSpatialDifferencing > 0) { + if ((err = grib_set_long_internal(gh, self->orderOfSpatialDifferencing, orderOfSpatialDifferencing)) != GRIB_SUCCESS) + return err; + if ((err = grib_set_long_internal(gh, self->numberOfOctetsExtraDescriptors, numberOfOctetsExtraDescriptors)) != GRIB_SUCCESS) + return err; + } + + // group reference value + size_sec7 += (ngroups * bits_per_value + 7) / 8; + + // group widths + size_sec7 += (ngroups * numberOfBitsUsedForTheGroupWidths + 7) / 8; + + // group lengths + size_sec7 += (ngroups * numberOfBitsUsedForTheScaledGroupLengths + 7) / 8; + + k = 0; + { + j = 0; + for (i = 0; i < ngroups; i++) { + j += lens[i] * widths[i]; + size_sec7 += (j >> 3); + j = (j & 7); + refs[i] = (refs[i] != INT_MAX) ? refs[i] : ONES; + itmp[i] = widths[i] - gwidmn; + itmp2[i] = lens[i] - glenmn; + } + k += j; + } + size_sec7 += (k >> 3) + ((k & 7) ? 1 : 0); + + sec7 = reinterpret_cast(grib_context_malloc(a->context, size_sec7)); + if (sec7 == NULL) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s packing: unable to allocate %d bytes", cclass_name, size_sec7); + return GRIB_OUT_OF_MEMORY; + } + + // pack the values into a bitstream + + bitstream_context ctx; + init_bitstream(&ctx, sec7); + add_bitstream(&ctx, a, size_sec7 >> 16, 16); + add_bitstream(&ctx, a, size_sec7, 16); + add_bitstream(&ctx, a, 7, 8); + + // write extra octets + if (orderOfSpatialDifferencing == 1 || orderOfSpatialDifferencing == 2) { + add_bitstream(&ctx, a, extra_0, 8 * numberOfOctetsExtraDescriptors); + if (orderOfSpatialDifferencing == 2) add_bitstream(&ctx, a, extra_1, 8 * numberOfOctetsExtraDescriptors); + k = vmn; + if (k < 0) { + k = -vmn | (1 << (8 * numberOfOctetsExtraDescriptors - 1)); + } + add_bitstream(&ctx, a, k, 8 * numberOfOctetsExtraDescriptors); + finish_bitstream(&ctx); + } + + // write the group reference values + add_many_bitstream(&ctx, a, refs, ngroups, bits_per_value); + finish_bitstream(&ctx); + + // write the group widths + add_many_bitstream(&ctx, a, itmp, ngroups, numberOfBitsUsedForTheGroupWidths); + finish_bitstream(&ctx); + + // write the group lengths + add_many_bitstream(&ctx, a, itmp2, ngroups, numberOfBitsUsedForTheScaledGroupLengths); + finish_bitstream(&ctx); + + s = start.tail; + for (i = 0; i < ngroups; i++, s = s->tail) { + itmp[i] = s->i0; + refs[i] = s->mn; + } + + for (i = 0; i < ngroups; i++) { + if (widths[i]) { + for (j = 0; j < lens[i]; j++) { + v[j + itmp[i]] = (v[j + itmp[i]] == INT_MAX) + ? ONES + : v[j + itmp[i]] - refs[i]; + } + } + } + for (i = 0; i < ngroups; i++) { + if (widths[i]) { + add_many_bitstream(&ctx, a, v + itmp[i], lens[i], widths[i]); + } + } + + finish_bitstream(&ctx); + + grib_buffer_replace(a, sec7 + 5, size_sec7 - 5, 1, 1); + + grib_context_free(a->context, sec7); + grib_context_free(a->context, list); + grib_context_free(a->context, v); + grib_context_free(a->context, lens); + grib_context_free(a->context, widths); + grib_context_free(a->context, refs); + grib_context_free(a->context, itmp); + grib_context_free(a->context, itmp2); + grib_context_free(a->context, data); + + // ECC-259: Set correct number of values + if ((err = grib_set_long_internal(gh, self->numberOfValues, *len)) != GRIB_SUCCESS) + return err; + + return GRIB_SUCCESS; +} + static int unpack_double(grib_accessor* a, double* val, size_t* len) { return unpack(a, val, len); @@ -978,7 +1896,7 @@ static int unpack_double_element(grib_accessor* a, size_t idx, double* val) if (idx > size) return GRIB_INVALID_ARGUMENT; - values = (double*)grib_context_malloc_clear(a->context, size * sizeof(double)); + values = reinterpret_cast(grib_context_malloc_clear(a->context, size * sizeof(double))); err = grib_get_double_array(grib_handle_of_accessor(a), "codedValues", values, &size); if (err) { grib_context_free(a->context, values); @@ -995,7 +1913,7 @@ static int unpack_double_element_set(grib_accessor* a, const size_t* index_array double* values; int err = 0; - /* GRIB-564: The indexes in index_array relate to codedValues NOT values! */ + // GRIB-564: The indexes in index_array relate to codedValues NOT values! err = grib_get_size(grib_handle_of_accessor(a), "codedValues", &size); if (err) return err; @@ -1004,7 +1922,7 @@ static int unpack_double_element_set(grib_accessor* a, const size_t* index_array if (index_array[i] > size) return GRIB_INVALID_ARGUMENT; } - values = (double*)grib_context_malloc_clear(a->context, size * sizeof(double)); + values = reinterpret_cast(grib_context_malloc_clear(a->context, size * sizeof(double))); err = grib_get_double_array(grib_handle_of_accessor(a), "codedValues", values, &size); if (err) { grib_context_free(a->context, values); @@ -1019,7 +1937,7 @@ static int unpack_double_element_set(grib_accessor* a, const size_t* index_array static int value_count(grib_accessor* a, long* count) { - grib_accessor_data_g22order_packing* self = (grib_accessor_data_g22order_packing*)a; + grib_accessor_data_g22order_packing* self = reinterpret_cast(a); *count = 0; return grib_get_long_internal(grib_handle_of_accessor(a), self->numberOfValues, count); } diff --git a/src/grib_accessor_class_data_g2bifourier_packing.cc b/src/grib_accessor_class_data_g2bifourier_packing.cc index 1e2335c0f..bf5f56f61 100644 --- a/src/grib_accessor_class_data_g2bifourier_packing.cc +++ b/src/grib_accessor_class_data_g2bifourier_packing.cc @@ -12,9 +12,11 @@ * philippe.marguinaud@meteo.fr *******************************/ +#include "grib_scaling.h" #include "grib_api_internal.h" #include "grib_optimize_decimal_factor.h" -#include +#include +#include /* This is used by make_class.pl @@ -57,7 +59,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_g2bifourier_packing { @@ -103,32 +104,32 @@ static grib_accessor_class _grib_accessor_class_data_g2bifourier_packing = { "data_g2bifourier_packing", /* name */ sizeof(grib_accessor_data_g2bifourier_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -137,10 +138,10 @@ static grib_accessor_class _grib_accessor_class_data_g2bifourier_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -149,45 +150,6 @@ static grib_accessor_class _grib_accessor_class_data_g2bifourier_packing = { grib_accessor_class* grib_accessor_class_data_g2bifourier_packing = &_grib_accessor_class_data_g2bifourier_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ typedef unsigned long (*encode_float_proc)(double); @@ -225,9 +187,6 @@ static int value_count(grib_accessor* a, long* numberOfValues) return grib_get_long_internal(gh, self->number_of_values, numberOfValues); } -#define MAX(x, y) ((x) > (y) ? (x) : (y)) -#define MIN(x, y) ((x) < (y) ? (x) : (y)) - static void ellipse(long ni, long nj, long itrunc[], long jtrunc[]) { const double zeps = 1.E-10; @@ -240,7 +199,7 @@ static void ellipse(long ni, long nj, long itrunc[], long jtrunc[]) */ for (j = 1; j < nj; j++) { - zi = (double)ni / (double)nj * sqrt(MAX(zauxil, (double)(nj * nj - j * j))); + zi = (double)ni / (double)nj * sqrt(std::max(zauxil, (double)(nj * nj - j * j))); itrunc[j] = (int)(zi + zeps); } @@ -257,7 +216,7 @@ static void ellipse(long ni, long nj, long itrunc[], long jtrunc[]) */ for (i = 1; i < ni; i++) { - zj = (double)nj / (double)ni * sqrt(MAX(zauxil, (double)(ni * ni - i * i))); + zj = (double)nj / (double)ni * sqrt(std::max(zauxil, (double)(ni * ni - i * i))); jtrunc[i] = (int)(zj + zeps); } @@ -452,10 +411,10 @@ static double laplam(bif_trunc_t* bt, const double val[]) else { int m, ll = itab1[i * i + j * j]; for (m = 0; m < 4; m++, isp++) { - DebugAssertAccess(znorm, (long)ll, (long)lmax); - DebugAssertAccess(val, (long)isp, (long)bt->n_vals_bif); + DEBUG_ASSERT_ACCESS(znorm, (long)ll, (long)lmax); + DEBUG_ASSERT_ACCESS(val, (long)isp, (long)bt->n_vals_bif); if (ll < lmax && isp < bt->n_vals_bif) { - znorm[ll] = MAX(znorm[ll], fabs(val[isp])); + znorm[ll] = std::max(znorm[ll], fabs(val[isp])); } } } @@ -504,7 +463,7 @@ static double laplam(bif_trunc_t* bt, const double val[]) zbeta1 = zsum1 / zsum2; zp = -zbeta1; - zp = MAX(-9.999, MIN(9.999, zp)); + zp = std::max(-9.999, std::min(9.999, zp)); free(itab1); free(itab2); @@ -700,8 +659,8 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) buf = (unsigned char*)gh->buffer->data; buf += grib_byte_offset(a); - s = grib_power(bt->binary_scale_factor, 2); - d = grib_power(-bt->decimal_scale_factor, 10); + s = codes_power(bt->binary_scale_factor, 2); + d = codes_power(-bt->decimal_scale_factor, 10); /* * Decode data @@ -749,6 +708,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) { grib_accessor_data_g2bifourier_packing* self = (grib_accessor_data_g2bifourier_packing*)a; grib_handle* gh = grib_handle_of_accessor(a); + const char* cclass_name = a->cclass->name; + size_t buflen = 0; size_t hsize = 0; size_t lsize = 0; @@ -848,8 +809,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if (ret != GRIB_SUCCESS) goto cleanup; - s = grib_power(-bt->binary_scale_factor, 2); - d = grib_power(+bt->decimal_scale_factor, 10); + s = codes_power(-bt->binary_scale_factor, 2); + d = codes_power(+bt->decimal_scale_factor, 10); } else { bt->decimal_scale_factor = 0; @@ -916,10 +877,14 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) goto cleanup; { - /* Make sure we can decode it again */ + // Make sure we can decode it again double ref = 1e-100; grib_get_double_internal(gh, self->reference_value, &ref); - Assert(ref == bt->reference_value); + if (ref != bt->reference_value) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s %s: %s (ref=%.10e != reference_value=%.10e)", + cclass_name, __func__, self->reference_value, ref, bt->reference_value); + return GRIB_INTERNAL_ERROR; + } } if ((ret = grib_set_long_internal(gh, self->binary_scale_factor, bt->binary_scale_factor)) != GRIB_SUCCESS) diff --git a/src/grib_accessor_class_data_g2complex_packing.cc b/src/grib_accessor_class_data_g2complex_packing.cc index 363c4d88a..98bcaf5cc 100644 --- a/src/grib_accessor_class_data_g2complex_packing.cc +++ b/src/grib_accessor_class_data_g2complex_packing.cc @@ -37,7 +37,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_g2complex_packing { @@ -82,32 +81,32 @@ static grib_accessor_class _grib_accessor_class_data_g2complex_packing = { "data_g2complex_packing", /* name */ sizeof(grib_accessor_data_g2complex_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -116,10 +115,10 @@ static grib_accessor_class _grib_accessor_class_data_g2complex_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -128,46 +127,6 @@ static grib_accessor_class _grib_accessor_class_data_g2complex_packing = { grib_accessor_class* grib_accessor_class_data_g2complex_packing = &_grib_accessor_class_data_g2complex_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) diff --git a/src/grib_accessor_class_data_g2secondary_bitmap.cc b/src/grib_accessor_class_data_g2secondary_bitmap.cc index 7756962f6..ee9f8f0be 100644 --- a/src/grib_accessor_class_data_g2secondary_bitmap.cc +++ b/src/grib_accessor_class_data_g2secondary_bitmap.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_g2secondary_bitmap { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_data_g2secondary_bitmap = { "data_g2secondary_bitmap", /* name */ sizeof(grib_accessor_data_g2secondary_bitmap), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_data_g2secondary_bitmap = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,46 +103,6 @@ static grib_accessor_class _grib_accessor_class_data_g2secondary_bitmap = { grib_accessor_class* grib_accessor_class_data_g2secondary_bitmap = &_grib_accessor_class_data_g2secondary_bitmap; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) diff --git a/src/grib_accessor_class_data_g2shsimple_packing.cc b/src/grib_accessor_class_data_g2shsimple_packing.cc index eded8b748..bdb1157cf 100644 --- a/src/grib_accessor_class_data_g2shsimple_packing.cc +++ b/src/grib_accessor_class_data_g2shsimple_packing.cc @@ -39,7 +39,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_g2shsimple_packing { @@ -61,32 +60,32 @@ static grib_accessor_class _grib_accessor_class_data_g2shsimple_packing = { "data_g2shsimple_packing", /* name */ sizeof(grib_accessor_data_g2shsimple_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -95,10 +94,10 @@ static grib_accessor_class _grib_accessor_class_data_g2shsimple_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -107,45 +106,6 @@ static grib_accessor_class _grib_accessor_class_data_g2shsimple_packing = { grib_accessor_class* grib_accessor_class_data_g2shsimple_packing = &_grib_accessor_class_data_g2shsimple_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) diff --git a/src/grib_accessor_class_data_g2simple_packing.cc b/src/grib_accessor_class_data_g2simple_packing.cc index 0adaf67bb..69e1bdbc9 100644 --- a/src/grib_accessor_class_data_g2simple_packing.cc +++ b/src/grib_accessor_class_data_g2simple_packing.cc @@ -8,6 +8,7 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" /* @@ -38,7 +39,6 @@ static int pack_bytes(grib_accessor*, const unsigned char*, size_t* len); static int pack_double(grib_accessor*, const double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_g2simple_packing { @@ -71,32 +71,32 @@ static grib_accessor_class _grib_accessor_class_data_g2simple_packing = { "data_g2simple_packing", /* name */ sizeof(grib_accessor_data_g2simple_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - &pack_bytes, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + &pack_bytes, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -105,10 +105,10 @@ static grib_accessor_class _grib_accessor_class_data_g2simple_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -117,45 +117,6 @@ static grib_accessor_class _grib_accessor_class_data_g2simple_packing = { grib_accessor_class* grib_accessor_class_data_g2simple_packing = &_grib_accessor_class_data_g2simple_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -277,8 +238,8 @@ static int pack_double(grib_accessor* a, const double* cval, size_t* len) if ((ret = grib_get_long_internal(grib_handle_of_accessor(a), self->decimal_scale_factor, &decimal_scale_factor)) != GRIB_SUCCESS) return ret; - decimal = grib_power(decimal_scale_factor, 10); - divisor = grib_power(-binary_scale_factor, 2); + decimal = codes_power(decimal_scale_factor, 10); + divisor = codes_power(-binary_scale_factor, 2); buflen = (((bits_per_value * n_vals) + 7) / 8) * sizeof(unsigned char); buf = (unsigned char*)grib_context_buffer_malloc_clear(a->context, buflen); diff --git a/src/grib_accessor_class_data_g2simple_packing_with_preprocessing.cc b/src/grib_accessor_class_data_g2simple_packing_with_preprocessing.cc index 55549fdd9..88a4de2cb 100644 --- a/src/grib_accessor_class_data_g2simple_packing_with_preprocessing.cc +++ b/src/grib_accessor_class_data_g2simple_packing_with_preprocessing.cc @@ -8,15 +8,10 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/*********************************** - * Enrico Fucile - **********************************/ - #include "grib_api_internal.h" -#define DIRECT 0 +#define DIRECT 0 #define INVERSE 1 - /* This is used by make_class.pl @@ -33,9 +28,6 @@ */ -static int pre_processing_func(double* values, long length, long pre_processing, - double* pre_processing_parameter, int mode); - /* START_CLASS_IMP */ /* @@ -50,7 +42,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_g2simple_packing_with_preprocessing { @@ -86,32 +77,32 @@ static grib_accessor_class _grib_accessor_class_data_g2simple_packing_with_prepr "data_g2simple_packing_with_preprocessing", /* name */ sizeof(grib_accessor_data_g2simple_packing_with_preprocessing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -120,10 +111,10 @@ static grib_accessor_class _grib_accessor_class_data_g2simple_packing_with_prepr 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -132,68 +123,93 @@ static grib_accessor_class _grib_accessor_class_data_g2simple_packing_with_prepr grib_accessor_class* grib_accessor_class_data_g2simple_packing_with_preprocessing = &_grib_accessor_class_data_g2simple_packing_with_preprocessing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) { grib_accessor_data_g2simple_packing_with_preprocessing* self = (grib_accessor_data_g2simple_packing_with_preprocessing*)a; - self->pre_processing = grib_arguments_get_name(grib_handle_of_accessor(a), args, self->carg++); - self->pre_processing_parameter = grib_arguments_get_name(grib_handle_of_accessor(a), args, self->carg++); + self->pre_processing = grib_arguments_get_name(grib_handle_of_accessor(a), args, self->carg++); + self->pre_processing_parameter = grib_arguments_get_name(grib_handle_of_accessor(a), args, self->carg++); a->flags |= GRIB_ACCESSOR_FLAG_DATA; } static int value_count(grib_accessor* a, long* n_vals) { grib_accessor_data_g2simple_packing_with_preprocessing* self = (grib_accessor_data_g2simple_packing_with_preprocessing*)a; - *n_vals = 0; + *n_vals = 0; return grib_get_long_internal(grib_handle_of_accessor(a), self->number_of_values, n_vals); } +static int pre_processing_func(double* values, long length, long pre_processing, + double* pre_processing_parameter, int mode) +{ + int i = 0, ret = 0; + double min = values[0]; + double next_min = values[0]; + Assert(length > 0); + + switch (pre_processing) { + /* NONE */ + case 0: + break; + /* LOGARITHM */ + case 1: + if (mode == DIRECT) { + for (i = 0; i < length; i++) { + if (values[i] < min) + min = values[i]; + if (values[i] > next_min) + next_min = values[i]; + } + for (i = 0; i < length; i++) { + if (values[i] > min && values[i] < next_min) + next_min = values[i]; + } + if (min > 0) { + *pre_processing_parameter = 0; + for (i = 0; i < length; i++) { + DEBUG_ASSERT(values[i] > 0); + values[i] = log(values[i]); + } + } + else { + double ppp = 0; + *pre_processing_parameter = next_min - 2 * min; + if (next_min == min) + return ret; + ppp = *pre_processing_parameter; + for (i = 0; i < length; i++) { + DEBUG_ASSERT((values[i] + ppp) > 0); + values[i] = log(values[i] + ppp); + } + } + } + else { + Assert(mode == INVERSE); + if (*pre_processing_parameter == 0) { + for (i = 0; i < length; i++) + values[i] = exp(values[i]); + } + else { + for (i = 0; i < length; i++) + values[i] = exp(values[i]) - *pre_processing_parameter; + } + } + break; + default: + ret = GRIB_NOT_IMPLEMENTED; + break; + } + + return ret; +} + static int unpack_double(grib_accessor* a, double* val, size_t* len) { grib_accessor_data_g2simple_packing_with_preprocessing* self = (grib_accessor_data_g2simple_packing_with_preprocessing*)a; - grib_accessor_class* super = *(a->cclass->super); - grib_accessor_class* super2 = NULL; + grib_accessor_class* super = *(a->cclass->super); + grib_accessor_class* super2 = NULL; size_t n_vals = 0; long nn = 0; @@ -215,12 +231,10 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) self->dirty = 0; if ((err = grib_get_long_internal(grib_handle_of_accessor(a), self->pre_processing, &pre_processing)) != GRIB_SUCCESS) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont gather value for %s error %d \n", a->name, self->pre_processing, err); return err; } if ((err = grib_get_double_internal(grib_handle_of_accessor(a), self->pre_processing_parameter, &pre_processing_parameter)) != GRIB_SUCCESS) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannont gather value for %s error %d \n", a->name, self->pre_processing_parameter, err); return err; } @@ -271,67 +285,3 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) return GRIB_SUCCESS; } - -static int pre_processing_func(double* values, long length, long pre_processing, - double* pre_processing_parameter, int mode) -{ - int i; - int ret = 0; - double min = values[0]; - double next_min = values[0]; - Assert(length > 0); - - switch (pre_processing) { - /* NONE */ - case 0: - break; - /* LOGARITHM */ - case 1: - if (mode == DIRECT) { - for (i = 0; i < length; i++) { - if (values[i] < min) - min = values[i]; - if (values[i] > next_min) - next_min = values[i]; - } - for (i = 0; i < length; i++) { - if (values[i] > min && values[i] < next_min) - next_min = values[i]; - } - if (min > 0) { - *pre_processing_parameter = 0; - for (i = 0; i < length; i++) { - DebugAssert(values[i] > 0); - values[i] = log(values[i]); - } - } - else { - double ppp = 0; - *pre_processing_parameter = next_min - 2 * min; - if (next_min == min) - return ret; - ppp = *pre_processing_parameter; - for (i = 0; i < length; i++) { - DebugAssert((values[i] + ppp) > 0); - values[i] = log(values[i] + ppp); - } - } - } - else { - if (*pre_processing_parameter == 0) { - for (i = 0; i < length; i++) - values[i] = exp(values[i]); - } - else { - for (i = 0; i < length; i++) - values[i] = exp(values[i]) - *pre_processing_parameter; - } - } - break; - default: - ret = GRIB_NOT_IMPLEMENTED; - break; - } - - return ret; -} diff --git a/src/grib_accessor_class_data_jpeg2000_packing.cc b/src/grib_accessor_class_data_jpeg2000_packing.cc index 9b813dd6d..7349def3e 100644 --- a/src/grib_accessor_class_data_jpeg2000_packing.cc +++ b/src/grib_accessor_class_data_jpeg2000_packing.cc @@ -8,6 +8,7 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" /* @@ -18,7 +19,7 @@ SUPER = grib_accessor_class_data_simple_packing IMPLEMENTS = init IMPLEMENTS = unpack_double - IMPLEMENTS = pack_double + IMPLEMENTS = pack_double;unpack_float IMPLEMENTS = unpack_double_element;unpack_double_element_set IMPLEMENTS = value_count MEMBERS=const char* type_of_compression_used @@ -46,9 +47,9 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); +static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int unpack_double_element(grib_accessor*, size_t i, double* val); static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array); @@ -92,32 +93,32 @@ static grib_accessor_class _grib_accessor_class_data_jpeg2000_packing = { "data_jpeg2000_packing", /* name */ sizeof(grib_accessor_data_jpeg2000_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -126,10 +127,10 @@ static grib_accessor_class _grib_accessor_class_data_jpeg2000_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -138,43 +139,6 @@ static grib_accessor_class _grib_accessor_class_data_jpeg2000_packing = { grib_accessor_class* grib_accessor_class_data_jpeg2000_packing = &_grib_accessor_class_data_jpeg2000_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int first = 1; @@ -251,6 +215,11 @@ static int value_count(grib_accessor* a, long* n_vals) #define EXTRA_BUFFER_SIZE 10240 #if HAVE_JPEG +static int unpack_float(grib_accessor*, float* val, size_t* len) +{ + return GRIB_NOT_IMPLEMENTED; +} + static int unpack_double(grib_accessor* a, double* val, size_t* len) { grib_accessor_data_jpeg2000_packing* self = (grib_accessor_data_jpeg2000_packing*)a; @@ -296,8 +265,8 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) self->dirty = 0; - bscale = grib_power(binary_scale_factor, 2); - dscale = grib_power(-decimal_scale_factor, 10); + bscale = codes_power(binary_scale_factor, 2); + dscale = codes_power(-decimal_scale_factor, 10); /* TODO: This should be called upstream */ if (*len < n_vals) @@ -436,8 +405,8 @@ static int pack_double(grib_accessor* a, const double* cval, size_t* len) if ((ret = grib_get_long_internal(grib_handle_of_accessor(a), self->decimal_scale_factor, &decimal_scale_factor)) != GRIB_SUCCESS) return ret; - decimal = grib_power(decimal_scale_factor, 10); - divisor = grib_power(-binary_scale_factor, 2); + decimal = codes_power(decimal_scale_factor, 10); + divisor = codes_power(-binary_scale_factor, 2); simple_packing_size = (((bits_per_value * n_vals) + 7) / 8) * sizeof(unsigned char); buf = (unsigned char*)grib_context_malloc_clear(a->context, simple_packing_size + EXTRA_BUFFER_SIZE); @@ -578,15 +547,25 @@ static int pack_double(grib_accessor* a, const double* cval, size_t* len) } #else +static void print_error_feature_not_enabled(grib_context* c) +{ + grib_context_log(c, GRIB_LOG_ERROR, + "JPEG support not enabled. Please rebuild with -DENABLE_JPG=ON"); +} +static int unpack_float(grib_accessor* a, float* val, size_t* len) +{ + print_error_feature_not_enabled(a->context); + return GRIB_FUNCTIONALITY_NOT_ENABLED; +} static int unpack_double(grib_accessor* a, double* val, size_t* len) { - grib_context_log(a->context, GRIB_LOG_ERROR, "JPEG support not enabled."); + print_error_feature_not_enabled(a->context); return GRIB_FUNCTIONALITY_NOT_ENABLED; } static int pack_double(grib_accessor* a, const double* val, size_t* len) { - grib_context_log(a->context, GRIB_LOG_ERROR, "JPEG support not enabled."); + print_error_feature_not_enabled(a->context); return GRIB_FUNCTIONALITY_NOT_ENABLED; } diff --git a/src/grib_accessor_class_data_png_packing.cc b/src/grib_accessor_class_data_png_packing.cc index 0485b2b21..44e9b41f6 100644 --- a/src/grib_accessor_class_data_png_packing.cc +++ b/src/grib_accessor_class_data_png_packing.cc @@ -8,6 +8,7 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" #define PNG_ANYBITS @@ -51,7 +52,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int unpack_double_element(grib_accessor*, size_t i, double* val); static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array); @@ -85,32 +85,32 @@ static grib_accessor_class _grib_accessor_class_data_png_packing = { "data_png_packing", /* name */ sizeof(grib_accessor_data_png_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -119,10 +119,10 @@ static grib_accessor_class _grib_accessor_class_data_png_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -131,43 +131,6 @@ static grib_accessor_class _grib_accessor_class_data_png_packing = { grib_accessor_class* grib_accessor_class_data_png_packing = &_grib_accessor_class_data_png_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -279,8 +242,8 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) if ((err = grib_get_long_internal(grib_handle_of_accessor(a), self->decimal_scale_factor, &decimal_scale_factor)) != GRIB_SUCCESS) return err; - bscale = grib_power(binary_scale_factor, 2); - dscale = grib_power(-decimal_scale_factor, 10); + bscale = codes_power(binary_scale_factor, 2); + dscale = codes_power(-decimal_scale_factor, 10); /* TODO: This should be called upstream */ if (*len < n_vals) @@ -398,6 +361,7 @@ static bool is_constant(const double* values, size_t n_vals) static int pack_double(grib_accessor* a, const double* val, size_t* len) { grib_accessor_data_png_packing* self = (grib_accessor_data_png_packing*)a; + const char* cclass_name = a->cclass->name; int err = GRIB_SUCCESS; bool is_constant_field = false; @@ -465,12 +429,16 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) #endif if ((err = grib_set_double_internal(grib_handle_of_accessor(a), self->reference_value, val[0])) != GRIB_SUCCESS) return err; + { - /* Make sure we can decode it again */ + // Make sure we can decode it again double ref = 1e-100; grib_get_double_internal(grib_handle_of_accessor(a), self->reference_value, &ref); - /*printf("%g %g %g\n", reference_value, ref, reference_value - ref);*/ - Assert(ref == reference_value); + if (ref != reference_value) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s %s: %s (ref=%.10e != reference_value=%.10e)", + cclass_name, __func__, self->reference_value, ref, reference_value); + return GRIB_INTERNAL_ERROR; + } } if ((err = grib_set_long_internal(grib_handle_of_accessor(a), self->number_of_values, n_vals)) != GRIB_SUCCESS) @@ -519,9 +487,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if (width * height != *len) { grib_context_log(a->context, GRIB_LOG_ERROR, - "grib_accessor_class_data_png_packing pack_double: width=%ld height=%ld len=%ld." - " width*height should equal len!", - (long)width, (long)height, (long)*len); + "%s %s: width=%ld height=%ld len=%ld. width*height should equal len!", + cclass_name, __func__, (long)width, (long)height, (long)*len); /* ECC-802: We cannot bomb out here as the user might have changed Ni/Nj and the packingType * but has not yet submitted the new data values. So len will be out of sync! * So issue a warning but proceed. @@ -529,7 +496,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) return GRIB_SUCCESS; } - d = grib_power(decimal_scale_factor, 10); + d = codes_power(decimal_scale_factor, 10); max = val[0]; min = max; @@ -547,12 +514,13 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) } if (reference_value > min) { - fprintf(stderr, "reference_value=%g min_value=%g diff=%g\n", reference_value, min, reference_value - min); - Assert(reference_value <= min); + grib_context_log(a->context, GRIB_LOG_ERROR, "reference_value=%g min_value=%g diff=%g", + reference_value, min, reference_value - min); + return GRIB_INTERNAL_ERROR; } binary_scale_factor = grib_get_binary_scale_fact(max, reference_value, bits_per_value, &err); - divisor = grib_power(-binary_scale_factor, 2); + divisor = codes_power(-binary_scale_factor, 2); #ifndef PNG_ANYBITS Assert(bits_per_value % 8 == 0); @@ -588,12 +556,18 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if ((err = grib_set_double_internal(grib_handle_of_accessor(a), self->reference_value, reference_value)) != GRIB_SUCCESS) return err; + { - /* Make sure we can decode it again */ + // Make sure we can decode it again double ref = 1e-100; grib_get_double_internal(grib_handle_of_accessor(a), self->reference_value, &ref); - Assert(ref == reference_value); + if (ref != reference_value) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s %s: %s (ref=%.10e != reference_value=%.10e)", + cclass_name, __func__, self->reference_value, ref, reference_value); + return GRIB_INTERNAL_ERROR; + } } + if ((err = grib_set_long_internal(grib_handle_of_accessor(a), self->binary_scale_factor, binary_scale_factor)) != GRIB_SUCCESS) return err; if ((err = grib_set_long_internal(grib_handle_of_accessor(a), self->decimal_scale_factor, decimal_scale_factor)) != GRIB_SUCCESS) @@ -765,8 +739,7 @@ static int unpack_double_element_set(grib_accessor* a, const size_t* index_array static void print_error_feature_not_enabled(grib_context* c) { grib_context_log(c, GRIB_LOG_ERROR, - "grib_accessor_data_png_packing: PNG support not enabled. " - "Please rebuild with -DENABLE_PNG=ON"); + "PNG support not enabled. Please rebuild with -DENABLE_PNG=ON"); } static int unpack_double(grib_accessor* a, double* val, size_t* len) diff --git a/src/grib_accessor_class_data_raw_packing.cc b/src/grib_accessor_class_data_raw_packing.cc index acceae597..336c73684 100644 --- a/src/grib_accessor_class_data_raw_packing.cc +++ b/src/grib_accessor_class_data_raw_packing.cc @@ -11,7 +11,7 @@ * Enrico Fucile ****************************/ -#include "grib_api_internal_cpp.h" +#include "grib_ieeefloat.h" #define PRE_PROCESSING_NONE 0 #define PRE_PROCESSING_DIFFERENCE 1 @@ -46,7 +46,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int unpack_double_element(grib_accessor*, size_t i, double* val); static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array); @@ -72,32 +71,32 @@ static grib_accessor_class _grib_accessor_class_data_raw_packing = { "data_raw_packing", /* name */ sizeof(grib_accessor_data_raw_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -106,10 +105,10 @@ static grib_accessor_class _grib_accessor_class_data_raw_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -118,43 +117,6 @@ static grib_accessor_class _grib_accessor_class_data_raw_packing = { grib_accessor_class* grib_accessor_class_data_raw_packing = &_grib_accessor_class_data_raw_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) diff --git a/src/grib_accessor_class_data_run_length_packing.cc b/src/grib_accessor_class_data_run_length_packing.cc index d8ecdaba2..cfe5370e0 100644 --- a/src/grib_accessor_class_data_run_length_packing.cc +++ b/src/grib_accessor_class_data_run_length_packing.cc @@ -8,6 +8,7 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" /* @@ -44,7 +45,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_run_length_packing { @@ -72,32 +72,32 @@ static grib_accessor_class _grib_accessor_class_data_run_length_packing = { "data_run_length_packing", /* name */ sizeof(grib_accessor_data_run_length_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -106,10 +106,10 @@ static grib_accessor_class _grib_accessor_class_data_run_length_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -118,45 +118,6 @@ static grib_accessor_class _grib_accessor_class_data_run_length_packing = { grib_accessor_class* grib_accessor_class_data_run_length_packing = &_grib_accessor_class_data_run_length_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -175,7 +136,7 @@ static void init(grib_accessor* a, const long v, grib_arguments* args) static int value_count(grib_accessor* a, long* number_of_values) { grib_accessor_data_run_length_packing* self = (grib_accessor_data_run_length_packing*)a; - *number_of_values = 0; + *number_of_values = 0; return grib_get_long_internal(grib_handle_of_accessor(a), self->number_of_values, number_of_values); } @@ -183,6 +144,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) { grib_accessor_data_run_length_packing* self = (grib_accessor_data_run_length_packing*)a; grib_handle* gh = grib_handle_of_accessor(a); + const char* cclass_name = a->cclass->name; int err = GRIB_SUCCESS; long seclen, number_of_values, bits_per_value, max_level_value, number_of_level_values, decimal_scale_factor; long* level_values = NULL; @@ -226,21 +188,24 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) } range = (1 << bits_per_value) - 1 - max_level_value; if ((max_level_value <= 0) || (number_of_level_values <= 0) || (max_level_value > number_of_level_values) || (range <= 0)) { - grib_context_log(a->context, GRIB_LOG_ERROR, "parameters are invalid: max_level_value=%ld(>0, <=number_of_level_values), number_of_level_values=%ld(>0, >=max_level_value), range=%ld(>0)", max_level_value, number_of_level_values, range); + grib_context_log(a->context, GRIB_LOG_ERROR, + "%s: parameters are invalid: max_level_value=%ld(>0, <=number_of_level_values), " + "number_of_level_values=%ld(>0, >=max_level_value), range=%ld(>0)", + cclass_name, max_level_value, number_of_level_values, range); return GRIB_DECODING_ERROR; } if (decimal_scale_factor > 127) { decimal_scale_factor = -(decimal_scale_factor - 128); } - level_scale_factor = grib_power(-decimal_scale_factor, 10.0); - levels = (double*)grib_context_malloc_clear(a->context, sizeof(double) * (number_of_level_values + 1)); - levels[0] = missingValue; + level_scale_factor = codes_power(-decimal_scale_factor, 10.0); + levels = (double*)grib_context_malloc_clear(a->context, sizeof(double) * (number_of_level_values + 1)); + levels[0] = missingValue; for (i = 0; i < number_of_level_values; i++) { levels[i + 1] = level_values[i] * level_scale_factor; } compressed_values = (long*)grib_context_malloc_clear(a->context, sizeof(long) * number_of_compressed_values); - buf = (unsigned char*)grib_handle_of_accessor(a)->buffer->data; - offsetBeforeData = grib_byte_offset(a); + buf = (unsigned char*)grib_handle_of_accessor(a)->buffer->data; + offsetBeforeData = grib_byte_offset(a); buf += offsetBeforeData; pos = 0; grib_decode_long_array(buf, &pos, bits_per_value, number_of_compressed_values, compressed_values); @@ -248,11 +213,14 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) i = 0; while (i < number_of_compressed_values) { if (compressed_values[i] > max_level_value) { - grib_context_log(a->context, GRIB_LOG_ERROR, "numberOfValues mismatch: i=%ld, compressed_values[i]=%ld, max_level_value=%ld", i, compressed_values[i], max_level_value); + grib_context_log(a->context, GRIB_LOG_ERROR, + "%s: numberOfValues mismatch: i=%d, " + "compressed_values[i]=%ld, max_level_value=%ld", + cclass_name, i, compressed_values[i], max_level_value); break; } - v = compressed_values[i++]; - n = 1; + v = compressed_values[i++]; + n = 1; factor = 1; while (i < number_of_compressed_values && compressed_values[i] > max_level_value) { n += factor * (compressed_values[i] - max_level_value - 1); @@ -260,7 +228,8 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) i++; } if (n > number_of_values) { - grib_context_log(a->context, GRIB_LOG_ERROR, "numberOfValues mismatch: n=%ld, number_of_values=%ld", n, number_of_values); + grib_context_log(a->context, GRIB_LOG_ERROR, "%s: numberOfValues mismatch: n=%ld, number_of_values=%ld", + cclass_name, n, number_of_values); break; } for (k = 0; k < n; k++) { @@ -271,7 +240,8 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) grib_context_free(a->context, levels); grib_context_free(a->context, compressed_values); if (j != number_of_values) { - grib_context_log(a->context, GRIB_LOG_ERROR, "numberOfValues mismatch: j=%ld, number_of_values=%ld", j, number_of_values); + grib_context_log(a->context, GRIB_LOG_ERROR, "%s: numberOfValues mismatch: j=%ld, number_of_values=%ld", + cclass_name, j, number_of_values); return GRIB_DECODING_ERROR; } return err; @@ -279,6 +249,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) static int pack_double(grib_accessor* a, const double* val, size_t* len) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Changing the packing type to 'grid_run_length' is not implemented."); + grib_context_log(a->context, GRIB_LOG_ERROR, + "%s: Function '%s' is not implemented", a->cclass->name, __func__); return GRIB_NOT_IMPLEMENTED; } diff --git a/src/grib_accessor_class_data_secondary_bitmap.cc b/src/grib_accessor_class_data_secondary_bitmap.cc index e914ecd4a..06329aa92 100644 --- a/src/grib_accessor_class_data_secondary_bitmap.cc +++ b/src/grib_accessor_class_data_secondary_bitmap.cc @@ -40,7 +40,6 @@ static int get_native_type(grib_accessor*); static int unpack_double(grib_accessor*, double* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_secondary_bitmap { @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_data_secondary_bitmap = { "data_secondary_bitmap", /* name */ sizeof(grib_accessor_data_secondary_bitmap), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_data_secondary_bitmap = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,45 +105,6 @@ static grib_accessor_class _grib_accessor_class_data_secondary_bitmap = { grib_accessor_class* grib_accessor_class_data_secondary_bitmap = &_grib_accessor_class_data_secondary_bitmap; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -248,8 +208,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) static int get_native_type(grib_accessor* a) { - /* grib_accessor_data_secondary_bitmap* self = (grib_accessor_data_secondary_bitmap*)a; - return grib_accessor_get_native_type(grib_find_accessor(grib_handle_of_accessor(a),self->coded_values));*/ - + // grib_accessor_data_secondary_bitmap* self = (grib_accessor_data_secondary_bitmap*)a; + //return grib_accessor_get_native_type(grib_find_accessor(grib_handle_of_accessor(a),self->coded_values)); return GRIB_TYPE_DOUBLE; } diff --git a/src/grib_accessor_class_data_sh_packed.cc b/src/grib_accessor_class_data_sh_packed.cc index 0d78b879a..6944c7a0a 100644 --- a/src/grib_accessor_class_data_sh_packed.cc +++ b/src/grib_accessor_class_data_sh_packed.cc @@ -8,8 +8,9 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -47,7 +48,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_sh_packed { @@ -90,32 +90,32 @@ static grib_accessor_class _grib_accessor_class_data_sh_packed = { "data_sh_packed", /* name */ sizeof(grib_accessor_data_sh_packed), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -124,10 +124,10 @@ static grib_accessor_class _grib_accessor_class_data_sh_packed = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -136,46 +136,6 @@ static grib_accessor_class _grib_accessor_class_data_sh_packed = { grib_accessor_class* grib_accessor_class_data_sh_packed = &_grib_accessor_class_data_sh_packed; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ typedef unsigned long (*encode_float_proc)(double); @@ -362,8 +322,8 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) lpos = 8 * (packed_offset - offsetdata); - s = grib_power(binary_scale_factor, 2); - d = grib_power(-decimal_scale_factor, 10); + s = codes_power(binary_scale_factor, 2); + d = codes_power(-decimal_scale_factor, 10); scals = (double*)grib_context_malloc(a->context, maxv * sizeof(double)); Assert(scals); diff --git a/src/grib_accessor_class_data_sh_unpacked.cc b/src/grib_accessor_class_data_sh_unpacked.cc index baacec961..394793612 100644 --- a/src/grib_accessor_class_data_sh_unpacked.cc +++ b/src/grib_accessor_class_data_sh_unpacked.cc @@ -8,8 +8,9 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -47,7 +48,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_sh_unpacked { @@ -90,32 +90,32 @@ static grib_accessor_class _grib_accessor_class_data_sh_unpacked = { "data_sh_unpacked", /* name */ sizeof(grib_accessor_data_sh_unpacked), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -124,10 +124,10 @@ static grib_accessor_class _grib_accessor_class_data_sh_unpacked = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -136,46 +136,6 @@ static grib_accessor_class _grib_accessor_class_data_sh_unpacked = { grib_accessor_class* grib_accessor_class_data_sh_unpacked = &_grib_accessor_class_data_sh_unpacked; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ typedef unsigned long (*encode_float_proc)(double); @@ -341,8 +301,8 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) lpos = 8 * (packed_offset - offsetdata); - s = grib_power(binary_scale_factor, 2); - d = grib_power(-decimal_scale_factor, 10); + s = codes_power(binary_scale_factor, 2); + d = codes_power(-decimal_scale_factor, 10); scals = (double*)grib_context_malloc(a->context, maxv * sizeof(double)); Assert(scals); diff --git a/src/grib_accessor_class_data_shsimple_packing.cc b/src/grib_accessor_class_data_shsimple_packing.cc index 643e2e035..d06743f8d 100644 --- a/src/grib_accessor_class_data_shsimple_packing.cc +++ b/src/grib_accessor_class_data_shsimple_packing.cc @@ -39,7 +39,6 @@ static int get_native_type(grib_accessor*); static int pack_double(grib_accessor*, const double* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_data_shsimple_packing { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_data_shsimple_packing = { "data_shsimple_packing", /* name */ sizeof(grib_accessor_data_shsimple_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_data_shsimple_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,45 +103,6 @@ static grib_accessor_class _grib_accessor_class_data_shsimple_packing = { grib_accessor_class* grib_accessor_class_data_shsimple_packing = &_grib_accessor_class_data_shsimple_packing; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) diff --git a/src/grib_accessor_class_data_simple_packing.cc b/src/grib_accessor_class_data_simple_packing.cc index 672b24b70..f8eed0d3c 100644 --- a/src/grib_accessor_class_data_simple_packing.cc +++ b/src/grib_accessor_class_data_simple_packing.cc @@ -8,13 +8,11 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/******************************** - * Enrico Fucile - *******************************/ - -#include "grib_api_internal_cpp.h" +#include "grib_scaling.h" +#include "grib_bits_any_endian_simple.h" #include "grib_optimize_decimal_factor.h" #include +#include /* This is used by make_class.pl @@ -57,7 +55,6 @@ static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int unpack_double_element(grib_accessor*, size_t i, double* val); static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array); static int unpack_double_subarray(grib_accessor*, double* val, size_t start, size_t len); @@ -92,32 +89,32 @@ static grib_accessor_class _grib_accessor_class_data_simple_packing = { "data_simple_packing", /* name */ sizeof(grib_accessor_data_simple_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - &unpack_float, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -126,10 +123,10 @@ static grib_accessor_class _grib_accessor_class_data_simple_packing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ &unpack_double_subarray, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -138,41 +135,6 @@ static grib_accessor_class _grib_accessor_class_data_simple_packing = { grib_accessor_class* grib_accessor_class_data_simple_packing = &_grib_accessor_class_data_simple_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) @@ -227,6 +189,7 @@ static int value_count(grib_accessor* a, long* number_of_values) static int unpack_double_element(grib_accessor* a, size_t idx, double* val) { grib_accessor_data_simple_packing* self = (grib_accessor_data_simple_packing*)a; + const char* cclass_name = a->cclass->name; long n_vals; int err = 0; @@ -267,12 +230,12 @@ static int unpack_double_element(grib_accessor* a, size_t idx, double* val) } Assert(idx < n_vals); - s = grib_power(binary_scale_factor, 2); - d = grib_power(-decimal_scale_factor, 10); + s = codes_power(binary_scale_factor, 2); + d = codes_power(-decimal_scale_factor, 10); grib_context_log(a->context, GRIB_LOG_DEBUG, - "grib_accessor_data_simple_packing: unpack_double_element: creating %s, %d values (idx=%ld)", - a->name, n_vals, idx); + "%s: %s: creating %s, %ld values (idx=%zu)", + cclass_name, __func__, a->name, n_vals, idx); buf += grib_byte_offset(a); @@ -280,14 +243,11 @@ static int unpack_double_element(grib_accessor* a, size_t idx, double* val) if (bits_per_value % 8) { grib_context_log(a->context, GRIB_LOG_DEBUG, - "unpack_double_element: calling outline function : bpv %d, rv : %g, sf : %d, dsf : %d ", - bits_per_value, reference_value, binary_scale_factor, decimal_scale_factor); + "%s: calling outline function : bpv %ld, rv: %g, bsf: %ld, dsf: %ld ", + cclass_name, bits_per_value, reference_value, binary_scale_factor, decimal_scale_factor); pos = idx * bits_per_value; - *val = (double)((( - grib_decode_unsigned_long(buf, &pos, bits_per_value) * s) + - reference_value) * - d); - /* val[i] = grib_decode_unsigned_long(buf, &pos, bits_per_value); */ + *val = (double)(((grib_decode_unsigned_long(buf, &pos, bits_per_value) * s) + reference_value) * d); + /* val[i] = grib_decode_unsigned_long(buf, &pos, bits_per_value); */ /* fprintf(stdout,"unpck uuu-o: %d vals %d bitspv buf %d by long \n", n_vals, bits_per_value, pos/8);*/ } else { @@ -327,6 +287,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len) static_assert(std::is_floating_point::value, "Requires floating point numbers"); grib_accessor_data_simple_packing* self = (grib_accessor_data_simple_packing*)a; + const char* cclass_name = a->cclass->name; grib_handle* gh = grib_handle_of_accessor(a); unsigned char* buf = (unsigned char*)grib_handle_of_accessor(a)->buffer->data; @@ -402,12 +363,11 @@ static int unpack(grib_accessor* a, T* val, size_t* len) return GRIB_SUCCESS; } - s = grib_power(binary_scale_factor, 2); - d = grib_power(-decimal_scale_factor, 10); + s = codes_power(binary_scale_factor, 2); + d = codes_power(-decimal_scale_factor, 10); grib_context_log(a->context, GRIB_LOG_DEBUG, - "grib_accessor_data_simple_packing: unpack_double : creating %s, %d values", - a->name, n_vals); + "%s %s: Creating %s, %zu values", cclass_name, __func__, a->name, n_vals); offsetBeforeData = grib_byte_offset(a); buf += offsetBeforeData; @@ -423,25 +383,24 @@ static int unpack(grib_accessor* a, T* val, size_t* len) const long valuesSize = (bits_per_value * n_vals) / 8; /*in bytes*/ if (offsetBeforeData + valuesSize > offsetAfterData) { grib_context_log(a->context, GRIB_LOG_ERROR, - "Data section size mismatch: offset before data=%ld, offset after data=%ld (num values=%ld, bits per value=%ld)", - offsetBeforeData, offsetAfterData, n_vals, bits_per_value); + "%s: Data section size mismatch: " + "offset before data=%ld, offset after data=%ld (num values=%zu, bits per value=%ld)", + cclass_name, offsetBeforeData, offsetAfterData, n_vals, bits_per_value); return GRIB_DECODING_ERROR; } } -#if 0 - if (offsetBeforeData == offsetAfterData) { - /* Crazy case: Constant field with bitsPerValue > 0 */ - for (i = 0; i < n_vals; i++) - val[i] = reference_value; - *len = n_vals; - return GRIB_SUCCESS; - } -#endif + // if (offsetBeforeData == offsetAfterData) { + // /* Crazy case: Constant field with bitsPerValue > 0 */ + // for (i = 0; i < n_vals; i++) + // val[i] = reference_value; + // *len = n_vals; + // return GRIB_SUCCESS; + // } } grib_context_log(a->context, GRIB_LOG_DEBUG, - "unpack_double: calling outline function : bpv %d, rv : %g, sf : %d, dsf : %d ", - bits_per_value, reference_value, binary_scale_factor, decimal_scale_factor); + "%s %s: calling outline function: bpv: %ld, rv: %g, bsf: %ld, dsf: %ld", + cclass_name, __func__, bits_per_value, reference_value, binary_scale_factor, decimal_scale_factor); grib_decode_array(buf, &pos, bits_per_value, reference_value, s, d, n_vals, val); *len = (long)n_vals; @@ -474,6 +433,7 @@ static int _unpack_double(grib_accessor* a, double* val, size_t* len, unsigned c { grib_accessor_data_simple_packing* self = (grib_accessor_data_simple_packing*)a; grib_handle* gh = grib_handle_of_accessor(a); + const char* cclass_name = a->cclass->name; size_t i = 0; int err = 0; @@ -539,12 +499,11 @@ static int _unpack_double(grib_accessor* a, double* val, size_t* len, unsigned c return GRIB_SUCCESS; } - s = grib_power(binary_scale_factor, 2); - d = grib_power(-decimal_scale_factor, 10); + s = codes_power(binary_scale_factor, 2); + d = codes_power(-decimal_scale_factor, 10); grib_context_log(a->context, GRIB_LOG_DEBUG, - "grib_accessor_data_simple_packing: unpack_double : creating %s, %d values", - a->name, n_vals); + "%s %s: Creating %s, %zu values", cclass_name, __func__, a->name, n_vals); offsetBeforeData = grib_byte_offset(a); buf += offsetBeforeData; @@ -565,15 +524,14 @@ static int _unpack_double(grib_accessor* a, double* val, size_t* len, unsigned c return GRIB_DECODING_ERROR; } } -#if 0 - if (offsetBeforeData == offsetAfterData) { - /* Crazy case: Constant field with bitsPerValue > 0 */ - for (i = 0; i < n_vals; i++) - val[i] = reference_value; - *len = n_vals; - return GRIB_SUCCESS; - } -#endif + + // if (offsetBeforeData == offsetAfterData) { + // /* Crazy case: Constant field with bitsPerValue > 0 */ + // for (i = 0; i < n_vals; i++) + // val[i] = reference_value; + // *len = n_vals; + // return GRIB_SUCCESS; + // } } grib_context_log(a->context, GRIB_LOG_DEBUG, @@ -617,38 +575,11 @@ static int unpack_double_subarray(grib_accessor* a, double* val, size_t start, s return _unpack_double(a, val, plen, buf, pos, nvals); } -#if GRIB_IBMPOWER67_OPT -#define restrict -#include "minmax_val.cc" -#undef restrict -#endif - -#if 0 -static int grib_producing_large_constant_fields(const grib_context* c, grib_handle* h, int edition) -{ - /* GRIB-802: If override key is set, ignore env. var and produce compressed fields */ - if (c->large_constant_fields) { /* This is set by the environment variable */ - /* check the override key */ - int err = 0; - long override_large_constant_fields = 0; - err = grib_get_long_internal(h, "override_large_constant_fields", &override_large_constant_fields); - if (err == GRIB_SUCCESS && override_large_constant_fields) { - return 0; - } - return 1; - } - if (c->gribex_mode_on==1 && edition==1) { - return 1; - } - - return 0; -} -#endif - static int pack_double(grib_accessor* a, const double* val, size_t* len) { grib_accessor_data_simple_packing* self = (grib_accessor_data_simple_packing*)a; grib_handle* gh = grib_handle_of_accessor(a); + const char* cclass_name = a->cclass->name; size_t i = 0; size_t n_vals = *len; @@ -696,14 +627,11 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) max = val[0]; min = max; -#if GRIB_IBMPOWER67_OPT - minmax_val(val + 1, n_vals - 1, &min, &max); -#else for (i = 1; i < n_vals; i++) { if (val[i] > max) max = val[i]; else if (val[i] < min) min = val[i]; } -#endif + if ((err = grib_check_data_values_range(gh, min, max)) != GRIB_SUCCESS) { return err; } @@ -722,9 +650,11 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) /* Make sure we can decode it again */ double ref = 1e-100; grib_get_double_internal(gh, self->reference_value, &ref); - if (ref != reference_value) - printf("%.20e != %.20e", ref, reference_value); - Assert(ref == reference_value); + if (ref != reference_value) { + grib_context_log(a->context, GRIB_LOG_ERROR, "%s %s: %s (ref=%.10e != reference_value=%.10e)", + cclass_name, __func__, self->reference_value, ref, reference_value); + return GRIB_INTERNAL_ERROR; + } } large_constant_fields = grib_producing_large_constant_fields(gh, self->edition); @@ -774,7 +704,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) /* decimal_scale_factor is given, binary_scale_factor=0 and bits_per_value is computed */ binary_scale_factor = 0; decimal_scale_factor = decimal_scale_factor_get; - decimal = grib_power(decimal_scale_factor, 10); + decimal = codes_power(decimal_scale_factor, 10); min *= decimal; max *= decimal; @@ -783,8 +713,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) err = number_of_bits((unsigned long)ceil(fabs(max - min)), &bits_per_value); if (err) { grib_context_log(a->context, GRIB_LOG_ERROR, - "Range of values too large. Try a smaller value for decimal precision (less than %ld)", - decimal_scale_factor); + "%s %s: Range of values too large. Try a smaller value for decimal precision (less than %ld)", + cclass_name, __func__, decimal_scale_factor); return err; } @@ -820,14 +750,14 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) return err; } else { - /* printf("max=%g reference_value=%g grib_power(-last,2)=%g decimal_scale_factor=%ld bits_per_value=%ld\n", - max,reference_value,grib_power(-last,2),decimal_scale_factor,bits_per_value);*/ + /* printf("max=%g reference_value=%g codes_power(-last,2)=%g decimal_scale_factor=%ld bits_per_value=%ld\n", + max,reference_value,codes_power(-last,2),decimal_scale_factor,bits_per_value);*/ range = (max - min); unscaled_min = min; unscaled_max = max; - f = (grib_power(bits_per_value, 2) - 1); - minrange = grib_power(-last, 2) * f; - maxrange = grib_power(last, 2) * f; + f = (codes_power(bits_per_value, 2) - 1); + minrange = codes_power(-last, 2) * f; + maxrange = codes_power(last, 2) * f; while (range < minrange) { decimal_scale_factor += 1; diff --git a/src/grib_accessor_class_decimal_precision.cc b/src/grib_accessor_class_decimal_precision.cc index 0d5bbd6c7..e498931b7 100644 --- a/src/grib_accessor_class_decimal_precision.cc +++ b/src/grib_accessor_class_decimal_precision.cc @@ -41,7 +41,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_decimal_precision { @@ -62,32 +61,32 @@ static grib_accessor_class _grib_accessor_class_decimal_precision = { "decimal_precision", /* name */ sizeof(grib_accessor_decimal_precision), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -96,10 +95,10 @@ static grib_accessor_class _grib_accessor_class_decimal_precision = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -108,46 +107,6 @@ static grib_accessor_class _grib_accessor_class_decimal_precision = { grib_accessor_class* grib_accessor_class_decimal_precision = &_grib_accessor_class_decimal_precision; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* args) diff --git a/src/grib_accessor_class_dictionary.cc b/src/grib_accessor_class_dictionary.cc index f239ccdfb..0f46c43eb 100644 --- a/src/grib_accessor_class_dictionary.cc +++ b/src/grib_accessor_class_dictionary.cc @@ -44,7 +44,6 @@ static int unpack_string(grib_accessor*, char*, size_t* len); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_dictionary { @@ -65,32 +64,32 @@ static grib_accessor_class _grib_accessor_class_dictionary = { "dictionary", /* name */ sizeof(grib_accessor_dictionary), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -99,10 +98,10 @@ static grib_accessor_class _grib_accessor_class_dictionary = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -111,42 +110,6 @@ static grib_accessor_class _grib_accessor_class_dictionary = { grib_accessor_class* grib_accessor_class_dictionary = &_grib_accessor_class_dictionary; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* params) @@ -164,7 +127,7 @@ static void init(grib_accessor* a, const long len, grib_arguments* params) a->flags |= GRIB_ACCESSOR_FLAG_READ_ONLY; } -static grib_trie* load_dictionary(grib_context* c, grib_accessor* a, int* err) +static grib_trie* load_dictionary(grib_accessor* a, int* err) { grib_accessor_dictionary* self = (grib_accessor_dictionary*)a; @@ -181,6 +144,7 @@ static grib_trie* load_dictionary(grib_context* c, grib_accessor* a, int* err) FILE* f = NULL; int i = 0; grib_handle* h = grib_handle_of_accessor(a); + grib_context* c = a->context; *err = GRIB_SUCCESS; @@ -306,7 +270,7 @@ static int unpack_string(grib_accessor* a, char* buffer, size_t* len) size_t rsize = 0; int i = 0; - grib_trie* dictionary = load_dictionary(a->context, a, &err); + grib_trie* dictionary = load_dictionary(a, &err); if (err) return err; diff --git a/src/grib_accessor_class_dirty.cc b/src/grib_accessor_class_dirty.cc index b94270be0..ec29923e3 100644 --- a/src/grib_accessor_class_dirty.cc +++ b/src/grib_accessor_class_dirty.cc @@ -39,7 +39,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_dirty { @@ -57,32 +56,32 @@ static grib_accessor_class _grib_accessor_class_dirty = { "dirty", /* name */ sizeof(grib_accessor_dirty), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -91,10 +90,10 @@ static grib_accessor_class _grib_accessor_class_dirty = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -103,46 +102,6 @@ static grib_accessor_class _grib_accessor_class_dirty = { grib_accessor_class* grib_accessor_class_dirty = &_grib_accessor_class_dirty; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_divdouble.cc b/src/grib_accessor_class_divdouble.cc index dda267300..e4e5442ef 100644 --- a/src/grib_accessor_class_divdouble.cc +++ b/src/grib_accessor_class_divdouble.cc @@ -39,7 +39,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_double(grib_accessor*, double* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_divdouble { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_divdouble = { "divdouble", /* name */ sizeof(grib_accessor_divdouble), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_divdouble = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,47 +103,6 @@ static grib_accessor_class _grib_accessor_class_divdouble = { grib_accessor_class* grib_accessor_class_divdouble = &_grib_accessor_class_divdouble; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_double.cc b/src/grib_accessor_class_double.cc index 62a4aea5b..e1888ed0c 100644 --- a/src/grib_accessor_class_double.cc +++ b/src/grib_accessor_class_double.cc @@ -41,7 +41,6 @@ static int get_native_type(grib_accessor*); static int pack_missing(grib_accessor*); static int unpack_string(grib_accessor*, char*, size_t* len); static void dump(grib_accessor*, grib_dumper*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_double @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_double = { "double", /* name */ sizeof(grib_accessor_double), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - &pack_missing, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + &pack_missing, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_double = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,43 +103,6 @@ static grib_accessor_class _grib_accessor_class_double = { grib_accessor_class* grib_accessor_class_double = &_grib_accessor_class_double; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int get_native_type(grib_accessor* a) @@ -234,17 +196,3 @@ static int pack_missing(grib_accessor* a) return grib_pack_double(a, &value, &len); return GRIB_VALUE_CANNOT_BE_MISSING; } -/* -static int is_missing(grib_accessor* a){ - size_t one = 1; - double value = GRIB_MISSING_DOUBLE; - - if(a->flags & GRIB_ACCESSOR_FLAG_CAN_BE_MISSING) - { - int e=grib_unpack_double(a,&value,&one); - Assert(e == 0); - return value == GRIB_MISSING_DOUBLE; - } - return 0; -} -*/ diff --git a/src/grib_accessor_class_element.cc b/src/grib_accessor_class_element.cc index 4b3c15973..5de471be4 100644 --- a/src/grib_accessor_class_element.cc +++ b/src/grib_accessor_class_element.cc @@ -41,7 +41,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_element { @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_element = { "element", /* name */ sizeof(grib_accessor_element), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_element = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,46 +105,6 @@ static grib_accessor_class _grib_accessor_class_element = { grib_accessor_class* grib_accessor_class_element = &_grib_accessor_class_element; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_evaluate.cc b/src/grib_accessor_class_evaluate.cc index 1099e4099..2c9fdf1e3 100644 --- a/src/grib_accessor_class_evaluate.cc +++ b/src/grib_accessor_class_evaluate.cc @@ -35,7 +35,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_evaluate { @@ -53,32 +52,32 @@ static grib_accessor_class _grib_accessor_class_evaluate = { "evaluate", /* name */ sizeof(grib_accessor_evaluate), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -87,10 +86,10 @@ static grib_accessor_class _grib_accessor_class_evaluate = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -99,46 +98,6 @@ static grib_accessor_class _grib_accessor_class_evaluate = { grib_accessor_class* grib_accessor_class_evaluate = &_grib_accessor_class_evaluate; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_expanded_descriptors.cc b/src/grib_accessor_class_expanded_descriptors.cc index 66c56c9ae..a339882d0 100644 --- a/src/grib_accessor_class_expanded_descriptors.cc +++ b/src/grib_accessor_class_expanded_descriptors.cc @@ -15,6 +15,7 @@ can appear */ +#include "grib_scaling.h" #include "grib_api_internal.h" /* This is used by make_class.pl @@ -58,7 +59,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_expanded_descriptors { @@ -84,32 +84,32 @@ static grib_accessor_class _grib_accessor_class_expanded_descriptors = { "expanded_descriptors", /* name */ sizeof(grib_accessor_expanded_descriptors), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -118,10 +118,10 @@ static grib_accessor_class _grib_accessor_class_expanded_descriptors = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -130,42 +130,6 @@ static grib_accessor_class _grib_accessor_class_expanded_descriptors = { grib_accessor_class* grib_accessor_class_expanded_descriptors = &_grib_accessor_class_expanded_descriptors; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ #define MYDEBUG 0 @@ -513,7 +477,7 @@ static void __expand(grib_accessor* a, bufr_descriptors_array* unexpanded, bufr_ case 7: if (us->Y) { ccp->extraScale = us->Y; - ccp->referenceFactor = grib_power(us->Y, 10); + ccp->referenceFactor = codes_power(us->Y, 10); ccp->extraWidth = ((10 * us->Y) + 2) / 3; } else { @@ -708,11 +672,11 @@ static int expand(grib_accessor* a) if (aDescriptor1->F == 2 && aDescriptor1->X == 6) { Assert(aDescriptor1->type == BUFR_DESCRIPTOR_TYPE_OPERATOR); operator206yyy_width = aDescriptor1->Y; /* Store the width for the following descriptor */ - DebugAssert(operator206yyy_width > 0); + DEBUG_ASSERT(operator206yyy_width > 0); } else if (operator206yyy_width > 0) { if (err == GRIB_NOT_FOUND) { - DebugAssert(aDescriptor1->type == BUFR_DESCRIPTOR_TYPE_UNKNOWN); + DEBUG_ASSERT(aDescriptor1->type == BUFR_DESCRIPTOR_TYPE_UNKNOWN); err = 0; /* Clear any error generated due to local descriptor */ aDescriptor1->nokey = aDescriptor2->nokey = 1; /* Do not show this descriptor in dump */ } @@ -866,10 +830,9 @@ static int value_count(grib_accessor* a, long* rlen) static void destroy(grib_context* c, grib_accessor* a) { - /* grib_accessor_expanded_descriptors* self = (grib_accessor_expanded_descriptors*)a; */ - /* if (self->rank==0 && self->expanded) { */ - /* grib_bufr_descriptors_array_delete(self->expanded); */ - /* } */ + // grib_accessor_expanded_descriptors* self = (grib_accessor_expanded_descriptors*)a; + // if (self->rank==0 && self->expanded) + // grib_bufr_descriptors_array_delete(self->expanded); } static int get_native_type(grib_accessor* a) diff --git a/src/grib_accessor_class_forward.cc b/src/grib_accessor_class_forward.cc deleted file mode 100644 index da816334a..000000000 --- a/src/grib_accessor_class_forward.cc +++ /dev/null @@ -1,154 +0,0 @@ -/* - * (C) Copyright 2005- 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 "grib_api_internal.h" - -/* - This is used by make_class.pl - - START_CLASS_DEF - SUPER= grib_accessor_class_gen - CLASS = accessor - IMPLEMENTS = dump - END_CLASS_DEF - - */ - -/* START_CLASS_IMP */ - -/* - -Don't edit anything between START_CLASS_IMP and END_CLASS_IMP -Instead edit values between START_CLASS_DEF and END_CLASS_DEF -or edit "accessor.class" and rerun ./make_class.pl - -*/ - -static void dump(grib_accessor*, grib_dumper*); -static void init_class(grib_accessor_class*); - -typedef struct grib_accessor_forward -{ - grib_accessor att; - /* Members defined in gen */ - /* Members defined in forward */ -} grib_accessor_forward; - -extern grib_accessor_class* grib_accessor_class_gen; - -static grib_accessor_class _grib_accessor_class_forward = { - &grib_accessor_class_gen, /* super */ - "forward", /* name */ - sizeof(grib_accessor_forward), /* size */ - 0, /* inited */ - &init_class, /* init_class */ - 0, /* init */ - 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ - 0, /* get length of string */ - 0, /* get number of values */ - 0, /* get number of bytes */ - 0, /* get offset to bytes */ - 0, /* get native type */ - 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ - 0, /* pack_expression */ - 0, /* notify_change */ - 0, /* update_size */ - 0, /* preferred_size */ - 0, /* resize */ - 0, /* nearest_smaller_value */ - 0, /* next accessor */ - 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ - 0, /* unpack a subarray */ - 0, /* clear */ - 0, /* clone accessor */ -}; - - -grib_accessor_class* grib_accessor_class_forward = &_grib_accessor_class_forward; - - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - -/* END_CLASS_IMP */ - - -static void dump(grib_accessor* a, grib_dumper* dumper) -{ -#if 0 - /* grib_accessor_forward* self = (grib_accessor_forward*)a; */ - grib_accessor *target = grib_find_accessor(grib_handle_of_accessor(a),a->alias); - if(target) { - grib_dump_label(dumper,a,"is:"); - dumper->depth += 2; - grib_accessor_dump(target, dumper); - dumper->depth -= 2; - } - else grib_dump_label(dumper,a," undefined "); -#endif -} diff --git a/src/grib_accessor_class_from_scale_factor_scaled_value.cc b/src/grib_accessor_class_from_scale_factor_scaled_value.cc index ef4b30cf2..53784e172 100644 --- a/src/grib_accessor_class_from_scale_factor_scaled_value.cc +++ b/src/grib_accessor_class_from_scale_factor_scaled_value.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include #ifdef ECCODES_ON_WINDOWS #include #endif @@ -44,7 +44,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_from_scale_factor_scaled_value { @@ -63,32 +62,32 @@ static grib_accessor_class _grib_accessor_class_from_scale_factor_scaled_value = "from_scale_factor_scaled_value", /* name */ sizeof(grib_accessor_from_scale_factor_scaled_value), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - &is_missing, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + &is_missing, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -97,10 +96,10 @@ static grib_accessor_class _grib_accessor_class_from_scale_factor_scaled_value = 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -109,44 +108,6 @@ static grib_accessor_class _grib_accessor_class_from_scale_factor_scaled_value = grib_accessor_class* grib_accessor_class_from_scale_factor_scaled_value = &_grib_accessor_class_from_scale_factor_scaled_value; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -156,118 +117,23 @@ static void init(grib_accessor* a, const long l, grib_arguments* c) grib_handle* hand = grib_handle_of_accessor(a); self->scaleFactor = grib_arguments_get_name(hand, c, n++); - self->scaledValue = grib_arguments_get_name(hand, c, n++); /* Can be scalar or array */ - - /* ECC-979: Allow user to encode */ - /* a->flags |= GRIB_ACCESSOR_FLAG_READ_ONLY; */ -} - -static float float_epsilon(void) -{ - float floatEps = 1.0; - while (1 + floatEps / 2 != 1) - floatEps /= 2; - return floatEps; -} - -static int is_approximately_equal(double a, double b, double epsilon) -{ - if (a == b) - return 1; - if (fabs(a - b) <= epsilon) - return 1; - return 0; -} + self->scaledValue = grib_arguments_get_name(hand, c, n++); // Can be scalar or array -static double eval_value_factor(int64_t value, int64_t factor) -{ - return (double)value * pow(10.0, -factor); -} - -/* Return 0 if no error and set the two outputs 'value' and 'factor' - * value cannot exceed maximum_value and factor cannot exceed maximum_factor - */ -static int get_scaled_value_and_scale_factor_algorithm1( - double input, int64_t maximum_value, int64_t maximum_factor, - int64_t* ret_value, int64_t* ret_factor) -{ - int64_t factor = 0; - int64_t value = 0; - - factor = floor(log10(maximum_value)) - floor(log10(input < 0 ? -input : input)); - value = (int64_t)round(input * pow(10, factor)); - while ((value % 10 == 0) && (factor > 0)) { - value /= 10; - factor--; - } - if (value >= maximum_value) - return GRIB_INTERNAL_ERROR; - if (factor > maximum_factor) - return GRIB_INTERNAL_ERROR; - - *ret_factor = factor; - *ret_value = value; - return GRIB_SUCCESS; -} - -/* Return 0 if no error and set the two outputs 'value' and 'factor' - * value cannot exceed maximum_value and factor cannot exceed maximum_factor - */ -static int get_scaled_value_and_scale_factor_algorithm2( - double input, int64_t maximum_value, int64_t maximum_factor, - int64_t* ret_value, int64_t* ret_factor) -{ - int64_t factor = 0, prev_factor = 0; - int64_t value = 0, prev_value = 0; - double exact = input; - const float epsilon = float_epsilon(); - int is_negative = 0; - - /* Loop until we find a close enough approximation. Keep the last good values */ - if (exact < 0) { - is_negative = 1; - exact *= -1; - } - factor = prev_factor = 0; - value = prev_value = round(exact); - while (!is_approximately_equal(exact, eval_value_factor(value, factor), epsilon) && - value < maximum_value && - factor < maximum_factor) { - value = round(exact * pow(10., ++factor)); - if (value > maximum_value || factor > maximum_factor) { - /* One or more maxima exceeded. So stop and use the previous values */ - value = prev_value; - factor = prev_factor; - break; - } - prev_factor = factor; - prev_value = value; - } - - if (is_negative) { - value *= -1; - } - - if (value == 0) - return GRIB_INTERNAL_ERROR; - - *ret_factor = factor; - *ret_value = value; - - return GRIB_SUCCESS; + // ECC-979: Allow user to encode + // a->flags |= GRIB_ACCESSOR_FLAG_READ_ONLY; } static int pack_double(grib_accessor* a, const double* val, size_t* len) { - /* See ECC-979 and ECC-1416 */ - /* Evaluate self->scaleFactor and self->scaledValue from input double '*val' */ + // See ECC-979 and ECC-1416 + // Evaluate self->scaleFactor and self->scaledValue from input double '*val' grib_accessor_from_scale_factor_scaled_value* self = (grib_accessor_from_scale_factor_scaled_value*)a; grib_handle* hand = grib_handle_of_accessor(a); int err = 0; int64_t factor = 0; int64_t value = 0; - double exact = *val; /*the input*/ - int64_t maxval_value, maxval_factor; /*maximum allowable values*/ + double exact = *val; // the input + int64_t maxval_value, maxval_factor; // maximum allowable values int value_accessor_num_bits = 0, factor_accessor_num_bits = 0; grib_accessor *factor_accessor, *value_accessor; @@ -295,19 +161,16 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) } value_accessor_num_bits = value_accessor->length * 8; factor_accessor_num_bits = factor_accessor->length * 8; - maxval_value = (1UL << value_accessor_num_bits) - 2; /* exclude missing */ - maxval_factor = (1UL << factor_accessor_num_bits) - 2; /* exclude missing */ + maxval_value = (1UL << value_accessor_num_bits) - 2; // exclude missing + maxval_factor = (1UL << factor_accessor_num_bits) - 2; // exclude missing if (strcmp(factor_accessor->cclass->name,"signed")==0) { maxval_factor = (1UL << (factor_accessor_num_bits - 1)) - 1; } - err = get_scaled_value_and_scale_factor_algorithm1(exact, maxval_value, maxval_factor, &value, &factor); + err = compute_scaled_value_and_scale_factor(exact, maxval_value, maxval_factor, &value, &factor); if (err) { - err = get_scaled_value_and_scale_factor_algorithm2(exact, maxval_value, maxval_factor, &value, &factor); - if (err) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Failed to compute %s and %s from %g", self->scaleFactor, self->scaledValue, exact); - return err; - } + grib_context_log(a->context, GRIB_LOG_ERROR, "Failed to compute %s and %s from %g", self->scaleFactor, self->scaledValue, exact); + return err; } if ((err = grib_set_long_internal(hand, self->scaleFactor, factor)) != GRIB_SUCCESS) @@ -342,7 +205,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) *len = 1; return GRIB_SUCCESS; } else { - /* ECC-966: If scale factor is missing, print error and treat it as zero (as a fallback) */ + // ECC-966: If scale factor is missing, print error and treat it as zero (as a fallback) if (grib_is_missing(hand, self->scaleFactor, &err) && err == GRIB_SUCCESS) { grib_context_log(a->context, GRIB_LOG_ERROR, "unpack_double for %s: %s is missing! Using zero instead", a->name, self->scaleFactor); @@ -352,9 +215,9 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) *val = scaledValue; - /* The formula is: - * real_value = scaled_value / pow(10, scale_factor) - */ + // The formula is: + // real_value = scaled_value / pow(10, scale_factor) + // while (scaleFactor < 0) { *val *= 10; scaleFactor++; diff --git a/src/grib_accessor_class_g1_half_byte_codeflag.cc b/src/grib_accessor_class_g1_half_byte_codeflag.cc index 6d819c2b7..522eb9ee1 100644 --- a/src/grib_accessor_class_g1_half_byte_codeflag.cc +++ b/src/grib_accessor_class_g1_half_byte_codeflag.cc @@ -39,7 +39,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_g1_half_byte_codeflag @@ -56,32 +55,32 @@ static grib_accessor_class _grib_accessor_class_g1_half_byte_codeflag = { "g1_half_byte_codeflag", /* name */ sizeof(grib_accessor_g1_half_byte_codeflag), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -90,10 +89,10 @@ static grib_accessor_class _grib_accessor_class_g1_half_byte_codeflag = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -102,43 +101,6 @@ static grib_accessor_class _grib_accessor_class_g1_half_byte_codeflag = { grib_accessor_class* grib_accessor_class_g1_half_byte_codeflag = &_grib_accessor_class_g1_half_byte_codeflag; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_g1_message_length.cc b/src/grib_accessor_class_g1_message_length.cc index 9eb10664e..adff03efe 100644 --- a/src/grib_accessor_class_g1_message_length.cc +++ b/src/grib_accessor_class_g1_message_length.cc @@ -34,7 +34,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g1_message_length { @@ -56,32 +55,32 @@ static grib_accessor_class _grib_accessor_class_g1_message_length = { "g1_message_length", /* name */ sizeof(grib_accessor_g1_message_length), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -90,10 +89,10 @@ static grib_accessor_class _grib_accessor_class_g1_message_length = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -102,46 +101,6 @@ static grib_accessor_class _grib_accessor_class_g1_message_length = { grib_accessor_class* grib_accessor_class_g1_message_length = &_grib_accessor_class_g1_message_length; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* args) @@ -234,10 +193,8 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) /* Do not do the length checks in this special case */ if ((ret = pack_long_unsigned_helper(a, &tlen, len, /*check=*/0)) != GRIB_SUCCESS) return ret; - /* - if((ret = super->pack_long(a,&tlen,len)) != GRIB_SUCCESS) - return ret; - */ + + // if((ret = super->pack_long(a,&tlen,len)) != GRIB_SUCCESS) return ret; { long total_length = -1, sec4_length = -1; diff --git a/src/grib_accessor_class_g1_section4_length.cc b/src/grib_accessor_class_g1_section4_length.cc index 6e114daaf..8e6c2b3f1 100644 --- a/src/grib_accessor_class_g1_section4_length.cc +++ b/src/grib_accessor_class_g1_section4_length.cc @@ -34,7 +34,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g1_section4_length { @@ -56,32 +55,32 @@ static grib_accessor_class _grib_accessor_class_g1_section4_length = { "g1_section4_length", /* name */ sizeof(grib_accessor_g1_section4_length), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -90,10 +89,10 @@ static grib_accessor_class _grib_accessor_class_g1_section4_length = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -102,49 +101,8 @@ static grib_accessor_class _grib_accessor_class_g1_section4_length = { grib_accessor_class* grib_accessor_class_g1_section4_length = &_grib_accessor_class_g1_section4_length; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ - static void init(grib_accessor* a, const long len, grib_arguments* args) { grib_accessor_g1_section4_length* self = (grib_accessor_g1_section4_length*)a; @@ -153,36 +111,31 @@ static void init(grib_accessor* a, const long len, grib_arguments* args) static int pack_long(grib_accessor* a, const long* val, size_t* len) { -#if 0 - grib_accessor_class* super = *(a->cclass->super); - - /* Here we assume that the totalLength will be coded AFTER the section4 length, and - the section4 length will be overwritten by the totalLength accessor for large GRIBs */ - - /*printf("UPDATING sec4len %ld\n",*val);*/ - - return super->pack_long(a,val,len); -#endif - /* Do not directly call pack_long on base class */ - /* because in this special case we want to skip the checks. */ - /* So we call the helper function which has an extra argument */ + // Old implementation: + // Here we assume that the totalLength will be coded AFTER the section4 length, and + // the section4 length will be overwritten by the totalLength accessor for large GRIBs + // grib_accessor_class* super = *(a->cclass->super); + // return super->pack_long(a,val,len); + + // Note: Do not directly call pack_long on base class + // because in this special case we want to skip the checks. + // So we call the helper function which has an extra argument return pack_long_unsigned_helper(a, val, len, /*check=*/0); } static int unpack_long(grib_accessor* a, long* val, size_t* len) { grib_accessor_g1_section4_length* self = (grib_accessor_g1_section4_length*)a; - int ret; - - long total_length, sec4_length; + int ret = 0; + long total_length = 0, sec4_length = 0; if ((ret = grib_get_g1_message_size(grib_handle_of_accessor(a), grib_find_accessor(grib_handle_of_accessor(a), self->total_length), a, &total_length, - &sec4_length)) != GRIB_SUCCESS) + &sec4_length)) != GRIB_SUCCESS) { return ret; - + } *val = sec4_length; diff --git a/src/grib_accessor_class_g1area.cc b/src/grib_accessor_class_g1area.cc index 616797efd..85119c75b 100644 --- a/src/grib_accessor_class_g1area.cc +++ b/src/grib_accessor_class_g1area.cc @@ -42,7 +42,6 @@ static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g1area { @@ -64,32 +63,32 @@ static grib_accessor_class _grib_accessor_class_g1area = { "g1area", /* name */ sizeof(grib_accessor_g1area), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -98,10 +97,10 @@ static grib_accessor_class _grib_accessor_class_g1area = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -110,44 +109,6 @@ static grib_accessor_class _grib_accessor_class_g1area = { grib_accessor_class* grib_accessor_class_g1area = &_grib_accessor_class_g1area; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_g1bitmap.cc b/src/grib_accessor_class_g1bitmap.cc index bee7e21bc..bfa835f01 100644 --- a/src/grib_accessor_class_g1bitmap.cc +++ b/src/grib_accessor_class_g1bitmap.cc @@ -37,7 +37,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_bytes(grib_accessor*, unsigned char*, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g1bitmap { @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_g1bitmap = { "g1bitmap", /* name */ sizeof(grib_accessor_g1bitmap), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - &unpack_bytes, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + &unpack_bytes, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_g1bitmap = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,45 +105,6 @@ static grib_accessor_class _grib_accessor_class_g1bitmap = { grib_accessor_class* grib_accessor_class_g1bitmap = &_grib_accessor_class_g1bitmap; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_g1date.cc b/src/grib_accessor_class_g1date.cc index 4113e3fa1..c1efdfc03 100644 --- a/src/grib_accessor_class_g1date.cc +++ b/src/grib_accessor_class_g1date.cc @@ -46,7 +46,6 @@ static int unpack_string(grib_accessor*, char*, size_t* len); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g1date { @@ -67,32 +66,32 @@ static grib_accessor_class _grib_accessor_class_g1date = { "g1date", /* name */ sizeof(grib_accessor_g1date), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -101,10 +100,10 @@ static grib_accessor_class _grib_accessor_class_g1date = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -113,43 +112,6 @@ static grib_accessor_class _grib_accessor_class_g1date = { grib_accessor_class* grib_accessor_class_g1date = &_grib_accessor_class_g1date; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_g1day_of_the_year_date.cc b/src/grib_accessor_class_g1day_of_the_year_date.cc index c14fa427a..6745bbf56 100644 --- a/src/grib_accessor_class_g1day_of_the_year_date.cc +++ b/src/grib_accessor_class_g1day_of_the_year_date.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_string(grib_accessor*, char*, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g1day_of_the_year_date { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_g1day_of_the_year_date = { "g1day_of_the_year_date", /* name */ sizeof(grib_accessor_g1day_of_the_year_date), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_g1day_of_the_year_date = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,46 +103,6 @@ static grib_accessor_class _grib_accessor_class_g1day_of_the_year_date = { grib_accessor_class* grib_accessor_class_g1day_of_the_year_date = &_grib_accessor_class_g1day_of_the_year_date; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_g1end_of_interval_monthly.cc b/src/grib_accessor_class_g1end_of_interval_monthly.cc index b47b659b4..5e39e6882 100644 --- a/src/grib_accessor_class_g1end_of_interval_monthly.cc +++ b/src/grib_accessor_class_g1end_of_interval_monthly.cc @@ -37,7 +37,6 @@ static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_g1end_of_interval_monthly @@ -59,32 +58,32 @@ static grib_accessor_class _grib_accessor_class_g1end_of_interval_monthly = { "g1end_of_interval_monthly", /* name */ sizeof(grib_accessor_g1end_of_interval_monthly), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -93,10 +92,10 @@ static grib_accessor_class _grib_accessor_class_g1end_of_interval_monthly = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -105,45 +104,6 @@ static grib_accessor_class _grib_accessor_class_g1end_of_interval_monthly = { grib_accessor_class* grib_accessor_class_g1end_of_interval_monthly = &_grib_accessor_class_g1end_of_interval_monthly; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_g1fcperiod.cc b/src/grib_accessor_class_g1fcperiod.cc index e0ad74979..03aa6e3f4 100644 --- a/src/grib_accessor_class_g1fcperiod.cc +++ b/src/grib_accessor_class_g1fcperiod.cc @@ -31,7 +31,6 @@ or edit "accessor.class" and rerun ./make_class.pl */ static int unpack_string(grib_accessor*, char*, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g1fcperiod { @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_g1fcperiod = { "g1fcperiod", /* name */ sizeof(grib_accessor_g1fcperiod), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_g1fcperiod = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,47 +105,6 @@ static grib_accessor_class _grib_accessor_class_g1fcperiod = { grib_accessor_class* grib_accessor_class_g1fcperiod = &_grib_accessor_class_g1fcperiod; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_string(grib_accessor* a, char* val, size_t* len) diff --git a/src/grib_accessor_class_g1forecastmonth.cc b/src/grib_accessor_class_g1forecastmonth.cc index 62bb3a7f2..e25db6930 100644 --- a/src/grib_accessor_class_g1forecastmonth.cc +++ b/src/grib_accessor_class_g1forecastmonth.cc @@ -42,7 +42,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g1forecastmonth { @@ -65,32 +64,32 @@ static grib_accessor_class _grib_accessor_class_g1forecastmonth = { "g1forecastmonth", /* name */ sizeof(grib_accessor_g1forecastmonth), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -99,10 +98,10 @@ static grib_accessor_class _grib_accessor_class_g1forecastmonth = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -111,45 +110,6 @@ static grib_accessor_class _grib_accessor_class_g1forecastmonth = { grib_accessor_class* grib_accessor_class_g1forecastmonth = &_grib_accessor_class_g1forecastmonth; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -173,15 +133,14 @@ static void dump(grib_accessor* a, grib_dumper* dumper) grib_dump_long(dumper, a, NULL); } -static int calculate_fcmonth(grib_accessor* a, - long verification_yearmonth, long base_date, long day, long hour, long* result) +static int calculate_fcmonth(grib_accessor* a, long verification_yearmonth, long base_date, long day, long hour, long* result) { - long base_yearmonth = 0; + long base_yearmonth = 0; long vyear = 0; long vmonth = 0; long byear = 0; long bmonth = 0; - long fcmonth = 0; + long fcmonth = 0; base_yearmonth = base_date / 100; diff --git a/src/grib_accessor_class_g1monthlydate.cc b/src/grib_accessor_class_g1monthlydate.cc index a3b47807e..503d0daa4 100644 --- a/src/grib_accessor_class_g1monthlydate.cc +++ b/src/grib_accessor_class_g1monthlydate.cc @@ -41,7 +41,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g1monthlydate { @@ -59,32 +58,32 @@ static grib_accessor_class _grib_accessor_class_g1monthlydate = { "g1monthlydate", /* name */ sizeof(grib_accessor_g1monthlydate), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -93,10 +92,10 @@ static grib_accessor_class _grib_accessor_class_g1monthlydate = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -105,46 +104,6 @@ static grib_accessor_class _grib_accessor_class_g1monthlydate = { grib_accessor_class* grib_accessor_class_g1monthlydate = &_grib_accessor_class_g1monthlydate; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_g1number_of_coded_values_sh_complex.cc b/src/grib_accessor_class_g1number_of_coded_values_sh_complex.cc index c643f2a55..45b983502 100644 --- a/src/grib_accessor_class_g1number_of_coded_values_sh_complex.cc +++ b/src/grib_accessor_class_g1number_of_coded_values_sh_complex.cc @@ -44,7 +44,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g1number_of_coded_values_sh_complex { @@ -69,32 +68,32 @@ static grib_accessor_class _grib_accessor_class_g1number_of_coded_values_sh_comp "g1number_of_coded_values_sh_complex", /* name */ sizeof(grib_accessor_g1number_of_coded_values_sh_complex), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -103,10 +102,10 @@ static grib_accessor_class _grib_accessor_class_g1number_of_coded_values_sh_comp 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -115,47 +114,6 @@ static grib_accessor_class _grib_accessor_class_g1number_of_coded_values_sh_comp grib_accessor_class* grib_accessor_class_g1number_of_coded_values_sh_complex = &_grib_accessor_class_g1number_of_coded_values_sh_complex; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -211,7 +169,7 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) NS = (MS + 1) * (MS + 2); if (bpv != 0) { - DebugAssert(offsetAfterData > offsetBeforeData); + DEBUG_ASSERT(offsetAfterData > offsetBeforeData); *val = ((offsetAfterData - offsetBeforeData) * 8 - unusedBits + NS * (bpv - 32)) / bpv; } else { diff --git a/src/grib_accessor_class_g1number_of_coded_values_sh_simple.cc b/src/grib_accessor_class_g1number_of_coded_values_sh_simple.cc index 9b8a3d772..532a4c5dd 100644 --- a/src/grib_accessor_class_g1number_of_coded_values_sh_simple.cc +++ b/src/grib_accessor_class_g1number_of_coded_values_sh_simple.cc @@ -41,7 +41,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g1number_of_coded_values_sh_simple { @@ -63,32 +62,32 @@ static grib_accessor_class _grib_accessor_class_g1number_of_coded_values_sh_simp "g1number_of_coded_values_sh_simple", /* name */ sizeof(grib_accessor_g1number_of_coded_values_sh_simple), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -97,10 +96,10 @@ static grib_accessor_class _grib_accessor_class_g1number_of_coded_values_sh_simp 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -109,47 +108,6 @@ static grib_accessor_class _grib_accessor_class_g1number_of_coded_values_sh_simp grib_accessor_class* grib_accessor_class_g1number_of_coded_values_sh_simple = &_grib_accessor_class_g1number_of_coded_values_sh_simple; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -187,7 +145,7 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) return ret; if (bpv != 0) { - DebugAssert(offsetAfterData > offsetBeforeData); + DEBUG_ASSERT(offsetAfterData > offsetBeforeData); *val = ((offsetAfterData - offsetBeforeData) * 8 - unusedBits) / bpv; } else { diff --git a/src/grib_accessor_class_g1step_range.cc b/src/grib_accessor_class_g1step_range.cc index 308929d46..46c7a3cc8 100644 --- a/src/grib_accessor_class_g1step_range.cc +++ b/src/grib_accessor_class_g1step_range.cc @@ -55,7 +55,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g1step_range { @@ -83,32 +82,32 @@ static grib_accessor_class _grib_accessor_class_g1step_range = { "g1step_range", /* name */ sizeof(grib_accessor_g1step_range), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -117,10 +116,10 @@ static grib_accessor_class _grib_accessor_class_g1step_range = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -129,40 +128,6 @@ static grib_accessor_class _grib_accessor_class_g1step_range = { grib_accessor_class* grib_accessor_class_g1step_range = &_grib_accessor_class_g1step_range; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_g1verificationdate.cc b/src/grib_accessor_class_g1verificationdate.cc index 651f9d322..a3272acc2 100644 --- a/src/grib_accessor_class_g1verificationdate.cc +++ b/src/grib_accessor_class_g1verificationdate.cc @@ -38,7 +38,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g1verificationdate { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_g1verificationdate = { "g1verificationdate", /* name */ sizeof(grib_accessor_g1verificationdate), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_g1verificationdate = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,46 +103,6 @@ static grib_accessor_class _grib_accessor_class_g1verificationdate = { grib_accessor_class* grib_accessor_class_g1verificationdate = &_grib_accessor_class_g1verificationdate; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_g2_aerosol.cc b/src/grib_accessor_class_g2_aerosol.cc index 2c36e96c9..7cd8659df 100644 --- a/src/grib_accessor_class_g2_aerosol.cc +++ b/src/grib_accessor_class_g2_aerosol.cc @@ -38,7 +38,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g2_aerosol { @@ -61,32 +60,32 @@ static grib_accessor_class _grib_accessor_class_g2_aerosol = { "g2_aerosol", /* name */ sizeof(grib_accessor_g2_aerosol), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -95,10 +94,10 @@ static grib_accessor_class _grib_accessor_class_g2_aerosol = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -107,45 +106,6 @@ static grib_accessor_class _grib_accessor_class_g2_aerosol = { grib_accessor_class* grib_accessor_class_g2_aerosol = &_grib_accessor_class_g2_aerosol; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_g2_chemical.cc b/src/grib_accessor_class_g2_chemical.cc index 48360f124..16d8e6f33 100644 --- a/src/grib_accessor_class_g2_chemical.cc +++ b/src/grib_accessor_class_g2_chemical.cc @@ -38,7 +38,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g2_chemical { @@ -61,32 +60,32 @@ static grib_accessor_class _grib_accessor_class_g2_chemical = { "g2_chemical", /* name */ sizeof(grib_accessor_g2_chemical), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -95,10 +94,10 @@ static grib_accessor_class _grib_accessor_class_g2_chemical = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -107,45 +106,6 @@ static grib_accessor_class _grib_accessor_class_g2_chemical = { grib_accessor_class* grib_accessor_class_g2_chemical = &_grib_accessor_class_g2_chemical; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_g2_eps.cc b/src/grib_accessor_class_g2_eps.cc index 949d4bc25..fc202a572 100644 --- a/src/grib_accessor_class_g2_eps.cc +++ b/src/grib_accessor_class_g2_eps.cc @@ -41,7 +41,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g2_eps { @@ -66,32 +65,32 @@ static grib_accessor_class _grib_accessor_class_g2_eps = { "g2_eps", /* name */ sizeof(grib_accessor_g2_eps), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -100,10 +99,10 @@ static grib_accessor_class _grib_accessor_class_g2_eps = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -112,45 +111,6 @@ static grib_accessor_class _grib_accessor_class_g2_eps = { grib_accessor_class* grib_accessor_class_g2_eps = &_grib_accessor_class_g2_eps; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_g2_mars_labeling.cc b/src/grib_accessor_class_g2_mars_labeling.cc index b11cbb30a..f6437c279 100644 --- a/src/grib_accessor_class_g2_mars_labeling.cc +++ b/src/grib_accessor_class_g2_mars_labeling.cc @@ -55,7 +55,6 @@ static int unpack_long(grib_accessor*, long* val, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g2_mars_labeling { @@ -81,32 +80,32 @@ static grib_accessor_class _grib_accessor_class_g2_mars_labeling = { "g2_mars_labeling", /* name */ sizeof(grib_accessor_g2_mars_labeling), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -115,10 +114,10 @@ static grib_accessor_class _grib_accessor_class_g2_mars_labeling = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -127,42 +126,6 @@ static grib_accessor_class _grib_accessor_class_g2_mars_labeling = { grib_accessor_class* grib_accessor_class_g2_mars_labeling = &_grib_accessor_class_g2_mars_labeling; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_g2bitmap.cc b/src/grib_accessor_class_g2bitmap.cc index c17da753b..3d928e804 100644 --- a/src/grib_accessor_class_g2bitmap.cc +++ b/src/grib_accessor_class_g2bitmap.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g2bitmap { @@ -59,32 +58,32 @@ static grib_accessor_class _grib_accessor_class_g2bitmap = { "g2bitmap", /* name */ sizeof(grib_accessor_g2bitmap), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -93,10 +92,10 @@ static grib_accessor_class _grib_accessor_class_g2bitmap = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -105,46 +104,6 @@ static grib_accessor_class _grib_accessor_class_g2bitmap = { grib_accessor_class* grib_accessor_class_g2bitmap = &_grib_accessor_class_g2bitmap; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_g2bitmap_present.cc b/src/grib_accessor_class_g2bitmap_present.cc index 93201529f..52378d4eb 100644 --- a/src/grib_accessor_class_g2bitmap_present.cc +++ b/src/grib_accessor_class_g2bitmap_present.cc @@ -39,7 +39,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g2bitmap_present { @@ -57,32 +56,32 @@ static grib_accessor_class _grib_accessor_class_g2bitmap_present = { "g2bitmap_present", /* name */ sizeof(grib_accessor_g2bitmap_present), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -91,10 +90,10 @@ static grib_accessor_class _grib_accessor_class_g2bitmap_present = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -103,46 +102,6 @@ static grib_accessor_class _grib_accessor_class_g2bitmap_present = { grib_accessor_class* grib_accessor_class_g2bitmap_present = &_grib_accessor_class_g2bitmap_present; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_g2date.cc b/src/grib_accessor_class_g2date.cc index d3523dfbe..4ed01d99e 100644 --- a/src/grib_accessor_class_g2date.cc +++ b/src/grib_accessor_class_g2date.cc @@ -39,7 +39,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g2date { @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_g2date = { "g2date", /* name */ sizeof(grib_accessor_g2date), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_g2date = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,45 +105,6 @@ static grib_accessor_class _grib_accessor_class_g2date = { grib_accessor_class* grib_accessor_class_g2date = &_grib_accessor_class_g2date; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) { diff --git a/src/grib_accessor_class_g2end_step.cc b/src/grib_accessor_class_g2end_step.cc index a450bec15..285a30085 100644 --- a/src/grib_accessor_class_g2end_step.cc +++ b/src/grib_accessor_class_g2end_step.cc @@ -57,7 +57,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g2end_step { @@ -92,32 +91,32 @@ static grib_accessor_class _grib_accessor_class_g2end_step = { "g2end_step", /* name */ sizeof(grib_accessor_g2end_step), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -126,10 +125,10 @@ static grib_accessor_class _grib_accessor_class_g2end_step = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -138,45 +137,6 @@ static grib_accessor_class _grib_accessor_class_g2end_step = { grib_accessor_class* grib_accessor_class_g2end_step = &_grib_accessor_class_g2end_step; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -398,6 +358,9 @@ static int unpack_multiple_time_ranges(grib_accessor* a, long* val, size_t* len) return GRIB_DECODING_ERROR; } +// For the old implementation of unpack_long, see +// src/deprecated/grib_accessor_class_g2end_step.unpack_long.cc +// static int unpack_long(grib_accessor* a, long* val, size_t* len) { grib_accessor_g2end_step* self = (grib_accessor_g2end_step*)a; @@ -428,80 +391,6 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) } } -#if 0 -static int unpack_long(grib_accessor* a, long* val, size_t *len) -{ - grib_accessor_g2end_step* self = (grib_accessor_g2end_step*)a; - int err = 0; - long start_step; - long unit; - long coded_unit; - long coded_time_range, typeOfTimeIncrement, numberOfTimeRange; - long coded_time_range_sec=0; - int factor; - long u2sf,u2sf_step_unit; - int add_time_range = 1; /* whether we add lengthOfTimeRange */ - - grib_handle* h=grib_handle_of_accessor(a); - - if((err = grib_get_long_internal(h,self->start_step,&start_step))) return err; - - /*point in time */ - if (self->year == NULL) { - *val=start_step; - return 0; - } - - if((err = grib_get_long_internal(h,self->unit,&unit))) return err; - - if((err = grib_get_long_internal(h,self->coded_unit,&coded_unit))) return err; - if((err = grib_get_long_internal(h,self->coded_time_range, &coded_time_range))) return err; - if((err = grib_get_long_internal(h,self->typeOfTimeIncrement, &typeOfTimeIncrement))) return err; - if((err = grib_get_long_internal(h,self->numberOfTimeRange, &numberOfTimeRange))) return err; - - Assert(numberOfTimeRange == 1 || numberOfTimeRange == 2); - - err = convert_time_range(h, unit, coded_unit, &coded_time_range); - if (err != GRIB_SUCCESS) return err; - -#if 0 - if (coded_unit!=unit) { - coded_time_range_sec=coded_time_range*u2s2[coded_unit]; - if (coded_time_range_sec<0) { - factor=60; - if (u2s2[coded_unit] % factor) return GRIB_DECODING_ERROR; - if (u2s[unit] % factor) return GRIB_DECODING_ERROR; - u2sf=u2s2[coded_unit]/factor; - coded_time_range_sec=coded_time_range*u2sf; - u2sf_step_unit=u2s[unit]/factor; - } else { - u2sf_step_unit=u2s[unit]; - } - if (coded_time_range_sec % u2sf_step_unit!=0) { - grib_context_log(h->context,GRIB_LOG_ERROR,"unable to convert endStep in stepUnits"); - return GRIB_WRONG_STEP_UNIT; - } - coded_time_range = coded_time_range_sec / u2sf_step_unit; - } -#endif - if (typeOfTimeIncrement == 1) { - /* See GRIB-488 */ - /* Note: For this case, lengthOfTimeRange is not related to step and should not be used to calculate step */ - add_time_range = 0; - if (is_special_expver(h)) { - add_time_range = 1; - } - } - if (add_time_range) { - *val = start_step + coded_time_range; - } else { - *val = start_step; - } - - return GRIB_SUCCESS; -} -#endif - static int pack_long(grib_accessor* a, const long* val, size_t* len) { grib_accessor_g2end_step* self = (grib_accessor_g2end_step*)a; diff --git a/src/grib_accessor_class_g2grid.cc b/src/grib_accessor_class_g2grid.cc index fba5d7ccc..94ddb31e4 100644 --- a/src/grib_accessor_class_g2grid.cc +++ b/src/grib_accessor_class_g2grid.cc @@ -8,12 +8,8 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/************************************************* - * Enrico Fucile - ***********************************************/ - #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -48,7 +44,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g2grid { @@ -73,32 +68,32 @@ static grib_accessor_class _grib_accessor_class_g2grid = { "g2grid", /* name */ sizeof(grib_accessor_g2grid), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -107,10 +102,10 @@ static grib_accessor_class _grib_accessor_class_g2grid = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -119,45 +114,6 @@ static grib_accessor_class _grib_accessor_class_g2grid = { grib_accessor_class* grib_accessor_class_g2grid = &_grib_accessor_class_g2grid; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -308,11 +264,9 @@ static int trial(const double* val, long v[6], long* basic_angle, long* sub_divi *basic_angle = 360; *sub_division = lcm(ni, nj); -#if 0 - printf("ni = %ld, nj = %ld , basic_angle=%ld sub_division = %ld\n", - ni,nj, - *basic_angle,*sub_division); -#endif + // printf("ni = %ld, nj = %ld , basic_angle=%ld sub_division = %ld\n", + // ni, nj, *basic_angle,*sub_division); + if (*sub_division < 0) return 0; diff --git a/src/grib_accessor_class_g2latlon.cc b/src/grib_accessor_class_g2latlon.cc index ff9adf7db..5549b79a3 100644 --- a/src/grib_accessor_class_g2latlon.cc +++ b/src/grib_accessor_class_g2latlon.cc @@ -44,7 +44,6 @@ static int is_missing(grib_accessor*); static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g2latlon { @@ -64,32 +63,32 @@ static grib_accessor_class _grib_accessor_class_g2latlon = { "g2latlon", /* name */ sizeof(grib_accessor_g2latlon), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - &pack_missing, /* grib_pack procedures long */ - &is_missing, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + &pack_missing, /* pack_missing */ + &is_missing, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -98,10 +97,10 @@ static grib_accessor_class _grib_accessor_class_g2latlon = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -110,44 +109,6 @@ static grib_accessor_class _grib_accessor_class_g2latlon = { grib_accessor_class* grib_accessor_class_g2latlon = &_grib_accessor_class_g2latlon; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_g2level.cc b/src/grib_accessor_class_g2level.cc index 34c649d3a..8474f924d 100644 --- a/src/grib_accessor_class_g2level.cc +++ b/src/grib_accessor_class_g2level.cc @@ -43,7 +43,6 @@ static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g2level { @@ -64,32 +63,32 @@ static grib_accessor_class _grib_accessor_class_g2level = { "g2level", /* name */ sizeof(grib_accessor_g2level), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - &is_missing, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + &is_missing, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -98,10 +97,10 @@ static grib_accessor_class _grib_accessor_class_g2level = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -110,42 +109,6 @@ static grib_accessor_class _grib_accessor_class_g2level = { grib_accessor_class* grib_accessor_class_g2level = &_grib_accessor_class_g2level; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -165,6 +128,14 @@ static void dump(grib_accessor* a, grib_dumper* dumper) grib_dump_long(dumper, a, NULL); } +static bool is_tigge(grib_handle* h) +{ + long productionStatus = 0; + int err = grib_get_long(h, "productionStatusOfProcessedData", &productionStatus); + if (err) return false; + return (productionStatus == 4 || productionStatus == 5); +} + static int unpack_double(grib_accessor* a, double* val, size_t* len) { int ret = 0; @@ -176,8 +147,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) long value_first = 0; char pressure_units[10] = {0,}; size_t pressure_units_len = 10; - long productionStatusOfProcessedData = 0; - bool is_tigge = false; + bool tigge = is_tigge(hand); double v; @@ -190,10 +160,6 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) if ((ret = grib_get_string_internal(hand, self->pressure_units, pressure_units, &pressure_units_len)) != GRIB_SUCCESS) return ret; - if ((ret = grib_get_long(hand, "productionStatusOfProcessedData", &productionStatusOfProcessedData)) != GRIB_SUCCESS) - return ret; - is_tigge = (productionStatusOfProcessedData==4 || productionStatusOfProcessedData==5); - if (value_first == GRIB_MISSING_LONG) { *val = 0; return GRIB_SUCCESS; @@ -208,7 +174,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) if (scale_first != GRIB_MISSING_LONG) { // GRIB-637, ECC-1081: Potential vorticity surface if (type_first == 109) { - if (is_tigge) { + if (tigge) { scale_first -= 6; // TIGGE data follows different rules } else { scale_first -= 9; @@ -261,13 +227,18 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) static int pack_double(grib_accessor* a, const double* val, size_t* len) { grib_accessor_g2level* self = (grib_accessor_g2level*)a; - grib_handle* hand = grib_handle_of_accessor(a); - int ret = 0; - double value_first = *val; - long scale_first = 0; - long type_first = 0; - char pressure_units[10] = {0,}; - size_t pressure_units_len = 10; + grib_handle* hand = grib_handle_of_accessor(a); + int ret = 0; + double value_first = *val; + //long scale_first = 0; + long type_first = 0; + char pressure_units[10] = {0,}; + size_t pressure_units_len = 10; + const long lval = (long)value_first; + + if (value_first == lval) { // input is a whole number; process it as an integer + return pack_long(a, &lval, len); + } if (*len != 1) return GRIB_WRONG_ARRAY_SIZE; @@ -287,20 +258,29 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) default: break; } - // + // final = scaled_value * 10 ^ -scale_factor - // = scaled_value / (10^scale_factor) - // - // Choose 2 decimal places - // - scale_first = 2; - value_first *= 100; - value_first = value_first + 0.5; /* round up */ + + //scale_first = 2; + //value_first *= 100; + //value_first = value_first + 0.5; //round up + + // TODO(masn): These maxima should come from the respective accessors + const int64_t scaled_value_max = (1ULL << 32) - 1; // scaledValueOf*FixedSurface is 4 octets + const int64_t scale_factor_max = (1ULL << 8) - 1; // scaleFactorOf*FixedSurface is 1 octet + int64_t lscaled_value=0, lscale_factor=0; + + ret = compute_scaled_value_and_scale_factor(value_first, scaled_value_max, scale_factor_max, &lscaled_value, &lscale_factor); + if (ret) { + grib_context_log(a->context, GRIB_LOG_ERROR, "Key %s (unpack_double): Failed to compute %s and %s from %g", + a->name, self->scale_first, self->value_first, value_first); + return ret; + } if (type_first > 9) { - if ((ret = grib_set_long_internal(hand, self->scale_first, scale_first)) != GRIB_SUCCESS) + if ((ret = grib_set_long_internal(hand, self->scale_first, (long)lscale_factor)) != GRIB_SUCCESS) return ret; - if ((ret = grib_set_long_internal(hand, self->value_first, (long)value_first)) != GRIB_SUCCESS) + if ((ret = grib_set_long_internal(hand, self->value_first, (long)lscaled_value)) != GRIB_SUCCESS) return ret; } @@ -315,12 +295,11 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) long type_first = 0; char pressure_units[10] = {0,}; size_t pressure_units_len = 10; - bool is_tigge = false; - long productionStatusOfProcessedData = 0; grib_accessor_g2level* self = (grib_accessor_g2level*)a; grib_handle* hand = grib_handle_of_accessor(a); int change_scale_and_value = 1; + bool tigge = is_tigge(hand); if (*len != 1) return GRIB_WRONG_ARRAY_SIZE; @@ -340,18 +319,14 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) if ((ret = grib_get_string_internal(hand, self->pressure_units, pressure_units, &pressure_units_len)) != GRIB_SUCCESS) return ret; - if ((ret = grib_get_long(hand, "productionStatusOfProcessedData", &productionStatusOfProcessedData)) != GRIB_SUCCESS) - return ret; - is_tigge = (productionStatusOfProcessedData==4 || productionStatusOfProcessedData==5); - switch (type_first) { case 100: // Pa scale_first = 0; if (!strcmp(pressure_units, "hPa")) value_first *= 100; break; - case 109: // Potential vorticity surface - if (!is_tigge) { + case 109: // Potential vorticity surface (See ECC-1081) + if (!tigge) { scale_first = 9; } else { scale_first = 6; // TIGGE data follows different rules @@ -371,11 +346,10 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) // In this scenario we do not want to change the scale/value. // However when the user directly sets the level or when we are changing edition, then // we do want to change the scale/value. -#if 0 - if (hand->loader && hand->loader->changing_edition==0) { - change_scale_and_value = 0; - } -#endif + // if (hand->loader && hand->loader->changing_edition==0) { + // change_scale_and_value = 0; + // } + if (change_scale_and_value) { if (type_first > 9) { if ((ret = grib_set_long_internal(hand, self->scale_first, scale_first)) != GRIB_SUCCESS) diff --git a/src/grib_accessor_class_g2lon.cc b/src/grib_accessor_class_g2lon.cc index 03baff9bf..c84776915 100644 --- a/src/grib_accessor_class_g2lon.cc +++ b/src/grib_accessor_class_g2lon.cc @@ -39,7 +39,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g2lon { @@ -57,32 +56,32 @@ static grib_accessor_class _grib_accessor_class_g2lon = { "g2lon", /* name */ sizeof(grib_accessor_g2lon), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -91,10 +90,10 @@ static grib_accessor_class _grib_accessor_class_g2lon = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -103,46 +102,6 @@ static grib_accessor_class _grib_accessor_class_g2lon = { grib_accessor_class* grib_accessor_class_g2lon = &_grib_accessor_class_g2lon; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -184,7 +143,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) else { if (value < 0) value += 360; - longitude = value * 1000000; + longitude = (long)(value * 1000000); } return grib_set_long(grib_handle_of_accessor(a), self->longitude, longitude); } diff --git a/src/grib_accessor_class_g2step_range.cc b/src/grib_accessor_class_g2step_range.cc index d99950c79..8d3440230 100644 --- a/src/grib_accessor_class_g2step_range.cc +++ b/src/grib_accessor_class_g2step_range.cc @@ -48,7 +48,6 @@ static size_t string_length(grib_accessor*); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_g2step_range { @@ -66,32 +65,32 @@ static grib_accessor_class _grib_accessor_class_g2step_range = { "g2step_range", /* name */ sizeof(grib_accessor_g2step_range), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -100,10 +99,10 @@ static grib_accessor_class _grib_accessor_class_g2step_range = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -112,40 +111,6 @@ static grib_accessor_class _grib_accessor_class_g2step_range = { grib_accessor_class* grib_accessor_class_g2step_range = &_grib_accessor_class_g2step_range; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_gaussian_grid_name.cc b/src/grib_accessor_class_gaussian_grid_name.cc index 2906cf77a..59a268f95 100644 --- a/src/grib_accessor_class_gaussian_grid_name.cc +++ b/src/grib_accessor_class_gaussian_grid_name.cc @@ -38,7 +38,6 @@ static int get_native_type(grib_accessor*); static int unpack_string(grib_accessor*, char*, size_t* len); static size_t string_length(grib_accessor*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_gaussian_grid_name { @@ -57,32 +56,32 @@ static grib_accessor_class _grib_accessor_class_gaussian_grid_name = { "gaussian_grid_name", /* name */ sizeof(grib_accessor_gaussian_grid_name), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -91,10 +90,10 @@ static grib_accessor_class _grib_accessor_class_gaussian_grid_name = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -103,45 +102,6 @@ static grib_accessor_class _grib_accessor_class_gaussian_grid_name = { grib_accessor_class* grib_accessor_class_gaussian_grid_name = &_grib_accessor_class_gaussian_grid_name; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_gds_is_present.cc b/src/grib_accessor_class_gds_is_present.cc index bb5e2910c..6066231ac 100644 --- a/src/grib_accessor_class_gds_is_present.cc +++ b/src/grib_accessor_class_gds_is_present.cc @@ -42,7 +42,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_gds_is_present { @@ -63,32 +62,32 @@ static grib_accessor_class _grib_accessor_class_gds_is_present = { "gds_is_present", /* name */ sizeof(grib_accessor_gds_is_present), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -97,10 +96,10 @@ static grib_accessor_class _grib_accessor_class_gds_is_present = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -109,56 +108,17 @@ static grib_accessor_class _grib_accessor_class_gds_is_present = { grib_accessor_class* grib_accessor_class_gds_is_present = &_grib_accessor_class_gds_is_present; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) { int n = 0; grib_accessor_gds_is_present* self = (grib_accessor_gds_is_present*)a; - self->gds_present = grib_arguments_get_name(grib_handle_of_accessor(a), c, n++); - self->grid_definition = grib_arguments_get_name(grib_handle_of_accessor(a), c, n++); - self->bitmap_present = grib_arguments_get_name(grib_handle_of_accessor(a), c, n++); - self->values = grib_arguments_get_name(grib_handle_of_accessor(a), c, n++); + grib_handle* h = grib_handle_of_accessor(a); + self->gds_present = grib_arguments_get_name(h, c, n++); + self->grid_definition = grib_arguments_get_name(h, c, n++); + self->bitmap_present = grib_arguments_get_name(h, c, n++); + self->values = grib_arguments_get_name(h, c, n++); a->flags |= GRIB_ACCESSOR_FLAG_FUNCTION; a->flags |= GRIB_ACCESSOR_FLAG_HIDDEN; @@ -167,13 +127,13 @@ static void init(grib_accessor* a, const long l, grib_arguments* c) static int pack_long(grib_accessor* a, const long* val, size_t* len) { - long missing = 255; - int ret = 0; - size_t size = 0; - double* values; - grib_context* c = a->context; - grib_handle* h = grib_handle_of_accessor(a); grib_accessor_gds_is_present* self = (grib_accessor_gds_is_present*)a; + long missing = 255; + int ret = 0; + size_t size = 0; + double* values = NULL; + grib_context* c = a->context; + grib_handle* h = grib_handle_of_accessor(a); if (*val != 1) return GRIB_NOT_IMPLEMENTED; diff --git a/src/grib_accessor_class_gds_not_present_bitmap.cc b/src/grib_accessor_class_gds_not_present_bitmap.cc index 40700c089..93431c9db 100644 --- a/src/grib_accessor_class_gds_not_present_bitmap.cc +++ b/src/grib_accessor_class_gds_not_present_bitmap.cc @@ -47,7 +47,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_gds_not_present_bitmap { @@ -68,32 +67,32 @@ static grib_accessor_class _grib_accessor_class_gds_not_present_bitmap = { "gds_not_present_bitmap", /* name */ sizeof(grib_accessor_gds_not_present_bitmap), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -102,10 +101,10 @@ static grib_accessor_class _grib_accessor_class_gds_not_present_bitmap = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -114,57 +113,19 @@ static grib_accessor_class _grib_accessor_class_gds_not_present_bitmap = { grib_accessor_class* grib_accessor_class_gds_not_present_bitmap = &_grib_accessor_class_gds_not_present_bitmap; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) { int n = 0; grib_accessor_gds_not_present_bitmap* self = (grib_accessor_gds_not_present_bitmap*)a; + grib_handle* hand = grib_handle_of_accessor(a); - self->missing_value = grib_arguments_get_name(grib_handle_of_accessor(a), args, n++); - self->number_of_values = grib_arguments_get_name(grib_handle_of_accessor(a), args, n++); - self->number_of_points = grib_arguments_get_name(grib_handle_of_accessor(a), args, n++); - self->latitude_of_first_point = grib_arguments_get_name(grib_handle_of_accessor(a), args, n++); - self->ni = grib_arguments_get_name(grib_handle_of_accessor(a), args, n++); + self->missing_value = grib_arguments_get_name(hand, args, n++); + self->number_of_values = grib_arguments_get_name(hand, args, n++); + self->number_of_points = grib_arguments_get_name(hand, args, n++); + self->latitude_of_first_point = grib_arguments_get_name(hand, args, n++); + self->ni = grib_arguments_get_name(hand, args, n++); a->length = 0; } @@ -178,6 +139,7 @@ static int value_count(grib_accessor* a, long* number_of_points) static int unpack_double(grib_accessor* a, double* val, size_t* len) { grib_accessor_gds_not_present_bitmap* self = (grib_accessor_gds_not_present_bitmap*)a; + grib_handle* hand = grib_handle_of_accessor(a); long number_of_points = 0, number_of_values = 0, ni = 0; long latitude_of_first_point = 0; @@ -193,19 +155,19 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) if (err) return err; - if ((err = grib_get_long(grib_handle_of_accessor(a), self->number_of_points, &number_of_points)) != GRIB_SUCCESS) + if ((err = grib_get_long(hand, self->number_of_points, &number_of_points)) != GRIB_SUCCESS) return err; - if ((err = grib_get_long(grib_handle_of_accessor(a), self->number_of_values, &number_of_values)) != GRIB_SUCCESS) + if ((err = grib_get_long(hand, self->number_of_values, &number_of_values)) != GRIB_SUCCESS) return err; - if ((err = grib_get_long(grib_handle_of_accessor(a), self->latitude_of_first_point, &latitude_of_first_point)) != GRIB_SUCCESS) + if ((err = grib_get_long(hand, self->latitude_of_first_point, &latitude_of_first_point)) != GRIB_SUCCESS) return err; - if ((err = grib_get_long(grib_handle_of_accessor(a), self->missing_value, &missing_value)) != GRIB_SUCCESS) + if ((err = grib_get_long(hand, self->missing_value, &missing_value)) != GRIB_SUCCESS) return err; - if ((err = grib_get_long(grib_handle_of_accessor(a), self->ni, &ni)) != GRIB_SUCCESS) + if ((err = grib_get_long(hand, self->ni, &ni)) != GRIB_SUCCESS) return err; if (*len < number_of_points) { @@ -239,68 +201,9 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) return err; } -#if 0 - -static void grib_set_bit_on( unsigned char* p, long *bitp){ - unsigned char o = 1; - p += (*bitp >> 3); - o <<= 7-((*bitp)%8); - *p |= o; - (*bitp)+=1; -} - -static int pack_double(grib_accessor* a, const double* val,size_t *len){ - grib_accessor_gds_not_present_bitmap* self = (grib_accessor_gds_not_present_bitmap*)a; - - size_t tlen; - - unsigned char* buf = NULL; - long i; - int err = 0; - long pos = 0; - long bmaplen = 0; - const int bit_padding = 16; - double miss_values = 0; - tlen = ((*len+bit_padding-1)/bit_padding*bit_padding)/8; - - if((err = grib_get_double_internal(grib_handle_of_accessor(a), self->missing_value, &miss_values)) != GRIB_SUCCESS) - { - grib_context_log(a->context, GRIB_LOG_ERROR, "grib_accessor_class_bitmap : pack_double : Cannot unpack %s err=%d ",self->missing_value,err); - return err; - } - - buf = grib_context_malloc_clear(a->context,tlen); - if(!buf) return GRIB_OUT_OF_MEMORY; - pos=0; - for(i=0;i<*len;i++) - { - if (val[i] == miss_values) - pos++; - else{ - bmaplen++; - grib_set_bit_on(buf, &pos); - } - } - - if((err = grib_set_long_internal(grib_handle_of_accessor(a), self->unusedBits,tlen*8 - *len )) != GRIB_SUCCESS) { - grib_context_log(a->context, GRIB_LOG_ERROR, "grib_accessor_class_bitmap : pack_double : Cannot pack %s err=%d ",self->unusedBits,err); - grib_context_free(a->context,buf); - return err; - } - - - grib_buffer_replace(a, buf, tlen,1,1); - - grib_context_free(a->context,buf); - - return GRIB_SUCCESS; -} - -#else - static int pack_double(grib_accessor* a, const double* val, size_t* len) { + // See deprecated/grib_accessor_class_gds_not_present_bitmap.cc for + // a possible implementation return GRIB_NOT_IMPLEMENTED; } - -#endif diff --git a/src/grib_accessor_class_gen.cc b/src/grib_accessor_class_gen.cc index 8b112c6a8..4846fc5d7 100644 --- a/src/grib_accessor_class_gen.cc +++ b/src/grib_accessor_class_gen.cc @@ -14,7 +14,7 @@ * Shahram Najm * ***************************************************************************/ #include "grib_api_internal.h" -#include +#include "grib_value.h" #include #include @@ -73,7 +73,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int notify_change(grib_accessor*, grib_accessor*); static void update_size(grib_accessor*, size_t); static size_t preferred_size(grib_accessor*, int); @@ -97,32 +96,32 @@ static grib_accessor_class _grib_accessor_class_gen = { "gen", /* name */ sizeof(grib_accessor_gen), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ &byte_count, /* get number of bytes */ &byte_offset, /* get offset to bytes */ &get_native_type, /* get native type */ &sub_section, /* get sub_section */ - 0, /* grib_pack procedures long */ - &is_missing, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - &unpack_float, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - &pack_string_array, /* grib_pack array procedures string */ - &unpack_string_array, /* grib_unpack array procedures string */ - &pack_bytes, /* grib_pack procedures bytes */ - &unpack_bytes, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + &is_missing, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + &pack_string_array, /* pack_string_array */ + &unpack_string_array, /* unpack_string_array */ + &pack_bytes, /* pack_bytes */ + &unpack_bytes, /* unpack_bytes */ &pack_expression, /* pack_expression */ ¬ify_change, /* notify_change */ &update_size, /* update_size */ @@ -131,10 +130,10 @@ static grib_accessor_class _grib_accessor_class_gen = { 0, /* nearest_smaller_value */ &next, /* next accessor */ &compare, /* compare vs. another accessor */ - &unpack_double_element, /* unpack only ith value */ - 0, /* unpack only ith value */ - &unpack_double_element_set, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + &unpack_double_element, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + &unpack_double_element_set, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ &unpack_double_subarray, /* unpack a subarray */ &clear, /* clear */ &make_clone, /* clone accessor */ @@ -143,11 +142,6 @@ static grib_accessor_class _grib_accessor_class_gen = { grib_accessor_class* grib_accessor_class_gen = &_grib_accessor_class_gen; - -static void init_class(grib_accessor_class* c) -{ -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* param) @@ -317,13 +311,15 @@ static int unpack_long(grib_accessor* a, long* v, size_t* len) template static int unpack(grib_accessor* a, T* v, size_t* len) { + static_assert(std::is_floating_point::value, "Requires floating point numbers"); int type = GRIB_TYPE_UNDEFINED; + const char* Tname = type_to_string(*v); if (a->cclass->unpack_long && a->cclass->unpack_long != &unpack_long) { long val = 0; size_t l = 1; grib_unpack_long(a, &val, &l); *v = val; - grib_context_log(a->context, GRIB_LOG_DEBUG, "Casting long %s to %s", a->name, typeid(T).name()); + grib_context_log(a->context, GRIB_LOG_DEBUG, "Casting long %s to %s", a->name, Tname); return GRIB_SUCCESS; } @@ -335,12 +331,12 @@ static int unpack(grib_accessor* a, T* v, size_t* len) *v = strtod(val, &last); if (*last == 0) { /* conversion of string to double worked */ - grib_context_log(a->context, GRIB_LOG_DEBUG, "Casting string %s to long", a->name); + grib_context_log(a->context, GRIB_LOG_DEBUG, "Casting string %s to %s", a->name, Tname); return GRIB_SUCCESS; } } - grib_context_log(a->context, GRIB_LOG_ERROR, "Cannot unpack as %s", a->name); + grib_context_log(a->context, GRIB_LOG_ERROR, "Cannot unpack %s as %s", a->name, Tname); if (grib_get_native_type(grib_handle_of_accessor(a), a->name, &type) == GRIB_SUCCESS) { grib_context_log(a->context, GRIB_LOG_ERROR, "Hint: Try unpacking as %s", grib_get_type_name(type)); } @@ -461,7 +457,7 @@ static int pack_long(grib_accessor* a, const long* v, size_t* len) double* val = (double*)grib_context_malloc(c, *len * (sizeof(double))); if (!val) { grib_context_log(c, GRIB_LOG_ERROR, - "Unable to allocate %d bytes\n", (int)(*len * (sizeof(double)))); + "Unable to allocate %zu bytes", *len * (sizeof(double))); return GRIB_OUT_OF_MEMORY; } for (i = 0; i < *len; i++) @@ -471,7 +467,6 @@ static int pack_long(grib_accessor* a, const long* v, size_t* len) return ret; } grib_context_log(c, GRIB_LOG_ERROR, "Should not grib_pack %s as long", a->name); - Assert(0); return GRIB_NOT_IMPLEMENTED; } @@ -541,8 +536,8 @@ static int pack_string(grib_accessor* a, const char* v, size_t* len) double val = strtod(v, &endPtr); if (*endPtr) { grib_context_log(a->context, GRIB_LOG_ERROR, - "pack_string: Invalid value (%s) for %s. String cannot be converted to a double", - v, a->name); + "%s: Invalid value (%s) for %s. String cannot be converted to a double", + __func__, v, a->name); return GRIB_WRONG_TYPE; } return grib_pack_double(a, &val, &l); @@ -550,7 +545,7 @@ static int pack_string(grib_accessor* a, const char* v, size_t* len) if (a->cclass->pack_long && a->cclass->pack_long != &pack_long) { size_t l = 1; - long val = atof(v); + long val = atol(v); return grib_pack_long(a, &val, &l); } @@ -563,7 +558,7 @@ static int pack_bytes(grib_accessor* a, const unsigned char* val, size_t* len) const size_t length = *len; if (length != a->length) { grib_context_log(a->context, GRIB_LOG_ERROR, - "pack_bytes: Wrong size (%lu) for %s. It is %lu bytes long", + "pack_bytes: Wrong size (%zu) for %s. It is %ld bytes long", length, a->name, a->length); return GRIB_BUFFER_TOO_SMALL; } @@ -597,7 +592,7 @@ static void update_size(grib_accessor* a, size_t s) { grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s [%s] must implement 'update_size'", a->name, a->cclass->name); - Assert(0 == 1); + Assert(0); } static grib_accessor* next(grib_accessor* a, int mod) diff --git a/src/grib_accessor_class_gen.h b/src/grib_accessor_class_gen.h deleted file mode 100644 index 5e8355c1f..000000000 --- a/src/grib_accessor_class_gen.h +++ /dev/null @@ -1,53 +0,0 @@ -// ECC-1467 - -#pragma once - -#include "grib_api_internal_cpp.h" -#include -#include - -template -class GribAccessorClassGen { -public: - static int unpack(grib_accessor* a, T* v, size_t* len); -}; - -template <> int GribAccessorClassGen::unpack(grib_accessor* a, long* v, size_t* len); -template <> int GribAccessorClassGen::unpack(grib_accessor* a, char* v, size_t* len); -template <> int GribAccessorClassGen::unpack(grib_accessor* a, float* v, size_t* len); - - -template -int GribAccessorClassGen::unpack(grib_accessor* a, T* v, size_t* len) -{ - static_assert(std::is_floating_point::value, "Requires floating point numbers"); - int type = GRIB_TYPE_UNDEFINED; - if (a->cclass->unpack_long && a->cclass->unpack_long != &GribAccessorClassGen::unpack) { - long val = 0; - size_t l = 1; - grib_unpack_long(a, &val, &l); - *v = val; - grib_context_log(a->context, GRIB_LOG_DEBUG, "Casting long %s to %s", a->name, typeid(T).name()); - return GRIB_SUCCESS; - } - - if (a->cclass->unpack_string && a->cclass->unpack_string != &GribAccessorClassGen::unpack) { - char val[1024]; - size_t l = sizeof(val); - char* last = NULL; - grib_unpack_string(a, val, &l); - - *v = strtod(val, &last); - if (*last == 0) { /* conversion of string to double worked */ - grib_context_log(a->context, GRIB_LOG_DEBUG, "Casting string %s to long", a->name); - return GRIB_SUCCESS; - } - } - - grib_context_log(a->context, GRIB_LOG_ERROR, "Cannot unpack %s as %s", a->name, typeid(T).name()); - if (grib_get_native_type(grib_handle_of_accessor(a), a->name, &type) == GRIB_SUCCESS) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Hint: Try unpacking as %s", grib_get_type_name(type)); - } - - return GRIB_NOT_IMPLEMENTED; -} diff --git a/src/grib_accessor_class_getenv.cc b/src/grib_accessor_class_getenv.cc index bf2db877c..6760dff6d 100644 --- a/src/grib_accessor_class_getenv.cc +++ b/src/grib_accessor_class_getenv.cc @@ -39,7 +39,6 @@ static int unpack_string(grib_accessor*, char*, size_t* len); static size_t string_length(grib_accessor*); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_getenv { @@ -59,32 +58,32 @@ static grib_accessor_class _grib_accessor_class_getenv = { "getenv", /* name */ sizeof(grib_accessor_getenv), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -93,10 +92,10 @@ static grib_accessor_class _grib_accessor_class_getenv = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -105,44 +104,6 @@ static grib_accessor_class _grib_accessor_class_getenv = { grib_accessor_class* grib_accessor_class_getenv = &_grib_accessor_class_getenv; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* args) diff --git a/src/grib_accessor_class_global_gaussian.cc b/src/grib_accessor_class_global_gaussian.cc index d36c2a59b..b39677da2 100644 --- a/src/grib_accessor_class_global_gaussian.cc +++ b/src/grib_accessor_class_global_gaussian.cc @@ -46,7 +46,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_global_gaussian { @@ -74,32 +73,32 @@ static grib_accessor_class _grib_accessor_class_global_gaussian = { "global_gaussian", /* name */ sizeof(grib_accessor_global_gaussian), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -108,10 +107,10 @@ static grib_accessor_class _grib_accessor_class_global_gaussian = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -120,46 +119,6 @@ static grib_accessor_class _grib_accessor_class_global_gaussian = { grib_accessor_class* grib_accessor_class_global_gaussian = &_grib_accessor_class_global_gaussian; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -240,14 +199,14 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) dlonlast = ((double)lonlast) / factor; if (N == 0) { - grib_context_log(c, GRIB_LOG_ERROR, "global_gaussian unpack_long: N cannot be 0!"); + grib_context_log(c, GRIB_LOG_ERROR, "Key %s (unpack_long): N cannot be 0!", a->name); return GRIB_WRONG_GRID; } lats = (double*)grib_context_malloc(c, sizeof(double) * N * 2); if (!lats) { grib_context_log(c, GRIB_LOG_ERROR, - "global_gaussian unpack_long: Memory allocation error: %ld bytes", sizeof(double) * N * 2); + "Key %s (unpack_long): Memory allocation error: %zu bytes", a->name, sizeof(double) * N * 2); return GRIB_OUT_OF_MEMORY; } if ((ret = grib_get_gaussian_latitudes(N, lats)) != GRIB_SUCCESS) @@ -333,7 +292,7 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) lats = (double*)grib_context_malloc(c, sizeof(double) * N * 2); if (!lats) { grib_context_log(c, GRIB_LOG_ERROR, - "global_gaussian pack_long: Memory allocation error: %zu bytes", sizeof(double) * N * 2); + "Key %s (pack_long): Memory allocation error: %zu bytes", a->name, sizeof(double) * N * 2); return GRIB_OUT_OF_MEMORY; } if ((ret = grib_get_gaussian_latitudes(N, lats)) != GRIB_SUCCESS) @@ -373,8 +332,8 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) ddi = (360.0 * dfactor) / dNi; dlonlast = (360.0 * dfactor) - ddi + 0.5; ddi = ddi + 0.5; - di = ddi; - lonlast = dlonlast; + di = (long)ddi; + lonlast = (long)dlonlast; grib_context_free(c, lats); diff --git a/src/grib_accessor_class_group.cc b/src/grib_accessor_class_group.cc index 6e7f4dd85..7997f3989 100644 --- a/src/grib_accessor_class_group.cc +++ b/src/grib_accessor_class_group.cc @@ -54,7 +54,6 @@ static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); static void post_init(grib_accessor*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_group @@ -72,32 +71,32 @@ static grib_accessor_class _grib_accessor_class_group = { "group", /* name */ sizeof(grib_accessor_group), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ &post_init, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -106,10 +105,10 @@ static grib_accessor_class _grib_accessor_class_group = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -118,36 +117,6 @@ static grib_accessor_class _grib_accessor_class_group = { grib_accessor_class* grib_accessor_class_group = &_grib_accessor_class_group; - -static void init_class(grib_accessor_class* c) -{ - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_gts_header.cc b/src/grib_accessor_class_gts_header.cc index d47ef0328..44aa9852d 100644 --- a/src/grib_accessor_class_gts_header.cc +++ b/src/grib_accessor_class_gts_header.cc @@ -38,7 +38,6 @@ static int unpack_string(grib_accessor*, char*, size_t* len); static size_t string_length(grib_accessor*); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_gts_header { @@ -57,32 +56,32 @@ static grib_accessor_class _grib_accessor_class_gts_header = { "gts_header", /* name */ sizeof(grib_accessor_gts_header), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -91,10 +90,10 @@ static grib_accessor_class _grib_accessor_class_gts_header = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -103,44 +102,6 @@ static grib_accessor_class _grib_accessor_class_gts_header = { grib_accessor_class* grib_accessor_class_gts_header = &_grib_accessor_class_gts_header; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_hash_array.cc b/src/grib_accessor_class_hash_array.cc index 7eefe3c29..987e68481 100644 --- a/src/grib_accessor_class_hash_array.cc +++ b/src/grib_accessor_class_hash_array.cc @@ -54,7 +54,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_hash_array @@ -73,32 +72,32 @@ static grib_accessor_class _grib_accessor_class_hash_array = { "hash_array", /* name */ sizeof(grib_accessor_hash_array), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -107,10 +106,10 @@ static grib_accessor_class _grib_accessor_class_hash_array = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -119,37 +118,6 @@ static grib_accessor_class _grib_accessor_class_hash_array = { grib_accessor_class* grib_accessor_class_hash_array = &_grib_accessor_class_hash_array; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ #define MAX_HASH_ARRAY_STRING_LENGTH 255 diff --git a/src/grib_accessor_class_headers_only.cc b/src/grib_accessor_class_headers_only.cc index 5626d582d..d3a98efb0 100644 --- a/src/grib_accessor_class_headers_only.cc +++ b/src/grib_accessor_class_headers_only.cc @@ -33,7 +33,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_headers_only { @@ -49,32 +48,32 @@ static grib_accessor_class _grib_accessor_class_headers_only = { "headers_only", /* name */ sizeof(grib_accessor_headers_only), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -83,10 +82,10 @@ static grib_accessor_class _grib_accessor_class_headers_only = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -95,46 +94,6 @@ static grib_accessor_class _grib_accessor_class_headers_only = { grib_accessor_class* grib_accessor_class_headers_only = &_grib_accessor_class_headers_only; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_ibmfloat.cc b/src/grib_accessor_class_ibmfloat.cc index 70a523347..27e6da1c5 100644 --- a/src/grib_accessor_class_ibmfloat.cc +++ b/src/grib_accessor_class_ibmfloat.cc @@ -8,11 +8,8 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/******************************** - * Enrico Fucile - *******************************/ - #include "grib_api_internal.h" +#include /* This is used by make_class.pl @@ -21,6 +18,7 @@ CLASS = accessor SUPER = grib_accessor_class_double IMPLEMENTS = unpack_double;pack_double + IMPLEMENTS = unpack_float IMPLEMENTS = init IMPLEMENTS = next_offset IMPLEMENTS = byte_count @@ -45,12 +43,12 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); +static int unpack_float(grib_accessor*, float* val, size_t* len); static long byte_count(grib_accessor*); static long byte_offset(grib_accessor*); static long next_offset(grib_accessor*); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); static int nearest_smaller_value (grib_accessor*, double, double*); @@ -70,32 +68,32 @@ static grib_accessor_class _grib_accessor_class_ibmfloat = { "ibmfloat", /* name */ sizeof(grib_accessor_ibmfloat), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - &next_offset, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + &next_offset, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ &byte_count, /* get number of bytes */ &byte_offset, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -104,10 +102,10 @@ static grib_accessor_class _grib_accessor_class_ibmfloat = { &nearest_smaller_value, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -116,46 +114,12 @@ static grib_accessor_class _grib_accessor_class_ibmfloat = { grib_accessor_class* grib_accessor_class_ibmfloat = &_grib_accessor_class_ibmfloat; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->string_length = (*(c->super))->string_length; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) { grib_accessor_ibmfloat* self = (grib_accessor_ibmfloat*)a; - long count = 0; + long count = 0; self->arg = arg; grib_value_count(a, &count); @@ -163,13 +127,16 @@ static void init(grib_accessor* a, const long len, grib_arguments* arg) Assert(a->length >= 0); } -static int unpack_double(grib_accessor* a, double* val, size_t* len) +template +static int unpack(grib_accessor* a, T* val, size_t* len) { + static_assert(std::is_floating_point::value, "Requires floating point numbers"); unsigned long rlen = 0; long count = 0; int err = 0; unsigned long i = 0; long bitp = a->offset * 8; + grib_handle* hand = grib_handle_of_accessor(a); err = grib_value_count(a, &count); if (err) @@ -177,18 +144,28 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) rlen = count; if (*len < rlen) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size (%lu) for %s, it contains %lu values", *len, a->name, rlen); + grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size (%zu) for %s, it contains %lu values", *len, a->name, rlen); *len = 0; return GRIB_ARRAY_TOO_SMALL; } for (i = 0; i < rlen; i++) - val[i] = grib_long_to_ibm(grib_decode_unsigned_long(grib_handle_of_accessor(a)->buffer->data, &bitp, 32)); + val[i] = (T)grib_long_to_ibm(grib_decode_unsigned_long(hand->buffer->data, &bitp, 32)); *len = rlen; return GRIB_SUCCESS; } +static int unpack_double(grib_accessor* a, double* val, size_t* len) +{ + return unpack(a, val, len); +} + +static int unpack_float(grib_accessor* a, float* val, size_t* len) +{ + return unpack(a, val, len); +} + static int pack_double(grib_accessor* a, const double* val, size_t* len) { grib_accessor_ibmfloat* self = (grib_accessor_ibmfloat*)a; @@ -206,16 +183,17 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) } if (rlen == 1) { - /* - double x = 0; - grib_nearest_smaller_ibm_float(val[0],&x); - double y = grib_long_to_ibm(grib_ibm_to_long(val[0])); - printf("IBMFLOAT val=%.20f nearest_smaller_ibm_float=%.20f long_to_ibm=%.20f\n",val[0],x ,y); - */ + + //double x = 0; + //grib_nearest_smaller_ibm_float(val[0],&x); + //double y = grib_long_to_ibm(grib_ibm_to_long(val[0])); + //printf("IBMFLOAT val=%.20f nearest_smaller_ibm_float=%.20f long_to_ibm=%.20f\n",val[0],x ,y); + off = byte_offset(a) * 8; ret = grib_encode_unsigned_long(grib_handle_of_accessor(a)->buffer->data, grib_ibm_to_long(val[0]), &off, 32); if (*len > 1) - grib_context_log(a->context, GRIB_LOG_WARNING, "grib_accessor_unsigned : Trying to pack %d values in a scalar %s, packing first value", *len, a->name); + grib_context_log(a->context, GRIB_LOG_WARNING, "ibmfloat: Trying to pack %zu values in a scalar %s, packing first value", + *len, a->name); if (ret == GRIB_SUCCESS) len[0] = 1; return ret; @@ -250,7 +228,7 @@ static long byte_count(grib_accessor* a) static int value_count(grib_accessor* a, long* len) { grib_accessor_ibmfloat* self = (grib_accessor_ibmfloat*)a; - *len = 0; + *len = 0; if (!self->arg) { *len = 1; return 0; @@ -262,11 +240,13 @@ static long byte_offset(grib_accessor* a) { return a->offset; } + static void update_size(grib_accessor* a, size_t s) { - a->length = s; + a->length = (long)s; Assert(a->length >= 0); } + static long next_offset(grib_accessor* a) { return grib_byte_offset(a) + grib_byte_count(a); @@ -276,7 +256,7 @@ static int nearest_smaller_value(grib_accessor* a, double val, double* nearest) { int ret = 0; if (grib_nearest_smaller_ibm_float(val, nearest) == GRIB_INTERNAL_ERROR) { - grib_context_log(a->context, GRIB_LOG_ERROR, "grib_nearest_smaller_ibm_float overflow value=%g\n", val); + grib_context_log(a->context, GRIB_LOG_ERROR, "ibm_float:nearest_smaller_value overflow value=%g", val); grib_dump_content(grib_handle_of_accessor(a), stderr, "wmo", GRIB_DUMP_FLAG_HEXADECIMAL, 0); ret = GRIB_INTERNAL_ERROR; } diff --git a/src/grib_accessor_class_ieeefloat.cc b/src/grib_accessor_class_ieeefloat.cc index 599145a8d..d6fa411bb 100644 --- a/src/grib_accessor_class_ieeefloat.cc +++ b/src/grib_accessor_class_ieeefloat.cc @@ -9,6 +9,7 @@ */ #include "grib_api_internal.h" +#include /* This is used by make_class.pl @@ -16,6 +17,7 @@ CLASS = accessor SUPER = grib_accessor_class_double IMPLEMENTS = unpack_double;pack_double + IMPLEMENTS = unpack_float IMPLEMENTS = init IMPLEMENTS = value_count MEMBERS = grib_arguments* arg @@ -37,9 +39,9 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); +static int unpack_float(grib_accessor*, float* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); static int nearest_smaller_value (grib_accessor*, double, double*); @@ -59,32 +61,32 @@ static grib_accessor_class _grib_accessor_class_ieeefloat = { "ieeefloat", /* name */ sizeof(grib_accessor_ieeefloat), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + &unpack_float, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -93,10 +95,10 @@ static grib_accessor_class _grib_accessor_class_ieeefloat = { &nearest_smaller_value, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -105,43 +107,6 @@ static grib_accessor_class _grib_accessor_class_ieeefloat = { grib_accessor_class* grib_accessor_class_ieeefloat = &_grib_accessor_class_ieeefloat; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) @@ -151,14 +116,13 @@ static void init(grib_accessor* a, const long len, grib_arguments* arg) self->arg = arg; grib_value_count(a, &count); a->length = 4 * count; - Assert(a->length >= 0); } static int value_count(grib_accessor* a, long* len) { grib_accessor_ieeefloat* self = (grib_accessor_ieeefloat*)a; - *len = 0; + *len = 0; if (!self->arg) { *len = 1; @@ -172,7 +136,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) grib_accessor_ieeefloat* self = (grib_accessor_ieeefloat*)a; int ret = 0; unsigned long i = 0; - unsigned long rlen = *len; + unsigned long rlen = (unsigned long)*len; size_t buflen = 0; unsigned char* buf = NULL; long off = 0; @@ -187,7 +151,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) off = a->offset * 8; ret = grib_encode_unsigned_long(grib_handle_of_accessor(a)->buffer->data, grib_ieee_to_long(val[0]), &off, 32); if (*len > 1) - grib_context_log(a->context, GRIB_LOG_WARNING, "grib_accessor_unsigned : Trying to pack %d values in a scalar %s, packing first value", *len, a->name); + grib_context_log(a->context, GRIB_LOG_WARNING, "ieeefloat: Trying to pack %zu values in a scalar %s, packing first value", + *len, a->name); if (ret == GRIB_SUCCESS) len[0] = 1; return ret; @@ -212,31 +177,46 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) return ret; } -static int unpack_double(grib_accessor* a, double* val, size_t* len) +template +static int unpack(grib_accessor* a, T* val, size_t* len) { + static_assert(std::is_floating_point::value, "Requires floating point numbers"); long rlen = 0; int err = 0; long i = 0; long bitp = a->offset * 8; + grib_handle* hand = grib_handle_of_accessor(a); err = grib_value_count(a, &rlen); if (err) return err; if (*len < (size_t)rlen) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size (%lu) for %s, it contains %ld values", *len, a->name, rlen); + grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size (%zu) for %s, it contains %ld values", *len, a->name, rlen); *len = 0; return GRIB_ARRAY_TOO_SMALL; } + for (i = 0; i < rlen; i++) - val[i] = grib_long_to_ieee(grib_decode_unsigned_long(grib_handle_of_accessor(a)->buffer->data, &bitp, 32)); + val[i] = (T)grib_long_to_ieee(grib_decode_unsigned_long(hand->buffer->data, &bitp, 32)); *len = rlen; return GRIB_SUCCESS; } + +static int unpack_double(grib_accessor* a, double* val, size_t* len) +{ + return unpack(a, val, len); +} + +static int unpack_float(grib_accessor* a, float* val, size_t* len) +{ + return unpack(a, val, len); +} + static void update_size(grib_accessor* a, size_t s) { - a->length = s; + a->length = (long)s; Assert(a->length >= 0); } diff --git a/src/grib_accessor_class_ifs_param.cc b/src/grib_accessor_class_ifs_param.cc index 6e00e5913..ba7e522c1 100644 --- a/src/grib_accessor_class_ifs_param.cc +++ b/src/grib_accessor_class_ifs_param.cc @@ -42,7 +42,6 @@ static int get_native_type(grib_accessor*); static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_ifs_param { @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_ifs_param = { "ifs_param", /* name */ sizeof(grib_accessor_ifs_param), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_ifs_param = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,45 +105,6 @@ static grib_accessor_class _grib_accessor_class_ifs_param = { grib_accessor_class* grib_accessor_class_ifs_param = &_grib_accessor_class_ifs_param; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_int16.cc b/src/grib_accessor_class_int16.cc index 0e46a4a88..e1c4cfd58 100644 --- a/src/grib_accessor_class_int16.cc +++ b/src/grib_accessor_class_int16.cc @@ -34,7 +34,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_int16 { @@ -50,32 +49,32 @@ static grib_accessor_class _grib_accessor_class_int16 = { "int16", /* name */ sizeof(grib_accessor_int16), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -84,10 +83,10 @@ static grib_accessor_class _grib_accessor_class_int16 = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -96,46 +95,6 @@ static grib_accessor_class _grib_accessor_class_int16 = { grib_accessor_class* grib_accessor_class_int16 = &_grib_accessor_class_int16; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_int16_little_endian.cc b/src/grib_accessor_class_int16_little_endian.cc index 34375162e..34b8966c2 100644 --- a/src/grib_accessor_class_int16_little_endian.cc +++ b/src/grib_accessor_class_int16_little_endian.cc @@ -34,7 +34,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_int16_little_endian { @@ -50,32 +49,32 @@ static grib_accessor_class _grib_accessor_class_int16_little_endian = { "int16_little_endian", /* name */ sizeof(grib_accessor_int16_little_endian), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -84,10 +83,10 @@ static grib_accessor_class _grib_accessor_class_int16_little_endian = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -96,46 +95,6 @@ static grib_accessor_class _grib_accessor_class_int16_little_endian = { grib_accessor_class* grib_accessor_class_int16_little_endian = &_grib_accessor_class_int16_little_endian; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_int32.cc b/src/grib_accessor_class_int32.cc index d45dd6115..b1d9143d8 100644 --- a/src/grib_accessor_class_int32.cc +++ b/src/grib_accessor_class_int32.cc @@ -34,7 +34,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_int32 { @@ -50,32 +49,32 @@ static grib_accessor_class _grib_accessor_class_int32 = { "int32", /* name */ sizeof(grib_accessor_int32), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -84,10 +83,10 @@ static grib_accessor_class _grib_accessor_class_int32 = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -96,46 +95,6 @@ static grib_accessor_class _grib_accessor_class_int32 = { grib_accessor_class* grib_accessor_class_int32 = &_grib_accessor_class_int32; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_int32_little_endian.cc b/src/grib_accessor_class_int32_little_endian.cc index a91e18253..1e47dfe33 100644 --- a/src/grib_accessor_class_int32_little_endian.cc +++ b/src/grib_accessor_class_int32_little_endian.cc @@ -34,7 +34,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_int32_little_endian { @@ -50,32 +49,32 @@ static grib_accessor_class _grib_accessor_class_int32_little_endian = { "int32_little_endian", /* name */ sizeof(grib_accessor_int32_little_endian), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -84,10 +83,10 @@ static grib_accessor_class _grib_accessor_class_int32_little_endian = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -96,46 +95,6 @@ static grib_accessor_class _grib_accessor_class_int32_little_endian = { grib_accessor_class* grib_accessor_class_int32_little_endian = &_grib_accessor_class_int32_little_endian; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_int64.cc b/src/grib_accessor_class_int64.cc index 5bfdba96e..8899e7cc0 100644 --- a/src/grib_accessor_class_int64.cc +++ b/src/grib_accessor_class_int64.cc @@ -34,7 +34,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_int64 { @@ -50,32 +49,32 @@ static grib_accessor_class _grib_accessor_class_int64 = { "int64", /* name */ sizeof(grib_accessor_int64), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -84,10 +83,10 @@ static grib_accessor_class _grib_accessor_class_int64 = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -96,46 +95,6 @@ static grib_accessor_class _grib_accessor_class_int64 = { grib_accessor_class* grib_accessor_class_int64 = &_grib_accessor_class_int64; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_int64_little_endian.cc b/src/grib_accessor_class_int64_little_endian.cc index acba5952d..2fe5db824 100644 --- a/src/grib_accessor_class_int64_little_endian.cc +++ b/src/grib_accessor_class_int64_little_endian.cc @@ -34,7 +34,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_int64_little_endian { @@ -50,32 +49,32 @@ static grib_accessor_class _grib_accessor_class_int64_little_endian = { "int64_little_endian", /* name */ sizeof(grib_accessor_int64_little_endian), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -84,10 +83,10 @@ static grib_accessor_class _grib_accessor_class_int64_little_endian = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -96,46 +95,6 @@ static grib_accessor_class _grib_accessor_class_int64_little_endian = { grib_accessor_class* grib_accessor_class_int64_little_endian = &_grib_accessor_class_int64_little_endian; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_int8.cc b/src/grib_accessor_class_int8.cc index 25f1e9e4e..a69ed3dd9 100644 --- a/src/grib_accessor_class_int8.cc +++ b/src/grib_accessor_class_int8.cc @@ -34,7 +34,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_int8 { @@ -50,32 +49,32 @@ static grib_accessor_class _grib_accessor_class_int8 = { "int8", /* name */ sizeof(grib_accessor_int8), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -84,10 +83,10 @@ static grib_accessor_class _grib_accessor_class_int8 = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -96,46 +95,6 @@ static grib_accessor_class _grib_accessor_class_int8 = { grib_accessor_class* grib_accessor_class_int8 = &_grib_accessor_class_int8; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_iterator.cc b/src/grib_accessor_class_iterator.cc index 8eab065b9..2a5fc815b 100644 --- a/src/grib_accessor_class_iterator.cc +++ b/src/grib_accessor_class_iterator.cc @@ -37,7 +37,6 @@ or edit "accessor.class" and rerun ./make_class.pl static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_iterator { @@ -54,32 +53,32 @@ static grib_accessor_class _grib_accessor_class_iterator = { "iterator", /* name */ sizeof(grib_accessor_iterator), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -88,10 +87,10 @@ static grib_accessor_class _grib_accessor_class_iterator = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -100,47 +99,6 @@ static grib_accessor_class _grib_accessor_class_iterator = { grib_accessor_class* grib_accessor_class_iterator = &_grib_accessor_class_iterator; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* args) diff --git a/src/grib_accessor_class_julian_date.cc b/src/grib_accessor_class_julian_date.cc index 2ce59d6be..fd94ee789 100644 --- a/src/grib_accessor_class_julian_date.cc +++ b/src/grib_accessor_class_julian_date.cc @@ -54,7 +54,6 @@ static int unpack_long(grib_accessor*, long* val, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_julian_date { @@ -80,32 +79,32 @@ static grib_accessor_class _grib_accessor_class_julian_date = { "julian_date", /* name */ sizeof(grib_accessor_julian_date), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ &pack_expression, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -114,10 +113,10 @@ static grib_accessor_class _grib_accessor_class_julian_date = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -126,40 +125,6 @@ static grib_accessor_class _grib_accessor_class_julian_date = { grib_accessor_class* grib_accessor_class_julian_date = &_grib_accessor_class_julian_date; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_julian_day.cc b/src/grib_accessor_class_julian_day.cc index 332fc3c8a..7a8e28cfc 100644 --- a/src/grib_accessor_class_julian_day.cc +++ b/src/grib_accessor_class_julian_day.cc @@ -44,7 +44,6 @@ static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_julian_day { @@ -65,32 +64,32 @@ static grib_accessor_class _grib_accessor_class_julian_day = { "julian_day", /* name */ sizeof(grib_accessor_julian_day), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -99,10 +98,10 @@ static grib_accessor_class _grib_accessor_class_julian_day = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -111,43 +110,6 @@ static grib_accessor_class _grib_accessor_class_julian_day = { grib_accessor_class* grib_accessor_class_julian_day = &_grib_accessor_class_julian_day; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_ksec1expver.cc b/src/grib_accessor_class_ksec1expver.cc index 41c61980e..762bf66e2 100644 --- a/src/grib_accessor_class_ksec1expver.cc +++ b/src/grib_accessor_class_ksec1expver.cc @@ -37,7 +37,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int pack_string(grib_accessor*, const char*, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_ksec1expver { @@ -54,32 +53,32 @@ static grib_accessor_class _grib_accessor_class_ksec1expver = { "ksec1expver", /* name */ sizeof(grib_accessor_ksec1expver), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -88,10 +87,10 @@ static grib_accessor_class _grib_accessor_class_ksec1expver = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -100,45 +99,6 @@ static grib_accessor_class _grib_accessor_class_ksec1expver = { grib_accessor_class* grib_accessor_class_ksec1expver = &_grib_accessor_class_ksec1expver; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) @@ -176,13 +136,13 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) expver[2] = *pTemp++; expver[3] = *pTemp++; expver[4] = 0; -#if 0 - expver[0] = intc[0]; - expver[1] = intc[1]; - expver[2] = intc[2]; - expver[3] = intc[3]; - expver[4] = 0; -#endif + +// expver[0] = intc[0]; +// expver[1] = intc[1]; +// expver[2] = intc[2]; +// expver[3] = intc[3]; +// expver[4] = 0; + /* if there is a difference, have to reverse*/ if (strcmp(refexpver, expver)) { intc[0] = expver[3]; diff --git a/src/grib_accessor_class_label.cc b/src/grib_accessor_class_label.cc index 9eecba906..c5958dd98 100644 --- a/src/grib_accessor_class_label.cc +++ b/src/grib_accessor_class_label.cc @@ -35,7 +35,6 @@ static int get_native_type(grib_accessor*); static int unpack_string(grib_accessor*, char*, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_label @@ -52,32 +51,32 @@ static grib_accessor_class _grib_accessor_class_label = { "label", /* name */ sizeof(grib_accessor_label), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -86,10 +85,10 @@ static grib_accessor_class _grib_accessor_class_label = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -98,44 +97,6 @@ static grib_accessor_class _grib_accessor_class_label = { grib_accessor_class* grib_accessor_class_label = &_grib_accessor_class_label; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_laplacian.cc b/src/grib_accessor_class_laplacian.cc index 293f216f4..81359c233 100644 --- a/src/grib_accessor_class_laplacian.cc +++ b/src/grib_accessor_class_laplacian.cc @@ -8,11 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/************************************** - * Enrico Fucile - **************************************/ - - #include "grib_api_internal.h" /* This is used by make_class.pl @@ -47,7 +42,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_laplacian { @@ -69,32 +63,32 @@ static grib_accessor_class _grib_accessor_class_laplacian = { "laplacian", /* name */ sizeof(grib_accessor_laplacian), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - &is_missing, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + &is_missing, /* is_missing */ + &pack_long, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -103,10 +97,10 @@ static grib_accessor_class _grib_accessor_class_laplacian = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -115,44 +109,6 @@ static grib_accessor_class _grib_accessor_class_laplacian = { grib_accessor_class* grib_accessor_class_laplacian = &_grib_accessor_class_laplacian; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -274,18 +230,15 @@ static int is_missing(grib_accessor* a) if (!av) return GRIB_NOT_FOUND; return grib_is_missing_internal(av); -#if 0 - int ret=0; - long value=0; - - if((ret = grib_get_long_internal(grib_handle_of_accessor(a),self->value, - &value) ) != GRIB_SUCCESS){ - grib_context_log(a->context, GRIB_LOG_ERROR, - "Accessor %s cannot gather value for %s error %d", a->name, - self->value, ret); - return 0; - } - return (value == GRIB_MISSING_LONG); -#endif + // int ret=0; + // long value=0; + // if((ret = grib_get_long_internal(grib_handle_of_accessor(a),self->value, + // &value) ) != GRIB_SUCCESS){ + // grib_context_log(a->context, GRIB_LOG_ERROR, + // "Accessor %s cannot gather value for %s error %d", a->name, + // self->value, ret); + // return 0; + // } + // return (value == GRIB_MISSING_LONG); } diff --git a/src/grib_accessor_class_latitudes.cc b/src/grib_accessor_class_latitudes.cc index 1eefcff4c..4131ff066 100644 --- a/src/grib_accessor_class_latitudes.cc +++ b/src/grib_accessor_class_latitudes.cc @@ -40,7 +40,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_latitudes { @@ -62,32 +61,32 @@ static grib_accessor_class _grib_accessor_class_latitudes = { "latitudes", /* name */ sizeof(grib_accessor_latitudes), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -96,10 +95,10 @@ static grib_accessor_class _grib_accessor_class_latitudes = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -108,46 +107,6 @@ static grib_accessor_class _grib_accessor_class_latitudes = { grib_accessor_class* grib_accessor_class_latitudes = &_grib_accessor_class_latitudes; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_latlon_increment.cc b/src/grib_accessor_class_latlon_increment.cc index 4c5953800..de43e60c9 100644 --- a/src/grib_accessor_class_latlon_increment.cc +++ b/src/grib_accessor_class_latlon_increment.cc @@ -44,7 +44,6 @@ static int is_missing(grib_accessor*); static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_latlon_increment { @@ -70,32 +69,32 @@ static grib_accessor_class _grib_accessor_class_latlon_increment = { "latlon_increment", /* name */ sizeof(grib_accessor_latlon_increment), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - &is_missing, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + &is_missing, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -104,10 +103,10 @@ static grib_accessor_class _grib_accessor_class_latlon_increment = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -116,45 +115,6 @@ static grib_accessor_class _grib_accessor_class_latlon_increment = { grib_accessor_class* grib_accessor_class_latlon_increment = &_grib_accessor_class_latlon_increment; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -255,15 +215,6 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) *val = (double)directionIncrement / angleDivisor * angleMultiplier; } -#if 0 - printf("unpack -- %s=%ld %s=%ld %s=%f %s=%f %s=%ld %s=%f\n", - self->directionIncrementGiven,directionIncrementGiven, - self->directionIncrement,directionIncrement, - self->last,last, - self->first,first, - self->numberOfPoints,numberOfPoints, - a->name,*val); -#endif if (ret == GRIB_SUCCESS) *len = 1; @@ -335,10 +286,8 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) } } - /*ret = grib_set_long_internal(hand, self->numberOfPoints,numberOfPoints); - if(ret) - grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot pack value for %s error %d \n", a->name, self->numberOfPoints, ret); - */ + //ret = grib_set_long_internal(hand, self->numberOfPoints,numberOfPoints); + //if(ret) grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot pack value for %s error %d \n", a->name, self->numberOfPoints, ret); grib_get_long_internal(hand, self->numberOfPoints, &codedNumberOfPoints); @@ -350,16 +299,6 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) if (ret) return ret; -#if 0 - printf("pack -- %s=%ld %s=%ld \n ------- %s=%f %s=%f \n ------- %s=%ld codedNumberOfPoints=%ld %s=%f\n", - self->directionIncrementGiven,directionIncrementGiven, - self->directionIncrement,directionIncrement, - self->last,last, - self->first,first, - self->numberOfPoints,numberOfPoints, - codedNumberOfPoints, - a->name,*val); -#endif if (ret == GRIB_SUCCESS) *len = 1; diff --git a/src/grib_accessor_class_latlonvalues.cc b/src/grib_accessor_class_latlonvalues.cc index 3eca92da0..e559eaa3d 100644 --- a/src/grib_accessor_class_latlonvalues.cc +++ b/src/grib_accessor_class_latlonvalues.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_latlonvalues { @@ -54,32 +53,32 @@ static grib_accessor_class _grib_accessor_class_latlonvalues = { "latlonvalues", /* name */ sizeof(grib_accessor_latlonvalues), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -88,10 +87,10 @@ static grib_accessor_class _grib_accessor_class_latlonvalues = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -100,46 +99,6 @@ static grib_accessor_class _grib_accessor_class_latlonvalues = { grib_accessor_class* grib_accessor_class_latlonvalues = &_grib_accessor_class_latlonvalues; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_library_version.cc b/src/grib_accessor_class_library_version.cc index c6c0dc791..2088b68c4 100644 --- a/src/grib_accessor_class_library_version.cc +++ b/src/grib_accessor_class_library_version.cc @@ -33,7 +33,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_string(grib_accessor*, char*, size_t* len); static size_t string_length(grib_accessor*); static int value_count(grib_accessor*, long*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_library_version { @@ -50,32 +49,32 @@ static grib_accessor_class _grib_accessor_class_library_version = { "library_version", /* name */ sizeof(grib_accessor_library_version), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -84,10 +83,10 @@ static grib_accessor_class _grib_accessor_class_library_version = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -96,45 +95,6 @@ static grib_accessor_class _grib_accessor_class_library_version = { grib_accessor_class* grib_accessor_class_library_version = &_grib_accessor_class_library_version; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_string(grib_accessor* a, char* val, size_t* len) diff --git a/src/grib_accessor_class_local_definition.cc b/src/grib_accessor_class_local_definition.cc index e1dc84f16..782ce5fde 100644 --- a/src/grib_accessor_class_local_definition.cc +++ b/src/grib_accessor_class_local_definition.cc @@ -48,7 +48,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_local_definition { @@ -77,32 +76,32 @@ static grib_accessor_class _grib_accessor_class_local_definition = { "local_definition", /* name */ sizeof(grib_accessor_local_definition), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -111,10 +110,10 @@ static grib_accessor_class _grib_accessor_class_local_definition = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -123,45 +122,6 @@ static grib_accessor_class _grib_accessor_class_local_definition = { grib_accessor_class* grib_accessor_class_local_definition = &_grib_accessor_class_local_definition; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_long.cc b/src/grib_accessor_class_long.cc index 6f5babcde..6caec017a 100644 --- a/src/grib_accessor_class_long.cc +++ b/src/grib_accessor_class_long.cc @@ -40,7 +40,6 @@ static int pack_string(grib_accessor*, const char*, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); static void dump(grib_accessor*, grib_dumper*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_long @@ -57,32 +56,32 @@ static grib_accessor_class _grib_accessor_class_long = { "long", /* name */ sizeof(grib_accessor_long), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - &pack_missing, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + &pack_missing, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -91,10 +90,10 @@ static grib_accessor_class _grib_accessor_class_long = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -103,41 +102,6 @@ static grib_accessor_class _grib_accessor_class_long = { grib_accessor_class* grib_accessor_class_long = &_grib_accessor_class_long; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int get_native_type(grib_accessor* a) @@ -194,24 +158,6 @@ static int pack_missing(grib_accessor* a) return GRIB_VALUE_CANNOT_BE_MISSING; } -/* -static int is_missing(grib_accessor* a){ - - size_t len = 1; - long value = GRIB_MISSING_LONG; - long ret=0; - - if(a->flags & GRIB_ACCESSOR_FLAG_CAN_BE_MISSING) - { - ret = grib_unpack_long(a,&value,&len); - Assert( ret == 0); - return value == GRIB_MISSING_LONG; - } - - return 0; -} -*/ - static int unpack_double(grib_accessor* a, double* val, size_t* len) { size_t rlen = 0; @@ -306,12 +252,10 @@ static int pack_string(grib_accessor* a, const char* val, size_t* len) { long v = 0; /* The converted value */ -#if 0 - /* Requires more work e.g. filter */ - if (strcmp_nocase(val, "missing")==0) { - return pack_missing(a); - } -#endif + // Requires more work e.g. filter + //if (strcmp_nocase(val, "missing")==0) { + // return pack_missing(a); + //} if (string_to_long(val, &v) != GRIB_SUCCESS) { grib_context_log(a->context, GRIB_LOG_ERROR, diff --git a/src/grib_accessor_class_long_vector.cc b/src/grib_accessor_class_long_vector.cc index b5389b512..612163a3e 100644 --- a/src/grib_accessor_class_long_vector.cc +++ b/src/grib_accessor_class_long_vector.cc @@ -44,7 +44,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_long_vector { @@ -66,32 +65,32 @@ static grib_accessor_class _grib_accessor_class_long_vector = { "long_vector", /* name */ sizeof(grib_accessor_long_vector), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -100,10 +99,10 @@ static grib_accessor_class _grib_accessor_class_long_vector = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -112,44 +111,6 @@ static grib_accessor_class _grib_accessor_class_long_vector = { grib_accessor_class* grib_accessor_class_long_vector = &_grib_accessor_class_long_vector; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ typedef struct grib_accessor_abstract_long_vector @@ -196,7 +157,7 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) /*TODO implement the dirty mechanism to avoid to unpack every time */ err = grib_get_size(grib_handle_of_accessor(a), self->vector, &size); if (err) return err; - DebugAssert(size > 0); + DEBUG_ASSERT(size > 0); vector = (long*)grib_context_malloc(a->context, sizeof(long) * size); err = grib_unpack_long(va, vector, &size); grib_context_free(a->context, vector); diff --git a/src/grib_accessor_class_longitudes.cc b/src/grib_accessor_class_longitudes.cc index 09f4bf87b..083d40138 100644 --- a/src/grib_accessor_class_longitudes.cc +++ b/src/grib_accessor_class_longitudes.cc @@ -40,7 +40,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_longitudes { @@ -62,32 +61,32 @@ static grib_accessor_class _grib_accessor_class_longitudes = { "longitudes", /* name */ sizeof(grib_accessor_longitudes), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -96,10 +95,10 @@ static grib_accessor_class _grib_accessor_class_longitudes = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -108,46 +107,6 @@ static grib_accessor_class _grib_accessor_class_longitudes = { grib_accessor_class* grib_accessor_class_longitudes = &_grib_accessor_class_longitudes; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_lookup.cc b/src/grib_accessor_class_lookup.cc index e8ce7af09..b7c9ce059 100644 --- a/src/grib_accessor_class_lookup.cc +++ b/src/grib_accessor_class_lookup.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -46,7 +46,6 @@ static long byte_offset(grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); static void post_init(grib_accessor*); -static void init_class(grib_accessor_class*); static int notify_change(grib_accessor*, grib_accessor*); typedef struct grib_accessor_lookup @@ -67,32 +66,32 @@ static grib_accessor_class _grib_accessor_class_lookup = { "lookup", /* name */ sizeof(grib_accessor_lookup), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ &post_init, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ &byte_count, /* get number of bytes */ &byte_offset, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ ¬ify_change, /* notify_change */ 0, /* update_size */ @@ -101,10 +100,10 @@ static grib_accessor_class _grib_accessor_class_lookup = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -113,41 +112,6 @@ static grib_accessor_class _grib_accessor_class_lookup = { grib_accessor_class* grib_accessor_class_lookup = &_grib_accessor_class_lookup; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_mars_param.cc b/src/grib_accessor_class_mars_param.cc index d5c6da1fd..fc120dd89 100644 --- a/src/grib_accessor_class_mars_param.cc +++ b/src/grib_accessor_class_mars_param.cc @@ -38,7 +38,6 @@ static int pack_string(grib_accessor*, const char*, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); static size_t string_length(grib_accessor*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_mars_param { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_mars_param = { "mars_param", /* name */ sizeof(grib_accessor_mars_param), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_mars_param = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,45 +103,6 @@ static grib_accessor_class _grib_accessor_class_mars_param = { grib_accessor_class* grib_accessor_class_mars_param = &_grib_accessor_class_mars_param; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -154,28 +114,12 @@ static void init(grib_accessor* a, const long l, grib_arguments* c) self->param = grib_arguments_get_name(grib_handle_of_accessor(a), c, n++); } +// For an alternative implementation of pack_string and unpack_string, see +// src/deprecated/grib_accessor_class_mars_param.cc +// static int pack_string(grib_accessor* a, const char* val, size_t* len) { -#if 1 return GRIB_NOT_IMPLEMENTED; -#else - grib_accessor_mars_param* self = (grib_accessor_mars_param*)a; - long paramId = 0; - long param = 0; - long table = 0; - char* p = (char*)val; - char* q = NULL; - - param = strtol(val, &p, 10); - if (*p != 0) - table = strtol(++p, &q, 10); - else - table = 128; - - paramId = table * 1000 + param; - - return grib_set_long_internal(grib_handle_of_accessor(a), self->paramId, paramId); -#endif } static int unpack_string(grib_accessor* a, char* val, size_t* len) @@ -185,32 +129,10 @@ static int unpack_string(grib_accessor* a, char* val, size_t* len) long table = 0; int ret = 0; -#if 1 if (self->table != NULL && (ret = grib_get_long_internal(grib_handle_of_accessor(a), self->table, &table)) != GRIB_SUCCESS) return ret; if (self->param != NULL && (ret = grib_get_long_internal(grib_handle_of_accessor(a), self->param, ¶m)) != GRIB_SUCCESS) return ret; -#else - { - long paramId = 0; - grib_get_long(grib_handle_of_accessor(a), self->paramId, ¶mId); - - if (paramId == 0 || (paramId < 4000 && paramId > 1000)) { - if (self->table != NULL && (ret = grib_get_long_internal(grib_handle_of_accessor(a), self->table, &table)) != GRIB_SUCCESS) - return ret; - if (self->param != NULL && (ret = grib_get_long_internal(grib_handle_of_accessor(a), self->param, ¶m)) != GRIB_SUCCESS) - return ret; - } - else if (paramId < 1000) { - table = 128; - param = paramId; - } - else { - table = paramId / 1000; - param = paramId - table * 1000; - } - } -#endif /*if (table==200) table=128;*/ snprintf(val, 32, "%ld.%ld", param, table); diff --git a/src/grib_accessor_class_mars_step.cc b/src/grib_accessor_class_mars_step.cc index bdf0715c9..81b7d7750 100644 --- a/src/grib_accessor_class_mars_step.cc +++ b/src/grib_accessor_class_mars_step.cc @@ -43,7 +43,6 @@ static int unpack_string(grib_accessor*, char*, size_t* len); static size_t string_length(grib_accessor*); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_mars_step { @@ -62,32 +61,32 @@ static grib_accessor_class _grib_accessor_class_mars_step = { "mars_step", /* name */ sizeof(grib_accessor_mars_step), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -96,10 +95,10 @@ static grib_accessor_class _grib_accessor_class_mars_step = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -108,41 +107,6 @@ static grib_accessor_class _grib_accessor_class_mars_step = { grib_accessor_class* grib_accessor_class_mars_step = &_grib_accessor_class_mars_step; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_md5.cc b/src/grib_accessor_class_md5.cc index e5ea8177e..142270098 100644 --- a/src/grib_accessor_class_md5.cc +++ b/src/grib_accessor_class_md5.cc @@ -40,7 +40,6 @@ static int unpack_string(grib_accessor*, char*, size_t* len); static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_md5 @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_md5 = { "md5", /* name */ sizeof(grib_accessor_md5), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_md5 = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,44 +105,6 @@ static grib_accessor_class _grib_accessor_class_md5 = { grib_accessor_class* grib_accessor_class_md5 = &_grib_accessor_class_md5; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_message.cc b/src/grib_accessor_class_message.cc index 11d430127..3a9ecc910 100644 --- a/src/grib_accessor_class_message.cc +++ b/src/grib_accessor_class_message.cc @@ -40,7 +40,6 @@ static int unpack_string(grib_accessor*, char*, size_t* len); static size_t string_length(grib_accessor*); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); static void resize(grib_accessor*,size_t); static int compare(grib_accessor*, grib_accessor*); @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_message = { "message", /* name */ sizeof(grib_accessor_message), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_message = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,42 +105,6 @@ static grib_accessor_class _grib_accessor_class_message = { grib_accessor_class* grib_accessor_class_message = &_grib_accessor_class_message; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_message_copy.cc b/src/grib_accessor_class_message_copy.cc index ed6d43c9b..4b3df8857 100644 --- a/src/grib_accessor_class_message_copy.cc +++ b/src/grib_accessor_class_message_copy.cc @@ -39,7 +39,6 @@ static size_t string_length(grib_accessor*); static long byte_count(grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_message_copy { @@ -55,32 +54,32 @@ static grib_accessor_class _grib_accessor_class_message_copy = { "message_copy", /* name */ sizeof(grib_accessor_message_copy), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ 0, /* get number of values */ &byte_count, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -89,10 +88,10 @@ static grib_accessor_class _grib_accessor_class_message_copy = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -101,43 +100,6 @@ static grib_accessor_class _grib_accessor_class_message_copy = { grib_accessor_class* grib_accessor_class_message_copy = &_grib_accessor_class_message_copy; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->value_count = (*(c->super))->value_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long length, grib_arguments* args) diff --git a/src/grib_accessor_class_missing.cc b/src/grib_accessor_class_missing.cc index d6eb6af52..0847ce699 100644 --- a/src/grib_accessor_class_missing.cc +++ b/src/grib_accessor_class_missing.cc @@ -60,7 +60,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int notify_change(grib_accessor*, grib_accessor*); static void update_size(grib_accessor*, size_t); @@ -76,32 +75,32 @@ static grib_accessor_class _grib_accessor_class_missing = { "missing", /* name */ sizeof(grib_accessor_missing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ &byte_count, /* get number of bytes */ &byte_offset, /* get offset to bytes */ &get_native_type, /* get native type */ &sub_section, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - &pack_bytes, /* grib_pack procedures bytes */ - &unpack_bytes, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + &pack_bytes, /* pack_bytes */ + &unpack_bytes, /* unpack_bytes */ &pack_expression, /* pack_expression */ ¬ify_change, /* notify_change */ &update_size, /* update_size */ @@ -110,10 +109,10 @@ static grib_accessor_class _grib_accessor_class_missing = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -122,11 +121,6 @@ static grib_accessor_class _grib_accessor_class_missing = { grib_accessor_class* grib_accessor_class_missing = &_grib_accessor_class_missing; - -static void init_class(grib_accessor_class* c) -{ -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* param) diff --git a/src/grib_accessor_class_nearest.cc b/src/grib_accessor_class_nearest.cc index 329c2b8b5..0620b5395 100644 --- a/src/grib_accessor_class_nearest.cc +++ b/src/grib_accessor_class_nearest.cc @@ -33,7 +33,6 @@ or edit "accessor.class" and rerun ./make_class.pl static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_nearest { @@ -50,32 +49,32 @@ static grib_accessor_class _grib_accessor_class_nearest = { "nearest", /* name */ sizeof(grib_accessor_nearest), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -84,10 +83,10 @@ static grib_accessor_class _grib_accessor_class_nearest = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -96,47 +95,6 @@ static grib_accessor_class _grib_accessor_class_nearest = { grib_accessor_class* grib_accessor_class_nearest = &_grib_accessor_class_nearest; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* args) diff --git a/src/grib_accessor_class_non_alpha.cc b/src/grib_accessor_class_non_alpha.cc index 6eb316d6b..3b5badd23 100644 --- a/src/grib_accessor_class_non_alpha.cc +++ b/src/grib_accessor_class_non_alpha.cc @@ -52,7 +52,6 @@ static long next_offset(grib_accessor*); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_non_alpha @@ -69,32 +68,32 @@ static grib_accessor_class _grib_accessor_class_non_alpha = { "non_alpha", /* name */ sizeof(grib_accessor_non_alpha), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -103,10 +102,10 @@ static grib_accessor_class _grib_accessor_class_non_alpha = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -115,36 +114,6 @@ static grib_accessor_class _grib_accessor_class_non_alpha = { grib_accessor_class* grib_accessor_class_non_alpha = &_grib_accessor_class_non_alpha; - -static void init_class(grib_accessor_class* c) -{ - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_number_of_coded_values.cc b/src/grib_accessor_class_number_of_coded_values.cc index df2c48f5a..14ef832d7 100644 --- a/src/grib_accessor_class_number_of_coded_values.cc +++ b/src/grib_accessor_class_number_of_coded_values.cc @@ -41,7 +41,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_number_of_coded_values { @@ -63,32 +62,32 @@ static grib_accessor_class _grib_accessor_class_number_of_coded_values = { "number_of_coded_values", /* name */ sizeof(grib_accessor_number_of_coded_values), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -97,10 +96,10 @@ static grib_accessor_class _grib_accessor_class_number_of_coded_values = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -109,47 +108,6 @@ static grib_accessor_class _grib_accessor_class_number_of_coded_values = { grib_accessor_class* grib_accessor_class_number_of_coded_values = &_grib_accessor_class_number_of_coded_values; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -190,7 +148,7 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) if (bpv != 0) { grib_context_log(a->context, GRIB_LOG_DEBUG, "grib_accessor_number_of_coded_values: offsetAfterData=%ld offsetBeforeData=%ld unusedBits=%ld bpv=%ld\n", offsetAfterData, offsetBeforeData, unusedBits, bpv); - DebugAssert(offsetAfterData > offsetBeforeData); + DEBUG_ASSERT(offsetAfterData > offsetBeforeData); *val = ((offsetAfterData - offsetBeforeData) * 8 - unusedBits) / bpv; } else { diff --git a/src/grib_accessor_class_number_of_points.cc b/src/grib_accessor_class_number_of_points.cc index f5e35590a..6a270bb69 100644 --- a/src/grib_accessor_class_number_of_points.cc +++ b/src/grib_accessor_class_number_of_points.cc @@ -40,7 +40,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_number_of_points { @@ -61,32 +60,32 @@ static grib_accessor_class _grib_accessor_class_number_of_points = { "number_of_points", /* name */ sizeof(grib_accessor_number_of_points), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -95,10 +94,10 @@ static grib_accessor_class _grib_accessor_class_number_of_points = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -107,47 +106,6 @@ static grib_accessor_class _grib_accessor_class_number_of_points = { grib_accessor_class* grib_accessor_class_number_of_points = &_grib_accessor_class_number_of_points; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_number_of_points_gaussian.cc b/src/grib_accessor_class_number_of_points_gaussian.cc index 17e4d03af..41d8971cb 100644 --- a/src/grib_accessor_class_number_of_points_gaussian.cc +++ b/src/grib_accessor_class_number_of_points_gaussian.cc @@ -48,7 +48,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_number_of_points_gaussian { @@ -75,32 +74,32 @@ static grib_accessor_class _grib_accessor_class_number_of_points_gaussian = { "number_of_points_gaussian", /* name */ sizeof(grib_accessor_number_of_points_gaussian), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -109,10 +108,10 @@ static grib_accessor_class _grib_accessor_class_number_of_points_gaussian = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -121,47 +120,6 @@ static grib_accessor_class _grib_accessor_class_number_of_points_gaussian = { grib_accessor_class* grib_accessor_class_number_of_points_gaussian = &_grib_accessor_class_number_of_points_gaussian; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ #define EFDEBUG 0 @@ -185,73 +143,10 @@ static void init(grib_accessor* a, const long l, grib_arguments* c) a->flags |= GRIB_ACCESSOR_FLAG_FUNCTION; a->length = 0; } -#if 0 -/*Legacy mode*/ -static long num_points_reduced_gauss_old(grib_handle* h, long nj, long pl[], - long max_pl, double lats[], - double angular_precision, - double lat_first, double lat_last, - double lon_first, double lon_last) -{ - long result=0; - int is_global=0; - size_t plsize=0; - long ilon_first=0,ilon_last=0; - double lon_first_row=0,lon_last_row=0; - float d = 0; - is_global=is_gaussian_global(lat_first,lat_last,lon_first,lon_last,max_pl,lats,angular_precision); - d=fabs(lats[0]-lats[1]); - if ( !is_global ) { - long j = 0; - /*sub area*/ - (void)d; -#if EFDEBUG - printf("-------- subarea fabs(lat_first-lats[0])=%g d=%g\n",fabs(lat_first-lats[0]),d); - printf("-------- subarea fabs(lat_last+lats[0])=%g d=%g\n",fabs(lat_last+lats[0]),d); - printf("-------- subarea lon_last=%g order=%ld 360.0-90.0/order=%g\n", - lon_last,order,360.0-90.0/order); - printf("-------- subarea lon_first=%g fabs(lon_last -( 360.0-90.0/order))=%g 90.0/order=%g\n", - lon_first,fabs(lon_last - (360.0-90.0/order)),90.0/order); -#endif - for (j=0;jdump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_number_of_values_data_raw_packing.cc b/src/grib_accessor_class_number_of_values_data_raw_packing.cc index be6ff1899..5bde2a163 100644 --- a/src/grib_accessor_class_number_of_values_data_raw_packing.cc +++ b/src/grib_accessor_class_number_of_values_data_raw_packing.cc @@ -49,7 +49,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_number_of_values_data_raw_packing { @@ -67,32 +66,32 @@ static grib_accessor_class _grib_accessor_class_number_of_values_data_raw_packin "number_of_values_data_raw_packing", /* name */ sizeof(grib_accessor_number_of_values_data_raw_packing), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -101,10 +100,10 @@ static grib_accessor_class _grib_accessor_class_number_of_values_data_raw_packin 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -113,46 +112,6 @@ static grib_accessor_class _grib_accessor_class_number_of_values_data_raw_packin grib_accessor_class* grib_accessor_class_number_of_values_data_raw_packing = &_grib_accessor_class_number_of_values_data_raw_packing; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long v, grib_arguments* args) diff --git a/src/grib_accessor_class_octahedral_gaussian.cc b/src/grib_accessor_class_octahedral_gaussian.cc index dc88d329a..8035c9ab0 100644 --- a/src/grib_accessor_class_octahedral_gaussian.cc +++ b/src/grib_accessor_class_octahedral_gaussian.cc @@ -40,7 +40,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_octahedral_gaussian { @@ -61,32 +60,32 @@ static grib_accessor_class _grib_accessor_class_octahedral_gaussian = { "octahedral_gaussian", /* name */ sizeof(grib_accessor_octahedral_gaussian), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -95,10 +94,10 @@ static grib_accessor_class _grib_accessor_class_octahedral_gaussian = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -107,46 +106,6 @@ static grib_accessor_class _grib_accessor_class_octahedral_gaussian = { grib_accessor_class* grib_accessor_class_octahedral_gaussian = &_grib_accessor_class_octahedral_gaussian; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_octet_number.cc b/src/grib_accessor_class_octet_number.cc index 9650e09e0..0f2a0d5be 100644 --- a/src/grib_accessor_class_octet_number.cc +++ b/src/grib_accessor_class_octet_number.cc @@ -40,7 +40,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_octet_number { @@ -59,32 +58,32 @@ static grib_accessor_class _grib_accessor_class_octet_number = { "octet_number", /* name */ sizeof(grib_accessor_octet_number), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -93,10 +92,10 @@ static grib_accessor_class _grib_accessor_class_octet_number = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -105,46 +104,6 @@ static grib_accessor_class _grib_accessor_class_octet_number = { grib_accessor_class* grib_accessor_class_octet_number = &_grib_accessor_class_octet_number; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_offset_file.cc b/src/grib_accessor_class_offset_file.cc index d923c87c2..d056af268 100644 --- a/src/grib_accessor_class_offset_file.cc +++ b/src/grib_accessor_class_offset_file.cc @@ -38,7 +38,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_offset_file { @@ -55,32 +54,32 @@ static grib_accessor_class _grib_accessor_class_offset_file = { "offset_file", /* name */ sizeof(grib_accessor_offset_file), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -89,10 +88,10 @@ static grib_accessor_class _grib_accessor_class_offset_file = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -101,46 +100,6 @@ static grib_accessor_class _grib_accessor_class_offset_file = { grib_accessor_class* grib_accessor_class_offset_file = &_grib_accessor_class_offset_file; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_offset_values.cc b/src/grib_accessor_class_offset_values.cc index e72d892f4..012698f79 100644 --- a/src/grib_accessor_class_offset_values.cc +++ b/src/grib_accessor_class_offset_values.cc @@ -39,7 +39,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_offset_values { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_offset_values = { "offset_values", /* name */ sizeof(grib_accessor_offset_values), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_offset_values = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,46 +103,6 @@ static grib_accessor_class _grib_accessor_class_offset_values = { grib_accessor_class* grib_accessor_class_offset_values = &_grib_accessor_class_offset_values; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* args) diff --git a/src/grib_accessor_class_pack_bufr_values.cc b/src/grib_accessor_class_pack_bufr_values.cc index b51f90021..a076e12ac 100644 --- a/src/grib_accessor_class_pack_bufr_values.cc +++ b/src/grib_accessor_class_pack_bufr_values.cc @@ -47,7 +47,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_pack_bufr_values { @@ -64,32 +63,32 @@ static grib_accessor_class _grib_accessor_class_pack_bufr_values = { "pack_bufr_values", /* name */ sizeof(grib_accessor_pack_bufr_values), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - &unpack_string_array, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + &unpack_string_array, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -98,10 +97,10 @@ static grib_accessor_class _grib_accessor_class_pack_bufr_values = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -110,39 +109,6 @@ static grib_accessor_class _grib_accessor_class_pack_bufr_values = { grib_accessor_class* grib_accessor_class_pack_bufr_values = &_grib_accessor_class_pack_bufr_values; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* params) diff --git a/src/grib_accessor_class_pad.cc b/src/grib_accessor_class_pad.cc index 7f19c1c73..473a507e1 100644 --- a/src/grib_accessor_class_pad.cc +++ b/src/grib_accessor_class_pad.cc @@ -37,7 +37,6 @@ or edit "accessor.class" and rerun ./make_class.pl */ static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static size_t preferred_size(grib_accessor*, int); typedef struct grib_accessor_pad @@ -57,32 +56,32 @@ static grib_accessor_class _grib_accessor_class_pad = { "pad", /* name */ sizeof(grib_accessor_pad), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -91,10 +90,10 @@ static grib_accessor_class _grib_accessor_class_pad = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -103,47 +102,6 @@ static grib_accessor_class _grib_accessor_class_pad = { grib_accessor_class* grib_accessor_class_pad = &_grib_accessor_class_pad; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_padding.cc b/src/grib_accessor_class_padding.cc index 5f8900c6a..44e1083b2 100644 --- a/src/grib_accessor_class_padding.cc +++ b/src/grib_accessor_class_padding.cc @@ -39,7 +39,6 @@ static size_t string_length(grib_accessor*); static long byte_count(grib_accessor*); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); static void resize(grib_accessor*,size_t); static int compare(grib_accessor*, grib_accessor*); @@ -59,32 +58,32 @@ static grib_accessor_class _grib_accessor_class_padding = { "padding", /* name */ sizeof(grib_accessor_padding), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ &byte_count, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -93,10 +92,10 @@ static grib_accessor_class _grib_accessor_class_padding = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -105,42 +104,6 @@ static grib_accessor_class _grib_accessor_class_padding = { grib_accessor_class* grib_accessor_class_padding = &_grib_accessor_class_padding; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_padto.cc b/src/grib_accessor_class_padto.cc index 233a751d2..f6f9417b4 100644 --- a/src/grib_accessor_class_padto.cc +++ b/src/grib_accessor_class_padto.cc @@ -37,7 +37,6 @@ or edit "accessor.class" and rerun ./make_class.pl static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static size_t preferred_size(grib_accessor*, int); typedef struct grib_accessor_padto @@ -57,32 +56,32 @@ static grib_accessor_class _grib_accessor_class_padto = { "padto", /* name */ sizeof(grib_accessor_padto), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -91,10 +90,10 @@ static grib_accessor_class _grib_accessor_class_padto = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -103,46 +102,6 @@ static grib_accessor_class _grib_accessor_class_padto = { grib_accessor_class* grib_accessor_class_padto = &_grib_accessor_class_padto; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_padtoeven.cc b/src/grib_accessor_class_padtoeven.cc index 3f37d7c78..c75e0e254 100644 --- a/src/grib_accessor_class_padtoeven.cc +++ b/src/grib_accessor_class_padtoeven.cc @@ -12,7 +12,6 @@ * Enrico Fucile **************************************/ - #include "grib_api_internal.h" /* This is used by make_class.pl @@ -38,7 +37,6 @@ or edit "accessor.class" and rerun ./make_class.pl */ static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static size_t preferred_size(grib_accessor*, int); typedef struct grib_accessor_padtoeven @@ -59,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_padtoeven = { "padtoeven", /* name */ sizeof(grib_accessor_padtoeven), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -93,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_padtoeven = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -105,47 +103,6 @@ static grib_accessor_class _grib_accessor_class_padtoeven = { grib_accessor_class* grib_accessor_class_padtoeven = &_grib_accessor_class_padtoeven; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static size_t preferred_size(grib_accessor* a, int from_handle) @@ -159,11 +116,9 @@ static size_t preferred_size(grib_accessor* a, int from_handle) grib_get_long_internal(grib_handle_of_accessor(a), self->section_length, &length); if ((length % 2) && from_handle) { -#if 0 - grib_context_log(a->context, - GRIB_LOG_ERROR,"GRIB message has an odd length section (%ld, %s)", - (long)length,a->name); -#endif + // grib_context_log(a->context, + // GRIB_LOG_ERROR,"GRIB message has an odd length section (%ld, %s)", + // (long)length,a->name); return 0; } diff --git a/src/grib_accessor_class_padtomultiple.cc b/src/grib_accessor_class_padtomultiple.cc index e57d33788..3104cdf2f 100644 --- a/src/grib_accessor_class_padtomultiple.cc +++ b/src/grib_accessor_class_padtomultiple.cc @@ -38,7 +38,6 @@ or edit "accessor.class" and rerun ./make_class.pl */ static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static size_t preferred_size(grib_accessor*, int); typedef struct grib_accessor_padtomultiple @@ -59,32 +58,32 @@ static grib_accessor_class _grib_accessor_class_padtomultiple = { "padtomultiple", /* name */ sizeof(grib_accessor_padtomultiple), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -93,10 +92,10 @@ static grib_accessor_class _grib_accessor_class_padtomultiple = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -105,47 +104,6 @@ static grib_accessor_class _grib_accessor_class_padtomultiple = { grib_accessor_class* grib_accessor_class_padtomultiple = &_grib_accessor_class_padtomultiple; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static size_t preferred_size(grib_accessor* a, int from_handle) diff --git a/src/grib_accessor_class_position.cc b/src/grib_accessor_class_position.cc index eed88cd38..1aef0a94f 100644 --- a/src/grib_accessor_class_position.cc +++ b/src/grib_accessor_class_position.cc @@ -42,7 +42,6 @@ static int get_native_type(grib_accessor*); static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_position @@ -59,32 +58,32 @@ static grib_accessor_class _grib_accessor_class_position = { "position", /* name */ sizeof(grib_accessor_position), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -93,10 +92,10 @@ static grib_accessor_class _grib_accessor_class_position = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -105,44 +104,6 @@ static grib_accessor_class _grib_accessor_class_position = { grib_accessor_class* grib_accessor_class_position = &_grib_accessor_class_position; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_proj_string.cc b/src/grib_accessor_class_proj_string.cc index 92d99c2a1..ffd5ed831 100644 --- a/src/grib_accessor_class_proj_string.cc +++ b/src/grib_accessor_class_proj_string.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int unpack_string(grib_accessor*, char*, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_proj_string { @@ -54,32 +53,32 @@ static grib_accessor_class _grib_accessor_class_proj_string = { "proj_string", /* name */ sizeof(grib_accessor_proj_string), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -88,10 +87,10 @@ static grib_accessor_class _grib_accessor_class_proj_string = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -100,46 +99,6 @@ static grib_accessor_class _grib_accessor_class_proj_string = { grib_accessor_class* grib_accessor_class_proj_string = &_grib_accessor_class_proj_string; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) @@ -168,7 +127,6 @@ struct proj_mapping }; typedef struct proj_mapping proj_mapping; - // This should only be called for GRID POINT data (not spherical harmonics etc) static int get_major_minor_axes(grib_handle* h, double* pMajor, double* pMinor) { @@ -202,25 +160,20 @@ static int get_earth_shape(grib_handle* h, char* result) static int proj_space_view(grib_handle* h, char* result) { return GRIB_NOT_IMPLEMENTED; -#if 0 - int err = 0; - char shape[64] = {0,}; - double latOfSubSatellitePointInDegrees, lonOfSubSatellitePointInDegrees; - - if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS) - return err; - - if ((err = grib_get_double_internal(h, "longitudeOfSubSatellitePointInDegrees", &lonOfSubSatellitePointInDegrees)) != GRIB_SUCCESS) - return err; - - snprintf(result, 526, "+proj=geos +lon_0=%lf +h=35785831 +x_0=0 +y_0=0 %s", lonOfSubSatellitePointInDegrees, shape); - return err; - - /* Experimental: For now do the same as gdalsrsinfo - hard coded values! */ - snprintf(result, 526, "+proj=geos +lon_0=0 +h=35785831 +x_0=0 +y_0=0 %s", shape); - return err; -#endif + // int err = 0; + // char shape[64] = {0,}; + // double latOfSubSatellitePointInDegrees, lonOfSubSatellitePointInDegrees; + // if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS) + // return err; + // if ((err = grib_get_double_internal(h, "longitudeOfSubSatellitePointInDegrees", &lonOfSubSatellitePointInDegrees)) != GRIB_SUCCESS) + // return err; + // snprintf(result, 526, "+proj=geos +lon_0=%lf +h=35785831 +x_0=0 +y_0=0 %s", lonOfSubSatellitePointInDegrees, shape); + // return err; + // /* Experimental: For now do the same as gdalsrsinfo - hard coded values! */ + // snprintf(result, 526, "+proj=geos +lon_0=0 +h=35785831 +x_0=0 +y_0=0 %s", shape); + // return err; } + static int proj_albers(grib_handle* h, char* result) { return GRIB_NOT_IMPLEMENTED; @@ -294,19 +247,18 @@ static int proj_polar_stereographic(grib_handle* h, char* result) return err; } -#if 0 // ECC-1552: This is for regular_ll, regular_gg, reduced_ll, reduced_gg +// These are not 'projected' grids! static int proj_unprojected(grib_handle* h, char* result) { int err = 0; - char shape[64] = {0,}; - if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS) - return err; + //char shape[64] = {0,}; + //if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS) return err; + //snprintf(result, 1024, "+proj=longlat %s", shape); + snprintf(result, 1024, "+proj=longlat +datum=WGS84 +no_defs +type=crs"); - snprintf(result, 1024, "+proj=longlat %s", shape); return err; } -#endif static int proj_mercator(grib_handle* h, char* result) { @@ -325,10 +277,10 @@ static int proj_mercator(grib_handle* h, char* result) #define NUMBER(a) (sizeof(a) / sizeof(a[0])) static proj_mapping proj_mappings[] = { - // { "regular_ll", &proj_unprojected }, - // { "regular_gg", &proj_unprojected }, - // { "reduced_ll", &proj_unprojected }, - // { "reduced_gg", &proj_unprojected }, + { "regular_ll", &proj_unprojected }, + { "regular_gg", &proj_unprojected }, + { "reduced_ll", &proj_unprojected }, + { "reduced_gg", &proj_unprojected }, { "mercator", &proj_mercator }, { "lambert", &proj_lambert_conformal }, diff --git a/src/grib_accessor_class_raw.cc b/src/grib_accessor_class_raw.cc index ec2a89dc4..f38153b43 100644 --- a/src/grib_accessor_class_raw.cc +++ b/src/grib_accessor_class_raw.cc @@ -40,7 +40,6 @@ static int unpack_bytes(grib_accessor*, unsigned char*, size_t* len); static long byte_count(grib_accessor*); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); static int compare(grib_accessor*, grib_accessor*); @@ -61,32 +60,32 @@ static grib_accessor_class _grib_accessor_class_raw = { "raw", /* name */ sizeof(grib_accessor_raw), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ &byte_count, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - &pack_bytes, /* grib_pack procedures bytes */ - &unpack_bytes, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + &pack_bytes, /* pack_bytes */ + &unpack_bytes, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -95,10 +94,10 @@ static grib_accessor_class _grib_accessor_class_raw = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -107,41 +106,6 @@ static grib_accessor_class _grib_accessor_class_raw = { grib_accessor_class* grib_accessor_class_raw = &_grib_accessor_class_raw; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_rdbtime_guess_date.cc b/src/grib_accessor_class_rdbtime_guess_date.cc index 33b380520..7bd8a3c4a 100644 --- a/src/grib_accessor_class_rdbtime_guess_date.cc +++ b/src/grib_accessor_class_rdbtime_guess_date.cc @@ -41,7 +41,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_rdbtime_guess_date { @@ -63,32 +62,32 @@ static grib_accessor_class _grib_accessor_class_rdbtime_guess_date = { "rdbtime_guess_date", /* name */ sizeof(grib_accessor_rdbtime_guess_date), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -97,10 +96,10 @@ static grib_accessor_class _grib_accessor_class_rdbtime_guess_date = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -109,45 +108,6 @@ static grib_accessor_class _grib_accessor_class_rdbtime_guess_date = { grib_accessor_class* grib_accessor_class_rdbtime_guess_date = &_grib_accessor_class_rdbtime_guess_date; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_reference_value_error.cc b/src/grib_accessor_class_reference_value_error.cc index 8b94991b4..3cc4af20d 100644 --- a/src/grib_accessor_class_reference_value_error.cc +++ b/src/grib_accessor_class_reference_value_error.cc @@ -40,7 +40,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_double(grib_accessor*, double* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_reference_value_error { @@ -59,32 +58,32 @@ static grib_accessor_class _grib_accessor_class_reference_value_error = { "reference_value_error", /* name */ sizeof(grib_accessor_reference_value_error), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -93,10 +92,10 @@ static grib_accessor_class _grib_accessor_class_reference_value_error = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -105,47 +104,6 @@ static grib_accessor_class _grib_accessor_class_reference_value_error = { grib_accessor_class* grib_accessor_class_reference_value_error = &_grib_accessor_class_reference_value_error; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_round.cc b/src/grib_accessor_class_round.cc index d15a5b83a..98fe2fda5 100644 --- a/src/grib_accessor_class_round.cc +++ b/src/grib_accessor_class_round.cc @@ -33,7 +33,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_round { @@ -52,32 +51,32 @@ static grib_accessor_class _grib_accessor_class_round = { "round", /* name */ sizeof(grib_accessor_round), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -86,10 +85,10 @@ static grib_accessor_class _grib_accessor_class_round = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -98,46 +97,6 @@ static grib_accessor_class _grib_accessor_class_round = { grib_accessor_class* grib_accessor_class_round = &_grib_accessor_class_round; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_double(grib_accessor* a, double* val, size_t* len) diff --git a/src/grib_accessor_class_scale.cc b/src/grib_accessor_class_scale.cc index 9ebab9e2b..6fec75e94 100644 --- a/src/grib_accessor_class_scale.cc +++ b/src/grib_accessor_class_scale.cc @@ -46,7 +46,6 @@ static int pack_double(grib_accessor*, const double* val, size_t* len); static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_scale { @@ -67,32 +66,32 @@ static grib_accessor_class _grib_accessor_class_scale = { "scale", /* name */ sizeof(grib_accessor_scale), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - &is_missing, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + &is_missing, /* is_missing */ + &pack_long, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -101,10 +100,10 @@ static grib_accessor_class _grib_accessor_class_scale = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -113,44 +112,6 @@ static grib_accessor_class _grib_accessor_class_scale = { grib_accessor_class* grib_accessor_class_scale = &_grib_accessor_class_scale; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -175,8 +136,8 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) if (*len < 1) { ret = GRIB_ARRAY_TOO_SMALL; grib_context_log(a->context, GRIB_LOG_ERROR, - "Accessor %s cannot gather value for %s and/or %s error %d", - a->name, self->multiplier, self->divisor, ret); + "Accessor %s cannot gather value for %s and/or %s", + a->name, self->multiplier, self->divisor); return ret; } @@ -193,7 +154,6 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) *val = GRIB_MISSING_DOUBLE; else *val = ((double)(value * multiplier)) / divisor; - /*printf("unpack_double: divisor=%ld multiplier=%ld long_value=%ld scaled_value=%.30f\n",(double)divisor,(double)multiplier,value,*val);*/ if (ret == GRIB_SUCCESS) *len = 1; @@ -219,25 +179,19 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len) double x; ret = grib_get_long_internal(grib_handle_of_accessor(a), self->divisor, &divisor); - if (ret != GRIB_SUCCESS) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot gather value for %s error %d \n", a->name, self->divisor, ret); - return ret; - } + if (ret != GRIB_SUCCESS) return ret; + ret = grib_get_long_internal(grib_handle_of_accessor(a), self->multiplier, &multiplier); - if (ret != GRIB_SUCCESS) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot gather value for %s error %d \n", a->name, self->divisor, ret); - return ret; - } + if (ret != GRIB_SUCCESS) return ret; + if (self->truncating) { ret = grib_get_long_internal(grib_handle_of_accessor(a), self->truncating, &truncating); - if (ret != GRIB_SUCCESS) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot gather value for %s error %d \n", a->name, self->truncating, ret); - return ret; - } + if (ret != GRIB_SUCCESS) return ret; } if (multiplier == 0) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s cannot divide by a zero multiplier %s error %d \n", a->name, self->multiplier, ret); + grib_context_log(a->context, GRIB_LOG_ERROR, "Accessor %s: cannot divide by a zero multiplier %s", + a->name, self->multiplier); return GRIB_ENCODING_ERROR; } @@ -271,17 +225,13 @@ static int is_missing(grib_accessor* a) if (!av) return GRIB_NOT_FOUND; return grib_is_missing_internal(av); -#if 0 - int ret=0; - long value=0; - - if((ret = grib_get_long_internal(grib_handle_of_accessor(a),self->value, &value))!= GRIB_SUCCESS){ - grib_context_log(a->context, GRIB_LOG_ERROR, - "Accessor %s cannot gather value for %s error %d \n", a->name, - self->value, ret); - return 0; - } - - return (value == GRIB_MISSING_LONG); -#endif + // int ret=0; + // long value=0; + // if((ret = grib_get_long_internal(grib_handle_of_accessor(a),self->value, &value))!= GRIB_SUCCESS){ + // grib_context_log(a->context, GRIB_LOG_ERROR, + // "Accessor %s cannot gather value for %s error %d \n", a->name, + // self->value, ret); + // return 0; + // } + // return (value == GRIB_MISSING_LONG); } diff --git a/src/grib_accessor_class_scale_values.cc b/src/grib_accessor_class_scale_values.cc index 1f62cd902..bae505f23 100644 --- a/src/grib_accessor_class_scale_values.cc +++ b/src/grib_accessor_class_scale_values.cc @@ -39,7 +39,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_double(grib_accessor*, const double* val, size_t* len); static int unpack_double(grib_accessor*, double* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_scale_values { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_scale_values = { "scale_values", /* name */ sizeof(grib_accessor_scale_values), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_scale_values = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,46 +103,6 @@ static grib_accessor_class _grib_accessor_class_scale_values = { grib_accessor_class* grib_accessor_class_scale_values = &_grib_accessor_class_scale_values; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* args) diff --git a/src/grib_accessor_class_second_order_bits_per_value.cc b/src/grib_accessor_class_second_order_bits_per_value.cc index 5cd3b970c..74c4b4c05 100644 --- a/src/grib_accessor_class_second_order_bits_per_value.cc +++ b/src/grib_accessor_class_second_order_bits_per_value.cc @@ -12,6 +12,7 @@ * Enrico Fucile **********************************/ +#include "grib_scaling.h" #include "grib_api_internal.h" /* This is used by make_class.pl @@ -42,7 +43,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_second_order_bits_per_value { @@ -63,32 +63,32 @@ static grib_accessor_class _grib_accessor_class_second_order_bits_per_value = { "second_order_bits_per_value", /* name */ sizeof(grib_accessor_second_order_bits_per_value), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -97,10 +97,10 @@ static grib_accessor_class _grib_accessor_class_second_order_bits_per_value = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -109,58 +109,8 @@ static grib_accessor_class _grib_accessor_class_second_order_bits_per_value = { grib_accessor_class* grib_accessor_class_second_order_bits_per_value = &_grib_accessor_class_second_order_bits_per_value; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ -/* -static const size_t nbits[32]={ - 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, - 0x40, 0x80, 0x100, 0x200, 0x400, 0x800, - 0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x20000, - 0x40000, 0x80000, 0x100000, 0x200000, 0x400000, 0x800000, - 0x1000000, 0x2000000, 0x4000000, 0x8000000, 0x10000000, 0x20000000, - 0x40000000, 0x80000000 -}; -*/ static const size_t nbits[64] = { 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, @@ -259,8 +209,8 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) min = values[i]; } - d = grib_power(decimalScaleFactor, 10); - b = grib_power(-binaryScaleFactor, 2); + d = codes_power(decimalScaleFactor, 10); + b = codes_power(-binaryScaleFactor, 2); /* self->bitsPerValue=(long)ceil(log((double)((max-min)*d+1))/log(2.0))-binaryScaleFactor; */ /* See GRIB-540 for why we use ceil */ diff --git a/src/grib_accessor_class_section.cc b/src/grib_accessor_class_section.cc index 12abc49e8..4b29c93bd 100644 --- a/src/grib_accessor_class_section.cc +++ b/src/grib_accessor_class_section.cc @@ -42,7 +42,6 @@ static long next_offset(grib_accessor*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); static grib_accessor* next(grib_accessor*, int); @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_section = { "section", /* name */ sizeof(grib_accessor_section), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ &byte_count, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ &sub_section, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_section = { 0, /* nearest_smaller_value */ &next, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,41 +105,6 @@ static grib_accessor_class _grib_accessor_class_section = { grib_accessor_class* grib_accessor_class_section = &_grib_accessor_class_section; - -static void init_class(grib_accessor_class* c) -{ - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_offset = (*(c->super))->byte_offset; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_section_length.cc b/src/grib_accessor_class_section_length.cc index 4d51be289..4e5957e71 100644 --- a/src/grib_accessor_class_section_length.cc +++ b/src/grib_accessor_class_section_length.cc @@ -34,7 +34,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_section_length { @@ -54,32 +53,32 @@ static grib_accessor_class _grib_accessor_class_section_length = { "section_length", /* name */ sizeof(grib_accessor_section_length), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -88,10 +87,10 @@ static grib_accessor_class _grib_accessor_class_section_length = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -100,46 +99,6 @@ static grib_accessor_class _grib_accessor_class_section_length = { grib_accessor_class* grib_accessor_class_section_length = &_grib_accessor_class_section_length; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_section_padding.cc b/src/grib_accessor_class_section_padding.cc index 3d4cab230..682946df5 100644 --- a/src/grib_accessor_class_section_padding.cc +++ b/src/grib_accessor_class_section_padding.cc @@ -32,7 +32,6 @@ or edit "accessor.class" and rerun ./make_class.pl */ static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static size_t preferred_size(grib_accessor*, int); typedef struct grib_accessor_section_padding @@ -52,32 +51,32 @@ static grib_accessor_class _grib_accessor_class_section_padding = { "section_padding", /* name */ sizeof(grib_accessor_section_padding), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -86,10 +85,10 @@ static grib_accessor_class _grib_accessor_class_section_padding = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -98,47 +97,6 @@ static grib_accessor_class _grib_accessor_class_section_padding = { grib_accessor_class* grib_accessor_class_section_padding = &_grib_accessor_class_section_padding; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static size_t preferred_size(grib_accessor* a, int from_handle) diff --git a/src/grib_accessor_class_section_pointer.cc b/src/grib_accessor_class_section_pointer.cc index 687f35d73..e9b81614a 100644 --- a/src/grib_accessor_class_section_pointer.cc +++ b/src/grib_accessor_class_section_pointer.cc @@ -39,7 +39,6 @@ static int unpack_string(grib_accessor*, char*, size_t* len); static long byte_count(grib_accessor*); static long byte_offset(grib_accessor*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_section_pointer { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_section_pointer = { "section_pointer", /* name */ sizeof(grib_accessor_section_pointer), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ &byte_count, /* get number of bytes */ &byte_offset, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_section_pointer = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,44 +103,6 @@ static grib_accessor_class _grib_accessor_class_section_pointer = { grib_accessor_class* grib_accessor_class_section_pointer = &_grib_accessor_class_section_pointer; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_select_step_template.cc b/src/grib_accessor_class_select_step_template.cc index a3ddb88fe..7a0e76c23 100644 --- a/src/grib_accessor_class_select_step_template.cc +++ b/src/grib_accessor_class_select_step_template.cc @@ -38,7 +38,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_select_step_template { @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_select_step_template = { "select_step_template", /* name */ sizeof(grib_accessor_select_step_template), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_select_step_template = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,45 +105,6 @@ static grib_accessor_class _grib_accessor_class_select_step_template = { grib_accessor_class* grib_accessor_class_select_step_template = &_grib_accessor_class_select_step_template; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_sexagesimal2decimal.cc b/src/grib_accessor_class_sexagesimal2decimal.cc index 31683d2ed..9e132d9c2 100644 --- a/src/grib_accessor_class_sexagesimal2decimal.cc +++ b/src/grib_accessor_class_sexagesimal2decimal.cc @@ -39,7 +39,6 @@ static int get_native_type(grib_accessor*); static int unpack_string(grib_accessor*, char*, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_sexagesimal2decimal { @@ -60,32 +59,32 @@ static grib_accessor_class _grib_accessor_class_sexagesimal2decimal = { "sexagesimal2decimal", /* name */ sizeof(grib_accessor_sexagesimal2decimal), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -94,10 +93,10 @@ static grib_accessor_class _grib_accessor_class_sexagesimal2decimal = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -106,45 +105,6 @@ static grib_accessor_class _grib_accessor_class_sexagesimal2decimal = { grib_accessor_class* grib_accessor_class_sexagesimal2decimal = &_grib_accessor_class_sexagesimal2decimal; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_signed.cc b/src/grib_accessor_class_signed.cc index 6c5606be0..3439934e1 100644 --- a/src/grib_accessor_class_signed.cc +++ b/src/grib_accessor_class_signed.cc @@ -48,7 +48,6 @@ static long next_offset(grib_accessor*); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); typedef struct grib_accessor_signed @@ -68,32 +67,32 @@ static grib_accessor_class _grib_accessor_class_signed = { "signed", /* name */ sizeof(grib_accessor_signed), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ &byte_count, /* get number of bytes */ &byte_offset, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - &is_missing, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + &is_missing, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -102,10 +101,10 @@ static grib_accessor_class _grib_accessor_class_signed = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -114,39 +113,6 @@ static grib_accessor_class _grib_accessor_class_signed = { grib_accessor_class* grib_accessor_class_signed = &_grib_accessor_class_signed; - -static void init_class(grib_accessor_class* c) -{ - c->string_length = (*(c->super))->string_length; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) @@ -237,7 +203,7 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) rlen = count; if (*len < 1) { - grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size for %s it contains %d values ", a->name, 1); + grib_context_log(a->context, GRIB_LOG_ERROR, "Wrong size for %s, it contains %d values", a->name, 1); len[0] = 0; return GRIB_ARRAY_TOO_SMALL; } @@ -249,9 +215,22 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len) if (rlen == 1) { long v = val[0]; - if (missing) + if (missing) { if (v == GRIB_MISSING_LONG) v = missing; + } else { + // ECC-1605: Check overflow/underflow + const int nbits = self->nbytes * 8; + const long minval = -(1L << (nbits-1)) + 1; + const long maxval = (1L << (nbits-1)) - 1; + //printf(" key=%s: v=%ld (minval=%ld maxval=%ld)\n", a->name, v, minval, maxval); + if (v > maxval || v < minval) { + grib_context_log(a->context, GRIB_LOG_ERROR, + "Key \"%s\": Trying to encode value of %ld but the allowable range is %ld to %ld (number of bits=%d)", + a->name, v, minval, maxval, nbits); + return GRIB_ENCODING_ERROR; + } + } off = a->offset; ret = grib_encode_signed_long(grib_handle_of_accessor(a)->buffer->data, v, off, a->length); diff --git a/src/grib_accessor_class_signed_bits.cc b/src/grib_accessor_class_signed_bits.cc index de9aab6fe..7082f827e 100644 --- a/src/grib_accessor_class_signed_bits.cc +++ b/src/grib_accessor_class_signed_bits.cc @@ -47,7 +47,6 @@ static long next_offset(grib_accessor*); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); typedef struct grib_accessor_signed_bits @@ -67,32 +66,32 @@ static grib_accessor_class _grib_accessor_class_signed_bits = { "signed_bits", /* name */ sizeof(grib_accessor_signed_bits), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ &byte_count, /* get number of bytes */ &byte_offset, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -101,10 +100,10 @@ static grib_accessor_class _grib_accessor_class_signed_bits = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -113,40 +112,6 @@ static grib_accessor_class _grib_accessor_class_signed_bits = { grib_accessor_class* grib_accessor_class_signed_bits = &_grib_accessor_class_signed_bits; - -static void init_class(grib_accessor_class* c) -{ - c->string_length = (*(c->super))->string_length; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static long byte_count(grib_accessor* a) diff --git a/src/grib_accessor_class_simple_packing_error.cc b/src/grib_accessor_class_simple_packing_error.cc index 54ee2d426..3f5038a78 100644 --- a/src/grib_accessor_class_simple_packing_error.cc +++ b/src/grib_accessor_class_simple_packing_error.cc @@ -13,6 +13,7 @@ **************************************/ +#include "grib_scaling.h" #include "grib_api_internal.h" /* This is used by make_class.pl @@ -43,7 +44,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_double(grib_accessor*, double* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_simple_packing_error { @@ -65,32 +65,32 @@ static grib_accessor_class _grib_accessor_class_simple_packing_error = { "simple_packing_error", /* name */ sizeof(grib_accessor_simple_packing_error), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -99,10 +99,10 @@ static grib_accessor_class _grib_accessor_class_simple_packing_error = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -111,47 +111,6 @@ static grib_accessor_class _grib_accessor_class_simple_packing_error = { grib_accessor_class* grib_accessor_class_simple_packing_error = &_grib_accessor_class_simple_packing_error; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -201,7 +160,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len) Assert(1 == 0); if (bitsPerValue != 0) - *val = (*val + grib_power(binaryScaleFactor, 2)) * grib_power(-decimalScaleFactor, 10) * 0.5; + *val = (*val + codes_power(binaryScaleFactor, 2)) * codes_power(-decimalScaleFactor, 10) * 0.5; if (ret == GRIB_SUCCESS) *len = 1; diff --git a/src/grib_accessor_class_size.cc b/src/grib_accessor_class_size.cc index e6b305414..410cec3c3 100644 --- a/src/grib_accessor_class_size.cc +++ b/src/grib_accessor_class_size.cc @@ -33,7 +33,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_size { @@ -51,32 +50,32 @@ static grib_accessor_class _grib_accessor_class_size = { "size", /* name */ sizeof(grib_accessor_size), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -85,10 +84,10 @@ static grib_accessor_class _grib_accessor_class_size = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -97,47 +96,6 @@ static grib_accessor_class _grib_accessor_class_size = { grib_accessor_class* grib_accessor_class_size = &_grib_accessor_class_size; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_smart_table.cc b/src/grib_accessor_class_smart_table.cc index 6291f6eb0..f9fda189d 100644 --- a/src/grib_accessor_class_smart_table.cc +++ b/src/grib_accessor_class_smart_table.cc @@ -13,7 +13,7 @@ ****************************************/ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -55,7 +55,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_smart_table { @@ -86,32 +85,32 @@ static grib_accessor_class _grib_accessor_class_smart_table = { "smart_table", /* name */ sizeof(grib_accessor_smart_table), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -120,10 +119,10 @@ static grib_accessor_class _grib_accessor_class_smart_table = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -132,43 +131,6 @@ static grib_accessor_class _grib_accessor_class_smart_table = { grib_accessor_class* grib_accessor_class_smart_table = &_grib_accessor_class_smart_table; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ #if GRIB_PTHREADS @@ -337,10 +299,10 @@ static int grib_load_smart_table(grib_context* c, const char* filename, t->recomposed_name[0] = grib_context_strdup_persistent(c, recomposed_name); t->next = c->smart_table; t->numberOfEntries = size; - GRIB_MUTEX_INIT_ONCE(&once, &thread_init) - GRIB_MUTEX_LOCK(&mutex) + GRIB_MUTEX_INIT_ONCE(&once, &thread_init); + GRIB_MUTEX_LOCK(&mutex); c->smart_table = t; - GRIB_MUTEX_UNLOCK(&mutex) + GRIB_MUTEX_UNLOCK(&mutex); } else if (t->filename[1] == NULL) { t->filename[1] = grib_context_strdup_persistent(c, filename); @@ -382,13 +344,13 @@ static int grib_load_smart_table(grib_context* c, const char* filename, numberOfColumns = 0; /* The highest possible descriptor code must fit into t->numberOfEntries */ - DebugAssert(code < t->numberOfEntries); + DEBUG_ASSERT(code < t->numberOfEntries); while (*s) { char* tcol = t->entries[code].column[numberOfColumns]; if ( tcol ) grib_context_free_persistent(c, tcol); t->entries[code].column[numberOfColumns] = grib_context_strdup_persistent(c, s); numberOfColumns++; - DebugAssert(numberOfColumns < MAX_SMART_TABLE_COLUMNS); + DEBUG_ASSERT(numberOfColumns < MAX_SMART_TABLE_COLUMNS); p++; s = p; diff --git a/src/grib_accessor_class_smart_table_column.cc b/src/grib_accessor_class_smart_table_column.cc index 2c307240b..11ff964d3 100644 --- a/src/grib_accessor_class_smart_table_column.cc +++ b/src/grib_accessor_class_smart_table_column.cc @@ -41,7 +41,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_smart_table_column { @@ -59,32 +58,32 @@ static grib_accessor_class _grib_accessor_class_smart_table_column = { "smart_table_column", /* name */ sizeof(grib_accessor_smart_table_column), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - &unpack_string_array, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + &unpack_string_array, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -93,10 +92,10 @@ static grib_accessor_class _grib_accessor_class_smart_table_column = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -105,43 +104,6 @@ static grib_accessor_class _grib_accessor_class_smart_table_column = { grib_accessor_class* grib_accessor_class_smart_table_column = &_grib_accessor_class_smart_table_column; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ typedef struct grib_accessor_smart_table diff --git a/src/grib_accessor_class_spd.cc b/src/grib_accessor_class_spd.cc index 06b8d0e66..22fa03dc5 100644 --- a/src/grib_accessor_class_spd.cc +++ b/src/grib_accessor_class_spd.cc @@ -47,7 +47,6 @@ static long next_offset(grib_accessor*); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); typedef struct grib_accessor_spd @@ -67,32 +66,32 @@ static grib_accessor_class _grib_accessor_class_spd = { "spd", /* name */ sizeof(grib_accessor_spd), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ &byte_count, /* get number of bytes */ &byte_offset, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -101,10 +100,10 @@ static grib_accessor_class _grib_accessor_class_spd = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -113,40 +112,6 @@ static grib_accessor_class _grib_accessor_class_spd = { grib_accessor_class* grib_accessor_class_spd = &_grib_accessor_class_spd; - -static void init_class(grib_accessor_class* c) -{ - c->string_length = (*(c->super))->string_length; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static long byte_count(grib_accessor* a) diff --git a/src/grib_accessor_class_spectral_truncation.cc b/src/grib_accessor_class_spectral_truncation.cc index 98c4f30ae..6cc902fa7 100644 --- a/src/grib_accessor_class_spectral_truncation.cc +++ b/src/grib_accessor_class_spectral_truncation.cc @@ -42,7 +42,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_spectral_truncation { @@ -63,32 +62,32 @@ static grib_accessor_class _grib_accessor_class_spectral_truncation = { "spectral_truncation", /* name */ sizeof(grib_accessor_spectral_truncation), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -97,10 +96,10 @@ static grib_accessor_class _grib_accessor_class_spectral_truncation = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -109,47 +108,6 @@ static grib_accessor_class _grib_accessor_class_spectral_truncation = { grib_accessor_class* grib_accessor_class_spectral_truncation = &_grib_accessor_class_spectral_truncation; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_sprintf.cc b/src/grib_accessor_class_sprintf.cc index 4b39122e0..fe4a6ccd4 100644 --- a/src/grib_accessor_class_sprintf.cc +++ b/src/grib_accessor_class_sprintf.cc @@ -37,7 +37,6 @@ static int unpack_string(grib_accessor*, char*, size_t* len); static size_t string_length(grib_accessor*); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_sprintf { @@ -55,32 +54,32 @@ static grib_accessor_class _grib_accessor_class_sprintf = { "sprintf", /* name */ sizeof(grib_accessor_sprintf), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -89,10 +88,10 @@ static grib_accessor_class _grib_accessor_class_sprintf = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -101,44 +100,6 @@ static grib_accessor_class _grib_accessor_class_sprintf = { grib_accessor_class* grib_accessor_class_sprintf = &_grib_accessor_class_sprintf; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_statistics.cc b/src/grib_accessor_class_statistics.cc index 0669ed7b2..a041414ee 100644 --- a/src/grib_accessor_class_statistics.cc +++ b/src/grib_accessor_class_statistics.cc @@ -45,7 +45,6 @@ static int unpack_string(grib_accessor*, char*, size_t* len); static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_statistics @@ -68,32 +67,32 @@ static grib_accessor_class _grib_accessor_class_statistics = { "statistics", /* name */ sizeof(grib_accessor_statistics), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -102,10 +101,10 @@ static grib_accessor_class _grib_accessor_class_statistics = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -114,44 +113,6 @@ static grib_accessor_class _grib_accessor_class_statistics = { grib_accessor_class* grib_accessor_class_statistics = &_grib_accessor_class_statistics; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_statistics_spectral.cc b/src/grib_accessor_class_statistics_spectral.cc index 0d4b47d94..f545df07e 100644 --- a/src/grib_accessor_class_statistics_spectral.cc +++ b/src/grib_accessor_class_statistics_spectral.cc @@ -46,7 +46,6 @@ static int unpack_double(grib_accessor*, double* val, size_t* len); static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_statistics_spectral @@ -72,32 +71,32 @@ static grib_accessor_class _grib_accessor_class_statistics_spectral = { "statistics_spectral", /* name */ sizeof(grib_accessor_statistics_spectral), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -106,10 +105,10 @@ static grib_accessor_class _grib_accessor_class_statistics_spectral = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -118,45 +117,6 @@ static grib_accessor_class _grib_accessor_class_statistics_spectral = { grib_accessor_class* grib_accessor_class_statistics_spectral = &_grib_accessor_class_statistics_spectral; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_step_human_readable.cc b/src/grib_accessor_class_step_human_readable.cc index eefa3f902..1e62e044d 100644 --- a/src/grib_accessor_class_step_human_readable.cc +++ b/src/grib_accessor_class_step_human_readable.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int unpack_string(grib_accessor*, char*, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_step_human_readable { @@ -54,32 +53,32 @@ static grib_accessor_class _grib_accessor_class_step_human_readable = { "step_human_readable", /* name */ sizeof(grib_accessor_step_human_readable), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -88,10 +87,10 @@ static grib_accessor_class _grib_accessor_class_step_human_readable = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -100,46 +99,6 @@ static grib_accessor_class _grib_accessor_class_step_human_readable = { grib_accessor_class* grib_accessor_class_step_human_readable = &_grib_accessor_class_step_human_readable; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* params) diff --git a/src/grib_accessor_class_step_in_units.cc b/src/grib_accessor_class_step_in_units.cc index ce1cbcdba..acf570c19 100644 --- a/src/grib_accessor_class_step_in_units.cc +++ b/src/grib_accessor_class_step_in_units.cc @@ -41,7 +41,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_step_in_units { @@ -63,32 +62,32 @@ static grib_accessor_class _grib_accessor_class_step_in_units = { "step_in_units", /* name */ sizeof(grib_accessor_step_in_units), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -97,10 +96,10 @@ static grib_accessor_class _grib_accessor_class_step_in_units = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -109,45 +108,6 @@ static grib_accessor_class _grib_accessor_class_step_in_units = { grib_accessor_class* grib_accessor_class_step_in_units = &_grib_accessor_class_step_in_units; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_sum.cc b/src/grib_accessor_class_sum.cc index db7d3843a..4d964fc0c 100644 --- a/src/grib_accessor_class_sum.cc +++ b/src/grib_accessor_class_sum.cc @@ -43,7 +43,6 @@ static int unpack_double(grib_accessor*, double* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_sum { @@ -61,32 +60,32 @@ static grib_accessor_class _grib_accessor_class_sum = { "sum", /* name */ sizeof(grib_accessor_sum), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -95,10 +94,10 @@ static grib_accessor_class _grib_accessor_class_sum = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -107,45 +106,6 @@ static grib_accessor_class _grib_accessor_class_sum = { grib_accessor_class* grib_accessor_class_sum = &_grib_accessor_class_sum; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_suppressed.cc b/src/grib_accessor_class_suppressed.cc index 64d9657bb..13a173f40 100644 --- a/src/grib_accessor_class_suppressed.cc +++ b/src/grib_accessor_class_suppressed.cc @@ -44,7 +44,6 @@ static int unpack_long(grib_accessor*, long* val, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_suppressed { @@ -62,32 +61,32 @@ static grib_accessor_class _grib_accessor_class_suppressed = { "suppressed", /* name */ sizeof(grib_accessor_suppressed), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -96,10 +95,10 @@ static grib_accessor_class _grib_accessor_class_suppressed = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -108,40 +107,6 @@ static grib_accessor_class _grib_accessor_class_suppressed = { grib_accessor_class* grib_accessor_class_suppressed = &_grib_accessor_class_suppressed; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_time.cc b/src/grib_accessor_class_time.cc index 1bdfdec7b..e993bc734 100644 --- a/src/grib_accessor_class_time.cc +++ b/src/grib_accessor_class_time.cc @@ -41,7 +41,6 @@ static int unpack_long(grib_accessor*, long* val, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_time { @@ -61,32 +60,32 @@ static grib_accessor_class _grib_accessor_class_time = { "time", /* name */ sizeof(grib_accessor_time), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -95,10 +94,10 @@ static grib_accessor_class _grib_accessor_class_time = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -107,44 +106,6 @@ static grib_accessor_class _grib_accessor_class_time = { grib_accessor_class* grib_accessor_class_time = &_grib_accessor_class_time; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) @@ -182,7 +143,7 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len) /* We ignore the 'seconds' in our time calculation! */ if (second != 0) { grib_context_log(a->context, GRIB_LOG_ERROR, - "Truncating time: non-zero seconds(%ld) ignored", second); + "Key %s (unpack_long): Truncating time: non-zero seconds(%ld) ignored", a->name, second); } if (*len < 1) @@ -236,7 +197,7 @@ static int unpack_string(grib_accessor* a, char* val, size_t* len) unpack_long(a, &v, &lsize); if (*len < 5) { - grib_context_log(a->context, GRIB_LOG_ERROR, "grib_accessor_time : unpack_string : Buffer too small for %s", a->name); + grib_context_log(a->context, GRIB_LOG_ERROR, "Key %s (unpack_string): Buffer too small", a->name); *len = 5; return GRIB_BUFFER_TOO_SMALL; diff --git a/src/grib_accessor_class_times.cc b/src/grib_accessor_class_times.cc index b0b27baf6..8817de8c1 100644 --- a/src/grib_accessor_class_times.cc +++ b/src/grib_accessor_class_times.cc @@ -38,7 +38,6 @@ static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); static int value_count(grib_accessor*, long*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_times { @@ -61,32 +60,32 @@ static grib_accessor_class _grib_accessor_class_times = { "times", /* name */ sizeof(grib_accessor_times), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -95,10 +94,10 @@ static grib_accessor_class _grib_accessor_class_times = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -107,45 +106,6 @@ static grib_accessor_class _grib_accessor_class_times = { grib_accessor_class* grib_accessor_class_times = &_grib_accessor_class_times; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* c) diff --git a/src/grib_accessor_class_to_double.cc b/src/grib_accessor_class_to_double.cc index 0110b5cc1..3afbf5955 100644 --- a/src/grib_accessor_class_to_double.cc +++ b/src/grib_accessor_class_to_double.cc @@ -22,7 +22,7 @@ IMPLEMENTS = unpack_long;pack_long IMPLEMENTS = unpack_double;pack_double IMPLEMENTS = init;dump;string_length - IMPLEMENTS = post_init;value_count + IMPLEMENTS = value_count IMPLEMENTS = next_offset IMPLEMENTS = get_native_type IMPLEMENTS = compare @@ -56,8 +56,6 @@ static long next_offset(grib_accessor*); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void post_init(grib_accessor*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_to_double @@ -78,32 +76,32 @@ static grib_accessor_class _grib_accessor_class_to_double = { "to_double", /* name */ sizeof(grib_accessor_to_double), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ - &post_init, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + 0, /* post_init */ + 0, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -112,10 +110,10 @@ static grib_accessor_class _grib_accessor_class_to_double = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -124,36 +122,6 @@ static grib_accessor_class _grib_accessor_class_to_double = { grib_accessor_class* grib_accessor_class_to_double = &_grib_accessor_class_to_double; - -static void init_class(grib_accessor_class* c) -{ - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) @@ -171,11 +139,6 @@ static void init(grib_accessor* a, const long len, grib_arguments* arg) a->length = 0; } -static void post_init(grib_accessor* a) -{ - return; -} - static int value_count(grib_accessor* a, long* count) { grib_accessor_to_double* self = (grib_accessor_to_double*)a; diff --git a/src/grib_accessor_class_to_integer.cc b/src/grib_accessor_class_to_integer.cc index 7d74b40f8..7e930bf82 100644 --- a/src/grib_accessor_class_to_integer.cc +++ b/src/grib_accessor_class_to_integer.cc @@ -56,7 +56,6 @@ static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); static void post_init(grib_accessor*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_to_integer @@ -76,32 +75,32 @@ static grib_accessor_class _grib_accessor_class_to_integer = { "to_integer", /* name */ sizeof(grib_accessor_to_integer), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ &post_init, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -110,10 +109,10 @@ static grib_accessor_class _grib_accessor_class_to_integer = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -122,36 +121,6 @@ static grib_accessor_class _grib_accessor_class_to_integer = { grib_accessor_class* grib_accessor_class_to_integer = &_grib_accessor_class_to_integer; - -static void init_class(grib_accessor_class* c) -{ - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_to_string.cc b/src/grib_accessor_class_to_string.cc index b7f9f05ca..3daf8ca8f 100644 --- a/src/grib_accessor_class_to_string.cc +++ b/src/grib_accessor_class_to_string.cc @@ -56,7 +56,6 @@ static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); static void post_init(grib_accessor*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_to_string @@ -76,32 +75,32 @@ static grib_accessor_class _grib_accessor_class_to_string = { "to_string", /* name */ sizeof(grib_accessor_to_string), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ &post_init, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -110,10 +109,10 @@ static grib_accessor_class _grib_accessor_class_to_string = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -122,36 +121,6 @@ static grib_accessor_class _grib_accessor_class_to_string = { grib_accessor_class* grib_accessor_class_to_string = &_grib_accessor_class_to_string; - -static void init_class(grib_accessor_class* c) -{ - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_class_transient.cc b/src/grib_accessor_class_transient.cc index 158351e31..3e998adcb 100644 --- a/src/grib_accessor_class_transient.cc +++ b/src/grib_accessor_class_transient.cc @@ -30,7 +30,6 @@ or edit "accessor.class" and rerun ./make_class.pl */ -static void init_class(grib_accessor_class*); typedef struct grib_accessor_transient { @@ -51,32 +50,32 @@ static grib_accessor_class _grib_accessor_class_transient = { "transient", /* name */ sizeof(grib_accessor_transient), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -85,10 +84,10 @@ static grib_accessor_class _grib_accessor_class_transient = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -97,46 +96,4 @@ static grib_accessor_class _grib_accessor_class_transient = { grib_accessor_class* grib_accessor_class_transient = &_grib_accessor_class_transient; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_transient_darray.cc b/src/grib_accessor_class_transient_darray.cc index 19fec9f56..9a316459b 100644 --- a/src/grib_accessor_class_transient_darray.cc +++ b/src/grib_accessor_class_transient_darray.cc @@ -45,7 +45,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); typedef struct grib_accessor_transient_darray @@ -64,32 +63,32 @@ static grib_accessor_class _grib_accessor_class_transient_darray = { "transient_darray", /* name */ sizeof(grib_accessor_transient_darray), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -98,10 +97,10 @@ static grib_accessor_class _grib_accessor_class_transient_darray = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -110,40 +109,6 @@ static grib_accessor_class _grib_accessor_class_transient_darray = { grib_accessor_class* grib_accessor_class_transient_darray = &_grib_accessor_class_transient_darray; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long length, grib_arguments* args) diff --git a/src/grib_accessor_class_trim.cc b/src/grib_accessor_class_trim.cc index 86b18376f..21948ab82 100644 --- a/src/grib_accessor_class_trim.cc +++ b/src/grib_accessor_class_trim.cc @@ -38,7 +38,6 @@ static int pack_string(grib_accessor*, const char*, size_t* len); static int unpack_string(grib_accessor*, char*, size_t* len); static size_t string_length(grib_accessor*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_trim { @@ -58,32 +57,32 @@ static grib_accessor_class _grib_accessor_class_trim = { "trim", /* name */ sizeof(grib_accessor_trim), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -92,10 +91,10 @@ static grib_accessor_class _grib_accessor_class_trim = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -104,45 +103,6 @@ static grib_accessor_class _grib_accessor_class_trim = { grib_accessor_class* grib_accessor_class_trim = &_grib_accessor_class_trim; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long l, grib_arguments* arg) @@ -154,8 +114,8 @@ static void init(grib_accessor* a, const long l, grib_arguments* arg) self->input = grib_arguments_get_name(h, arg, n++); self->trim_left = grib_arguments_get_long(h, arg, n++); self->trim_right= grib_arguments_get_long(h, arg, n++); - DebugAssert(self->trim_left == 0 || self->trim_left == 1); - DebugAssert(self->trim_right == 0 || self->trim_right == 1); + DEBUG_ASSERT(self->trim_left == 0 || self->trim_left == 1); + DEBUG_ASSERT(self->trim_right == 0 || self->trim_right == 1); } static int unpack_string(grib_accessor* a, char* val, size_t* len) diff --git a/src/grib_accessor_class_uint16.cc b/src/grib_accessor_class_uint16.cc index cbf1eba05..8977e92be 100644 --- a/src/grib_accessor_class_uint16.cc +++ b/src/grib_accessor_class_uint16.cc @@ -34,7 +34,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_uint16 { @@ -50,32 +49,32 @@ static grib_accessor_class _grib_accessor_class_uint16 = { "uint16", /* name */ sizeof(grib_accessor_uint16), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -84,10 +83,10 @@ static grib_accessor_class _grib_accessor_class_uint16 = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -96,46 +95,6 @@ static grib_accessor_class _grib_accessor_class_uint16 = { grib_accessor_class* grib_accessor_class_uint16 = &_grib_accessor_class_uint16; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_uint16_little_endian.cc b/src/grib_accessor_class_uint16_little_endian.cc index 42cc1ed6c..e75a76c55 100644 --- a/src/grib_accessor_class_uint16_little_endian.cc +++ b/src/grib_accessor_class_uint16_little_endian.cc @@ -34,7 +34,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_uint16_little_endian { @@ -50,32 +49,32 @@ static grib_accessor_class _grib_accessor_class_uint16_little_endian = { "uint16_little_endian", /* name */ sizeof(grib_accessor_uint16_little_endian), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -84,10 +83,10 @@ static grib_accessor_class _grib_accessor_class_uint16_little_endian = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -96,46 +95,6 @@ static grib_accessor_class _grib_accessor_class_uint16_little_endian = { grib_accessor_class* grib_accessor_class_uint16_little_endian = &_grib_accessor_class_uint16_little_endian; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_uint32.cc b/src/grib_accessor_class_uint32.cc index c29a9c7f2..60e113ae0 100644 --- a/src/grib_accessor_class_uint32.cc +++ b/src/grib_accessor_class_uint32.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_uint32 { @@ -52,32 +51,32 @@ static grib_accessor_class _grib_accessor_class_uint32 = { "uint32", /* name */ sizeof(grib_accessor_uint32), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -86,10 +85,10 @@ static grib_accessor_class _grib_accessor_class_uint32 = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -98,45 +97,6 @@ static grib_accessor_class _grib_accessor_class_uint32 = { grib_accessor_class* grib_accessor_class_uint32 = &_grib_accessor_class_uint32; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_uint32_little_endian.cc b/src/grib_accessor_class_uint32_little_endian.cc index 6938f7284..79907c466 100644 --- a/src/grib_accessor_class_uint32_little_endian.cc +++ b/src/grib_accessor_class_uint32_little_endian.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_uint32_little_endian { @@ -52,32 +51,32 @@ static grib_accessor_class _grib_accessor_class_uint32_little_endian = { "uint32_little_endian", /* name */ sizeof(grib_accessor_uint32_little_endian), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -86,10 +85,10 @@ static grib_accessor_class _grib_accessor_class_uint32_little_endian = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -98,45 +97,6 @@ static grib_accessor_class _grib_accessor_class_uint32_little_endian = { grib_accessor_class* grib_accessor_class_uint32_little_endian = &_grib_accessor_class_uint32_little_endian; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_uint64.cc b/src/grib_accessor_class_uint64.cc index c2f240b29..2ffe4fc14 100644 --- a/src/grib_accessor_class_uint64.cc +++ b/src/grib_accessor_class_uint64.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_uint64 { @@ -52,32 +51,32 @@ static grib_accessor_class _grib_accessor_class_uint64 = { "uint64", /* name */ sizeof(grib_accessor_uint64), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -86,10 +85,10 @@ static grib_accessor_class _grib_accessor_class_uint64 = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -98,45 +97,6 @@ static grib_accessor_class _grib_accessor_class_uint64 = { grib_accessor_class* grib_accessor_class_uint64 = &_grib_accessor_class_uint64; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_uint64_little_endian.cc b/src/grib_accessor_class_uint64_little_endian.cc index d7aaa3aba..cd579403e 100644 --- a/src/grib_accessor_class_uint64_little_endian.cc +++ b/src/grib_accessor_class_uint64_little_endian.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_uint64_little_endian { @@ -52,32 +51,32 @@ static grib_accessor_class _grib_accessor_class_uint64_little_endian = { "uint64_little_endian", /* name */ sizeof(grib_accessor_uint64_little_endian), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -86,10 +85,10 @@ static grib_accessor_class _grib_accessor_class_uint64_little_endian = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -98,45 +97,6 @@ static grib_accessor_class _grib_accessor_class_uint64_little_endian = { grib_accessor_class* grib_accessor_class_uint64_little_endian = &_grib_accessor_class_uint64_little_endian; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_uint8.cc b/src/grib_accessor_class_uint8.cc index b9d4fc665..1c0ac0a2e 100644 --- a/src/grib_accessor_class_uint8.cc +++ b/src/grib_accessor_class_uint8.cc @@ -36,7 +36,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int get_native_type(grib_accessor*); static int pack_long(grib_accessor*, const long* val, size_t* len); static int unpack_long(grib_accessor*, long* val, size_t* len); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_uint8 { @@ -52,32 +51,32 @@ static grib_accessor_class _grib_accessor_class_uint8 = { "uint8", /* name */ sizeof(grib_accessor_uint8), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ 0, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -86,10 +85,10 @@ static grib_accessor_class _grib_accessor_class_uint8 = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -98,45 +97,6 @@ static grib_accessor_class _grib_accessor_class_uint8 = { grib_accessor_class* grib_accessor_class_uint8 = &_grib_accessor_class_uint8; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static int unpack_long(grib_accessor* a, long* val, size_t* len) diff --git a/src/grib_accessor_class_unexpanded_descriptors.cc b/src/grib_accessor_class_unexpanded_descriptors.cc index e0c31460b..b583ce5cd 100644 --- a/src/grib_accessor_class_unexpanded_descriptors.cc +++ b/src/grib_accessor_class_unexpanded_descriptors.cc @@ -45,7 +45,6 @@ static long next_offset(grib_accessor*); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); typedef struct grib_accessor_unexpanded_descriptors @@ -65,32 +64,32 @@ static grib_accessor_class _grib_accessor_class_unexpanded_descriptors = { "unexpanded_descriptors", /* name */ sizeof(grib_accessor_unexpanded_descriptors), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ &byte_offset, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -99,10 +98,10 @@ static grib_accessor_class _grib_accessor_class_unexpanded_descriptors = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -111,41 +110,6 @@ static grib_accessor_class _grib_accessor_class_unexpanded_descriptors = { grib_accessor_class* grib_accessor_class_unexpanded_descriptors = &_grib_accessor_class_unexpanded_descriptors; - -static void init_class(grib_accessor_class* c) -{ - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* args) diff --git a/src/grib_accessor_class_unpack_bufr_values.cc b/src/grib_accessor_class_unpack_bufr_values.cc index 0f02df1d6..8dfc5e4f7 100644 --- a/src/grib_accessor_class_unpack_bufr_values.cc +++ b/src/grib_accessor_class_unpack_bufr_values.cc @@ -47,7 +47,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_unpack_bufr_values { @@ -64,32 +63,32 @@ static grib_accessor_class _grib_accessor_class_unpack_bufr_values = { "unpack_bufr_values", /* name */ sizeof(grib_accessor_unpack_bufr_values), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - &unpack_string_array, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + &unpack_string_array, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -98,10 +97,10 @@ static grib_accessor_class _grib_accessor_class_unpack_bufr_values = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -110,39 +109,6 @@ static grib_accessor_class _grib_accessor_class_unpack_bufr_values = { grib_accessor_class* grib_accessor_class_unpack_bufr_values = &_grib_accessor_class_unpack_bufr_values; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* params) @@ -206,15 +172,13 @@ static int get_native_type(grib_accessor* a) return GRIB_TYPE_LONG; } -#if 0 -static const char* mode_to_str(int p) -{ - if (p==CODES_BUFR_UNPACK_STRUCTURE) return "CODES_BUFR_UNPACK_STRUCTURE"; - if (p==CODES_BUFR_UNPACK_FLAT) return "CODES_BUFR_UNPACK_FLAT"; - if (p==CODES_BUFR_NEW_DATA) return "CODES_BUFR_NEW_DATA"; - return "unknown proc flag"; -} -#endif +// static const char* mode_to_str(int p) +// { +// if (p==CODES_BUFR_UNPACK_STRUCTURE) return "CODES_BUFR_UNPACK_STRUCTURE"; +// if (p==CODES_BUFR_UNPACK_FLAT) return "CODES_BUFR_UNPACK_FLAT"; +// if (p==CODES_BUFR_NEW_DATA) return "CODES_BUFR_NEW_DATA"; +// return "unknown proc flag"; +// } static int pack_long(grib_accessor* a, const long* val, size_t* len) { diff --git a/src/grib_accessor_class_unsigned.cc b/src/grib_accessor_class_unsigned.cc index 1ffe1c385..f1202b0d0 100644 --- a/src/grib_accessor_class_unsigned.cc +++ b/src/grib_accessor_class_unsigned.cc @@ -48,7 +48,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); typedef struct grib_accessor_unsigned @@ -68,32 +67,32 @@ static grib_accessor_class _grib_accessor_class_unsigned = { "unsigned", /* name */ sizeof(grib_accessor_unsigned), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ &byte_count, /* get number of bytes */ &byte_offset, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - &is_missing, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + &is_missing, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -102,10 +101,10 @@ static grib_accessor_class _grib_accessor_class_unsigned = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -114,39 +113,6 @@ static grib_accessor_class _grib_accessor_class_unsigned = { grib_accessor_class* grib_accessor_class_unsigned = &_grib_accessor_class_unsigned; - -static void init_class(grib_accessor_class* c) -{ - c->string_length = (*(c->super))->string_length; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) @@ -247,7 +213,7 @@ int pack_long_unsigned_helper(grib_accessor* a, const long* val, size_t* len, in if (check) { if (val[0] < 0) { grib_context_log(a->context, GRIB_LOG_ERROR, - "Key \"%s\": Trying to encode a negative value of %ld for key of type unsigned\n", a->name, val[0]); + "Key \"%s\": Trying to encode a negative value of %ld for key of type unsigned", a->name, val[0]); return GRIB_ENCODING_ERROR; } /* See GRIB-23 and GRIB-262 */ @@ -257,8 +223,8 @@ int pack_long_unsigned_helper(grib_accessor* a, const long* val, size_t* len, in unsigned long maxval = (1UL << nbits) - 1; if (maxval > 0 && v > maxval) { /* See ECC-1002 */ grib_context_log(a->context, GRIB_LOG_ERROR, - "Key \"%s\": Trying to encode value of %ld but the maximum allowable value is %ld (number of bits=%ld)\n", - a->name, v, maxval, nbits); + "Key \"%s\": Trying to encode value of %ld but the maximum allowable value is %lu (number of bits=%ld)", + a->name, v, maxval, nbits); return GRIB_ENCODING_ERROR; } } diff --git a/src/grib_accessor_class_unsigned_bits.cc b/src/grib_accessor_class_unsigned_bits.cc index d675bab7c..026d4ff67 100644 --- a/src/grib_accessor_class_unsigned_bits.cc +++ b/src/grib_accessor_class_unsigned_bits.cc @@ -47,7 +47,6 @@ static long next_offset(grib_accessor*); static int value_count(grib_accessor*, long*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); typedef struct grib_accessor_unsigned_bits @@ -67,32 +66,32 @@ static grib_accessor_class _grib_accessor_class_unsigned_bits = { "unsigned_bits", /* name */ sizeof(grib_accessor_unsigned_bits), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ 0, /* get length of string */ &value_count, /* get number of values */ &byte_count, /* get number of bytes */ &byte_offset, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -101,10 +100,10 @@ static grib_accessor_class _grib_accessor_class_unsigned_bits = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -113,40 +112,6 @@ static grib_accessor_class _grib_accessor_class_unsigned_bits = { grib_accessor_class* grib_accessor_class_unsigned_bits = &_grib_accessor_class_unsigned_bits; - -static void init_class(grib_accessor_class* c) -{ - c->string_length = (*(c->super))->string_length; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ diff --git a/src/grib_accessor_class_validity_date.cc b/src/grib_accessor_class_validity_date.cc index 9d8c5cab1..8182228ae 100644 --- a/src/grib_accessor_class_validity_date.cc +++ b/src/grib_accessor_class_validity_date.cc @@ -42,7 +42,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_validity_date { @@ -66,32 +65,32 @@ static grib_accessor_class _grib_accessor_class_validity_date = { "validity_date", /* name */ sizeof(grib_accessor_validity_date), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -100,10 +99,10 @@ static grib_accessor_class _grib_accessor_class_validity_date = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -112,46 +111,6 @@ static grib_accessor_class _grib_accessor_class_validity_date = { grib_accessor_class* grib_accessor_class_validity_date = &_grib_accessor_class_validity_date; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ /* Table of multipliers to convert step units to minutes */ diff --git a/src/grib_accessor_class_validity_time.cc b/src/grib_accessor_class_validity_time.cc index 64ae1a197..36af6cb98 100644 --- a/src/grib_accessor_class_validity_time.cc +++ b/src/grib_accessor_class_validity_time.cc @@ -41,7 +41,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_long(grib_accessor*, long* val, size_t* len); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_validity_time { @@ -64,32 +63,32 @@ static grib_accessor_class _grib_accessor_class_validity_time = { "validity_time", /* name */ sizeof(grib_accessor_validity_time), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + &unpack_long, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -98,10 +97,10 @@ static grib_accessor_class _grib_accessor_class_validity_time = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -110,46 +109,6 @@ static grib_accessor_class _grib_accessor_class_validity_time = { grib_accessor_class* grib_accessor_class_validity_time = &_grib_accessor_class_validity_time; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ /* Table of multipliers to convert step units to minutes */ diff --git a/src/grib_accessor_class_values.cc b/src/grib_accessor_class_values.cc index 3d5ec2818..3e69cf56e 100644 --- a/src/grib_accessor_class_values.cc +++ b/src/grib_accessor_class_values.cc @@ -51,7 +51,6 @@ static long byte_offset(grib_accessor*); static long next_offset(grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static void update_size(grib_accessor*, size_t); static int compare(grib_accessor*, grib_accessor*); @@ -74,32 +73,32 @@ static grib_accessor_class _grib_accessor_class_values = { "values", /* name */ sizeof(grib_accessor_values), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - &next_offset, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + &next_offset, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ &byte_count, /* get number of bytes */ &byte_offset, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ &update_size, /* update_size */ @@ -108,10 +107,10 @@ static grib_accessor_class _grib_accessor_class_values = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -120,40 +119,6 @@ static grib_accessor_class _grib_accessor_class_values = { grib_accessor_class* grib_accessor_class_values = &_grib_accessor_class_values; - -static void init_class(grib_accessor_class* c) -{ - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static long init_length(grib_accessor* a) { diff --git a/src/grib_accessor_class_variable.cc b/src/grib_accessor_class_variable.cc index 306578968..92d6fdd9c 100644 --- a/src/grib_accessor_class_variable.cc +++ b/src/grib_accessor_class_variable.cc @@ -52,7 +52,6 @@ static int value_count(grib_accessor*, long*); static void destroy(grib_context*, grib_accessor*); static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int compare(grib_accessor*, grib_accessor*); static grib_accessor* make_clone(grib_accessor*, grib_section*, int*); @@ -74,32 +73,32 @@ static grib_accessor_class _grib_accessor_class_variable = { "variable", /* name */ sizeof(grib_accessor_variable), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - &destroy, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + &destroy, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ &string_length, /* get length of string */ &value_count, /* get number of values */ &byte_count, /* get number of bytes */ 0, /* get offset to bytes */ &get_native_type, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - &pack_long, /* grib_pack procedures long */ - &unpack_long, /* grib_unpack procedures long */ - &pack_double, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - &pack_string, /* grib_pack procedures string */ - &unpack_string, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + &pack_long, /* pack_long */ + &unpack_long, /* unpack_long */ + &pack_double, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + &pack_string, /* pack_string */ + &unpack_string, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -108,10 +107,10 @@ static grib_accessor_class _grib_accessor_class_variable = { 0, /* nearest_smaller_value */ 0, /* next accessor */ &compare, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ &make_clone, /* clone accessor */ @@ -120,35 +119,6 @@ static grib_accessor_class _grib_accessor_class_variable = { grib_accessor_class* grib_accessor_class_variable = &_grib_accessor_class_variable; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->byte_offset = (*(c->super))->byte_offset; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; -} - /* END_CLASS_IMP */ #define MAX_VARIABLE_STRING_LENGTH 255 @@ -369,21 +339,6 @@ static long byte_count(grib_accessor* a) return a->length; } -/* NOT ANY MORE -static long byte_count(grib_accessor* a) { - grib_accessor_variable *self = (grib_accessor_variable*)a; - char buf[80]={0,}; - - if(self->type == GRIB_TYPE_STRING) { - return strlen(self->cval) +1; - } else { - snprintf(buf,64,"%g",self->dval); - printf("========> \"%s\"\n",buf); - return strlen(buf)+1; - } -} -*/ - static int compare(grib_accessor* a, grib_accessor* b) { int retval = 0; diff --git a/src/grib_accessor_class_vector.cc b/src/grib_accessor_class_vector.cc index 26b870001..1cc69a4c7 100644 --- a/src/grib_accessor_class_vector.cc +++ b/src/grib_accessor_class_vector.cc @@ -40,7 +40,6 @@ or edit "accessor.class" and rerun ./make_class.pl static int unpack_double(grib_accessor*, double* val, size_t* len); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); typedef struct grib_accessor_vector { @@ -62,32 +61,32 @@ static grib_accessor_class _grib_accessor_class_vector = { "vector", /* name */ sizeof(grib_accessor_vector), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - 0, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + 0, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - &unpack_double, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + &unpack_double, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ 0, /* notify_change */ 0, /* update_size */ @@ -96,10 +95,10 @@ static grib_accessor_class _grib_accessor_class_vector = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -108,47 +107,6 @@ static grib_accessor_class _grib_accessor_class_vector = { grib_accessor_class* grib_accessor_class_vector = &_grib_accessor_class_vector; - -static void init_class(grib_accessor_class* c) -{ - c->dump = (*(c->super))->dump; - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->notify_change = (*(c->super))->notify_change; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ typedef struct grib_accessor_abstract_vector diff --git a/src/grib_accessor_class_when.cc b/src/grib_accessor_class_when.cc index 1f2c1f57b..6717c2c4a 100644 --- a/src/grib_accessor_class_when.cc +++ b/src/grib_accessor_class_when.cc @@ -38,7 +38,6 @@ or edit "accessor.class" and rerun ./make_class.pl static void dump(grib_accessor*, grib_dumper*); static void init(grib_accessor*, const long, grib_arguments*); -static void init_class(grib_accessor_class*); static int notify_change(grib_accessor*, grib_accessor*); typedef struct grib_accessor_when @@ -55,32 +54,32 @@ static grib_accessor_class _grib_accessor_class_when = { "when", /* name */ sizeof(grib_accessor_when), /* size */ 0, /* inited */ - &init_class, /* init_class */ + 0, /* init_class */ &init, /* init */ 0, /* post_init */ - 0, /* free mem */ - &dump, /* describes himself */ - 0, /* get length of section */ + 0, /* destroy */ + &dump, /* dump */ + 0, /* next_offset */ 0, /* get length of string */ 0, /* get number of values */ 0, /* get number of bytes */ 0, /* get offset to bytes */ 0, /* get native type */ 0, /* get sub_section */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_pack procedures long */ - 0, /* grib_unpack procedures long */ - 0, /* grib_pack procedures double */ - 0, /* grib_pack procedures float */ - 0, /* grib_unpack procedures double */ - 0, /* grib_unpack procedures float */ - 0, /* grib_pack procedures string */ - 0, /* grib_unpack procedures string */ - 0, /* grib_pack array procedures string */ - 0, /* grib_unpack array procedures string */ - 0, /* grib_pack procedures bytes */ - 0, /* grib_unpack procedures bytes */ + 0, /* pack_missing */ + 0, /* is_missing */ + 0, /* pack_long */ + 0, /* unpack_long */ + 0, /* pack_double */ + 0, /* pack_float */ + 0, /* unpack_double */ + 0, /* unpack_float */ + 0, /* pack_string */ + 0, /* unpack_string */ + 0, /* pack_string_array */ + 0, /* unpack_string_array */ + 0, /* pack_bytes */ + 0, /* unpack_bytes */ 0, /* pack_expression */ ¬ify_change, /* notify_change */ 0, /* update_size */ @@ -89,10 +88,10 @@ static grib_accessor_class _grib_accessor_class_when = { 0, /* nearest_smaller_value */ 0, /* next accessor */ 0, /* compare vs. another accessor */ - 0, /* unpack only ith value */ - 0, /* unpack only ith value */ - 0, /* unpack a given set of elements */ - 0, /* unpack a given set of elements */ + 0, /* unpack only ith value (double) */ + 0, /* unpack only ith value (float) */ + 0, /* unpack a given set of elements (double) */ + 0, /* unpack a given set of elements (float) */ 0, /* unpack a subarray */ 0, /* clear */ 0, /* clone accessor */ @@ -101,46 +100,6 @@ static grib_accessor_class _grib_accessor_class_when = { grib_accessor_class* grib_accessor_class_when = &_grib_accessor_class_when; - -static void init_class(grib_accessor_class* c) -{ - c->next_offset = (*(c->super))->next_offset; - c->string_length = (*(c->super))->string_length; - c->value_count = (*(c->super))->value_count; - c->byte_count = (*(c->super))->byte_count; - c->byte_offset = (*(c->super))->byte_offset; - c->get_native_type = (*(c->super))->get_native_type; - c->sub_section = (*(c->super))->sub_section; - c->pack_missing = (*(c->super))->pack_missing; - c->is_missing = (*(c->super))->is_missing; - c->pack_long = (*(c->super))->pack_long; - c->unpack_long = (*(c->super))->unpack_long; - c->pack_double = (*(c->super))->pack_double; - c->pack_float = (*(c->super))->pack_float; - c->unpack_double = (*(c->super))->unpack_double; - c->unpack_float = (*(c->super))->unpack_float; - c->pack_string = (*(c->super))->pack_string; - c->unpack_string = (*(c->super))->unpack_string; - c->pack_string_array = (*(c->super))->pack_string_array; - c->unpack_string_array = (*(c->super))->unpack_string_array; - c->pack_bytes = (*(c->super))->pack_bytes; - c->unpack_bytes = (*(c->super))->unpack_bytes; - c->pack_expression = (*(c->super))->pack_expression; - c->update_size = (*(c->super))->update_size; - c->preferred_size = (*(c->super))->preferred_size; - c->resize = (*(c->super))->resize; - c->nearest_smaller_value = (*(c->super))->nearest_smaller_value; - c->next = (*(c->super))->next; - c->compare = (*(c->super))->compare; - c->unpack_double_element = (*(c->super))->unpack_double_element; - c->unpack_float_element = (*(c->super))->unpack_float_element; - c->unpack_double_element_set = (*(c->super))->unpack_double_element_set; - c->unpack_float_element_set = (*(c->super))->unpack_float_element_set; - c->unpack_double_subarray = (*(c->super))->unpack_double_subarray; - c->clear = (*(c->super))->clear; - c->make_clone = (*(c->super))->make_clone; -} - /* END_CLASS_IMP */ static void init(grib_accessor* a, const long len, grib_arguments* arg) diff --git a/src/grib_accessor_classes_hash.cc b/src/grib_accessor_classes_hash.cc index e4a8483d2..a27a7a7a0 100644 --- a/src/grib_accessor_classes_hash.cc +++ b/src/grib_accessor_classes_hash.cc @@ -37,12 +37,12 @@ #line 6 "accessor_class_list.gperf" struct accessor_class_hash { char *name; grib_accessor_class **cclass;}; -#define TOTAL_KEYWORDS 221 +#define TOTAL_KEYWORDS 218 #define MIN_WORD_LENGTH 1 #define MAX_WORD_LENGTH 44 #define MIN_HASH_VALUE 1 -#define MAX_HASH_VALUE 831 -/* maximum key range = 831, duplicates = 0 */ +#define MAX_HASH_VALUE 679 +/* maximum key range = 679, duplicates = 0 */ #ifdef __GNUC__ @@ -51,37 +51,36 @@ struct accessor_class_hash { char *name; grib_accessor_class **cclass;}; #endif #endif -static unsigned int -grib_accessor_classes_get_id (const char *str, size_t len) +static unsigned int grib_accessor_classes_get_id (const char *str, size_t len) { static const unsigned short asso_values[] = { - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 0, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 0, 196, - 41, 6, 25, 832, 12, 832, 0, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 1, 832, 7, 89, 154, - 0, 0, 200, 14, 198, 23, 2, 0, 112, 279, - 0, 48, 39, 832, 173, 6, 3, 76, 205, 0, - 2, 23, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832, 832, 832, 832, 832, - 832, 832, 832, 832, 832, 832 + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 0, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 0, 162, + 41, 6, 0, 680, 34, 680, 8, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 1, 680, 7, 129, 148, + 0, 0, 118, 14, 202, 23, 2, 5, 88, 254, + 0, 48, 39, 680, 86, 6, 3, 127, 212, 4, + 1, 24, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 680, 680, 680, 680, 680, 680 }; unsigned int hval = len; @@ -118,566 +117,546 @@ static const struct accessor_class_hash classes[] = #line 9 "accessor_class_list.gperf" {" "}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, -#line 158 "accessor_class_list.gperf" +#line 155 "accessor_class_list.gperf" {"nearest", &grib_accessor_class_nearest}, {""}, {""}, {""}, {""}, {""}, {""}, -#line 120 "accessor_class_list.gperf" +#line 117 "accessor_class_list.gperf" {"gen", &grib_accessor_class_gen}, {""}, {""}, -#line 121 "accessor_class_list.gperf" +#line 118 "accessor_class_list.gperf" {"getenv", &grib_accessor_class_getenv}, - {""}, -#line 86 "accessor_class_list.gperf" +#line 84 "accessor_class_list.gperf" {"expanded_descriptors", &grib_accessor_class_expanded_descriptors}, - {""}, {""}, {""}, {""}, -#line 136 "accessor_class_list.gperf" + {""}, {""}, {""}, {""}, {""}, +#line 133 "accessor_class_list.gperf" {"int8", &grib_accessor_class_int8}, - {""}, -#line 74 "accessor_class_list.gperf" +#line 131 "accessor_class_list.gperf" + {"int64", &grib_accessor_class_int64}, +#line 72 "accessor_class_list.gperf" {"data_secondary_bitmap", &grib_accessor_class_data_secondary_bitmap}, -#line 205 "accessor_class_list.gperf" +#line 202 "accessor_class_list.gperf" {"time", &grib_accessor_class_time}, -#line 71 "accessor_class_list.gperf" +#line 69 "accessor_class_list.gperf" {"data_png_packing", &grib_accessor_class_data_png_packing}, {""}, -#line 193 "accessor_class_list.gperf" +#line 190 "accessor_class_list.gperf" {"size", &grib_accessor_class_size}, -#line 183 "accessor_class_list.gperf" +#line 180 "accessor_class_list.gperf" {"second_order_bits_per_value", &grib_accessor_class_second_order_bits_per_value}, -#line 190 "accessor_class_list.gperf" +#line 187 "accessor_class_list.gperf" {"signed", &grib_accessor_class_signed}, -#line 184 "accessor_class_list.gperf" +#line 181 "accessor_class_list.gperf" {"section", &grib_accessor_class_section}, -#line 206 "accessor_class_list.gperf" +#line 203 "accessor_class_list.gperf" {"times", &grib_accessor_class_times}, -#line 72 "accessor_class_list.gperf" +#line 70 "accessor_class_list.gperf" {"data_raw_packing", &grib_accessor_class_data_raw_packing}, -#line 119 "accessor_class_list.gperf" +#line 116 "accessor_class_list.gperf" {"gds_not_present_bitmap", &grib_accessor_class_gds_not_present_bitmap}, -#line 130 "accessor_class_list.gperf" - {"int16", &grib_accessor_class_int16}, -#line 14 "accessor_class_list.gperf" + {""}, +#line 13 "accessor_class_list.gperf" {"ascii", &grib_accessor_class_ascii}, {""}, -#line 185 "accessor_class_list.gperf" +#line 182 "accessor_class_list.gperf" {"section_length", &grib_accessor_class_section_length}, -#line 186 "accessor_class_list.gperf" +#line 183 "accessor_class_list.gperf" {"section_padding", &grib_accessor_class_section_padding}, -#line 199 "accessor_class_list.gperf" +#line 196 "accessor_class_list.gperf" {"statistics", &grib_accessor_class_statistics}, -#line 202 "accessor_class_list.gperf" +#line 199 "accessor_class_list.gperf" {"step_in_units", &grib_accessor_class_step_in_units}, -#line 191 "accessor_class_list.gperf" +#line 188 "accessor_class_list.gperf" {"signed_bits", &grib_accessor_class_signed_bits}, -#line 196 "accessor_class_list.gperf" +#line 193 "accessor_class_list.gperf" {"spd", &grib_accessor_class_spd}, -#line 170 "accessor_class_list.gperf" +#line 167 "accessor_class_list.gperf" {"pad", &grib_accessor_class_pad}, -#line 78 "accessor_class_list.gperf" +#line 76 "accessor_class_list.gperf" {"data_simple_packing", &grib_accessor_class_data_simple_packing}, -#line 81 "accessor_class_list.gperf" - {"dirty", &grib_accessor_class_dirty}, - {""}, -#line 134 "accessor_class_list.gperf" - {"int64", &grib_accessor_class_int64}, {""}, -#line 200 "accessor_class_list.gperf" +#line 79 "accessor_class_list.gperf" + {"dirty", &grib_accessor_class_dirty}, + {""}, {""}, +#line 197 "accessor_class_list.gperf" {"statistics_spectral", &grib_accessor_class_statistics_spectral}, -#line 80 "accessor_class_list.gperf" +#line 78 "accessor_class_list.gperf" {"dictionary", &grib_accessor_class_dictionary}, {""}, -#line 118 "accessor_class_list.gperf" +#line 115 "accessor_class_list.gperf" {"gds_is_present", &grib_accessor_class_gds_is_present}, {""}, -#line 115 "accessor_class_list.gperf" +#line 112 "accessor_class_list.gperf" {"g2lon", &grib_accessor_class_g2lon}, -#line 208 "accessor_class_list.gperf" +#line 205 "accessor_class_list.gperf" {"to_integer", &grib_accessor_class_to_integer}, - {""}, {""}, -#line 110 "accessor_class_list.gperf" +#line 127 "accessor_class_list.gperf" + {"int16", &grib_accessor_class_int16}, + {""}, +#line 107 "accessor_class_list.gperf" {"g2date", &grib_accessor_class_g2date}, -#line 48 "accessor_class_list.gperf" +#line 46 "accessor_class_list.gperf" {"data_apply_bitmap", &grib_accessor_class_data_apply_bitmap}, {""}, -#line 187 "accessor_class_list.gperf" +#line 184 "accessor_class_list.gperf" {"section_pointer", &grib_accessor_class_section_pointer}, -#line 70 "accessor_class_list.gperf" +#line 68 "accessor_class_list.gperf" {"data_jpeg2000_packing", &grib_accessor_class_data_jpeg2000_packing}, -#line 132 "accessor_class_list.gperf" +#line 129 "accessor_class_list.gperf" {"int32", &grib_accessor_class_int32}, -#line 63 "accessor_class_list.gperf" +#line 61 "accessor_class_list.gperf" {"data_g22order_packing", &grib_accessor_class_data_g22order_packing}, -#line 111 "accessor_class_list.gperf" +#line 108 "accessor_class_list.gperf" {"g2end_step", &grib_accessor_class_g2end_step}, -#line 51 "accessor_class_list.gperf" +#line 49 "accessor_class_list.gperf" {"data_apply_gdsnotpresent", &grib_accessor_class_data_apply_gdsnotpresent}, -#line 108 "accessor_class_list.gperf" +#line 105 "accessor_class_list.gperf" {"g2bitmap", &grib_accessor_class_g2bitmap}, -#line 49 "accessor_class_list.gperf" +#line 47 "accessor_class_list.gperf" {"data_apply_boustrophedonic", &grib_accessor_class_data_apply_boustrophedonic}, {""}, -#line 53 "accessor_class_list.gperf" +#line 51 "accessor_class_list.gperf" {"data_complex_packing", &grib_accessor_class_data_complex_packing}, {""}, {""}, {""}, {""}, -#line 50 "accessor_class_list.gperf" +#line 48 "accessor_class_list.gperf" {"data_apply_boustrophedonic_bitmap", &grib_accessor_class_data_apply_boustrophedonic_bitmap}, -#line 116 "accessor_class_list.gperf" +#line 113 "accessor_class_list.gperf" {"g2step_range", &grib_accessor_class_g2step_range}, {""}, -#line 112 "accessor_class_list.gperf" +#line 109 "accessor_class_list.gperf" {"g2grid", &grib_accessor_class_g2grid}, -#line 203 "accessor_class_list.gperf" - {"sum", &grib_accessor_class_sum}, -#line 209 "accessor_class_list.gperf" + {""}, +#line 206 "accessor_class_list.gperf" {"to_string", &grib_accessor_class_to_string}, {""}, {""}, -#line 137 "accessor_class_list.gperf" +#line 134 "accessor_class_list.gperf" {"iterator", &grib_accessor_class_iterator}, -#line 171 "accessor_class_list.gperf" +#line 168 "accessor_class_list.gperf" {"padding", &grib_accessor_class_padding}, - {""}, {""}, {""}, {""}, -#line 67 "accessor_class_list.gperf" + {""}, {""}, +#line 209 "accessor_class_list.gperf" + {"trim", &grib_accessor_class_trim}, + {""}, +#line 65 "accessor_class_list.gperf" {"data_g2shsimple_packing", &grib_accessor_class_data_g2shsimple_packing}, -#line 139 "accessor_class_list.gperf" - {"julian_day", &grib_accessor_class_julian_day}, -#line 138 "accessor_class_list.gperf" - {"julian_date", &grib_accessor_class_julian_date}, -#line 222 "accessor_class_list.gperf" - {"unsigned", &grib_accessor_class_unsigned}, -#line 172 "accessor_class_list.gperf" +#line 174 "accessor_class_list.gperf" + {"raw", &grib_accessor_class_raw}, + {""}, +#line 82 "accessor_class_list.gperf" + {"element", &grib_accessor_class_element}, +#line 169 "accessor_class_list.gperf" {"padto", &grib_accessor_class_padto}, -#line 106 "accessor_class_list.gperf" +#line 103 "accessor_class_list.gperf" {"g2_eps", &grib_accessor_class_g2_eps}, -#line 54 "accessor_class_list.gperf" - {"data_dummy_field", &grib_accessor_class_data_dummy_field}, - {""}, -#line 159 "accessor_class_list.gperf" + {""}, {""}, +#line 156 "accessor_class_list.gperf" {"non_alpha", &grib_accessor_class_non_alpha}, -#line 219 "accessor_class_list.gperf" - {"uint8", &grib_accessor_class_uint8}, +#line 207 "accessor_class_list.gperf" + {"transient", &grib_accessor_class_transient}, +#line 14 "accessor_class_list.gperf" + {"assert", &grib_accessor_class_assert}, {""}, -#line 201 "accessor_class_list.gperf" - {"step_human_readable", &grib_accessor_class_step_human_readable}, -#line 73 "accessor_class_list.gperf" - {"data_run_length_packing", &grib_accessor_class_data_run_length_packing}, +#line 140 "accessor_class_list.gperf" + {"latitudes", &grib_accessor_class_latitudes}, {""}, -#line 68 "accessor_class_list.gperf" +#line 66 "accessor_class_list.gperf" {"data_g2simple_packing", &grib_accessor_class_data_g2simple_packing}, -#line 65 "accessor_class_list.gperf" +#line 63 "accessor_class_list.gperf" {"data_g2complex_packing", &grib_accessor_class_data_g2complex_packing}, -#line 215 "accessor_class_list.gperf" - {"uint32", &grib_accessor_class_uint32}, +#line 208 "accessor_class_list.gperf" + {"transient_darray", &grib_accessor_class_transient_darray}, {""}, -#line 104 "accessor_class_list.gperf" +#line 101 "accessor_class_list.gperf" {"g2_aerosol", &grib_accessor_class_g2_aerosol}, -#line 113 "accessor_class_list.gperf" +#line 110 "accessor_class_list.gperf" {"g2latlon", &grib_accessor_class_g2latlon}, -#line 16 "accessor_class_list.gperf" - {"bit", &grib_accessor_class_bit}, -#line 18 "accessor_class_list.gperf" - {"bits", &grib_accessor_class_bits}, -#line 217 "accessor_class_list.gperf" - {"uint64", &grib_accessor_class_uint64}, - {""}, {""}, -#line 66 "accessor_class_list.gperf" - {"data_g2secondary_bitmap", &grib_accessor_class_data_g2secondary_bitmap}, + {""}, {""}, {""}, {""}, {""}, #line 64 "accessor_class_list.gperf" + {"data_g2secondary_bitmap", &grib_accessor_class_data_g2secondary_bitmap}, +#line 62 "accessor_class_list.gperf" {"data_g2bifourier_packing", &grib_accessor_class_data_g2bifourier_packing}, -#line 84 "accessor_class_list.gperf" - {"element", &grib_accessor_class_element}, -#line 33 "accessor_class_list.gperf" - {"bytes", &grib_accessor_class_bytes}, - {""}, -#line 17 "accessor_class_list.gperf" - {"bitmap", &grib_accessor_class_bitmap}, -#line 223 "accessor_class_list.gperf" - {"unsigned_bits", &grib_accessor_class_unsigned_bits}, - {""}, -#line 69 "accessor_class_list.gperf" - {"data_g2simple_packing_with_preprocessing", &grib_accessor_class_data_g2simple_packing_with_preprocessing}, -#line 216 "accessor_class_list.gperf" - {"uint32_little_endian", &grib_accessor_class_uint32_little_endian}, - {""}, -#line 143 "accessor_class_list.gperf" - {"latitudes", &grib_accessor_class_latitudes}, -#line 161 "accessor_class_list.gperf" - {"number_of_points", &grib_accessor_class_number_of_points}, - {""}, -#line 19 "accessor_class_list.gperf" - {"bits_per_value", &grib_accessor_class_bits_per_value}, -#line 218 "accessor_class_list.gperf" - {"uint64_little_endian", &grib_accessor_class_uint64_little_endian}, - {""}, {""}, -#line 220 "accessor_class_list.gperf" - {"unexpanded_descriptors", &grib_accessor_class_unexpanded_descriptors}, #line 12 "accessor_class_list.gperf" - {"apply_operators", &grib_accessor_class_apply_operators}, -#line 21 "accessor_class_list.gperf" - {"box", &grib_accessor_class_box}, -#line 162 "accessor_class_list.gperf" - {"number_of_points_gaussian", &grib_accessor_class_number_of_points_gaussian}, + {"array", &grib_accessor_class_array}, {""}, {""}, {""}, {""}, #line 175 "accessor_class_list.gperf" - {"position", &grib_accessor_class_position}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, -#line 122 "accessor_class_list.gperf" + {"rdbtime_guess_date", &grib_accessor_class_rdbtime_guess_date}, +#line 67 "accessor_class_list.gperf" + {"data_g2simple_packing_with_preprocessing", &grib_accessor_class_data_g2simple_packing_with_preprocessing}, + {""}, {""}, +#line 119 "accessor_class_list.gperf" {"global_gaussian", &grib_accessor_class_global_gaussian}, {""}, -#line 189 "accessor_class_list.gperf" +#line 186 "accessor_class_list.gperf" {"sexagesimal2decimal", &grib_accessor_class_sexagesimal2decimal}, -#line 142 "accessor_class_list.gperf" +#line 139 "accessor_class_list.gperf" {"laplacian", &grib_accessor_class_laplacian}, - {""}, {""}, {""}, -#line 192 "accessor_class_list.gperf" - {"simple_packing_error", &grib_accessor_class_simple_packing_error}, {""}, -#line 148 "accessor_class_list.gperf" +#line 200 "accessor_class_list.gperf" + {"sum", &grib_accessor_class_sum}, + {""}, +#line 114 "accessor_class_list.gperf" + {"gaussian_grid_name", &grib_accessor_class_gaussian_grid_name}, +#line 177 "accessor_class_list.gperf" + {"round", &grib_accessor_class_round}, +#line 145 "accessor_class_list.gperf" {"long", &grib_accessor_class_long}, -#line 181 "accessor_class_list.gperf" - {"scale", &grib_accessor_class_scale}, -#line 83 "accessor_class_list.gperf" + {""}, +#line 81 "accessor_class_list.gperf" {"double", &grib_accessor_class_double}, +#line 189 "accessor_class_list.gperf" + {"simple_packing_error", &grib_accessor_class_simple_packing_error}, +#line 120 "accessor_class_list.gperf" + {"group", &grib_accessor_class_group}, + {""}, +#line 172 "accessor_class_list.gperf" + {"position", &grib_accessor_class_position}, +#line 136 "accessor_class_list.gperf" + {"julian_day", &grib_accessor_class_julian_day}, +#line 135 "accessor_class_list.gperf" + {"julian_date", &grib_accessor_class_julian_date}, +#line 219 "accessor_class_list.gperf" + {"unsigned", &grib_accessor_class_unsigned}, {""}, {""}, -#line 82 "accessor_class_list.gperf" - {"divdouble", &grib_accessor_class_divdouble}, - {""}, {""}, {""}, -#line 107 "accessor_class_list.gperf" - {"g2_mars_labeling", &grib_accessor_class_g2_mars_labeling}, - {""}, {""}, -#line 22 "accessor_class_list.gperf" - {"budgdate", &grib_accessor_class_budgdate}, - {""}, {""}, {""}, -#line 212 "accessor_class_list.gperf" - {"trim", &grib_accessor_class_trim}, #line 52 "accessor_class_list.gperf" - {"data_ccsds_packing", &grib_accessor_class_data_ccsds_packing}, + {"data_dummy_field", &grib_accessor_class_data_dummy_field}, {""}, -#line 177 "accessor_class_list.gperf" - {"raw", &grib_accessor_class_raw}, - {""}, {""}, {""}, {""}, {""}, {""}, -#line 24 "accessor_class_list.gperf" - {"bufr_data_element", &grib_accessor_class_bufr_data_element}, -#line 210 "accessor_class_list.gperf" - {"transient", &grib_accessor_class_transient}, +#line 173 "accessor_class_list.gperf" + {"proj_string", &grib_accessor_class_proj_string}, #line 15 "accessor_class_list.gperf" - {"assert", &grib_accessor_class_assert}, + {"bit", &grib_accessor_class_bit}, +#line 17 "accessor_class_list.gperf" + {"bits", &grib_accessor_class_bits}, +#line 198 "accessor_class_list.gperf" + {"step_human_readable", &grib_accessor_class_step_human_readable}, +#line 71 "accessor_class_list.gperf" + {"data_run_length_packing", &grib_accessor_class_data_run_length_packing}, +#line 178 "accessor_class_list.gperf" + {"scale", &grib_accessor_class_scale}, +#line 194 "accessor_class_list.gperf" + {"spectral_truncation", &grib_accessor_class_spectral_truncation}, +#line 45 "accessor_class_list.gperf" + {"data_2order_packing", &grib_accessor_class_data_2order_packing}, +#line 212 "accessor_class_list.gperf" + {"uint32", &grib_accessor_class_uint32}, +#line 216 "accessor_class_list.gperf" + {"uint8", &grib_accessor_class_uint8}, +#line 31 "accessor_class_list.gperf" + {"bytes", &grib_accessor_class_bytes}, +#line 16 "accessor_class_list.gperf" + {"bitmap", &grib_accessor_class_bitmap}, + {""}, +#line 106 "accessor_class_list.gperf" + {"g2bitmap_present", &grib_accessor_class_g2bitmap_present}, {""}, {""}, -#line 23 "accessor_class_list.gperf" - {"bufr_data_array", &grib_accessor_class_bufr_data_array}, +#line 195 "accessor_class_list.gperf" + {"sprintf", &grib_accessor_class_sprintf}, + {""}, {""}, {""}, +#line 18 "accessor_class_list.gperf" + {"bits_per_value", &grib_accessor_class_bits_per_value}, +#line 50 "accessor_class_list.gperf" + {"data_ccsds_packing", &grib_accessor_class_data_ccsds_packing}, {""}, -#line 207 "accessor_class_list.gperf" - {"to_double", &grib_accessor_class_to_double}, -#line 211 "accessor_class_list.gperf" - {"transient_darray", &grib_accessor_class_transient_darray}, +#line 220 "accessor_class_list.gperf" + {"unsigned_bits", &grib_accessor_class_unsigned_bits}, +#line 164 "accessor_class_list.gperf" + {"offset_file", &grib_accessor_class_offset_file}, {""}, -#line 32 "accessor_class_list.gperf" - {"bufrdc_expanded_descriptors", &grib_accessor_class_bufrdc_expanded_descriptors}, -#line 31 "accessor_class_list.gperf" - {"bufr_string_values", &grib_accessor_class_bufr_string_values}, -#line 229 "accessor_class_list.gperf" - {"when", &grib_accessor_class_when}, - {""}, {""}, -#line 20 "accessor_class_list.gperf" - {"blob", &grib_accessor_class_blob}, - {""}, {""}, -#line 13 "accessor_class_list.gperf" - {"array", &grib_accessor_class_array}, -#line 30 "accessor_class_list.gperf" - {"bufr_simple_thinning", &grib_accessor_class_bufr_simple_thinning}, - {""}, {""}, -#line 42 "accessor_class_list.gperf" - {"concept", &grib_accessor_class_concept}, -#line 43 "accessor_class_list.gperf" - {"constant", &grib_accessor_class_constant}, -#line 178 "accessor_class_list.gperf" - {"rdbtime_guess_date", &grib_accessor_class_rdbtime_guess_date}, +#line 213 "accessor_class_list.gperf" + {"uint32_little_endian", &grib_accessor_class_uint32_little_endian}, {""}, -#line 92 "accessor_class_list.gperf" +#line 89 "accessor_class_list.gperf" {"g1area", &grib_accessor_class_g1area}, -#line 166 "accessor_class_list.gperf" - {"octet_number", &grib_accessor_class_octet_number}, -#line 226 "accessor_class_list.gperf" - {"values", &grib_accessor_class_values}, -#line 94 "accessor_class_list.gperf" - {"g1date", &grib_accessor_class_g1date}, -#line 188 "accessor_class_list.gperf" - {"select_step_template", &grib_accessor_class_select_step_template}, +#line 158 "accessor_class_list.gperf" + {"number_of_points", &grib_accessor_class_number_of_points}, {""}, -#line 174 "accessor_class_list.gperf" - {"padtomultiple", &grib_accessor_class_padtomultiple}, +#line 91 "accessor_class_list.gperf" + {"g1date", &grib_accessor_class_g1date}, {""}, {""}, -#line 117 "accessor_class_list.gperf" - {"gaussian_grid_name", &grib_accessor_class_gaussian_grid_name}, -#line 180 "accessor_class_list.gperf" - {"round", &grib_accessor_class_round}, +#line 138 "accessor_class_list.gperf" + {"label", &grib_accessor_class_label}, +#line 217 "accessor_class_list.gperf" + {"unexpanded_descriptors", &grib_accessor_class_unexpanded_descriptors}, +#line 214 "accessor_class_list.gperf" + {"uint64", &grib_accessor_class_uint64}, {""}, -#line 93 "accessor_class_list.gperf" +#line 159 "accessor_class_list.gperf" + {"number_of_points_gaussian", &grib_accessor_class_number_of_points_gaussian}, + {""}, +#line 90 "accessor_class_list.gperf" {"g1bitmap", &grib_accessor_class_g1bitmap}, {""}, {""}, -#line 123 "accessor_class_list.gperf" - {"group", &grib_accessor_class_group}, -#line 124 "accessor_class_list.gperf" - {"gts_header", &grib_accessor_class_gts_header}, +#line 88 "accessor_class_list.gperf" + {"g1_section4_length", &grib_accessor_class_g1_section4_length}, +#line 125 "accessor_class_list.gperf" + {"ieeefloat", &grib_accessor_class_ieeefloat}, {""}, -#line 90 "accessor_class_list.gperf" +#line 87 "accessor_class_list.gperf" {"g1_message_length", &grib_accessor_class_g1_message_length}, -#line 224 "accessor_class_list.gperf" - {"validity_date", &grib_accessor_class_validity_date}, -#line 141 "accessor_class_list.gperf" - {"label", &grib_accessor_class_label}, -#line 102 "accessor_class_list.gperf" + {""}, {""}, +#line 99 "accessor_class_list.gperf" {"g1step_range", &grib_accessor_class_g1step_range}, + {""}, {""}, +#line 40 "accessor_class_list.gperf" + {"concept", &grib_accessor_class_concept}, +#line 41 "accessor_class_list.gperf" + {"constant", &grib_accessor_class_constant}, +#line 215 "accessor_class_list.gperf" + {"uint64_little_endian", &grib_accessor_class_uint64_little_endian}, +#line 80 "accessor_class_list.gperf" + {"divdouble", &grib_accessor_class_divdouble}, +#line 226 "accessor_class_list.gperf" + {"when", &grib_accessor_class_when}, +#line 163 "accessor_class_list.gperf" + {"octet_number", &grib_accessor_class_octet_number}, {""}, -#line 127 "accessor_class_list.gperf" - {"ibmfloat", &grib_accessor_class_ibmfloat}, - {""}, -#line 176 "accessor_class_list.gperf" - {"proj_string", &grib_accessor_class_proj_string}, -#line 151 "accessor_class_list.gperf" - {"lookup", &grib_accessor_class_lookup}, - {""}, {""}, {""}, {""}, -#line 197 "accessor_class_list.gperf" - {"spectral_truncation", &grib_accessor_class_spectral_truncation}, -#line 47 "accessor_class_list.gperf" - {"data_2order_packing", &grib_accessor_class_data_2order_packing}, +#line 104 "accessor_class_list.gperf" + {"g2_mars_labeling", &grib_accessor_class_g2_mars_labeling}, +#line 185 "accessor_class_list.gperf" + {"select_step_template", &grib_accessor_class_select_step_template}, {""}, -#line 61 "accessor_class_list.gperf" +#line 59 "accessor_class_list.gperf" {"data_g1shsimple_packing", &grib_accessor_class_data_g1shsimple_packing}, -#line 225 "accessor_class_list.gperf" - {"validity_time", &grib_accessor_class_validity_time}, -#line 198 "accessor_class_list.gperf" - {"sprintf", &grib_accessor_class_sprintf}, -#line 160 "accessor_class_list.gperf" - {"number_of_coded_values", &grib_accessor_class_number_of_coded_values}, -#line 109 "accessor_class_list.gperf" - {"g2bitmap_present", &grib_accessor_class_g2bitmap_present}, {""}, -#line 91 "accessor_class_list.gperf" - {"g1_section4_length", &grib_accessor_class_g1_section4_length}, +#line 132 "accessor_class_list.gperf" + {"int64_little_endian", &grib_accessor_class_int64_little_endian}, {""}, {""}, -#line 228 "accessor_class_list.gperf" - {"vector", &grib_accessor_class_vector}, -#line 167 "accessor_class_list.gperf" - {"offset_file", &grib_accessor_class_offset_file}, -#line 76 "accessor_class_list.gperf" - {"data_sh_unpacked", &grib_accessor_class_data_sh_unpacked}, -#line 87 "accessor_class_list.gperf" - {"forward", &grib_accessor_class_forward}, - {""}, -#line 62 "accessor_class_list.gperf" +#line 19 "accessor_class_list.gperf" + {"blob", &grib_accessor_class_blob}, + {""}, {""}, {""}, +#line 223 "accessor_class_list.gperf" + {"values", &grib_accessor_class_values}, + {""}, {""}, {""}, {""}, +#line 60 "accessor_class_list.gperf" {"data_g1simple_packing", &grib_accessor_class_data_g1simple_packing}, -#line 55 "accessor_class_list.gperf" +#line 53 "accessor_class_list.gperf" {"data_g1complex_packing", &grib_accessor_class_data_g1complex_packing}, -#line 77 "accessor_class_list.gperf" - {"data_shsimple_packing", &grib_accessor_class_data_shsimple_packing}, {""}, {""}, -#line 150 "accessor_class_list.gperf" - {"longitudes", &grib_accessor_class_longitudes}, - {""}, -#line 204 "accessor_class_list.gperf" +#line 146 "accessor_class_list.gperf" + {"long_vector", &grib_accessor_class_long_vector}, +#line 201 "accessor_class_list.gperf" {"suppressed", &grib_accessor_class_suppressed}, - {""}, {""}, {""}, -#line 60 "accessor_class_list.gperf" +#line 121 "accessor_class_list.gperf" + {"gts_header", &grib_accessor_class_gts_header}, +#line 204 "accessor_class_list.gperf" + {"to_double", &grib_accessor_class_to_double}, + {""}, {""}, +#line 144 "accessor_class_list.gperf" + {"local_definition", &grib_accessor_class_local_definition}, +#line 58 "accessor_class_list.gperf" {"data_g1secondary_bitmap", &grib_accessor_class_data_g1secondary_bitmap}, +#line 221 "accessor_class_list.gperf" + {"validity_date", &grib_accessor_class_validity_date}, +#line 143 "accessor_class_list.gperf" + {"library_version", &grib_accessor_class_library_version}, {""}, {""}, -#line 131 "accessor_class_list.gperf" - {"int16_little_endian", &grib_accessor_class_int16_little_endian}, - {""}, -#line 128 "accessor_class_list.gperf" - {"ieeefloat", &grib_accessor_class_ieeefloat}, - {""}, -#line 154 "accessor_class_list.gperf" - {"md5", &grib_accessor_class_md5}, -#line 96 "accessor_class_list.gperf" +#line 141 "accessor_class_list.gperf" + {"latlon_increment", &grib_accessor_class_latlon_increment}, + {""}, {""}, +#line 93 "accessor_class_list.gperf" {"g1end_of_interval_monthly", &grib_accessor_class_g1end_of_interval_monthly}, -#line 37 "accessor_class_list.gperf" - {"closest_date", &grib_accessor_class_closest_date}, {""}, {""}, -#line 58 "accessor_class_list.gperf" +#line 128 "accessor_class_list.gperf" + {"int16_little_endian", &grib_accessor_class_int16_little_endian}, +#line 56 "accessor_class_list.gperf" {"data_g1second_order_general_packing", &grib_accessor_class_data_g1second_order_general_packing}, -#line 147 "accessor_class_list.gperf" - {"local_definition", &grib_accessor_class_local_definition}, - {""}, -#line 59 "accessor_class_list.gperf" +#line 35 "accessor_class_list.gperf" + {"closest_date", &grib_accessor_class_closest_date}, +#line 124 "accessor_class_list.gperf" + {"ibmfloat", &grib_accessor_class_ibmfloat}, +#line 57 "accessor_class_list.gperf" {"data_g1second_order_row_by_row_packing", &grib_accessor_class_data_g1second_order_row_by_row_packing}, -#line 135 "accessor_class_list.gperf" - {"int64_little_endian", &grib_accessor_class_int64_little_endian}, -#line 85 "accessor_class_list.gperf" - {"evaluate", &grib_accessor_class_evaluate}, -#line 155 "accessor_class_list.gperf" - {"message", &grib_accessor_class_message}, -#line 56 "accessor_class_list.gperf" +#line 151 "accessor_class_list.gperf" + {"md5", &grib_accessor_class_md5}, +#line 222 "accessor_class_list.gperf" + {"validity_time", &grib_accessor_class_validity_time}, +#line 130 "accessor_class_list.gperf" + {"int32_little_endian", &grib_accessor_class_int32_little_endian}, +#line 54 "accessor_class_list.gperf" {"data_g1second_order_constant_width_packing", &grib_accessor_class_data_g1second_order_constant_width_packing}, {""}, -#line 57 "accessor_class_list.gperf" +#line 55 "accessor_class_list.gperf" {"data_g1second_order_general_extended_packing", &grib_accessor_class_data_g1second_order_general_extended_packing}, -#line 25 "accessor_class_list.gperf" - {"bufr_elements_table", &grib_accessor_class_bufr_elements_table}, -#line 163 "accessor_class_list.gperf" - {"number_of_values", &grib_accessor_class_number_of_values}, -#line 153 "accessor_class_list.gperf" - {"mars_step", &grib_accessor_class_mars_step}, + {""}, {""}, +#line 74 "accessor_class_list.gperf" + {"data_sh_unpacked", &grib_accessor_class_data_sh_unpacked}, +#line 225 "accessor_class_list.gperf" + {"vector", &grib_accessor_class_vector}, +#line 20 "accessor_class_list.gperf" + {"budgdate", &grib_accessor_class_budgdate}, +#line 152 "accessor_class_list.gperf" + {"message", &grib_accessor_class_message}, +#line 148 "accessor_class_list.gperf" + {"lookup", &grib_accessor_class_lookup}, +#line 75 "accessor_class_list.gperf" + {"data_shsimple_packing", &grib_accessor_class_data_shsimple_packing}, +#line 137 "accessor_class_list.gperf" + {"ksec1expver", &grib_accessor_class_ksec1expver}, {""}, -#line 213 "accessor_class_list.gperf" - {"uint16", &grib_accessor_class_uint16}, -#line 194 "accessor_class_list.gperf" +#line 171 "accessor_class_list.gperf" + {"padtomultiple", &grib_accessor_class_padtomultiple}, +#line 150 "accessor_class_list.gperf" + {"mars_step", &grib_accessor_class_mars_step}, +#line 126 "accessor_class_list.gperf" + {"ifs_param", &grib_accessor_class_ifs_param}, + {""}, +#line 191 "accessor_class_list.gperf" {"smart_table", &grib_accessor_class_smart_table}, -#line 39 "accessor_class_list.gperf" - {"codetable", &grib_accessor_class_codetable}, -#line 152 "accessor_class_list.gperf" + {""}, +#line 149 "accessor_class_list.gperf" {"mars_param", &grib_accessor_class_mars_param}, + {""}, +#line 22 "accessor_class_list.gperf" + {"bufr_data_element", &grib_accessor_class_bufr_data_element}, {""}, {""}, -#line 133 "accessor_class_list.gperf" - {"int32_little_endian", &grib_accessor_class_int32_little_endian}, -#line 173 "accessor_class_list.gperf" - {"padtoeven", &grib_accessor_class_padtoeven}, -#line 195 "accessor_class_list.gperf" +#line 192 "accessor_class_list.gperf" {"smart_table_column", &grib_accessor_class_smart_table_column}, - {""}, {""}, -#line 40 "accessor_class_list.gperf" - {"codetable_title", &grib_accessor_class_codetable_title}, - {""}, {""}, -#line 164 "accessor_class_list.gperf" - {"number_of_values_data_raw_packing", &grib_accessor_class_number_of_values_data_raw_packing}, + {""}, +#line 21 "accessor_class_list.gperf" + {"bufr_data_array", &grib_accessor_class_bufr_data_array}, + {""}, {""}, {""}, {""}, +#line 30 "accessor_class_list.gperf" + {"bufrdc_expanded_descriptors", &grib_accessor_class_bufrdc_expanded_descriptors}, +#line 29 "accessor_class_list.gperf" + {"bufr_string_values", &grib_accessor_class_bufr_string_values}, {""}, {""}, {""}, -#line 214 "accessor_class_list.gperf" - {"uint16_little_endian", &grib_accessor_class_uint16_little_endian}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, -#line 126 "accessor_class_list.gperf" +#line 147 "accessor_class_list.gperf" + {"longitudes", &grib_accessor_class_longitudes}, + {""}, +#line 157 "accessor_class_list.gperf" + {"number_of_coded_values", &grib_accessor_class_number_of_coded_values}, + {""}, +#line 28 "accessor_class_list.gperf" + {"bufr_simple_thinning", &grib_accessor_class_bufr_simple_thinning}, +#line 44 "accessor_class_list.gperf" + {"count_total", &grib_accessor_class_count_total}, + {""}, {""}, {""}, {""}, +#line 122 "accessor_class_list.gperf" + {"hash_array", &grib_accessor_class_hash_array}, +#line 165 "accessor_class_list.gperf" + {"offset_values", &grib_accessor_class_offset_values}, +#line 123 "accessor_class_list.gperf" {"headers_only", &grib_accessor_class_headers_only}, {""}, {""}, -#line 46 "accessor_class_list.gperf" - {"count_total", &grib_accessor_class_count_total}, - {""}, {""}, {""}, {""}, {""}, -#line 156 "accessor_class_list.gperf" +#line 94 "accessor_class_list.gperf" + {"g1fcperiod", &grib_accessor_class_g1fcperiod}, +#line 153 "accessor_class_list.gperf" {"message_copy", &grib_accessor_class_message_copy}, -#line 168 "accessor_class_list.gperf" - {"offset_values", &grib_accessor_class_offset_values}, -#line 227 "accessor_class_list.gperf" - {"variable", &grib_accessor_class_variable}, {""}, {""}, -#line 28 "accessor_class_list.gperf" - {"bufr_extract_subsets", &grib_accessor_class_bufr_extract_subsets}, - {""}, -#line 169 "accessor_class_list.gperf" - {"pack_bufr_values", &grib_accessor_class_pack_bufr_values}, -#line 149 "accessor_class_list.gperf" - {"long_vector", &grib_accessor_class_long_vector}, -#line 157 "accessor_class_list.gperf" +#line 170 "accessor_class_list.gperf" + {"padtoeven", &grib_accessor_class_padtoeven}, + {""}, {""}, +#line 210 "accessor_class_list.gperf" + {"uint16", &grib_accessor_class_uint16}, + {""}, {""}, +#line 154 "accessor_class_list.gperf" {"missing", &grib_accessor_class_missing}, -#line 26 "accessor_class_list.gperf" - {"bufr_extract_area_subsets", &grib_accessor_class_bufr_extract_area_subsets}, - {""}, -#line 29 "accessor_class_list.gperf" - {"bufr_group", &grib_accessor_class_bufr_group}, +#line 224 "accessor_class_list.gperf" + {"variable", &grib_accessor_class_variable}, + {""}, {""}, +#line 86 "accessor_class_list.gperf" + {"g1_half_byte_codeflag", &grib_accessor_class_g1_half_byte_codeflag}, {""}, -#line 27 "accessor_class_list.gperf" - {"bufr_extract_datetime_subsets", &grib_accessor_class_bufr_extract_datetime_subsets}, +#line 42 "accessor_class_list.gperf" + {"count_file", &grib_accessor_class_count_file}, {""}, -#line 146 "accessor_class_list.gperf" - {"library_version", &grib_accessor_class_library_version}, +#line 36 "accessor_class_list.gperf" + {"codeflag", &grib_accessor_class_codeflag}, + {""}, {""}, {""}, {""}, {""}, {""}, +#line 211 "accessor_class_list.gperf" + {"uint16_little_endian", &grib_accessor_class_uint16_little_endian}, +#line 37 "accessor_class_list.gperf" + {"codetable", &grib_accessor_class_codetable}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +#line 38 "accessor_class_list.gperf" + {"codetable_title", &grib_accessor_class_codetable_title}, {""}, {""}, {""}, -#line 144 "accessor_class_list.gperf" - {"latlon_increment", &grib_accessor_class_latlon_increment}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, -#line 75 "accessor_class_list.gperf" - {"data_sh_packed", &grib_accessor_class_data_sh_packed}, +#line 83 "accessor_class_list.gperf" + {"evaluate", &grib_accessor_class_evaluate}, {""}, {""}, -#line 182 "accessor_class_list.gperf" - {"scale_values", &grib_accessor_class_scale_values}, - {""}, -#line 114 "accessor_class_list.gperf" - {"g2level", &grib_accessor_class_g2level}, - {""}, {""}, {""}, {""}, -#line 145 "accessor_class_list.gperf" - {"latlonvalues", &grib_accessor_class_latlonvalues}, -#line 41 "accessor_class_list.gperf" - {"codetable_units", &grib_accessor_class_codetable_units}, +#line 27 "accessor_class_list.gperf" + {"bufr_group", &grib_accessor_class_bufr_group}, {""}, {""}, -#line 140 "accessor_class_list.gperf" - {"ksec1expver", &grib_accessor_class_ksec1expver}, -#line 125 "accessor_class_list.gperf" - {"hash_array", &grib_accessor_class_hash_array}, +#line 160 "accessor_class_list.gperf" + {"number_of_values", &grib_accessor_class_number_of_values}, {""}, {""}, -#line 35 "accessor_class_list.gperf" - {"change_scanning_direction", &grib_accessor_class_change_scanning_direction}, - {""}, {""}, {""}, {""}, {""}, -#line 34 "accessor_class_list.gperf" - {"change_alternative_row_scanning", &grib_accessor_class_change_alternative_row_scanning}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, -#line 79 "accessor_class_list.gperf" +#line 77 "accessor_class_list.gperf" {"decimal_precision", &grib_accessor_class_decimal_precision}, - {""}, {""}, {""}, {""}, {""}, {""}, -#line 44 "accessor_class_list.gperf" - {"count_file", &grib_accessor_class_count_file}, + {""}, {""}, +#line 111 "accessor_class_list.gperf" + {"g2level", &grib_accessor_class_g2level}, {""}, -#line 38 "accessor_class_list.gperf" - {"codeflag", &grib_accessor_class_codeflag}, +#line 23 "accessor_class_list.gperf" + {"bufr_elements_table", &grib_accessor_class_bufr_elements_table}, {""}, {""}, -#line 165 "accessor_class_list.gperf" - {"octahedral_gaussian", &grib_accessor_class_octahedral_gaussian}, +#line 142 "accessor_class_list.gperf" + {"latlonvalues", &grib_accessor_class_latlonvalues}, + {""}, {""}, {""}, {""}, +#line 73 "accessor_class_list.gperf" + {"data_sh_packed", &grib_accessor_class_data_sh_packed}, +#line 161 "accessor_class_list.gperf" + {"number_of_values_data_raw_packing", &grib_accessor_class_number_of_values_data_raw_packing}, + {""}, {""}, {""}, {""}, +#line 179 "accessor_class_list.gperf" + {"scale_values", &grib_accessor_class_scale_values}, {""}, -#line 221 "accessor_class_list.gperf" +#line 218 "accessor_class_list.gperf" {"unpack_bufr_values", &grib_accessor_class_unpack_bufr_values}, - {""}, {""}, {""}, {""}, {""}, -#line 99 "accessor_class_list.gperf" - {"g1monthlydate", &grib_accessor_class_g1monthlydate}, {""}, {""}, {""}, -#line 97 "accessor_class_list.gperf" - {"g1fcperiod", &grib_accessor_class_g1fcperiod}, - {""}, {""}, {""}, {""}, {""}, +#line 85 "accessor_class_list.gperf" + {"from_scale_factor_scaled_value", &grib_accessor_class_from_scale_factor_scaled_value}, #line 11 "accessor_class_list.gperf" {"abstract_vector", &grib_accessor_class_abstract_vector}, + {""}, {""}, {""}, {""}, +#line 33 "accessor_class_list.gperf" + {"change_scanning_direction", &grib_accessor_class_change_scanning_direction}, + {""}, {""}, {""}, {""}, {""}, +#line 32 "accessor_class_list.gperf" + {"change_alternative_row_scanning", &grib_accessor_class_change_alternative_row_scanning}, + {""}, +#line 96 "accessor_class_list.gperf" + {"g1monthlydate", &grib_accessor_class_g1monthlydate}, {""}, {""}, -#line 89 "accessor_class_list.gperf" - {"g1_half_byte_codeflag", &grib_accessor_class_g1_half_byte_codeflag}, +#line 100 "accessor_class_list.gperf" + {"g1verificationdate", &grib_accessor_class_g1verificationdate}, +#line 166 "accessor_class_list.gperf" + {"pack_bufr_values", &grib_accessor_class_pack_bufr_values}, {""}, {""}, -#line 129 "accessor_class_list.gperf" - {"ifs_param", &grib_accessor_class_ifs_param}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +#line 176 "accessor_class_list.gperf" + {"reference_value_error", &grib_accessor_class_reference_value_error}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, + {""}, {""}, {""}, +#line 162 "accessor_class_list.gperf" + {"octahedral_gaussian", &grib_accessor_class_octahedral_gaussian}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, +#line 26 "accessor_class_list.gperf" + {"bufr_extract_subsets", &grib_accessor_class_bufr_extract_subsets}, + {""}, {""}, {""}, {""}, +#line 24 "accessor_class_list.gperf" + {"bufr_extract_area_subsets", &grib_accessor_class_bufr_extract_area_subsets}, + {""}, {""}, {""}, +#line 25 "accessor_class_list.gperf" + {"bufr_extract_datetime_subsets", &grib_accessor_class_bufr_extract_datetime_subsets}, + {""}, {""}, #line 10 "accessor_class_list.gperf" {"abstract_long_vector", &grib_accessor_class_abstract_long_vector}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, -#line 95 "accessor_class_list.gperf" - {"g1day_of_the_year_date", &grib_accessor_class_g1day_of_the_year_date}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, -#line 45 "accessor_class_list.gperf" - {"count_missing", &grib_accessor_class_count_missing}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, -#line 88 "accessor_class_list.gperf" - {"from_scale_factor_scaled_value", &grib_accessor_class_from_scale_factor_scaled_value}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, -#line 36 "accessor_class_list.gperf" - {"check_internal_version", &grib_accessor_class_check_internal_version}, + {""}, {""}, {""}, {""}, +#line 39 "accessor_class_list.gperf" + {"codetable_units", &grib_accessor_class_codetable_units}, {""}, -#line 179 "accessor_class_list.gperf" - {"reference_value_error", &grib_accessor_class_reference_value_error}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +#line 92 "accessor_class_list.gperf" + {"g1day_of_the_year_date", &grib_accessor_class_g1day_of_the_year_date}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, -#line 103 "accessor_class_list.gperf" - {"g1verificationdate", &grib_accessor_class_g1verificationdate}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +#line 34 "accessor_class_list.gperf" + {"check_internal_version", &grib_accessor_class_check_internal_version}, + {""}, {""}, +#line 43 "accessor_class_list.gperf" + {"count_missing", &grib_accessor_class_count_missing}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, -#line 105 "accessor_class_list.gperf" - {"g2_chemical", &grib_accessor_class_g2_chemical}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -685,13 +664,16 @@ static const struct accessor_class_hash classes[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, -#line 101 "accessor_class_list.gperf" + {""}, {""}, +#line 98 "accessor_class_list.gperf" {"g1number_of_coded_values_sh_simple", &grib_accessor_class_g1number_of_coded_values_sh_simple}, -#line 100 "accessor_class_list.gperf" +#line 97 "accessor_class_list.gperf" {"g1number_of_coded_values_sh_complex", &grib_accessor_class_g1number_of_coded_values_sh_complex}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +#line 102 "accessor_class_list.gperf" + {"g2_chemical", &grib_accessor_class_g2_chemical}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -699,15 +681,12 @@ static const struct accessor_class_hash classes[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, -#line 98 "accessor_class_list.gperf" + {""}, {""}, {""}, {""}, {""}, +#line 95 "accessor_class_list.gperf" {"g1forecastmonth", &grib_accessor_class_g1forecastmonth} }; -static const struct accessor_class_hash * -grib_accessor_classes_hash (const char *str, size_t len) +static const struct accessor_class_hash* grib_accessor_classes_hash (const char *str, size_t len) { unsigned int key = grib_accessor_classes_get_id (str, len); @@ -722,5 +701,4 @@ grib_accessor_classes_hash (const char *str, size_t len) #endif return &classes[key]; - } diff --git a/src/grib_accessor_factory.h b/src/grib_accessor_factory.h index 5a2a8db43..a706fc95c 100644 --- a/src/grib_accessor_factory.h +++ b/src/grib_accessor_factory.h @@ -1,7 +1,6 @@ /* This file is automatically generated by ./make_class.pl, do not edit */ { "abstract_long_vector", &grib_accessor_class_abstract_long_vector, }, { "abstract_vector", &grib_accessor_class_abstract_vector, }, -{ "apply_operators", &grib_accessor_class_apply_operators, }, { "array", &grib_accessor_class_array, }, { "ascii", &grib_accessor_class_ascii, }, { "assert", &grib_accessor_class_assert, }, @@ -10,7 +9,6 @@ { "bits", &grib_accessor_class_bits, }, { "bits_per_value", &grib_accessor_class_bits_per_value, }, { "blob", &grib_accessor_class_blob, }, -{ "box", &grib_accessor_class_box, }, { "budgdate", &grib_accessor_class_budgdate, }, { "bufr_data_array", &grib_accessor_class_bufr_data_array, }, { "bufr_data_element", &grib_accessor_class_bufr_data_element, }, @@ -76,7 +74,6 @@ { "element", &grib_accessor_class_element, }, { "evaluate", &grib_accessor_class_evaluate, }, { "expanded_descriptors", &grib_accessor_class_expanded_descriptors, }, -{ "forward", &grib_accessor_class_forward, }, { "from_scale_factor_scaled_value", &grib_accessor_class_from_scale_factor_scaled_value, }, { "g1_half_byte_codeflag", &grib_accessor_class_g1_half_byte_codeflag, }, { "g1_message_length", &grib_accessor_class_g1_message_length, }, diff --git a/src/grib_accessor_factory_hash_list b/src/grib_accessor_factory_hash_list index f5b01c828..0abb60a46 100644 --- a/src/grib_accessor_factory_hash_list +++ b/src/grib_accessor_factory_hash_list @@ -2,7 +2,6 @@ abstract_long_vector, &grib_accessor_class_abstract_long_vector abstract_vector, &grib_accessor_class_abstract_vector -apply_operators, &grib_accessor_class_apply_operators array, &grib_accessor_class_array ascii, &grib_accessor_class_ascii assert, &grib_accessor_class_assert @@ -11,7 +10,6 @@ bitmap, &grib_accessor_class_bitmap bits, &grib_accessor_class_bits bits_per_value, &grib_accessor_class_bits_per_value blob, &grib_accessor_class_blob -box, &grib_accessor_class_box budgdate, &grib_accessor_class_budgdate bufr_data_array, &grib_accessor_class_bufr_data_array bufr_data_element, &grib_accessor_class_bufr_data_element @@ -77,7 +75,6 @@ double, &grib_accessor_class_double element, &grib_accessor_class_element evaluate, &grib_accessor_class_evaluate expanded_descriptors, &grib_accessor_class_expanded_descriptors -forward, &grib_accessor_class_forward from_scale_factor_scaled_value, &grib_accessor_class_from_scale_factor_scaled_value g1_half_byte_codeflag, &grib_accessor_class_g1_half_byte_codeflag g1_message_length, &grib_accessor_class_g1_message_length diff --git a/src/grib_api.h b/src/grib_api.h index b06e854fc..718a1bb57 100644 --- a/src/grib_api.h +++ b/src/grib_api.h @@ -204,12 +204,6 @@ typedef struct grib_iterator grib_iterator; */ typedef struct grib_nearest grib_nearest; -/*! Grib box, structure used to crop a box given north/west/south/east boundaries. - \ingroup grib_box -*/ -typedef struct grib_box grib_box; -typedef struct grib_points grib_points; - /*! Grib keys iterator. Iterator over keys. \ingroup keys_iterator */ @@ -1388,19 +1382,6 @@ int grib_read_any_from_file(grib_context* ctx, FILE* f, void* buffer, size_t* le int grib_get_message_offset(const grib_handle* h, off_t* offset); int grib_get_message_size(const grib_handle* h, size_t* size); -struct grib_points -{ - grib_context* context; - double* latitudes; - double* longitudes; - size_t* indexes; - size_t* group_start; - size_t* group_len; - size_t n_groups; - size_t n; - size_t size; -}; - /* --------------------------------------- */ #define GRIB_UTIL_GRID_SPEC_REGULAR_LL 1 diff --git a/src/grib_api_internal.h b/src/grib_api_internal.h index da2fa37ac..9f413495b 100644 --- a/src/grib_api_internal.h +++ b/src/grib_api_internal.h @@ -186,8 +186,8 @@ extern int pthread_mutexattr_settype(pthread_mutexattr_t* attr, int type); #endif #ifdef DEBUG -#define DebugAssert(a) Assert(a) -#define DebugAssertAccess(array, index, size) \ +#define DEBUG_ASSERT(a) Assert(a) +#define DEBUG_ASSERT_ACCESS(array, index, size) \ do { \ if (!((index) >= 0 && (index) < (size))) { \ printf("ARRAY ACCESS ERROR: array=%s idx=%ld size=%ld @ %s +%d \n", #array, index, size, __FILE__, __LINE__); \ @@ -195,8 +195,8 @@ extern int pthread_mutexattr_settype(pthread_mutexattr_t* attr, int type); } \ } while (0) #else -#define DebugAssert(a) -#define DebugAssertAccess(array, index, size) +#define DEBUG_ASSERT(a) +#define DEBUG_ASSERT_ACCESS(array, index, size) #endif /* Return true if two strings are equal */ @@ -272,7 +272,6 @@ typedef struct grib_smart_table grib_smart_table; typedef struct grib_accessor grib_accessor; typedef struct grib_iterator_class grib_iterator_class; typedef struct grib_nearest_class grib_nearest_class; -typedef struct grib_box_class grib_box_class; typedef struct grib_dumper grib_dumper; typedef struct grib_dumper_class grib_dumper_class; typedef struct grib_dependency grib_dependency; @@ -292,11 +291,6 @@ typedef int (*nearest_find_proc)(grib_nearest* nearest, grib_handle* h, double* distances, int* indexes, size_t* len); typedef int (*nearest_destroy_proc)(grib_nearest* nearest); -typedef void (*box_init_class_proc)(grib_box_class*); -typedef int (*box_destroy_proc)(grib_box*); -typedef int (*box_init_proc)(grib_box*, grib_handle*, grib_arguments*); -typedef grib_points* (*box_get_points_proc)(grib_box*, double, double, double, double, int*); - typedef void (*iterator_init_class_proc)(grib_iterator_class*); typedef int (*iterator_init_proc)(grib_iterator* i, grib_handle*, grib_arguments*); @@ -562,23 +556,24 @@ struct grib_accessor grib_accessor* parent_as_attribute; }; -#define GRIB_ACCESSOR_FLAG_READ_ONLY (1 << 1) -#define GRIB_ACCESSOR_FLAG_DUMP (1 << 2) +#define GRIB_ACCESSOR_FLAG_READ_ONLY (1 << 1) +#define GRIB_ACCESSOR_FLAG_DUMP (1 << 2) #define GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC (1 << 3) -#define GRIB_ACCESSOR_FLAG_CAN_BE_MISSING (1 << 4) -#define GRIB_ACCESSOR_FLAG_HIDDEN (1 << 5) -#define GRIB_ACCESSOR_FLAG_CONSTRAINT (1 << 6) -#define GRIB_ACCESSOR_FLAG_BUFR_DATA (1 << 7) -#define GRIB_ACCESSOR_FLAG_NO_COPY (1 << 8) -#define GRIB_ACCESSOR_FLAG_COPY_OK (1 << 9) -#define GRIB_ACCESSOR_FLAG_FUNCTION (1 << 10) -#define GRIB_ACCESSOR_FLAG_DATA (1 << 11) -#define GRIB_ACCESSOR_FLAG_NO_FAIL (1 << 12) -#define GRIB_ACCESSOR_FLAG_TRANSIENT (1 << 13) -#define GRIB_ACCESSOR_FLAG_STRING_TYPE (1 << 14) -#define GRIB_ACCESSOR_FLAG_LONG_TYPE (1 << 15) -#define GRIB_ACCESSOR_FLAG_DOUBLE_TYPE (1 << 16) -#define GRIB_ACCESSOR_FLAG_LOWERCASE (1 << 17) +#define GRIB_ACCESSOR_FLAG_CAN_BE_MISSING (1 << 4) +#define GRIB_ACCESSOR_FLAG_HIDDEN (1 << 5) +#define GRIB_ACCESSOR_FLAG_CONSTRAINT (1 << 6) +#define GRIB_ACCESSOR_FLAG_BUFR_DATA (1 << 7) +#define GRIB_ACCESSOR_FLAG_NO_COPY (1 << 8) +#define GRIB_ACCESSOR_FLAG_COPY_OK (1 << 9) +#define GRIB_ACCESSOR_FLAG_FUNCTION (1 << 10) +#define GRIB_ACCESSOR_FLAG_DATA (1 << 11) +#define GRIB_ACCESSOR_FLAG_NO_FAIL (1 << 12) +#define GRIB_ACCESSOR_FLAG_TRANSIENT (1 << 13) +#define GRIB_ACCESSOR_FLAG_STRING_TYPE (1 << 14) +#define GRIB_ACCESSOR_FLAG_LONG_TYPE (1 << 15) +#define GRIB_ACCESSOR_FLAG_DOUBLE_TYPE (1 << 16) +#define GRIB_ACCESSOR_FLAG_LOWERCASE (1 << 17) +#define GRIB_ACCESSOR_FLAG_BUFR_COORD (1 << 18) /** * a section accessor @@ -630,18 +625,6 @@ struct grib_nearest_class nearest_find_proc find; }; -struct grib_box_class -{ - grib_box_class** super; - const char* name; - size_t size; - int inited; - box_init_class_proc init_class; - box_init_proc init; - box_destroy_proc destroy; - box_get_points_proc get_points; -}; - /* --------------- */ /* --------------- */ typedef void (*search_all_callback_proc)(grib_accessor*, void* data); @@ -711,16 +694,6 @@ struct grib_nearest unsigned long flags; }; -struct grib_box -{ - grib_box_class* cclass; - grib_context* context; - grib_arguments* args; - grib_handle* h; - unsigned long flags; - grib_points* points; -}; - struct grib_dependency { grib_dependency* next; @@ -1118,6 +1091,7 @@ struct grib_context int bufr_set_to_missing_if_out_of_range; int bufr_multi_element_constant_arrays; int grib_data_quality_checks; + int single_precision; FILE* log_stream; grib_trie* classes; grib_trie* lists; @@ -1278,7 +1252,6 @@ struct grib_int_array int* el; }; -#if 1 struct grib_fieldset { grib_context* context; @@ -1293,31 +1266,6 @@ struct grib_fieldset long current; grib_field** fields; }; -#endif - -#if 0 -/* grib db */ -struct grib_db -{ - grib_context* context; - size_t size; - size_t fields_array_size; - grib_column* columns; - size_t columns_size; - grib_field** fields; -}; - -struct grib_fieldset -{ - grib_context* context; - grib_db* db; - grib_int_array* filter; - grib_int_array* order; - size_t size; - grib_query* query; - long current; -}; -#endif /* concept index structures */ @@ -1613,8 +1561,6 @@ typedef struct j2k_encode_helper #endif - - /* This part is automatically generated by ./errors.pl, do not edit */ #ifndef grib_errors_internal_H #define grib_errors_internal_H diff --git a/src/grib_api_internal_cpp.h b/src/grib_api_internal_cpp.h deleted file mode 100644 index 47ea00874..000000000 --- a/src/grib_api_internal_cpp.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -#include "grib_accessor.h" -#include "grib_value.h" -#include "grib_bits_any_endian_simple.h" -#include "grib_ieeefloat.h" diff --git a/src/grib_bits_any_endian.cc b/src/grib_bits_any_endian.cc index 2c803f089..33e643a19 100644 --- a/src/grib_bits_any_endian.cc +++ b/src/grib_bits_any_endian.cc @@ -10,13 +10,14 @@ /*************************************************************************** * Enrico Fucile - 19.06.2007 * - * * ***************************************************************************/ #ifdef ECCODES_ON_WINDOWS #include #endif +#include "grib_scaling.h" + #if GRIB_PTHREADS static pthread_once_t once = PTHREAD_ONCE_INIT; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; @@ -59,7 +60,7 @@ static void init_bits_all_one() int size = sizeof(int64_t) * 8; int64_t* v = 0; uint64_t cmask = -1; - DebugAssert(!bits_all_one.inited); + DEBUG_ASSERT(!bits_all_one.inited); bits_all_one.size = size; bits_all_one.inited = 1; @@ -130,7 +131,7 @@ int grib_encode_string(unsigned char* bitStream, long* bitOffset, size_t numberO *bitOffset += numberOfCharacters * 8; return err; } - DebugAssert(remainderComplement >= 0); + DEBUG_ASSERT(remainderComplement >= 0); for (i = 0; i < numberOfCharacters; i++) { c = ((*s) >> remainder) & ~mask[remainder]; *p |= c; @@ -168,7 +169,7 @@ char* grib_decode_string(const unsigned char* bitStream, long* bitOffset, size_t return string; } - DebugAssert(remainderComplement >= 0); + DEBUG_ASSERT(remainderComplement >= 0); for (i = 0; i < numberOfCharacters; i++) { c = (*p) << remainder; p++; @@ -221,15 +222,16 @@ unsigned long grib_decode_unsigned_long(const unsigned char* p, long* bitp, long return grib_decode_unsigned_long(p, bitp, bits); } -#if 0 - long ret2 = 0; - for(i=0; i< nbits;i++){ - ret2 <<= 1; - if(grib_get_bit( p, *bitp)) ret2 += 1; - *bitp += 1; - } - *bitp -= nbits; -#else + + // Old algorithm: + // long ret2 = 0; + // for(i=0; i< nbits;i++){ + // ret2 <<= 1; + // if(grib_get_bit( p, *bitp)) ret2 += 1; + // *bitp += 1; + // } + // *bitp -= nbits; + mask = BIT_MASK(nbits); /* pi: position of bitp in p[]. >>3 == /8 */ pi = oc; @@ -240,7 +242,7 @@ unsigned long grib_decode_unsigned_long(const unsigned char* p, long* bitp, long while (bitsToRead > 0) { ret <<= 8; /* ret += p[pi]; */ - DebugAssert((ret & p[pi]) == 0); + DEBUG_ASSERT((ret & p[pi]) == 0); ret = ret | p[pi]; pi++; bitsToRead -= usefulBitsInByte; @@ -254,7 +256,7 @@ unsigned long grib_decode_unsigned_long(const unsigned char* p, long* bitp, long /* remove leading bits (from previous value) */ ret &= mask; /* printf("%d %d\n", ret2, ret);*/ -#endif + return ret; } @@ -364,7 +366,7 @@ size_t grib_decode_size_t(const unsigned char* p, long* bitp, long nbits) while (bitsToRead > 0) { ret <<= 8; /* ret += p[pi]; */ - DebugAssert((ret & p[pi]) == 0); + DEBUG_ASSERT((ret & p[pi]) == 0); ret = ret | p[pi]; pi++; bitsToRead -= usefulBitsInByte; @@ -392,7 +394,7 @@ int grib_encode_unsigned_longb(unsigned char* p, unsigned long val, long* bitp, } #ifdef DEBUG { - unsigned long maxV = grib_power(nb, 2); + unsigned long maxV = codes_power(nb, 2); if (val > maxV) { fprintf(stderr, "grib_encode_unsigned_longb: Value=%lu, but number of bits=%ld!\n", val, nb); Assert(0); @@ -421,7 +423,7 @@ int grib_encode_size_tb(unsigned char* p, size_t val, long* bitp, long nb) } #ifdef DEBUG { - size_t maxV = grib_power(nb, 2); + size_t maxV = codes_power(nb, 2); if (val > maxV) { fprintf(stderr, "grib_encode_size_tb: Value=%lu, but number of bits=%ld!\n", val, nb); Assert(0); diff --git a/src/grib_bits_any_endian_omp.cc b/src/grib_bits_any_endian_omp.cc index fa726a19b..31e2c4df5 100644 --- a/src/grib_bits_any_endian_omp.cc +++ b/src/grib_bits_any_endian_omp.cc @@ -10,7 +10,6 @@ /*************************************************************************** * Enrico Fucile - 19.06.2007 * - * * ***************************************************************************/ /** * decode an array of n_vals values from a octet-stream @@ -81,20 +80,19 @@ int grib_decode_double_array(const unsigned char* p, long* bitp, long bitsPerVal unsigned long lvalue = 0; double x; -#if 0 - /* slow reference code */ - int j=0; - for(i=0;i < n_vals;i++) { - lvalue=0; - for(j=0; j< bitsPerValue;j++){ - lvalue <<= 1; - if(grib_get_bit( p, *bitp)) lvalue += 1; - *bitp += 1; - } - x=((lvalue*s)+reference_value)*d; - val[i] = (double)x; - } -#endif +// Slow reference code +// int j=0; +// for(i=0;i < n_vals;i++) { +// lvalue=0; +// for(j=0; j< bitsPerValue;j++){ +// lvalue <<= 1; +// if(grib_get_bit( p, *bitp)) lvalue += 1; +// *bitp += 1; +// } +// x=((lvalue*s)+reference_value)*d; +// val[i] = (double)x; +// } + unsigned long mask = BIT_MASK(bitsPerValue); /* pi: position of bitp in p[]. >>3 == /8 */ diff --git a/src/grib_bits_any_endian_simple.cc b/src/grib_bits_any_endian_simple.cc index e7291c283..c01516bc0 100644 --- a/src/grib_bits_any_endian_simple.cc +++ b/src/grib_bits_any_endian_simple.cc @@ -10,7 +10,6 @@ /*************************************************************************** * Enrico Fucile - 19.06.2007 * - * * ***************************************************************************/ #include "grib_bits_any_endian_simple.h" @@ -84,7 +83,7 @@ int grib_decode_long_array(const unsigned char* p, long* bitp, long bitsPerValue // unsigned long lvalue = 0; // double x; -//#if 0 +//#if OLD_REF_CODE // [> slow reference code <] // int j=0; // for(i=0;i < n_vals;i++) { diff --git a/src/grib_bits_any_endian_simple.h b/src/grib_bits_any_endian_simple.h index 369b87067..6a628e515 100644 --- a/src/grib_bits_any_endian_simple.h +++ b/src/grib_bits_any_endian_simple.h @@ -1,4 +1,12 @@ -// ECC-1467 +/* + * (C) Copyright 2005- 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. + */ #pragma once @@ -19,7 +27,7 @@ int grib_decode_array(const unsigned char* p, long* bitp, long bitsPerValue, unsigned long lvalue = 0; T x; -#if 0 +#ifdef SLOW_OLD_CODE /* slow reference code */ int j=0; for(i=0; i < n_vals; i++) { diff --git a/src/grib_buffer.cc b/src/grib_buffer.cc index 6f3bb1911..581a66239 100644 --- a/src/grib_buffer.cc +++ b/src/grib_buffer.cc @@ -9,8 +9,7 @@ */ /*************************************************************************** - * Jean Baptiste Filippi - 01.11.2005 * - * * + * Jean Baptiste Filippi - 01.11.2005 * ***************************************************************************/ #include "grib_api_internal.h" @@ -31,7 +30,7 @@ grib_buffer* grib_create_growable_buffer(const grib_context* c) grib_buffer* b = (grib_buffer*)grib_context_malloc_clear(c, sizeof(grib_buffer)); if (b == NULL) { - grib_context_log(c, GRIB_LOG_ERROR, "grib_new_buffer: cannot allocate buffer"); + grib_context_log(c, GRIB_LOG_ERROR, "%s: cannot allocate buffer", __func__); return NULL; } @@ -42,7 +41,7 @@ grib_buffer* grib_create_growable_buffer(const grib_context* c) b->growable = 1; if (!b->data) { - grib_context_log(c, GRIB_LOG_ERROR, "grib_new_buffer: cannot allocate buffer"); + grib_context_log(c, GRIB_LOG_ERROR, "%s: cannot allocate buffer", __func__); grib_context_free(c, b); return NULL; } @@ -55,7 +54,7 @@ grib_buffer* grib_new_buffer(const grib_context* c, const unsigned char* data, s grib_buffer* b = (grib_buffer*)grib_context_malloc_clear(c, sizeof(grib_buffer)); if (b == NULL) { - grib_context_log(c, GRIB_LOG_ERROR, "grib_new_buffer: cannot allocate buffer"); + grib_context_log(c, GRIB_LOG_ERROR, "%s: cannot allocate buffer", __func__); return NULL; } @@ -138,87 +137,75 @@ static void update_offsets_after(grib_accessor* a, long len) } } -#if 0 -/* new GCC compiler v4.5.0 complains function is defined but not used*/ -void grib_recompute_sections_lengths(grib_section* s) -{ - if(s) - { - long plen = 0; - size_t len = 1; - - grib_accessor* a = s->block->first; - - while(a) - { - /* grib_recompute_sections_lengths(grib_get_sub_section(a)); */ - grib_recompute_sections_lengths(a->sub_section); - a = a->next; - } - - if(s->aclength) - { - int ret; - if(s->owner) - plen = grib_get_next_position_offset(s->block->last) - s->owner->offset; - else - plen = grib_get_next_position_offset(s->block->last); - - if((ret = grib_pack_long(s->aclength, &plen, &len)) != GRIB_SUCCESS) - ; - -#if 0 - if(s->h->context->debug) - printf("SECTION updating length %ld .. %s\n",plen,s->owner->name); -#endif - - } - } -} -#endif - - -#if 0 -/* new GCC compiler v4.5.0 complains function is defined but not used*/ -static void update_sections_lengths(grib_section* s) -{ - long plen = 0; - size_t len = 1; - - if(!s) return; - - - if(s->aclength) - { - int ret; - if(s->owner) - plen = grib_get_next_position_offset(s->block->last) - s->owner->offset; - else - plen = grib_get_next_position_offset(s->block->last); - - /* if(s->owner) */ - /* s->owner->length = plen; */ - - /* if(s->aclength) */ - if((ret = grib_pack_long(s->aclength, &plen, &len)) != GRIB_SUCCESS) - ; - - if(s->h->context->debug) - { - printf("SECTION updating length %ld .. %s\n",plen,s->owner->name); - printf("NEXT_POS = %ld, owner offset= %ld %s %s\n", - grib_get_next_position_offset(s->block->last), - s->owner ? s->owner->offset : 0L, s->owner->name, - s->block->last->name); - } - } - - if(s->owner) - update_sections_lengths(s->owner->parent); - -} -#endif - +// /* new GCC compiler v4.5.0 complains function is defined but not used*/ +// void grib_recompute_sections_lengths(grib_section* s) +// { +// if(s) +// { +// long plen = 0; +// size_t len = 1; + +// grib_accessor* a = s->block->first; + +// while(a) +// { +// /* grib_recompute_sections_lengths(grib_get_sub_section(a)); */ +// grib_recompute_sections_lengths(a->sub_section); +// a = a->next; +// } + +// if(s->aclength) +// { +// int ret; +// if(s->owner) +// plen = grib_get_next_position_offset(s->block->last) - s->owner->offset; +// else +// plen = grib_get_next_position_offset(s->block->last); + +// if((ret = grib_pack_long(s->aclength, &plen, &len)) != GRIB_SUCCESS) +// ; + +// +// if(s->h->context->debug) +// printf("SECTION updating length %ld .. %s\n",plen,s->owner->name); +// } +// } +// } + +// /* new GCC compiler v4.5.0 complains function is defined but not used*/ +// static void update_sections_lengths(grib_section* s) +// { +// long plen = 0; +// size_t len = 1; + +// if(!s) return; +// if(s->aclength) +// { +// int ret; +// if(s->owner) +// plen = grib_get_next_position_offset(s->block->last) - s->owner->offset; +// else +// plen = grib_get_next_position_offset(s->block->last); + +// /* if(s->owner) */ +// /* s->owner->length = plen; */ + +// /* if(s->aclength) */ +// if((ret = grib_pack_long(s->aclength, &plen, &len)) != GRIB_SUCCESS) +// ; + +// if(s->h->context->debug) +// { +// printf("SECTION updating length %ld .. %s\n",plen,s->owner->name); +// printf("NEXT_POS = %ld, owner offset= %ld %s %s\n", +// grib_get_next_position_offset(s->block->last), +// s->owner ? s->owner->offset : 0L, s->owner->name, +// s->block->last->name); +// } +// } +// if(s->owner) +// update_sections_lengths(s->owner->parent); +// } void grib_buffer_replace(grib_accessor* a, const unsigned char* data, size_t newsize, int update_lengths, int update_paddings) @@ -246,8 +233,8 @@ void grib_buffer_replace(grib_accessor* a, const unsigned char* data, message_length - offset - oldsize); /* copy new data */ - DebugAssert(buffer->data + offset); - DebugAssert(data || (newsize == 0)); /* if data==NULL then newsize must be 0 */ + DEBUG_ASSERT(buffer->data + offset); + DEBUG_ASSERT(data || (newsize == 0)); /* if data==NULL then newsize must be 0 */ if (data) { /* Note: memcpy behaviour is undefined if either dest or src is NULL */ memcpy(buffer->data + offset, data, newsize); diff --git a/src/grib_bufr_descriptor.cc b/src/grib_bufr_descriptor.cc index 6d1ab0076..68aa7e290 100644 --- a/src/grib_bufr_descriptor.cc +++ b/src/grib_bufr_descriptor.cc @@ -9,6 +9,7 @@ */ +#include "grib_scaling.h" #include "grib_api_internal.h" bufr_descriptor* grib_bufr_descriptor_new(grib_accessor* tables_accessor, int code, int silent, int* err) @@ -109,7 +110,7 @@ void grib_bufr_descriptor_set_scale(bufr_descriptor* v, long scale) v->scale = scale; if (scale != 0) v->type = BUFR_DESCRIPTOR_TYPE_DOUBLE; - v->factor = grib_power(-scale, 10); + v->factor = codes_power(-scale, 10); } int grib_bufr_descriptor_can_be_missing(bufr_descriptor* v) diff --git a/src/grib_bufr_descriptors_array.cc b/src/grib_bufr_descriptors_array.cc index b524caf26..a5967f26c 100644 --- a/src/grib_bufr_descriptors_array.cc +++ b/src/grib_bufr_descriptors_array.cc @@ -50,7 +50,7 @@ bufr_descriptor* grib_bufr_descriptors_array_pop_front(bufr_descriptors_array* a { bufr_descriptor* v = a->v[0]; if (a->n == 0) { - DebugAssert(0); + DEBUG_ASSERT(0); } a->n--; a->v++; diff --git a/src/grib_context.cc b/src/grib_context.cc index 3bfc44982..90b531f6f 100644 --- a/src/grib_context.cc +++ b/src/grib_context.cc @@ -350,25 +350,26 @@ static grib_context default_grib_context = { 0, /* keys_count */ 0, /* concepts_index */ 0, /* concepts_count */ - {0,}, /* concepts */ - 0, /* hash_array_index */ - 0, /* hash_array_count */ - {0,}, /* hash_array */ - 0, /* def_files */ - 0, /* blocklist */ - 0, /* ieee_packing */ - 0, /* bufrdc_mode */ - 0, /* bufr_set_to_missing_if_out_of_range */ - 0, /* bufr_multi_element_constant_arrays */ - 0, /* grib_data_quality_checks */ - 0, /* log_stream */ - 0, /* classes */ - 0, /* lists */ - 0, /* expanded_descriptors */ + {0,}, /* concepts */ + 0, /* hash_array_index */ + 0, /* hash_array_count */ + {0,}, /* hash_array */ + 0, /* def_files */ + 0, /* blocklist */ + 0, /* ieee_packing */ + 0, /* bufrdc_mode */ + 0, /* bufr_set_to_missing_if_out_of_range */ + 0, /* bufr_multi_element_constant_arrays */ + 0, /* grib_data_quality_checks */ + 0, /* single_precision */ + 0, /* log_stream */ + 0, /* classes */ + 0, /* lists */ + 0, /* expanded_descriptors */ DEFAULT_FILE_POOL_MAX_OPENED_FILES /* file_pool_max_opened_files */ #if GRIB_PTHREADS , - PTHREAD_MUTEX_INITIALIZER /* mutex */ + PTHREAD_MUTEX_INITIALIZER /* mutex */ #endif }; @@ -396,6 +397,7 @@ grib_context* grib_context_get_default() const char* bufr_set_to_missing_if_out_of_range = NULL; const char* bufr_multi_element_constant_arrays = NULL; const char* grib_data_quality_checks = NULL; + const char* single_precision = NULL; const char* file_pool_max_opened_files = NULL; #ifdef ENABLE_FLOATING_POINT_EXCEPTIONS @@ -407,6 +409,7 @@ grib_context* grib_context_get_default() bufr_set_to_missing_if_out_of_range = getenv("ECCODES_BUFR_SET_TO_MISSING_IF_OUT_OF_RANGE"); bufr_multi_element_constant_arrays = getenv("ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS"); grib_data_quality_checks = getenv("ECCODES_GRIB_DATA_QUALITY_CHECKS"); + single_precision = getenv("ECCODES_SINGLE_PRECISION"); large_constant_fields = codes_getenv("ECCODES_GRIB_LARGE_CONSTANT_FIELDS"); no_abort = codes_getenv("ECCODES_NO_ABORT"); debug = codes_getenv("ECCODES_DEBUG"); @@ -550,6 +553,7 @@ grib_context* grib_context_get_default() default_grib_context.bufr_set_to_missing_if_out_of_range = bufr_set_to_missing_if_out_of_range ? atoi(bufr_set_to_missing_if_out_of_range) : 0; default_grib_context.bufr_multi_element_constant_arrays = bufr_multi_element_constant_arrays ? atoi(bufr_multi_element_constant_arrays) : 0; default_grib_context.grib_data_quality_checks = grib_data_quality_checks ? atoi(grib_data_quality_checks) : 0; + default_grib_context.single_precision = single_precision ? atoi(single_precision) : 0; default_grib_context.file_pool_max_opened_files = file_pool_max_opened_files ? atoi(file_pool_max_opened_files) : DEFAULT_FILE_POOL_MAX_OPENED_FILES; } @@ -557,52 +561,52 @@ grib_context* grib_context_get_default() return &default_grib_context; } -#if 0 /* function removed */ -grib_context* grib_context_new(grib_context* parent) -{ - grib_context* c; -#if GRIB_PTHREADS - pthread_mutexattr_t attr; -#endif +// Do we really need this? +// grib_context* grib_context_new(grib_context* parent) +// { +// grib_context* c; +// #if GRIB_PTHREADS +// pthread_mutexattr_t attr; +// #endif - if (!parent) parent=grib_context_get_default(); +// if (!parent) parent=grib_context_get_default(); - GRIB_MUTEX_INIT_ONCE(&once,&init); - GRIB_MUTEX_LOCK(&(parent->mutex)); +// GRIB_MUTEX_INIT_ONCE(&once,&init); +// GRIB_MUTEX_LOCK(&(parent->mutex)); - c = (grib_context*)grib_context_malloc_clear_persistent(&default_grib_context,sizeof(grib_context)); +// c = (grib_context*)grib_context_malloc_clear_persistent(&default_grib_context,sizeof(grib_context)); - c->inited = default_grib_context.inited; - c->debug = default_grib_context.debug; +// c->inited = default_grib_context.inited; +// c->debug = default_grib_context.debug; - c->real_mode = default_grib_context.real_mode; +// c->real_mode = default_grib_context.real_mode; - c->free_mem = default_grib_context.free_mem; - c->alloc_mem = default_grib_context.alloc_mem; +// c->free_mem = default_grib_context.free_mem; +// c->alloc_mem = default_grib_context.alloc_mem; - c->free_persistent_mem = default_grib_context.free_persistent_mem; - c->alloc_persistent_mem= default_grib_context.alloc_persistent_mem; +// c->free_persistent_mem = default_grib_context.free_persistent_mem; +// c->alloc_persistent_mem= default_grib_context.alloc_persistent_mem; - c->read = default_grib_context.read; - c->write = default_grib_context.write; - c->tell = default_grib_context.tell; +// c->read = default_grib_context.read; +// c->write = default_grib_context.write; +// c->tell = default_grib_context.tell; - c->output_log = default_grib_context.output_log; - c->print = default_grib_context.print ; - c->user_data = default_grib_context.user_data; - c->def_files = default_grib_context.def_files; - c->lists = default_grib_context.lists; +// c->output_log = default_grib_context.output_log; +// c->print = default_grib_context.print ; +// c->user_data = default_grib_context.user_data; +// c->def_files = default_grib_context.def_files; +// c->lists = default_grib_context.lists; -#if GRIB_PTHREADS - pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&mutex_c,&attr); - pthread_mutexattr_destroy(&attr); -#endif +// #if GRIB_PTHREADS +// pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); +// pthread_mutex_init(&mutex_c,&attr); +// pthread_mutexattr_destroy(&attr); +// #endif + +// GRIB_MUTEX_UNLOCK(&(parent->mutex)); +// return c; +// } - GRIB_MUTEX_UNLOCK(&(parent->mutex)); - return c; -} -#endif /* function removed */ /* GRIB-235: Resolve path to expand symbolic links etc */ /* Note: return value is allocated. Client has to free */ @@ -1065,17 +1069,15 @@ void grib_context_log(const grib_context* c, int level, const char* fmt, ...) level = level & ~GRIB_LOG_PERROR; /* #if HAS_STRERROR */ -#if 1 strcat(msg, " ("); strcat(msg, strerror(errsv)); strcat(msg, ")"); -#else - if (errsv > 0 && errsv < sys_nerr) { - strcat(msg, " ("); - strcat(msg, sys_errlist[errsv]); - strcat(msg, " )"); - } -#endif + + // if (errsv > 0 && errsv < sys_nerr) { + // strcat(msg, " ("); + // strcat(msg, sys_errlist[errsv]); + // strcat(msg, " )"); + // } } if (c->output_log) diff --git a/src/grib_darray.cc b/src/grib_darray.cc index e37ba710f..3646e6937 100644 --- a/src/grib_darray.cc +++ b/src/grib_darray.cc @@ -22,23 +22,21 @@ void grib_darray_print(const char* title, const grib_darray* darray) printf("\n"); } -#if 0 -grib_darray* grib_darray_new_from_array(grib_context* c, double* src_array, size_t size) -{ - size_t i; - grib_darray* v; +// grib_darray* grib_darray_new_from_array(grib_context* c, double* src_array, size_t size) +// { +// size_t i; +// grib_darray* v; - if (!c) - c = grib_context_get_default(); +// if (!c) +// c = grib_context_get_default(); - v = grib_darray_new(c, size, 100); - for (i = 0; i < size; i++) - v->v[i] = src_array[i]; - v->n = size; - v->context = c; - return v; -} -#endif +// v = grib_darray_new(c, size, 100); +// for (i = 0; i < size; i++) +// v->v[i] = src_array[i]; +// v->n = size; +// v->context = c; +// return v; +// } grib_darray* grib_darray_new(grib_context* c, size_t size, size_t incsize) { diff --git a/src/grib_date.cc b/src/grib_date.cc index cd2fc32cf..b069cb8b6 100644 --- a/src/grib_date.cc +++ b/src/grib_date.cc @@ -45,21 +45,19 @@ int grib_julian_to_datetime(double jd, long* year, long* month, long* day, *day = (long)dday; dday -= *day; -#if 1 /* ANF-CG 02.03.2012 */ s = ROUND((double)(dday * 86400)); /* total in sec , no msec*/ *hour = (long)s / 3600; *minute = (long)((s % 3600) / 60); *second = (long)(s % 60); -#else - /* Old algorithm, now replaced by above. See GRIB-180 */ - dhour = dday * 24; - *hour = (long)dhour; - dhour -= *hour; - dminute = dhour * 60; - *minute = (long)dminute; - *second = (long)((dminute - *minute) * 60); -#endif + + // Old algorithm, now replaced by above. See GRIB-180 + // dhour = dday * 24; + // *hour = (long)dhour; + // dhour -= *hour; + // dminute = dhour * 60; + // *minute = (long)dminute; + // *second = (long)((dminute - *minute) * 60); if (e < 14) *month = e - 1; diff --git a/src/grib_db.cc b/src/grib_db.cc index c55be2f3c..56571c104 100644 --- a/src/grib_db.cc +++ b/src/grib_db.cc @@ -250,64 +250,55 @@ static int grib_db_column_copy_from_handle(grib_handle* h, grib_db* db, int i) return err; } -/* --------------- grib_db functions ------------------*/ -#if 0 -grib_db* grib_db_new_from_files(grib_context* c, char* filenames[], - int nfiles, char** keys, int nkeys, int* err) -{ - int i = 0; - int ret = GRIB_SUCCESS; - - grib_db* db = 0; - - if (!c) - c = grib_context_get_default(); - - if (((!keys || nkeys == 0)) || !filenames) { - *err = GRIB_INVALID_ARGUMENT; - return NULL; - } +// grib_db* grib_db_new_from_files(grib_context* c, char* filenames[], +// int nfiles, char** keys, int nkeys, int* err) +// { +// int i = 0; +// int ret = GRIB_SUCCESS; +// grib_db* db = 0; +// if (!c) c = grib_context_get_default(); + +// if (((!keys || nkeys == 0)) || !filenames) { +// *err = GRIB_INVALID_ARGUMENT; +// return NULL; +// } + +// db = grib_db_new_from_file(c, filenames[0], keys, nkeys, err); +// if (!db || *err != GRIB_SUCCESS) +// return db; + +// *err = GRIB_SUCCESS; +// for (i = 1; i < nfiles; i++) { +// ret = grib_db_load(db, filenames[i]); +// if (ret != GRIB_SUCCESS) +// *err = ret; +// } +// return db; +// } + +// grib_db* grib_db_new_from_file(grib_context* c, char* filename, +// char** keys, int nkeys, int* err) +// { +// int i = 0; +// int ret = GRIB_SUCCESS; +// grib_db* db = 0; + +// if (!c) +// c = grib_context_get_default(); + +// if (((!keys || nkeys == 0)) || !filename) { +// *err = GRIB_INVALID_ARGUMENT; +// return NULL; +// } + +// db = grib_db_create_from_keys(c, keys, nkeys, err); +// *err = GRIB_SUCCESS; +// ret = grib_db_load(db, filename); +// if (ret != GRIB_SUCCESS) +// *err = ret; +// return db; +// } - db = grib_db_new_from_file(c, filenames[0], keys, nkeys, err); - if (!db || *err != GRIB_SUCCESS) - return db; - - *err = GRIB_SUCCESS; - for (i = 1; i < nfiles; i++) { - ret = grib_db_load(db, filenames[i]); - if (ret != GRIB_SUCCESS) - *err = ret; - } - - return db; -} - -grib_db* grib_db_new_from_file(grib_context* c, char* filename, - char** keys, int nkeys, int* err) -{ - int i = 0; - int ret = GRIB_SUCCESS; - - grib_db* db = 0; - - if (!c) - c = grib_context_get_default(); - - if (((!keys || nkeys == 0)) || !filename) { - *err = GRIB_INVALID_ARGUMENT; - return NULL; - } - - db = grib_db_create_from_keys(c, keys, nkeys, err); - - *err = GRIB_SUCCESS; - ret = grib_db_load(db, filename); - if (ret != GRIB_SUCCESS) - *err = ret; - - return db; -} -#endif static grib_db* grib_db_create_from_keys(grib_context* c, char** keys, int nkeys, int* err) { @@ -458,12 +449,9 @@ int grib_db_apply_where(grib_fieldset* set) if (!set) return GRIB_INVALID_ARGUMENT; - /* - m=grib_math_new(set->context,where_string,&err); - - print_math(m); - printf("\n"); - */ + // m=grib_math_new(set->context,where_string,&err); + // print_math(m); + // printf("\n"); if (set->filter) grib_db_delete_int_array(set->filter); @@ -495,61 +483,59 @@ int grib_db_apply_order_by(grib_fieldset* set) return err; } -#if 0 -static int grib_fieldset_compare(grib_fieldset* set, int* i, int* j) -{ - int ret = 0; - double d = 0; - int idkey = 0; - grib_order_by* ob = 0; - int ii = 0, jj = 0; - int *order = 0, *filter = 0; - - if (!set || !set->order_by) - return GRIB_INVALID_ARGUMENT; - ob = set->query->order_by; - order = set->order->el; - filter = set->filter->el; - - ii = *(set->filter->el + *(order + *i)); - jj = *(set->filter->el + *(order + *j)); - - while (ob) { - idkey = ob->idkey; - switch (set->db->columns[idkey].type) { - case GRIB_TYPE_STRING: - ret = grib_inline_strcmp(set->db->columns[idkey].string_values[ii], - set->db->columns[idkey].string_values[jj]); - break; - - case GRIB_TYPE_DOUBLE: - d = set->db->columns[idkey].double_values[ii] - - set->db->columns[idkey].double_values[jj]; - if (d > 0) - ret = 1; - else if (d == 0) - ret = 0; - else - ret = -1; - break; - - case GRIB_TYPE_LONG: - ret = set->db->columns[idkey].long_values[ii] - - set->db->columns[idkey].long_values[jj]; - break; - default: - return GRIB_INVALID_TYPE; - } - if (ret != 0) { - ret *= ob->mode; - break; - } - ob = ob->next; - } - - return ret; -} -#endif +// static int grib_fieldset_compare(grib_fieldset* set, int* i, int* j) +// { +// int ret = 0; +// double d = 0; +// int idkey = 0; +// grib_order_by* ob = 0; +// int ii = 0, jj = 0; +// int *order = 0, *filter = 0; + +// if (!set || !set->order_by) +// return GRIB_INVALID_ARGUMENT; +// ob = set->query->order_by; +// order = set->order->el; +// filter = set->filter->el; + +// ii = *(set->filter->el + *(order + *i)); +// jj = *(set->filter->el + *(order + *j)); + +// while (ob) { +// idkey = ob->idkey; +// switch (set->db->columns[idkey].type) { +// case GRIB_TYPE_STRING: +// ret = grib_inline_strcmp(set->db->columns[idkey].string_values[ii], +// set->db->columns[idkey].string_values[jj]); +// break; + +// case GRIB_TYPE_DOUBLE: +// d = set->db->columns[idkey].double_values[ii] - +// set->db->columns[idkey].double_values[jj]; +// if (d > 0) +// ret = 1; +// else if (d == 0) +// ret = 0; +// else +// ret = -1; +// break; + +// case GRIB_TYPE_LONG: +// ret = set->db->columns[idkey].long_values[ii] - +// set->db->columns[idkey].long_values[jj]; +// break; +// default: +// return GRIB_INVALID_TYPE; +// } +// if (ret != 0) { +// ret *= ob->mode; +// break; +// } +// ob = ob->next; +// } + +// return ret; +// } static void grib_db_sort(grib_set* set, int beg, int theEnd) { diff --git a/src/grib_dependency.cc b/src/grib_dependency.cc index 9d6bab0f7..769ec49ce 100644 --- a/src/grib_dependency.cc +++ b/src/grib_dependency.cc @@ -10,8 +10,6 @@ /*************************************************************************** * Jean Baptiste Filippi - 01.11.2005 - * Enrico Fucile - * * ***************************************************************************/ #include "grib_api_internal.h" @@ -28,7 +26,7 @@ grib_handle* grib_handle_of_accessor(const grib_accessor* a) static grib_handle* handle_of(grib_accessor* observed) { grib_handle* h = NULL; - DebugAssert(observed); + DEBUG_ASSERT(observed); /* printf("+++++ %s->parent = %p\n",observed->name,observed->parent); */ /* printf("+++++ %s = %p\n",observed->name,observed); */ /* printf("+++++ h=%p\n",observed->h); */ @@ -69,15 +67,12 @@ void grib_dependency_add(grib_accessor* observer, grib_accessor* observed) d = d->next; } -#if 0 - d = h->dependencies; - while(d) - { - last = d; - d = d->next; - } - -#endif +// d = h->dependencies; +// while(d) +// { +// last = d; +// d = d->next; +// } d = (grib_dependency*)grib_context_malloc_clear(h->context, sizeof(grib_dependency)); Assert(d); @@ -86,11 +81,9 @@ void grib_dependency_add(grib_accessor* observer, grib_accessor* observed) d->observer = observer; d->next = 0; - /*printf("observe %p %p %s %s\n",(void*)observed,(void*)observer, observed->name,observer->name);*/ -#if 0 - d->next = h->dependencies; - h->dependencies = d; -#endif + //printf("observe %p %p %s %s\n",(void*)observed,(void*)observer, observed->name,observer->name); +// d->next = h->dependencies; +// h->dependencies = d; if (last) last->next = d; diff --git a/src/grib_dumper_class.h b/src/grib_dumper_class.h index 0728c7395..6ccf0c046 100644 --- a/src/grib_dumper_class.h +++ b/src/grib_dumper_class.h @@ -13,7 +13,6 @@ extern grib_dumper_class* grib_dumper_class_default; extern grib_dumper_class* grib_dumper_class_file; extern grib_dumper_class* grib_dumper_class_grib_encode_C; extern grib_dumper_class* grib_dumper_class_json; -extern grib_dumper_class* grib_dumper_class_keys; extern grib_dumper_class* grib_dumper_class_serialize; extern grib_dumper_class* grib_dumper_class_string; extern grib_dumper_class* grib_dumper_class_wmo; diff --git a/src/grib_dumper_class_bufr_decode_C.cc b/src/grib_dumper_class_bufr_decode_C.cc index e658a29ba..294f7931e 100644 --- a/src/grib_dumper_class_bufr_decode_C.cc +++ b/src/grib_dumper_class_bufr_decode_C.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl diff --git a/src/grib_dumper_class_bufr_decode_filter.cc b/src/grib_dumper_class_bufr_decode_filter.cc index 1c7434cdb..ca1e7f454 100644 --- a/src/grib_dumper_class_bufr_decode_filter.cc +++ b/src/grib_dumper_class_bufr_decode_filter.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl diff --git a/src/grib_dumper_class_bufr_decode_fortran.cc b/src/grib_dumper_class_bufr_decode_fortran.cc index 9a3871c40..739ec1362 100644 --- a/src/grib_dumper_class_bufr_decode_fortran.cc +++ b/src/grib_dumper_class_bufr_decode_fortran.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl diff --git a/src/grib_dumper_class_bufr_decode_python.cc b/src/grib_dumper_class_bufr_decode_python.cc index 3b6cffba0..8c77c8325 100644 --- a/src/grib_dumper_class_bufr_decode_python.cc +++ b/src/grib_dumper_class_bufr_decode_python.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl diff --git a/src/grib_dumper_class_bufr_encode_C.cc b/src/grib_dumper_class_bufr_encode_C.cc index 385474470..b69f765c6 100644 --- a/src/grib_dumper_class_bufr_encode_C.cc +++ b/src/grib_dumper_class_bufr_encode_C.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl diff --git a/src/grib_dumper_class_bufr_encode_filter.cc b/src/grib_dumper_class_bufr_encode_filter.cc index 308d5f7b4..38a704842 100644 --- a/src/grib_dumper_class_bufr_encode_filter.cc +++ b/src/grib_dumper_class_bufr_encode_filter.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl diff --git a/src/grib_dumper_class_bufr_encode_fortran.cc b/src/grib_dumper_class_bufr_encode_fortran.cc index 5596718c6..8ddc771b6 100644 --- a/src/grib_dumper_class_bufr_encode_fortran.cc +++ b/src/grib_dumper_class_bufr_encode_fortran.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl diff --git a/src/grib_dumper_class_bufr_encode_python.cc b/src/grib_dumper_class_bufr_encode_python.cc index 53c9a9352..ba2a0998a 100644 --- a/src/grib_dumper_class_bufr_encode_python.cc +++ b/src/grib_dumper_class_bufr_encode_python.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl diff --git a/src/grib_dumper_class_bufr_simple.cc b/src/grib_dumper_class_bufr_simple.cc index 19094f7c7..7dc758bc4 100644 --- a/src/grib_dumper_class_bufr_simple.cc +++ b/src/grib_dumper_class_bufr_simple.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -315,9 +315,9 @@ static void dump_long(grib_dumper* d, grib_accessor* a, const char* comment) /* Note: the "subsetNumber" key is only there for UNCOMPRESSED BUFR messages */ if (self->numberOfSubsets > 1 && strcmp(a->name, "subsetNumber") == 0) { err = grib_unpack_long(a, &value, &size); - DebugAssert(!err); + DEBUG_ASSERT(!err); fprintf(self->dumper.out, "%s=%ld\n", a->name, value); - DebugAssert(!grib_is_missing_long(a, value)); + DEBUG_ASSERT(!grib_is_missing_long(a, value)); (void)err; return; } diff --git a/src/grib_dumper_class_debug.cc b/src/grib_dumper_class_debug.cc index 123a99601..79c1ea29c 100644 --- a/src/grib_dumper_class_debug.cc +++ b/src/grib_dumper_class_debug.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -191,8 +191,12 @@ static void dump_long(grib_dumper* d, grib_accessor* a, const char* comment) fprintf(self->dumper.out, "%ld-%ld %s %s = %ld", self->begin, self->theEnd, a->creator->op, a->name, value); if (comment) fprintf(self->dumper.out, " [%s]", comment); + if ((d->option_flags & GRIB_DUMP_FLAG_TYPE) != 0) + fprintf(self->dumper.out, " (%s)", grib_get_type_name(grib_accessor_get_native_type(a))); if ((a->flags & GRIB_ACCESSOR_FLAG_CAN_BE_MISSING) != 0) fprintf(self->dumper.out, " %s", "(can be missing)"); + if ((a->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) != 0) + fprintf(self->dumper.out, " %s", "(read-only)"); } if (err) fprintf(self->dumper.out, " *** ERR=%d (%s) [grib_dumper_debug::dump_long]", err, grib_get_error_message(err)); @@ -267,6 +271,8 @@ static void dump_double(grib_dumper* d, grib_accessor* a, const char* comment) fprintf(self->dumper.out, "%ld-%ld %s %s = %g", self->begin, self->theEnd, a->creator->op, a->name, value); if (comment) fprintf(self->dumper.out, " [%s]", comment); + if ((d->option_flags & GRIB_DUMP_FLAG_TYPE) != 0) + fprintf(self->dumper.out, " (%s)", grib_get_type_name(grib_accessor_get_native_type(a))); if (err) fprintf(self->dumper.out, " *** ERR=%d (%s) [grib_dumper_debug::dump_double]", err, grib_get_error_message(err)); aliases(d, a); @@ -315,6 +321,9 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment) if (comment) fprintf(self->dumper.out, " [%s]", comment); + if ((d->option_flags & GRIB_DUMP_FLAG_TYPE) != 0) + fprintf(self->dumper.out, " (%s)", grib_get_type_name(grib_accessor_get_native_type(a))); + if (err) fprintf(self->dumper.out, " *** ERR=%d (%s) [grib_dumper_debug::dump_string]", err, grib_get_error_message(err)); aliases(d, a); @@ -444,7 +453,6 @@ static void dump_values(grib_dumper* d, grib_accessor* a) k = 0; while (k < size) { -#if 1 int j; for (i = 0; i < d->depth + 3; i++) fprintf(self->dumper.out, " "); @@ -454,11 +462,6 @@ static void dump_values(grib_dumper* d, grib_accessor* a) fprintf(self->dumper.out, ", "); } fprintf(self->dumper.out, "\n"); -#else - - fprintf(self->dumper.out, "%d %g\n", k, buf[k]); - -#endif } if (more) { for (i = 0; i < d->depth + 3; i++) @@ -488,12 +491,11 @@ static void dump_section(grib_dumper* d, grib_accessor* a, grib_block_of_accesso /* grib_section* s = grib_get_sub_section(a); */ grib_section* s = a->sub_section; -#if 1 if (a->name[0] == '_') { grib_dump_accessors_block(d, block); return; } -#endif + for (i = 0; i < d->depth; i++) fprintf(self->dumper.out, " "); fprintf(self->dumper.out, "======> %s %s (%ld,%ld,%ld)\n", a->creator->op, diff --git a/src/grib_dumper_class_default.cc b/src/grib_dumper_class_default.cc index 0b64ce88a..61aface7f 100644 --- a/src/grib_dumper_class_default.cc +++ b/src/grib_dumper_class_default.cc @@ -14,7 +14,7 @@ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -466,77 +466,75 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment) static void dump_bytes(grib_dumper* d, grib_accessor* a, const char* comment) { -#if 0 - grib_dumper_default *self = (grib_dumper_default*)d; - int i,k,err =0; - size_t more = 0; - size_t size = a->length; - unsigned char* buf = grib_context_malloc(d->context,size); - - if ( (a->flags & GRIB_ACCESSOR_FLAG_DUMP) == 0) - return; - - - if (a->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) - fprintf(self->dumper.out,"-READ ONLY- "); - - /*for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," ");*/ - /*print_offset(self->dumper.out,self->begin,self->theEnd);*/ - if ((d->option_flags & GRIB_DUMP_FLAG_TYPE) != 0) - fprintf(self->dumper.out,"%s ",a->creator->op); - - fprintf(self->dumper.out,"%s = %ld",a->name,a->length); - aliases(d,a); - fprintf(self->dumper.out," {"); - - if(!buf) - { - if(size == 0) - fprintf(self->dumper.out,"}\n"); - else - fprintf(self->dumper.out," *** ERR cannot malloc(%ld) }\n",(long)size); - return; - } - - fprintf(self->dumper.out,"\n"); - - err = grib_unpack_bytes(a,buf,&size); - if(err){ - grib_context_free(d->context,buf); - fprintf(self->dumper.out," *** ERR=%d (%s) [grib_dumper_default::dump_bytes]\n}",err,grib_get_error_message(err)); - return ; - } - - if(size > 100) { - more = size - 100; - size = 100; - } - - k = 0; - /* if(size > 100) size = 100; */ - while(k < size) - { - int j; - for(i = 0; i < d->depth + 3 ; i++) fprintf(self->dumper.out," "); - for(j = 0; j < 16 && k < size; j++, k++) - { - fprintf(self->dumper.out,"%02x",buf[k]); - if(k != size-1) - fprintf(self->dumper.out,", "); - } - fprintf(self->dumper.out,"\n"); - } - - if(more) - { - for(i = 0; i < d->depth + 3 ; i++) fprintf(self->dumper.out," "); - fprintf(self->dumper.out,"... %lu more values\n", (unsigned long)more); - } - - for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," "); - fprintf(self->dumper.out,"} # %s %s \n",a->creator->op, a->name); - grib_context_free(d->context,buf); -#endif +// grib_dumper_default *self = (grib_dumper_default*)d; +// int i,k,err =0; +// size_t more = 0; +// size_t size = a->length; +// unsigned char* buf = grib_context_malloc(d->context,size); + +// if ( (a->flags & GRIB_ACCESSOR_FLAG_DUMP) == 0) +// return; + + +// if (a->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) +// fprintf(self->dumper.out,"-READ ONLY- "); + +// /*for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," ");*/ +// /*print_offset(self->dumper.out,self->begin,self->theEnd);*/ +// if ((d->option_flags & GRIB_DUMP_FLAG_TYPE) != 0) +// fprintf(self->dumper.out,"%s ",a->creator->op); + +// fprintf(self->dumper.out,"%s = %ld",a->name,a->length); +// aliases(d,a); +// fprintf(self->dumper.out," {"); + +// if(!buf) +// { +// if(size == 0) +// fprintf(self->dumper.out,"}\n"); +// else +// fprintf(self->dumper.out," *** ERR cannot malloc(%ld) }\n",(long)size); +// return; +// } + +// fprintf(self->dumper.out,"\n"); + +// err = grib_unpack_bytes(a,buf,&size); +// if(err){ +// grib_context_free(d->context,buf); +// fprintf(self->dumper.out," *** ERR=%d (%s) [grib_dumper_default::dump_bytes]\n}",err,grib_get_error_message(err)); +// return ; +// } + +// if(size > 100) { +// more = size - 100; +// size = 100; +// } + +// k = 0; +// /* if(size > 100) size = 100; */ +// while(k < size) +// { +// int j; +// for(i = 0; i < d->depth + 3 ; i++) fprintf(self->dumper.out," "); +// for(j = 0; j < 16 && k < size; j++, k++) +// { +// fprintf(self->dumper.out,"%02x",buf[k]); +// if(k != size-1) +// fprintf(self->dumper.out,", "); +// } +// fprintf(self->dumper.out,"\n"); +// } + +// if(more) +// { +// for(i = 0; i < d->depth + 3 ; i++) fprintf(self->dumper.out," "); +// fprintf(self->dumper.out,"... %lu more values\n", (unsigned long)more); +// } + +// for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," "); +// fprintf(self->dumper.out,"} # %s %s \n",a->creator->op, a->name); +// grib_context_free(d->context,buf); } static void dump_values(grib_dumper* d, grib_accessor* a) @@ -613,7 +611,6 @@ static void dump_values(grib_dumper* d, grib_accessor* a) k = 0; while (k < size) { -#if 1 int j; fprintf(self->dumper.out, " "); for (j = 0; j < 5 && k < size; j++, k++) { @@ -622,11 +619,6 @@ static void dump_values(grib_dumper* d, grib_accessor* a) fprintf(self->dumper.out, ", "); } fprintf(self->dumper.out, "\n"); -#else - - fprintf(self->dumper.out, "%d %g\n", k, buf[k]); - -#endif } if (more) { fprintf(self->dumper.out, " "); diff --git a/src/grib_dumper_class_grib_encode_C.cc b/src/grib_dumper_class_grib_encode_C.cc index b9c06653a..91d07b688 100644 --- a/src/grib_dumper_class_grib_encode_C.cc +++ b/src/grib_dumper_class_grib_encode_C.cc @@ -135,10 +135,8 @@ static void dump_long(grib_dumper* d, grib_accessor* a, const char* comment) if ((a->flags & GRIB_ACCESSOR_FLAG_READ_ONLY)) return; -#if 1 if (comment) pcomment(self->dumper.out, value, comment); -#endif if (((a->flags & GRIB_ACCESSOR_FLAG_CAN_BE_MISSING) != 0) && (value == GRIB_MISSING_LONG)) fprintf(self->dumper.out, " GRIB_CHECK(grib_set_missing(h,\"%s\"),%d);\n", a->name, 0); @@ -210,9 +208,7 @@ static void dump_double(grib_dumper* d, grib_accessor* a, const char* comment) if (a->length == 0) return; -#if 0 - if(comment) fprintf(self->dumper.out,"/* %s */\n",comment); -#endif + //if(comment) fprintf(self->dumper.out,"/* %s */\n",comment); fprintf(self->dumper.out, " GRIB_CHECK(grib_set_double(h,\"%s\",%g),%d);\n", a->name, value, 0); @@ -233,10 +229,8 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment) if (a->length == 0) return; -#if 1 if (comment) fprintf(self->dumper.out, "/* %s */\n", comment); -#endif fprintf(self->dumper.out, " p = \"%s\";\n", value); fprintf(self->dumper.out, " size = strlen(p);\n"); @@ -273,27 +267,26 @@ static void dump_bytes(grib_dumper* d, grib_accessor* a, const char* comment) return; } -#if 0 - if(size > 100) { - more = size - 100; - size = 100; - } + // if(size > 100) { + // more = size - 100; + // size = 100; + // } + + // k = 0; + // //if(size > 100) size = 100; + // while(k < size) + // { + // int j; + // for(i = 0; i < d->depth + 3 ; i++) fprintf(self->dumper.out," "); + // for(j = 0; j < 16 && k < size; j++, k++) + // { + // fprintf(self->dumper.out,"%02x",buf[k]); + // if(k != size-1) + // fprintf(self->dumper.out,", "); + // } + // fprintf(self->dumper.out,"\n"); + // } - k = 0; - /* if(size > 100) size = 100; */ - while(k < size) - { - int j; - for(i = 0; i < d->depth + 3 ; i++) fprintf(self->dumper.out," "); - for(j = 0; j < 16 && k < size; j++, k++) - { - fprintf(self->dumper.out,"%02x",buf[k]); - if(k != size-1) - fprintf(self->dumper.out,", "); - } - fprintf(self->dumper.out,"\n"); - } -#endif grib_context_free(d->context, buf); } diff --git a/src/grib_dumper_class_json.cc b/src/grib_dumper_class_json.cc index 7ccf07f7f..3615595b2 100644 --- a/src/grib_dumper_class_json.cc +++ b/src/grib_dumper_class_json.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl diff --git a/src/grib_dumper_class_keys.cc b/src/grib_dumper_class_keys.cc deleted file mode 100644 index ed979677b..000000000 --- a/src/grib_dumper_class_keys.cc +++ /dev/null @@ -1,321 +0,0 @@ -/* - * (C) Copyright 2005- 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. - */ - -/************************************** - * Enrico Fucile - **************************************/ - - -#include "grib_api_internal.h" -#include -/* - This is used by make_class.pl - - START_CLASS_DEF - CLASS = dumper - IMPLEMENTS = dump_long;dump_bits - IMPLEMENTS = dump_double;dump_string - IMPLEMENTS = dump_bytes;dump_values - IMPLEMENTS = dump_label;dump_section - IMPLEMENTS = init;destroy - MEMBERS = long section_offset - MEMBERS = long begin - MEMBERS = long theEnd - END_CLASS_DEF - - */ - - -/* START_CLASS_IMP */ - -/* - -Don't edit anything between START_CLASS_IMP and END_CLASS_IMP -Instead edit values between START_CLASS_DEF and END_CLASS_DEF -or edit "dumper.class" and rerun ./make_class.pl - -*/ - -static void init_class (grib_dumper_class*); -static int init (grib_dumper* d); -static int destroy (grib_dumper*); -static void dump_long (grib_dumper* d, grib_accessor* a,const char* comment); -static void dump_bits (grib_dumper* d, grib_accessor* a,const char* comment); -static void dump_double (grib_dumper* d, grib_accessor* a,const char* comment); -static void dump_string (grib_dumper* d, grib_accessor* a,const char* comment); -static void dump_bytes (grib_dumper* d, grib_accessor* a,const char* comment); -static void dump_values (grib_dumper* d, grib_accessor* a); -static void dump_label (grib_dumper* d, grib_accessor* a,const char* comment); -static void dump_section (grib_dumper* d, grib_accessor* a,grib_block_of_accessors* block); - -typedef struct grib_dumper_keys { - grib_dumper dumper; - /* Members defined in keys */ - long section_offset; - long begin; - long theEnd; -} grib_dumper_keys; - - -static grib_dumper_class _grib_dumper_class_keys = { - 0, /* super */ - "keys", /* name */ - sizeof(grib_dumper_keys), /* size */ - 0, /* inited */ - &init_class, /* init_class */ - &init, /* init */ - &destroy, /* free mem */ - &dump_long, /* dump long */ - &dump_double, /* dump double */ - &dump_string, /* dump string */ - 0, /* dump string array */ - &dump_label, /* dump labels */ - &dump_bytes, /* dump bytes */ - &dump_bits, /* dump bits */ - &dump_section, /* dump section */ - &dump_values, /* dump values */ - 0, /* header */ - 0, /* footer */ -}; - -grib_dumper_class* grib_dumper_class_keys = &_grib_dumper_class_keys; - -/* END_CLASS_IMP */ - -static void print_offset(FILE* out, grib_dumper* d, grib_accessor* a); - -static void init_class(grib_dumper_class* c) {} - -static int init(grib_dumper* d) -{ - grib_dumper_keys* self = (grib_dumper_keys*)d; - self->section_offset = 0; - - return GRIB_SUCCESS; -} - -static int destroy(grib_dumper* d) -{ - return GRIB_SUCCESS; -} - -static void aliases(grib_dumper* d, grib_accessor* a) -{ - int i; - grib_dumper_keys* self = (grib_dumper_keys*)d; - - if ((d->option_flags & GRIB_DUMP_FLAG_ALIASES) == 0) - return; - - if (a->all_names[1]) { - const char* sep = ""; - fprintf(self->dumper.out, " ( ALIASES: "); - - for (i = 1; i < MAX_ACCESSOR_NAMES; i++) { - if (a->all_names[i]) { - if (a->all_name_spaces[i]) - fprintf(self->dumper.out, "%s%s.%s", sep, a->all_name_spaces[i], a->all_names[i]); - else - fprintf(self->dumper.out, "%s%s", sep, a->all_names[i]); - } - sep = ", "; - } - printf(") "); - } -} - -static void dump_name_only(grib_dumper* d, grib_accessor* a, const char* comment) -{ - grib_dumper_keys* self = (grib_dumper_keys*)d; - - print_offset(self->dumper.out, d, a); - - - if (a->flags & GRIB_ACCESSOR_FLAG_HIDDEN) { - return; - } - - if (a->length == 0 && - (d->option_flags & GRIB_DUMP_FLAG_CODED) != 0) - return; - - if ((a->flags & GRIB_ACCESSOR_FLAG_DUMP) == 0 && - (d->option_flags & GRIB_DUMP_FLAG_DUMP_OK) != 0) - return; - - fprintf(self->dumper.out, "%s", a->name); - - if (a->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) { - fprintf(self->dumper.out, " (read only)"); - } - if ((d->option_flags & GRIB_DUMP_FLAG_TYPE) != 0) { - fprintf(self->dumper.out, " (type %s) ", a->creator->op); - } - - aliases(d, a); - - fprintf(self->dumper.out, "\n"); -} - -static void dump_long(grib_dumper* d, grib_accessor* a, const char* comment) -{ - dump_name_only(d, a, comment); -} - -static void dump_bits(grib_dumper* d, grib_accessor* a, const char* comment) -{ - dump_name_only(d, a, comment); -} - -static void dump_double(grib_dumper* d, grib_accessor* a, const char* comment) -{ - dump_name_only(d, a, comment); -} - -static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment) -{ - dump_name_only(d, a, comment); -} - -static void dump_bytes(grib_dumper* d, grib_accessor* a, const char* comment) -{ -#if 0 - grib_dumper_keys *self = (grib_dumper_keys*)d; - int i,k,err =0; - size_t more = 0; - size_t size = a->length; - unsigned char* buf = grib_context_malloc(d->handle->context,size); - - if ( (a->flags & GRIB_ACCESSOR_FLAG_DUMP) == 0) - return; - - - if (a->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) - fprintf(self->dumper.out,"-READ ONLY- "); - - /*for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," ");*/ - /*print_offset(self->dumper.out,self->begin,self->theEnd);*/ - if ((d->option_flags & GRIB_DUMP_FLAG_TYPE) != 0) - fprintf(self->dumper.out,"%s ",a->creator->op); - - fprintf(self->dumper.out,"%s = %ld",a->name,a->length); - aliases(d,a); - fprintf(self->dumper.out," {"); - - if(!buf) - { - if(size == 0) - fprintf(self->dumper.out,"}\n"); - else - fprintf(self->dumper.out," *** ERR cannot malloc(%ld) }\n",(long)size); - return; - } - - fprintf(self->dumper.out,"\n"); - - err = grib_unpack_bytes(a,buf,&size); - if(err){ - grib_context_free(d->handle->context,buf); - fprintf(self->dumper.out," *** ERR=%d (%s) \n}",err,grib_get_error_message(err)); - return ; - } - - if(size > 100) { - more = size - 100; - size = 100; - } - - k = 0; - /* if(size > 100) size = 100; */ - while(k < size) - { - int j; - for(i = 0; i < d->depth + 3 ; i++) fprintf(self->dumper.out," "); - for(j = 0; j < 16 && k < size; j++, k++) - { - fprintf(self->dumper.out,"%02x",buf[k]); - if(k != size-1) - fprintf(self->dumper.out,", "); - } - fprintf(self->dumper.out,"\n"); - } - - if(more) - { - for(i = 0; i < d->depth + 3 ; i++) fprintf(self->dumper.out," "); - fprintf(self->dumper.out,"... %lu more values\n", (unsigned long)more); - } - - for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," "); - fprintf(self->dumper.out,"} # %s %s \n",a->creator->op, a->name); - grib_context_free(d->handle->context,buf); -#endif -} - -static void dump_values(grib_dumper* d, grib_accessor* a) -{ - dump_name_only(d, a, 0); -} - -static void dump_label(grib_dumper* d, grib_accessor* a, const char* comment) -{ - /*grib_dumper_keys *self = (grib_dumper_keys*)d; - - for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," "); - fprintf(self->dumper.out,"----> %s %s %s\n",a->creator->op, a->name,comment?comment:"");*/ -} - -static void dump_section(grib_dumper* d, grib_accessor* a, grib_block_of_accessors* block) -{ - grib_dumper_keys* self = (grib_dumper_keys*)d; - /*grib_section* s = grib_get_sub_section(a);*/ - int is_default_section = 0; - char* upper = NULL; - char *p = NULL, *q = NULL; - if (!strncmp(a->name, "section", 7)) - is_default_section = 1; - - /*for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," ");*/ - if (is_default_section) { - upper = (char*)malloc(strlen(a->name) + 1); - Assert(upper); - p = (char*)a->name; - q = upper; - while (*p != '\0') { - *q = toupper(*p); - if (*q == '_') - *q = ' '; - q++; - p++; - } - *q = '\0'; - - /*snprintf(tmp,1024,"%s ",upper,(long)s->length,(long)s->padding);*/ - - fprintf(self->dumper.out, "====> %s <==== \n", upper); - - free(upper); - self->section_offset = a->offset; - } - else { - } - - /*printf("------------- section_offset = %ld\n",self->section_offset);*/ - d->depth += 3; - grib_dump_accessors_block(d, block); - d->depth -= 3; - - /*for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," ");*/ - /*fprintf(self->dumper.out,"<===== %s %s\n",a->creator->op, a->name);*/ -} - -static void print_offset(FILE* out, grib_dumper* d, grib_accessor* a) -{ -} diff --git a/src/grib_dumper_class_serialize.cc b/src/grib_dumper_class_serialize.cc index bc7424fc9..163a01f6b 100644 --- a/src/grib_dumper_class_serialize.cc +++ b/src/grib_dumper_class_serialize.cc @@ -13,7 +13,7 @@ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -121,18 +121,15 @@ static void dump_long(grib_dumper* d, grib_accessor* a, const char* comment) (strcmp(a->cclass->name, "lookup") != 0)) fprintf(self->dumper.out, " (read_only)"); -#if 0 - if(comment) fprintf(self->dumper.out," [%s]",comment); -#endif + //if(comment) fprintf(self->dumper.out," [%s]",comment); + if (err) fprintf(self->dumper.out, " *** ERR=%d (%s) [grib_dumper_serialize::dump_long]", err, grib_get_error_message(err)); fprintf(self->dumper.out, "\n"); } -#if 0 -static int test_bit(long a, long b) {return a&(1<dumper.out, "%s = %ld ", a->name, value); -#if 0 + // fprintf(self->dumper.out,"["); + // for(i=0;i<(a->length*8);i++) { + // if(test_bit(value,a->length*8-i-1)) + // fprintf(self->dumper.out,"1"); + // else + // fprintf(self->dumper.out,"0"); + // } - fprintf(self->dumper.out,"["); - for(i=0;i<(a->length*8);i++) { - if(test_bit(value,a->length*8-i-1)) - fprintf(self->dumper.out,"1"); - else - fprintf(self->dumper.out,"0"); - } + // if(comment) + // fprintf(self->dumper.out,":%s]",comment); + // else + // fprintf(self->dumper.out,"]"); - if(comment) - fprintf(self->dumper.out,":%s]",comment); - else - fprintf(self->dumper.out,"]"); -#endif if (err) fprintf(self->dumper.out, " *** ERR=%d (%s)", err, grib_get_error_message(err)); @@ -193,9 +188,8 @@ static void dump_double(grib_dumper* d, grib_accessor* a, const char* comment) if ((a->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) != 0) fprintf(self->dumper.out, " (read_only)"); -#if 0 - if(comment) fprintf(self->dumper.out," [%s]",comment); -#endif + //if (comment) fprintf(self->dumper.out," [%s]",comment); + if (err) fprintf(self->dumper.out, " *** ERR=%d (%s) [grib_dumper_serialize::dump_double]", err, grib_get_error_message(err)); fprintf(self->dumper.out, "\n"); @@ -231,9 +225,8 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment) if ((a->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) != 0) fprintf(self->dumper.out, " (read_only)"); -#if 0 - if(comment) fprintf(self->dumper.out," [%s]",comment); -#endif + // if(comment) fprintf(self->dumper.out," [%s]",comment); + if (err) fprintf(self->dumper.out, " *** ERR=%d (%s) [grib_dumper_serialize::dump_string]", err, grib_get_error_message(err)); fprintf(self->dumper.out, "\n"); @@ -407,12 +400,10 @@ static void dump_values(grib_dumper* d, grib_accessor* a) static void dump_label(grib_dumper* d, grib_accessor* a, const char* comment) { -#if 0 - grib_dumper_serialize *self = (grib_dumper_serialize*)d; - int i; - for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," "); - fprintf(self->dumper.out,"----> %s %s %s\n",a->creator->op, a->name,comment?comment:""); -#endif + // grib_dumper_serialize *self = (grib_dumper_serialize*)d; + // int i; + // for(i = 0; i < d->depth ; i++) fprintf(self->dumper.out," "); + // fprintf(self->dumper.out,"----> %s %s %s\n",a->creator->op, a->name,comment?comment:""); } static void dump_section(grib_dumper* d, grib_accessor* a, grib_block_of_accessors* block) @@ -433,7 +424,5 @@ static void dump_section(grib_dumper* d, grib_accessor* a, grib_block_of_accesso grib_dump_accessors_block(d, block); -#if 0 - fprintf(self->dumper.out,"<------ %s %s\n",a->creator->op, a->name); -#endif + //fprintf(self->dumper.out,"<------ %s %s\n",a->creator->op, a->name); } diff --git a/src/grib_dumper_class_wmo.cc b/src/grib_dumper_class_wmo.cc index 86270e0b2..7c898543a 100644 --- a/src/grib_dumper_class_wmo.cc +++ b/src/grib_dumper_class_wmo.cc @@ -14,7 +14,7 @@ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -486,7 +486,6 @@ static void dump_values(grib_dumper* d, grib_accessor* a) k = 0; while (k < size) { -#if 1 int j; /*for(i = 0; i < d->depth + 3 ; i++) fprintf(self->dumper.out," ");*/ for (j = 0; j < 8 && k < size; j++, k++) { @@ -498,14 +497,10 @@ static void dump_values(grib_dumper* d, grib_accessor* a) fprintf(self->dumper.out, ", "); } fprintf(self->dumper.out, "\n"); -#else - - if (is_char) - fprintf(self->dumper.out, "%d '%c'\n", k, (char)buf[k]); - else - fprintf(self->dumper.out, "%d %g\n", k, buf[k]); - -#endif + // if (is_char) + // fprintf(self->dumper.out, "%d '%c'\n", k, (char)buf[k]); + // else + // fprintf(self->dumper.out, "%d %g\n", k, buf[k]); } if (more) { /*for(i = 0; i < d->depth + 3 ; i++) fprintf(self->dumper.out," ");*/ diff --git a/src/grib_dumper_factory.h b/src/grib_dumper_factory.h index a7373a999..0b4135077 100644 --- a/src/grib_dumper_factory.h +++ b/src/grib_dumper_factory.h @@ -12,6 +12,5 @@ { "default", &grib_dumper_class_default, }, { "grib_encode_C", &grib_dumper_class_grib_encode_C, }, { "json", &grib_dumper_class_json, }, -{ "keys", &grib_dumper_class_keys, }, { "serialize", &grib_dumper_class_serialize, }, { "wmo", &grib_dumper_class_wmo, }, diff --git a/src/grib_expression_class_accessor.cc b/src/grib_expression_class_accessor.cc index f6ea5f1a4..e806a3e1a 100644 --- a/src/grib_expression_class_accessor.cc +++ b/src/grib_expression_class_accessor.cc @@ -68,20 +68,18 @@ typedef struct grib_expression_accessor{ static grib_expression_class _grib_expression_class_accessor = { 0, /* super */ "accessor", /* name */ - sizeof(grib_expression_accessor),/* size of instance */ + sizeof(grib_expression_accessor),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - &get_name, - - &evaluate_long, - &evaluate_double, - &evaluate_string, + &native_type, + &get_name, + &evaluate_long, + &evaluate_double, + &evaluate_string, }; grib_expression_class* grib_expression_class_accessor = &_grib_expression_class_accessor; diff --git a/src/grib_expression_class_binop.cc b/src/grib_expression_class_binop.cc index b87947017..e95bebbd3 100644 --- a/src/grib_expression_class_binop.cc +++ b/src/grib_expression_class_binop.cc @@ -68,20 +68,18 @@ typedef struct grib_expression_binop{ static grib_expression_class _grib_expression_class_binop = { 0, /* super */ "binop", /* name */ - sizeof(grib_expression_binop),/* size of instance */ + sizeof(grib_expression_binop),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - 0, - - &evaluate_long, - &evaluate_double, - 0, + &native_type, + 0, + &evaluate_long, + &evaluate_double, + 0, }; grib_expression_class* grib_expression_class_binop = &_grib_expression_class_binop; @@ -99,20 +97,19 @@ static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) int ret; grib_expression_binop* e = (grib_expression_binop*)g; -#if 0 /* DEBUGGING */ - { - int typeLeft, typeRight; - const char* nameLeft; - const char* nameRight; - typeLeft = grib_expression_native_type(h, e->left); - typeRight = grib_expression_native_type(h, e->right); - nameLeft = grib_expression_get_name(e->left); - nameRight= grib_expression_get_name(e->right); - printf("eval_long nameLeft=%s (type=%d), nameRight=%s (type=%d)\n",nameLeft,typeLeft, nameRight,typeRight); - grib_expression_print(h->context, g, h); - printf("\n"); - } -#endif +// #if DEBUGGING +// { +// int typeLeft, typeRight; +// const char* nameLeft; +// const char* nameRight; +// typeLeft = grib_expression_native_type(h, e->left); +// typeRight = grib_expression_native_type(h, e->right); +// nameLeft = grib_expression_get_name(e->left); +// nameRight= grib_expression_get_name(e->right); +// printf("eval_long nameLeft=%s (type=%d), nameRight=%s (type=%d)\n",nameLeft,typeLeft, nameRight,typeRight); +// grib_expression_print(h->context, g, h); +// printf("\n"); +// } ret = grib_expression_evaluate_long(h, e->left, &v1); if (ret != GRIB_SUCCESS) @@ -134,20 +131,19 @@ static int evaluate_double(grib_expression* g, grib_handle* h, double* dres) grib_expression_binop* e = (grib_expression_binop*)g; -#if 0 /* DEBUGGING */ - { - int typeLeft, typeRight; - const char* nameLeft; - const char* nameRight; - typeLeft = grib_expression_native_type(h, e->left); - typeRight = grib_expression_native_type(h, e->right); - nameLeft = grib_expression_get_name(e->left); - nameRight= grib_expression_get_name(e->right); - printf("eval_dbl nameLeft=%s (type=%d), nameRight=%s (type=%d)\n",nameLeft,typeLeft, nameRight,typeRight); - grib_expression_print(h->context, g, h); - printf("\n"); - } -#endif +// #if DEBUGGING +// { +// int typeLeft, typeRight; +// const char* nameLeft; +// const char* nameRight; +// typeLeft = grib_expression_native_type(h, e->left); +// typeRight = grib_expression_native_type(h, e->right); +// nameLeft = grib_expression_get_name(e->left); +// nameRight= grib_expression_get_name(e->right); +// printf("eval_dbl nameLeft=%s (type=%d), nameRight=%s (type=%d)\n",nameLeft,typeLeft, nameRight,typeRight); +// grib_expression_print(h->context, g, h); +// printf("\n"); +// } ret = grib_expression_evaluate_double(h, e->left, &v1); if (ret != GRIB_SUCCESS) diff --git a/src/grib_expression_class_column.cc b/src/grib_expression_class_column.cc index 6f92b8b25..b683b93a5 100644 --- a/src/grib_expression_class_column.cc +++ b/src/grib_expression_class_column.cc @@ -65,20 +65,18 @@ typedef struct grib_expression_column{ static grib_expression_class _grib_expression_class_column = { 0, /* super */ "column", /* name */ - sizeof(grib_expression_column),/* size of instance */ + sizeof(grib_expression_column),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ 0, 0, - - &native_type, - &get_name, - - &evaluate_long, - &evaluate_double, - &evaluate_string, + &native_type, + &get_name, + &evaluate_long, + &evaluate_double, + &evaluate_string, }; grib_expression_class* grib_expression_class_column = &_grib_expression_class_column; diff --git a/src/grib_expression_class_constant.cc b/src/grib_expression_class_constant.cc index 24fa871a4..7bd817678 100644 --- a/src/grib_expression_class_constant.cc +++ b/src/grib_expression_class_constant.cc @@ -61,20 +61,18 @@ typedef struct grib_expression_constant{ static grib_expression_class _grib_expression_class_constant = { 0, /* super */ "constant", /* name */ - sizeof(grib_expression_constant),/* size of instance */ + sizeof(grib_expression_constant),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - 0, - - 0, - 0, - 0, + &native_type, + 0, + 0, + 0, + 0, }; grib_expression_class* grib_expression_class_constant = &_grib_expression_class_constant; diff --git a/src/grib_expression_class_double.cc b/src/grib_expression_class_double.cc index b123dc1c3..f904c887e 100644 --- a/src/grib_expression_class_double.cc +++ b/src/grib_expression_class_double.cc @@ -60,20 +60,18 @@ typedef struct grib_expression_double{ static grib_expression_class _grib_expression_class_double = { 0, /* super */ "double", /* name */ - sizeof(grib_expression_double),/* size of instance */ + sizeof(grib_expression_double),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - 0, - - &evaluate_long, - &evaluate_double, - 0, + &native_type, + 0, + &evaluate_long, + &evaluate_double, + 0, }; grib_expression_class* grib_expression_class_double = &_grib_expression_class_double; diff --git a/src/grib_expression_class_functor.cc b/src/grib_expression_class_functor.cc index 5c9d9c3ca..99ab0ad36 100644 --- a/src/grib_expression_class_functor.cc +++ b/src/grib_expression_class_functor.cc @@ -60,20 +60,18 @@ typedef struct grib_expression_functor{ static grib_expression_class _grib_expression_class_functor = { 0, /* super */ "functor", /* name */ - sizeof(grib_expression_functor),/* size of instance */ + sizeof(grib_expression_functor),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - 0, - - &evaluate_long, - 0, - 0, + &native_type, + 0, + &evaluate_long, + 0, + 0, }; grib_expression_class* grib_expression_class_functor = &_grib_expression_class_functor; diff --git a/src/grib_expression_class_is_in_dict.cc b/src/grib_expression_class_is_in_dict.cc index d28759d95..6cb43acb3 100644 --- a/src/grib_expression_class_is_in_dict.cc +++ b/src/grib_expression_class_is_in_dict.cc @@ -64,20 +64,18 @@ typedef struct grib_expression_is_in_dict{ static grib_expression_class _grib_expression_class_is_in_dict = { 0, /* super */ "is_in_dict", /* name */ - sizeof(grib_expression_is_in_dict),/* size of instance */ + sizeof(grib_expression_is_in_dict),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ 0, /* destructor */ &print, &add_dependency, - - &native_type, - &get_name, - - &evaluate_long, - &evaluate_double, - &evaluate_string, + &native_type, + &get_name, + &evaluate_long, + &evaluate_double, + &evaluate_string, }; grib_expression_class* grib_expression_class_is_in_dict = &_grib_expression_class_is_in_dict; diff --git a/src/grib_expression_class_is_in_list.cc b/src/grib_expression_class_is_in_list.cc index 24ebb57f8..4a6c3dc3b 100644 --- a/src/grib_expression_class_is_in_list.cc +++ b/src/grib_expression_class_is_in_list.cc @@ -66,20 +66,18 @@ typedef struct grib_expression_is_in_list{ static grib_expression_class _grib_expression_class_is_in_list = { 0, /* super */ "is_in_list", /* name */ - sizeof(grib_expression_is_in_list),/* size of instance */ + sizeof(grib_expression_is_in_list),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - &get_name, - - &evaluate_long, - &evaluate_double, - &evaluate_string, + &native_type, + &get_name, + &evaluate_long, + &evaluate_double, + &evaluate_string, }; grib_expression_class* grib_expression_class_is_in_list = &_grib_expression_class_is_in_list; diff --git a/src/grib_expression_class_is_integer.cc b/src/grib_expression_class_is_integer.cc index f170f6d44..c42ae9f86 100644 --- a/src/grib_expression_class_is_integer.cc +++ b/src/grib_expression_class_is_integer.cc @@ -68,20 +68,18 @@ typedef struct grib_expression_is_integer{ static grib_expression_class _grib_expression_class_is_integer = { 0, /* super */ "is_integer", /* name */ - sizeof(grib_expression_is_integer),/* size of instance */ + sizeof(grib_expression_is_integer),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - &get_name, - - &evaluate_long, - &evaluate_double, - &evaluate_string, + &native_type, + &get_name, + &evaluate_long, + &evaluate_double, + &evaluate_string, }; grib_expression_class* grib_expression_class_is_integer = &_grib_expression_class_is_integer; diff --git a/src/grib_expression_class_length.cc b/src/grib_expression_class_length.cc index e64d3c0eb..c685f2186 100644 --- a/src/grib_expression_class_length.cc +++ b/src/grib_expression_class_length.cc @@ -68,20 +68,18 @@ typedef struct grib_expression_length{ static grib_expression_class _grib_expression_class_length = { 0, /* super */ "length", /* name */ - sizeof(grib_expression_length),/* size of instance */ + sizeof(grib_expression_length),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - &get_name, - - &evaluate_long, - &evaluate_double, - &evaluate_string, + &native_type, + &get_name, + &evaluate_long, + &evaluate_double, + &evaluate_string, }; grib_expression_class* grib_expression_class_length = &_grib_expression_class_length; diff --git a/src/grib_expression_class_logical_and.cc b/src/grib_expression_class_logical_and.cc index ee03656d2..5cf98db69 100644 --- a/src/grib_expression_class_logical_and.cc +++ b/src/grib_expression_class_logical_and.cc @@ -63,20 +63,18 @@ typedef struct grib_expression_logical_and{ static grib_expression_class _grib_expression_class_logical_and = { 0, /* super */ "logical_and", /* name */ - sizeof(grib_expression_logical_and),/* size of instance */ + sizeof(grib_expression_logical_and),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - 0, - - &evaluate_long, - &evaluate_double, - 0, + &native_type, + 0, + &evaluate_long, + &evaluate_double, + 0, }; grib_expression_class* grib_expression_class_logical_and = &_grib_expression_class_logical_and; diff --git a/src/grib_expression_class_logical_or.cc b/src/grib_expression_class_logical_or.cc index e83100d3b..75c2a6520 100644 --- a/src/grib_expression_class_logical_or.cc +++ b/src/grib_expression_class_logical_or.cc @@ -63,20 +63,18 @@ typedef struct grib_expression_logical_or{ static grib_expression_class _grib_expression_class_logical_or = { 0, /* super */ "logical_or", /* name */ - sizeof(grib_expression_logical_or),/* size of instance */ + sizeof(grib_expression_logical_or),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - 0, - - &evaluate_long, - &evaluate_double, - 0, + &native_type, + 0, + &evaluate_long, + &evaluate_double, + 0, }; grib_expression_class* grib_expression_class_logical_or = &_grib_expression_class_logical_or; diff --git a/src/grib_expression_class_long.cc b/src/grib_expression_class_long.cc index 9e5fd585a..481e143c8 100644 --- a/src/grib_expression_class_long.cc +++ b/src/grib_expression_class_long.cc @@ -60,20 +60,18 @@ typedef struct grib_expression_long{ static grib_expression_class _grib_expression_class_long = { 0, /* super */ "long", /* name */ - sizeof(grib_expression_long),/* size of instance */ + sizeof(grib_expression_long),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - 0, - - &evaluate_long, - &evaluate_double, - 0, + &native_type, + 0, + &evaluate_long, + &evaluate_double, + 0, }; grib_expression_class* grib_expression_class_long = &_grib_expression_class_long; diff --git a/src/grib_expression_class_string.cc b/src/grib_expression_class_string.cc index f36d23dbe..1d6734c4c 100644 --- a/src/grib_expression_class_string.cc +++ b/src/grib_expression_class_string.cc @@ -58,20 +58,18 @@ typedef struct grib_expression_string{ static grib_expression_class _grib_expression_class_string = { 0, /* super */ "string", /* name */ - sizeof(grib_expression_string),/* size of instance */ + sizeof(grib_expression_string),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - 0, - - 0, - 0, - &evaluate_string, + &native_type, + 0, + 0, + 0, + &evaluate_string, }; grib_expression_class* grib_expression_class_string = &_grib_expression_class_string; diff --git a/src/grib_expression_class_string_compare.cc b/src/grib_expression_class_string_compare.cc index 1686ca0ba..8ee196c2e 100644 --- a/src/grib_expression_class_string_compare.cc +++ b/src/grib_expression_class_string_compare.cc @@ -62,20 +62,18 @@ typedef struct grib_expression_string_compare{ static grib_expression_class _grib_expression_class_string_compare = { 0, /* super */ "string_compare", /* name */ - sizeof(grib_expression_string_compare),/* size of instance */ + sizeof(grib_expression_string_compare),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - 0, - - &evaluate_long, - &evaluate_double, - 0, + &native_type, + 0, + &evaluate_long, + &evaluate_double, + 0, }; grib_expression_class* grib_expression_class_string_compare = &_grib_expression_class_string_compare; diff --git a/src/grib_expression_class_sub_string.cc b/src/grib_expression_class_sub_string.cc index 3d7fa5507..0a53638bc 100644 --- a/src/grib_expression_class_sub_string.cc +++ b/src/grib_expression_class_sub_string.cc @@ -58,20 +58,18 @@ typedef struct grib_expression_sub_string{ static grib_expression_class _grib_expression_class_sub_string = { 0, /* super */ "sub_string", /* name */ - sizeof(grib_expression_sub_string),/* size of instance */ + sizeof(grib_expression_sub_string),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - 0, - - 0, - 0, - &evaluate_string, + &native_type, + 0, + 0, + 0, + &evaluate_string, }; grib_expression_class* grib_expression_class_sub_string = &_grib_expression_class_sub_string; diff --git a/src/grib_expression_class_true.cc b/src/grib_expression_class_true.cc index ec702322a..a57ce9c60 100644 --- a/src/grib_expression_class_true.cc +++ b/src/grib_expression_class_true.cc @@ -58,20 +58,18 @@ typedef struct grib_expression_true{ static grib_expression_class _grib_expression_class_true = { 0, /* super */ "true", /* name */ - sizeof(grib_expression_true),/* size of instance */ + sizeof(grib_expression_true),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - 0, - - &evaluate_long, - &evaluate_double, - 0, + &native_type, + 0, + &evaluate_long, + &evaluate_double, + 0, }; grib_expression_class* grib_expression_class_true = &_grib_expression_class_true; diff --git a/src/grib_expression_class_unop.cc b/src/grib_expression_class_unop.cc index 619cb3564..2abd4dbc9 100644 --- a/src/grib_expression_class_unop.cc +++ b/src/grib_expression_class_unop.cc @@ -64,20 +64,18 @@ typedef struct grib_expression_unop{ static grib_expression_class _grib_expression_class_unop = { 0, /* super */ "unop", /* name */ - sizeof(grib_expression_unop),/* size of instance */ + sizeof(grib_expression_unop),/* size of instance */ 0, /* inited */ &init_class, /* init_class */ 0, /* constructor */ &destroy, /* destructor */ &print, &add_dependency, - - &native_type, - 0, - - &evaluate_long, - &evaluate_double, - 0, + &native_type, + 0, + &evaluate_long, + &evaluate_double, + 0, }; grib_expression_class* grib_expression_class_unop = &_grib_expression_class_unop; diff --git a/src/grib_fieldset.cc b/src/grib_fieldset.cc index 0c7ba5652..88eabeb7b 100644 --- a/src/grib_fieldset.cc +++ b/src/grib_fieldset.cc @@ -411,21 +411,16 @@ static grib_fieldset* grib_fieldset_create_from_order_by(grib_context* c, grib_o return set; } -/* Experimental: Needs more work */ +// Experimental: Needs more work int grib_fieldset_apply_where(grib_fieldset* set, const char* where_string) { - int err = GRIB_NOT_IMPLEMENTED; - grib_math* m = NULL; + // grib_math* m = NULL; + // m = grib_math_new(set->context, where_string, &err); + // if (err || !m) return err; - if (!set) - return GRIB_INVALID_ARGUMENT; - - m = grib_math_new(set->context, where_string, &err); - if (err || !m) return err; - - print_math(m); - printf("\n"); - grib_math_delete(set->context, m); + // print_math(m); + // printf("\n"); + // grib_math_delete(set->context, m); return GRIB_NOT_IMPLEMENTED; } diff --git a/src/grib_filepool.cc b/src/grib_filepool.cc index 84d87ab2c..4ba9a2432 100644 --- a/src/grib_filepool.cc +++ b/src/grib_filepool.cc @@ -8,12 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/* - * - * Description: file pool - * - */ - #include "grib_api_internal.h" #define GRIB_MAX_OPENED_FILES 200 @@ -296,7 +290,7 @@ void grib_file_pool_delete_file(grib_file* file) break; prev = prev->next; } - DebugAssert(prev); + DEBUG_ASSERT(prev); if (prev) { prev->next = file->next; } @@ -436,21 +430,19 @@ grib_file* grib_file_new(grib_context* c, const char* name, int* err) void grib_file_delete(grib_file* file) { - { - if (!file) - return; - } + if (!file) return; + GRIB_MUTEX_INIT_ONCE(&once, &init); GRIB_MUTEX_LOCK(&mutex1); /* GRIB-803: cannot call fclose yet! Causes crash */ /* TODO: Set handle to NULL in filepool too */ -#if 0 - if (file->handle) { - if (fclose(file->handle) != 0) { - perror(file->name); - } - } -#endif + + //if (file->handle) { + // if (fclose(file->handle) != 0) { + // perror(file->name); + // } + //} + if (file->name) free(file->name); if (file->mode) diff --git a/src/grib_gaussian_reduced.cc b/src/grib_gaussian_reduced.cc index 12f616c02..8ba2ed088 100644 --- a/src/grib_gaussian_reduced.cc +++ b/src/grib_gaussian_reduced.cc @@ -115,7 +115,7 @@ static Fraction_type fraction_construct_from_double(double x) x = 1.0 / (x - a); - if (x > LLONG_MAX) { + if (x > (double)LLONG_MAX) { break; } diff --git a/src/grib_geography.cc b/src/grib_geography.cc index 5afbec4a8..b385ceb10 100644 --- a/src/grib_geography.cc +++ b/src/grib_geography.cc @@ -9,12 +9,12 @@ */ /*************************************************************************** - * Jean Baptiste Filippi - 01.11.2005 * - * * + * Jean Baptiste Filippi - 01.11.2005 * ***************************************************************************/ #include "grib_api_internal.h" -#include +#include +#include #define NUMBER(x) (sizeof(x) / sizeof(x[0])) #define MAXITER 10 @@ -22,13 +22,6 @@ #define RAD2DEG 57.29577951308232087684 /* 180 over pi */ #define DEG2RAD 0.01745329251994329576 /* pi over 180 */ -#ifndef MAX -#define MAX(a, b) (((a) > (b)) ? (a) : (b)) -#endif -#ifndef MIN -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) -#endif - #ifndef M_PI #define M_PI 3.14159265358979323846 #endif @@ -4067,15 +4060,15 @@ void rotate(const double inlat, const double inlon, const double ZCXMXC = cos(ZXMXC); const double ZSYREG = sin(DEG2RAD * inlat); const double ZCYREG = cos(DEG2RAD * inlat); - double ZSYROT = ZCYCEN * ZSYREG - ZSYCEN * ZCYREG * ZCXMXC; + double ZSYROT = ZCYCEN * ZSYREG - ZSYCEN * ZCYREG * ZCXMXC; - ZSYROT = MAX(MIN(ZSYROT, +1.0), -1.0); + ZSYROT = std::max(std::min(ZSYROT, +1.0), -1.0); PYROT = asin(ZSYROT) * RAD2DEG; ZCYROT = cos(PYROT * DEG2RAD); ZCXROT = (ZCYCEN * ZCYREG * ZCXMXC + ZSYCEN * ZSYREG) / ZCYROT; - ZCXROT = MAX(MIN(ZCXROT, +1.0), -1.0); + ZCXROT = std::max(std::min(ZCXROT, +1.0), -1.0); ZSXROT = ZCYREG * ZSXMXC / ZCYROT; PXROT = acos(ZCXROT) * RAD2DEG; diff --git a/src/grib_handle.cc b/src/grib_handle.cc index 931bdd6ea..8b14a7161 100644 --- a/src/grib_handle.cc +++ b/src/grib_handle.cc @@ -14,37 +14,6 @@ ***************************************************************************/ #include "grib_api_internal.h" -#if 0 - /* #if GRIB_PTHREADS */ - static pthread_once_t once = PTHREAD_ONCE_INIT; - static pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; - static pthread_mutex_t mutex2 = PTHREAD_MUTEX_INITIALIZER; - static void init() { - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&mutex1,&attr); - pthread_mutex_init(&mutex2,&attr); - pthread_mutexattr_destroy(&attr); - } - /* #elif GRIB_OMP_THREADS */ - static int once = 0; - static omp_nest_lock_t mutex1; - static omp_nest_lock_t mutex2; - static void init() - { - GRIB_OMP_CRITICAL(lock_grib_handle_c) - { - if (once == 0) - { - omp_init_nest_lock(&mutex1); - omp_init_nest_lock(&mutex2); - once = 1; - } - } - } -#endif - static grib_handle* grib_handle_new_from_file_no_multi(grib_context* c, FILE* f, int headers_only, int* error); static grib_handle* grib_handle_new_from_file_multi(grib_context* c, FILE* f, int* error); static int grib2_get_next_section(unsigned char* msgbegin, size_t msglen, unsigned char** secbegin, size_t* seclen, int* secnum, int* err); @@ -660,6 +629,8 @@ static grib_handle* grib_handle_new_from_file_multi(grib_context* c, FILE* f, in char *gts_header = 0, *save_gts_header = 0; int gtslen = 0; + *error = GRIB_SUCCESS; + if (c == NULL) c = grib_context_get_default(); @@ -798,7 +769,7 @@ static grib_handle* grib_handle_new_from_file_multi(grib_context* c, FILE* f, in if (c->gts_header_on && gtslen >= 8) { gl->gts_header = (char*)grib_context_malloc_clear(c, sizeof(unsigned char) * gtslen); - DebugAssert(gts_header); + DEBUG_ASSERT(gts_header); if (gts_header) memcpy(gl->gts_header, gts_header, gtslen); gl->gts_header_len = gtslen; grib_context_free(c, save_gts_header); @@ -1031,7 +1002,7 @@ grib_handle* bufr_new_from_file(grib_context* c, FILE* f, int* error) if (c->gts_header_on && gtslen >= 8) { gl->gts_header = (char*)grib_context_malloc(c, sizeof(unsigned char) * gtslen); - DebugAssert(gts_header); + DEBUG_ASSERT(gts_header); if (gts_header) memcpy(gl->gts_header, gts_header, gtslen); gl->gts_header_len = gtslen; grib_context_free(c, save_gts_header); @@ -1154,7 +1125,7 @@ static grib_handle* grib_handle_new_from_file_no_multi(grib_context* c, FILE* f, if (c->gts_header_on && gtslen >= 8) { gl->gts_header = (char*)grib_context_malloc(c, sizeof(unsigned char) * gtslen); - DebugAssert(gts_header); + DEBUG_ASSERT(gts_header); if (gts_header) memcpy(gl->gts_header, gts_header, gtslen); gl->gts_header_len = gtslen; grib_context_free(c, save_gts_header); diff --git a/src/grib_hash_keys.cc b/src/grib_hash_keys.cc index a8ab85ef1..550481324 100644 --- a/src/grib_hash_keys.cc +++ b/src/grib_hash_keys.cc @@ -34,12 +34,12 @@ struct grib_keys_hash { char* name; int id;}; #include -#define TOTAL_KEYWORDS 2432 +#define TOTAL_KEYWORDS 2487 #define MIN_WORD_LENGTH 1 #define MAX_WORD_LENGTH 74 #define MIN_HASH_VALUE 3 -#define MAX_HASH_VALUE 32422 -/* maximum key range = 32420, duplicates = 0 */ +#define MAX_HASH_VALUE 34316 +/* maximum key range = 34314, duplicates = 0 */ #ifdef __GNUC__ __inline @@ -53,32 +53,32 @@ hash_keys (const char *str, size_t len) { static const unsigned short asso_values[] = { - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 1, 32423, 32423, 1, 32423, 32423, 100, 2542, - 2012, 2507, 1904, 3737, 1317, 921, 233, 6, 5, 1, - 1, 32423, 32423, 32423, 32423, 2617, 4123, 2527, 159, 1640, - 52, 5304, 2521, 684, 43, 193, 551, 292, 1641, 211, - 1969, 64, 1061, 161, 85, 4435, 2022, 3043, 60, 4866, - 6, 1, 1, 32423, 32423, 1548, 32423, 5, 552, 54, - 1, 2, 196, 180, 109, 10, 2716, 4017, 71, 7, - 1, 20, 29, 1211, 1, 8, 4, 65, 258, 230, - 764, 7, 784, 55, 1795, 2, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, - 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423, 32423 + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 2, 34317, 34317, 1, 34317, 34317, 320, 2507, + 2365, 2344, 2145, 2487, 2277, 2572, 64, 43, 3, 2, + 1, 34317, 34317, 34317, 34317, 2043, 3384, 2134, 276, 2123, + 145, 4454, 3774, 926, 575, 173, 102, 1646, 779, 158, + 966, 21, 629, 68, 50, 5392, 1844, 3354, 605, 3874, + 1, 1, 3, 34317, 34317, 2581, 34317, 5, 494, 54, + 1, 2, 53, 83, 173, 10, 3062, 3321, 71, 7, + 1, 20, 29, 1231, 1, 8, 4, 65, 291, 211, + 1560, 203, 1838, 4, 581, 1, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, + 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317, 34317 }; unsigned int hval = len; @@ -165,1039 +165,1030 @@ hash_keys (const char *str, size_t len) static const unsigned char lengthtable[] = { 0, 0, 0, 1, 0, 2, 2, 3, 2, 1, 0, 2, 2, 2, - 0, 1, 0, 2, 4, 0, 4, 4, 3, 3, 4, 0, 0, 5, + 0, 1, 0, 0, 4, 0, 0, 4, 3, 0, 4, 0, 0, 5, 3, 4, 0, 0, 0, 4, 0, 0, 5, 0, 0, 0, 6, 4, - 0, 5, 0, 0, 8, 0, 4, 6, 3, 6, 5, 0, 0, 0, + 0, 5, 0, 0, 8, 0, 0, 0, 3, 6, 5, 0, 0, 0, 7, 4, 7, 5, 0, 0, 0, 0, 0, 0, 9, 9, 0, 9, - 9, 0, 6, 0, 0, 0, 4, 0, 4, 0, 0, 0, 10, 4, - 10, 7, 6, 1, 0, 7, 0, 0, 6, 6, 0, 0, 5, 6, - 10, 5, 8, 5, 2, 0, 6, 0, 0, 7, 6, 0, 10, 0, - 8, 9, 0, 0, 7, 10, 0, 0, 2, 7, 0, 0, 0, 5, - 8, 0, 5, 8, 8, 0, 0, 10, 0, 0, 0, 7, 3, 0, - 0, 0, 0, 0, 0, 9, 0, 0, 8, 0, 6, 0, 0, 5, - 8, 0, 0, 0, 0, 5, 5, 0, 3, 0, 0, 0, 7, 0, - 0, 0, 0, 0, 8, 2, 4, 2, 8, 5, 10, 0, 5, 2, - 6, 0, 9, 7, 0, 9, 7, 0, 0, 6, 10, 0, 10, 8, - 5, 4, 7, 7, 4, 6, 0, 0, 6, 0, 0, 9, 10, 0, - 8, 0, 10, 0, 0, 0, 0, 0, 10, 0, 7, 0, 8, 0, - 0, 0, 13, 0, 0, 6, 0, 0, 0, 0, 10, 0, 7, 0, - 0, 0, 0, 8, 11, 0, 0, 0, 0, 0, 10, 10, 0, 0, - 0, 0, 8, 5, 9, 2, 0, 0, 8, 14, 0, 0, 0, 0, - 0, 0, 10, 0, 0, 0, 9, 0, 0, 10, 0, 3, 0, 0, - 0, 0, 0, 0, 8, 4, 0, 9, 0, 5, 0, 0, 0, 0, - 0, 0, 0, 5, 0, 0, 11, 0, 11, 17, 10, 0, 0, 0, - 7, 0, 5, 0, 0, 12, 5, 0, 0, 0, 0, 0, 0, 7, - 8, 11, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, - 9, 0, 0, 0, 0, 0, 0, 6, 0, 10, 0, 0, 8, 0, - 8, 0, 0, 8, 0, 0, 0, 10, 0, 0, 0, 1, 0, 0, - 0, 9, 0, 2, 10, 10, 11, 0, 0, 0, 0, 0, 0, 0, - 9, 0, 10, 0, 7, 9, 0, 0, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 13, 12, 0, 10, 8, 0, 9, 0, 11, 0, - 0, 8, 0, 2, 10, 0, 0, 0, 7, 0, 0, 11, 0, 0, - 0, 0, 0, 6, 0, 0, 6, 0, 0, 0, 0, 0, 13, 8, - 9, 0, 6, 0, 8, 10, 0, 0, 0, 0, 8, 0, 0, 9, - 0, 0, 10, 11, 15, 0, 0, 0, 0, 0, 0, 10, 0, 10, - 7, 0, 0, 0, 0, 0, 11, 0, 11, 0, 0, 5, 0, 0, - 0, 0, 0, 0, 5, 0, 0, 0, 0, 17, 0, 9, 6, 0, - 6, 0, 0, 14, 0, 0, 12, 0, 13, 0, 0, 0, 0, 18, - 0, 0, 0, 7, 11, 12, 0, 8, 0, 0, 15, 0, 0, 2, - 0, 0, 0, 14, 0, 0, 0, 0, 0, 24, 0, 14, 15, 0, - 0, 0, 0, 0, 0, 12, 9, 0, 0, 0, 2, 0, 0, 0, - 0, 2, 0, 0, 0, 0, 20, 0, 6, 15, 0, 0, 0, 13, - 0, 0, 0, 0, 4, 0, 0, 2, 0, 0, 0, 0, 12, 8, - 0, 0, 0, 5, 0, 6, 0, 0, 0, 0, 5, 1, 7, 18, - 0, 0, 0, 0, 3, 13, 4, 0, 0, 0, 0, 0, 0, 13, - 6, 10, 0, 11, 0, 0, 17, 0, 0, 0, 0, 12, 0, 0, - 2, 3, 0, 0, 0, 0, 3, 0, 10, 0, 3, 0, 0, 0, - 0, 7, 3, 3, 0, 6, 4, 0, 0, 0, 0, 0, 6, 0, - 14, 0, 0, 0, 0, 0, 0, 11, 0, 22, 0, 0, 0, 0, - 0, 0, 12, 6, 14, 0, 0, 23, 0, 0, 13, 0, 0, 0, - 0, 0, 14, 0, 0, 0, 0, 18, 19, 0, 0, 0, 0, 0, - 7, 0, 0, 15, 18, 0, 0, 12, 0, 0, 0, 13, 0, 14, - 12, 0, 0, 0, 0, 0, 0, 0, 10, 0, 11, 0, 0, 0, - 0, 11, 6, 12, 9, 0, 0, 14, 10, 0, 14, 0, 9, 0, - 0, 0, 0, 0, 14, 0, 0, 17, 0, 0, 0, 0, 7, 0, - 13, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 22, - 0, 0, 15, 0, 0, 12, 0, 14, 0, 10, 10, 13, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 12, - 0, 22, 0, 0, 0, 12, 0, 0, 0, 0, 0, 21, 0, 0, - 23, 0, 0, 11, 0, 19, 0, 21, 0, 0, 17, 14, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, - 0, 15, 5, 13, 0, 4, 13, 0, 0, 0, 10, 0, 13, 0, - 0, 0, 0, 10, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 11, - 0, 17, 0, 0, 0, 0, 0, 12, 16, 3, 0, 7, 0, 21, - 0, 12, 0, 7, 17, 0, 0, 0, 0, 0, 0, 19, 0, 17, - 0, 0, 0, 27, 13, 0, 0, 15, 14, 0, 0, 14, 0, 18, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 10, 0, 0, 0, - 10, 0, 0, 0, 17, 0, 0, 0, 12, 0, 14, 0, 20, 15, - 0, 0, 13, 12, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, - 0, 18, 9, 0, 0, 10, 0, 0, 0, 0, 15, 12, 0, 0, - 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, - 0, 10, 8, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 25, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 39, 40, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, - 0, 0, 0, 0, 0, 20, 0, 13, 0, 0, 14, 0, 0, 0, - 9, 0, 16, 0, 0, 10, 16, 0, 0, 16, 0, 0, 18, 6, - 0, 10, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 14, 44, 0, 0, 15, 0, 0, 0, - 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 19, 0, 18, 0, - 0, 0, 0, 21, 0, 0, 0, 14, 0, 0, 14, 0, 0, 0, - 0, 0, 0, 0, 19, 17, 0, 20, 0, 21, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 10, 0, 0, 10, 0, 0, 0, 7, 0, 9, 14, 0, - 48, 0, 0, 0, 14, 27, 19, 0, 0, 0, 14, 0, 15, 0, - 17, 0, 0, 0, 17, 0, 0, 23, 0, 0, 21, 0, 12, 0, - 16, 0, 13, 0, 8, 0, 0, 0, 0, 0, 25, 0, 0, 0, - 0, 23, 9, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, - 14, 0, 0, 0, 0, 0, 0, 16, 0, 0, 12, 0, 0, 0, - 0, 37, 0, 0, 0, 0, 13, 0, 0, 0, 0, 30, 0, 23, - 0, 0, 27, 0, 15, 0, 0, 9, 11, 0, 0, 10, 0, 0, - 0, 20, 0, 20, 0, 0, 15, 0, 0, 0, 0, 0, 22, 0, - 0, 9, 16, 0, 0, 0, 0, 0, 0, 15, 17, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 5, 15, 0, - 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 18, 0, 0, 0, 0, 11, 0, 12, 0, 0, 0, 9, 0, - 0, 0, 0, 0, 0, 0, 19, 8, 0, 0, 0, 7, 0, 0, - 10, 10, 0, 0, 24, 0, 0, 34, 13, 0, 14, 31, 0, 0, - 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 12, 0, 14, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 0, 30, 0, 0, 0, 0, 0, 0, - 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 17, 0, - 0, 0, 0, 18, 11, 0, 0, 11, 0, 0, 0, 0, 0, 0, - 0, 0, 12, 0, 0, 0, 0, 0, 12, 0, 13, 15, 0, 0, - 0, 0, 19, 0, 24, 28, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 13, 0, - 0, 0, 15, 0, 0, 2, 0, 0, 0, 11, 0, 0, 16, 0, - 0, 0, 0, 3, 0, 0, 0, 0, 16, 23, 0, 0, 24, 0, - 0, 9, 0, 0, 15, 0, 0, 21, 0, 25, 0, 0, 0, 0, - 0, 0, 10, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 10, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, - 13, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, - 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, - 0, 0, 0, 0, 0, 0, 0, 2, 0, 14, 0, 0, 0, 0, - 33, 8, 0, 0, 0, 2, 0, 0, 0, 20, 22, 2, 17, 0, - 0, 16, 0, 14, 0, 15, 10, 0, 15, 0, 0, 12, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 26, 2, 0, 23, 0, 0, - 0, 0, 26, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, - 5, 0, 0, 0, 3, 0, 0, 0, 0, 10, 0, 0, 2, 26, - 0, 3, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 14, 0, 0, 0, 0, 17, 0, 13, 0, 0, 0, 13, 23, - 0, 13, 0, 0, 13, 9, 13, 16, 0, 0, 0, 0, 0, 0, - 16, 0, 0, 9, 0, 10, 0, 0, 0, 0, 10, 0, 0, 0, - 0, 31, 15, 0, 0, 0, 0, 8, 23, 31, 15, 0, 31, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 30, 9, 0, - 0, 0, 9, 0, 0, 0, 0, 2, 0, 0, 30, 0, 0, 0, - 0, 0, 14, 0, 0, 0, 15, 0, 0, 0, 0, 0, 12, 0, - 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 9, 17, 8, 0, 0, 0, 0, - 0, 0, 0, 0, 9, 0, 0, 0, 0, 10, 0, 0, 0, 11, - 0, 0, 11, 10, 30, 0, 0, 0, 0, 0, 11, 13, 0, 0, - 0, 13, 0, 0, 0, 13, 9, 17, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 11, 0, 0, 0, 6, 0, 0, 0, 29, - 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 15, - 0, 0, 0, 10, 0, 0, 13, 15, 0, 10, 0, 18, 0, 0, - 0, 0, 0, 8, 0, 10, 0, 12, 0, 0, 0, 0, 3, 0, - 24, 0, 0, 31, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, - 0, 0, 0, 0, 0, 9, 0, 0, 14, 0, 0, 0, 13, 0, - 0, 0, 18, 0, 0, 0, 0, 0, 26, 0, 0, 11, 0, 0, - 0, 0, 0, 0, 0, 13, 0, 0, 9, 0, 0, 0, 0, 15, - 23, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, - 13, 0, 20, 0, 0, 0, 0, 30, 0, 0, 2, 8, 0, 16, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, - 0, 0, 0, 0, 0, 0, 0, 11, 32, 2, 13, 0, 0, 30, - 24, 0, 0, 0, 0, 13, 14, 25, 0, 0, 0, 42, 0, 0, - 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 11, 13, - 0, 0, 24, 0, 0, 11, 0, 11, 9, 0, 27, 0, 0, 0, - 13, 24, 0, 12, 0, 10, 0, 0, 3, 15, 0, 0, 0, 0, - 0, 0, 0, 23, 19, 3, 0, 22, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 9, 0, 0, - 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 13, 0, 21, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, - 25, 19, 0, 0, 8, 0, 0, 0, 22, 0, 0, 10, 11, 22, - 0, 0, 12, 11, 0, 11, 0, 0, 0, 0, 0, 0, 0, 15, - 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 28, 15, 0, 0, 0, 0, 0, 21, - 0, 0, 10, 16, 0, 0, 13, 9, 0, 18, 0, 0, 0, 0, - 0, 0, 0, 27, 0, 0, 33, 0, 0, 0, 0, 0, 0, 17, - 0, 39, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, - 0, 0, 9, 0, 0, 0, 0, 16, 0, 32, 25, 0, 0, 0, - 0, 0, 0, 10, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 38, 0, 0, 22, 0, 0, 0, 26, 0, 0, 0, 0, 0, - 0, 0, 13, 27, 25, 0, 0, 0, 10, 0, 11, 0, 0, 0, - 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 12, 0, 14, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 14, 0, 0, - 0, 33, 0, 0, 35, 0, 0, 0, 0, 0, 0, 34, 0, 0, - 0, 0, 0, 0, 0, 0, 19, 0, 0, 17, 0, 14, 0, 0, - 25, 0, 0, 16, 0, 0, 0, 14, 15, 0, 0, 0, 11, 18, - 22, 3, 0, 0, 0, 0, 0, 27, 0, 15, 0, 0, 0, 22, - 0, 0, 19, 31, 0, 0, 11, 0, 0, 8, 14, 0, 0, 0, - 0, 17, 18, 0, 0, 0, 0, 0, 0, 0, 12, 15, 0, 14, - 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, - 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, - 11, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 9, 0, 0, - 25, 0, 0, 0, 0, 0, 16, 18, 0, 0, 0, 0, 17, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 18, 0, - 13, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 18, 0, - 14, 0, 0, 0, 0, 0, 0, 25, 0, 0, 32, 23, 0, 0, - 0, 0, 18, 0, 0, 12, 0, 0, 0, 0, 28, 0, 10, 0, - 0, 36, 48, 22, 0, 18, 0, 0, 0, 0, 23, 0, 0, 0, - 13, 9, 0, 0, 19, 0, 6, 0, 10, 0, 0, 20, 0, 0, - 11, 0, 0, 0, 10, 10, 22, 0, 0, 0, 13, 11, 0, 17, - 31, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, - 21, 0, 0, 0, 0, 15, 0, 0, 0, 23, 0, 0, 0, 0, - 16, 0, 17, 0, 0, 0, 0, 3, 0, 0, 0, 24, 0, 25, - 0, 15, 0, 12, 0, 0, 0, 0, 3, 0, 20, 0, 0, 0, - 29, 0, 0, 0, 0, 0, 0, 16, 0, 6, 0, 42, 0, 0, - 13, 0, 18, 26, 0, 0, 0, 0, 0, 0, 10, 0, 25, 0, - 0, 0, 0, 0, 0, 0, 0, 23, 11, 0, 0, 8, 0, 0, - 0, 2, 0, 2, 0, 0, 6, 0, 0, 0, 12, 0, 0, 0, - 6, 0, 0, 0, 13, 11, 0, 0, 0, 0, 0, 0, 9, 0, - 0, 0, 6, 30, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, - 0, 0, 24, 32, 0, 0, 0, 3, 35, 0, 0, 22, 0, 0, - 0, 0, 0, 18, 16, 9, 0, 0, 0, 3, 0, 23, 0, 0, - 0, 0, 0, 0, 0, 14, 0, 0, 0, 17, 0, 0, 0, 0, - 0, 0, 0, 0, 15, 0, 11, 0, 0, 0, 9, 0, 0, 0, - 0, 0, 0, 15, 0, 0, 0, 24, 0, 0, 0, 13, 0, 0, - 0, 0, 0, 0, 11, 20, 17, 11, 0, 0, 0, 0, 0, 21, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, - 0, 23, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 12, 0, 0, - 0, 0, 0, 0, 0, 18, 0, 21, 0, 0, 0, 0, 0, 0, - 19, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, - 0, 0, 0, 18, 0, 0, 0, 19, 0, 0, 0, 25, 0, 27, - 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 11, 0, 0, 0, - 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 18, 0, 11, 0, 0, 0, 0, 25, 20, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, - 0, 10, 0, 0, 17, 0, 0, 22, 0, 11, 0, 0, 28, 14, - 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 18, - 0, 0, 0, 9, 0, 0, 0, 20, 0, 15, 15, 0, 0, 15, - 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 21, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 17, 0, 0, - 15, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 47, 0, 0, - 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 24, 0, 0, - 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 38, 15, 0, 0, 24, 0, 0, 24, - 0, 0, 0, 26, 0, 0, 0, 2, 0, 9, 0, 0, 0, 0, - 12, 0, 23, 0, 15, 0, 0, 0, 26, 0, 24, 0, 28, 0, - 0, 0, 0, 9, 0, 0, 0, 0, 13, 12, 12, 0, 0, 26, - 0, 0, 0, 12, 0, 27, 0, 16, 0, 0, 0, 0, 11, 10, - 0, 0, 12, 0, 17, 0, 3, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, 29, 0, 0, 28, 0, 0, 0, 28, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 11, 0, - 0, 0, 0, 21, 14, 0, 0, 0, 0, 18, 0, 14, 34, 0, - 0, 14, 0, 0, 0, 12, 0, 1, 0, 30, 0, 21, 14, 0, - 0, 0, 0, 14, 19, 0, 20, 21, 0, 20, 0, 26, 0, 0, - 24, 0, 0, 0, 16, 0, 0, 0, 0, 10, 12, 0, 0, 27, - 0, 0, 0, 0, 10, 13, 0, 0, 0, 0, 19, 0, 0, 0, - 0, 0, 0, 12, 17, 0, 0, 0, 22, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 21, 14, 0, 0, 0, 0, 0, - 0, 15, 16, 0, 0, 0, 16, 0, 0, 24, 0, 0, 0, 0, - 0, 0, 0, 20, 0, 0, 0, 21, 12, 0, 0, 15, 0, 35, - 0, 0, 25, 0, 0, 0, 0, 14, 10, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 14, 0, 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 28, - 33, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, - 0, 0, 11, 20, 0, 15, 0, 13, 0, 0, 14, 0, 22, 0, - 10, 0, 22, 0, 0, 0, 0, 15, 0, 18, 7, 15, 9, 22, - 0, 0, 0, 0, 0, 18, 0, 0, 13, 0, 0, 0, 15, 0, - 0, 0, 15, 0, 20, 0, 0, 32, 0, 0, 0, 0, 13, 12, - 0, 22, 0, 0, 0, 0, 0, 0, 15, 0, 31, 0, 0, 15, - 0, 0, 23, 0, 0, 0, 0, 33, 20, 0, 0, 15, 16, 0, - 0, 0, 15, 0, 0, 19, 0, 0, 0, 12, 0, 19, 0, 0, - 31, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 10, 26, 18, - 20, 16, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 30, 0, - 0, 10, 0, 0, 20, 23, 0, 0, 0, 31, 0, 0, 27, 0, - 11, 0, 21, 0, 39, 24, 0, 18, 0, 0, 22, 0, 0, 0, - 15, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, - 16, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, - 0, 16, 0, 0, 12, 0, 0, 20, 30, 0, 12, 18, 0, 0, - 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 16, 29, - 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, - 0, 0, 13, 24, 30, 0, 16, 12, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 15, 18, 14, 0, 0, 16, 14, - 0, 11, 0, 0, 0, 0, 0, 0, 23, 18, 16, 0, 0, 0, - 12, 0, 0, 0, 0, 14, 0, 17, 3, 0, 0, 0, 23, 2, - 13, 0, 23, 0, 0, 0, 0, 0, 23, 0, 24, 0, 0, 29, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 37, - 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, - 0, 12, 0, 0, 13, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 34, 0, 0, 0, 0, 0, 0, 0, 21, 21, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 13, 6, 0, 17, 12, 0, - 23, 0, 0, 0, 0, 0, 0, 18, 21, 0, 0, 22, 0, 0, - 14, 0, 27, 0, 25, 0, 0, 0, 0, 10, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 24, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, - 0, 19, 0, 0, 0, 13, 27, 0, 13, 0, 7, 0, 0, 31, - 22, 18, 0, 0, 0, 1, 0, 0, 0, 13, 9, 0, 22, 0, - 0, 0, 0, 0, 0, 30, 5, 0, 0, 0, 0, 13, 0, 0, - 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, - 0, 0, 31, 0, 23, 16, 21, 0, 12, 0, 0, 0, 0, 0, - 0, 25, 22, 0, 0, 0, 0, 0, 0, 12, 0, 24, 11, 0, - 0, 14, 33, 0, 0, 12, 0, 15, 0, 0, 0, 11, 15, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, - 0, 0, 0, 34, 0, 0, 0, 0, 0, 14, 0, 0, 29, 0, - 0, 0, 0, 31, 0, 0, 0, 11, 3, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 29, 0, 0, 0, 0, 0, 0, - 0, 6, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 2, 33, - 33, 0, 0, 0, 15, 0, 15, 4, 37, 19, 0, 0, 0, 0, - 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 6, 0, 16, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, - 0, 24, 0, 0, 26, 8, 0, 0, 0, 0, 20, 0, 0, 0, - 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 42, 0, - 0, 0, 0, 0, 0, 9, 0, 0, 0, 32, 0, 11, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 13, 0, 0, - 0, 0, 14, 0, 18, 0, 6, 0, 0, 0, 15, 7, 4, 0, - 0, 0, 0, 0, 23, 0, 0, 30, 0, 35, 16, 0, 0, 0, - 0, 0, 13, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, - 11, 22, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, - 21, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, - 16, 0, 0, 12, 0, 0, 9, 28, 8, 0, 0, 0, 0, 0, - 13, 0, 0, 0, 0, 0, 16, 0, 0, 0, 9, 0, 23, 0, - 0, 0, 15, 0, 0, 0, 18, 22, 0, 25, 18, 0, 0, 0, - 0, 0, 34, 0, 0, 0, 0, 0, 12, 12, 41, 15, 0, 0, - 14, 0, 0, 7, 0, 0, 21, 0, 0, 0, 7, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 29, - 0, 24, 0, 0, 0, 13, 0, 0, 0, 24, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 13, 0, 0, 10, 14, 0, 0, 0, - 0, 0, 0, 10, 14, 0, 0, 0, 0, 15, 0, 0, 0, 0, - 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 14, 0, - 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 25, 0, 0, - 14, 17, 0, 0, 0, 0, 14, 34, 15, 0, 0, 0, 0, 0, - 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 4, 0, 22, - 0, 27, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 20, 0, 0, 17, 0, 12, 0, 0, 16, 9, 0, 9, 15, - 0, 0, 0, 0, 0, 8, 0, 12, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 11, 31, 0, 14, 23, 15, 17, 0, 0, 0, 50, - 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 14, 24, 0, 0, - 13, 32, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 0, 4, 8, 0, 0, 0, 14, 0, - 0, 0, 25, 0, 0, 0, 3, 0, 4, 6, 0, 0, 0, 0, - 0, 0, 15, 4, 0, 0, 0, 0, 0, 11, 0, 0, 3, 0, - 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 22, 12, 0, - 14, 0, 0, 0, 0, 0, 18, 0, 0, 26, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 11, 0, 9, 0, - 0, 0, 0, 0, 18, 0, 0, 0, 29, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 11, 13, 0, 0, 0, 0, 0, 17, 0, - 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 26, 0, 0, 9, - 0, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0, 0, - 0, 33, 0, 16, 0, 15, 0, 0, 0, 0, 0, 0, 0, 29, - 0, 31, 18, 0, 0, 0, 0, 30, 0, 0, 0, 0, 14, 0, - 20, 22, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 22, 0, 0, 16, 0, 0, 0, 19, 0, 0, 42, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, - 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 24, 0, 14, 22, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, - 0, 19, 16, 0, 0, 0, 19, 0, 19, 0, 0, 0, 0, 0, - 0, 31, 0, 12, 0, 0, 12, 0, 0, 0, 0, 0, 0, 16, - 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 13, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 22, 15, 0, 0, 0, 0, 0, 0, - 0, 0, 12, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 21, - 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, - 0, 0, 0, 32, 0, 30, 11, 0, 0, 12, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 8, 0, 0, 0, 0, 0, 0, 28, 0, - 12, 0, 0, 0, 0, 0, 0, 0, 19, 16, 0, 0, 0, 0, - 0, 0, 0, 0, 31, 32, 20, 0, 0, 11, 0, 0, 0, 0, - 0, 0, 0, 0, 14, 0, 15, 41, 0, 0, 13, 27, 0, 32, - 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 0, 0, 0, 2, 17, 15, 0, 0, 14, 0, 0, 0, - 0, 0, 0, 15, 0, 0, 0, 0, 23, 15, 18, 0, 0, 0, - 15, 0, 25, 0, 0, 0, 15, 0, 14, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 6, 0, 0, - 0, 0, 17, 0, 0, 0, 28, 0, 0, 17, 0, 25, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 32, 12, 0, 32, 0, 0, - 15, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 15, 0, 0, 16, 0, 0, 0, 0, 0, - 3, 0, 0, 15, 0, 0, 11, 16, 0, 37, 0, 6, 0, 0, - 0, 0, 0, 0, 0, 19, 18, 0, 2, 0, 0, 0, 0, 0, - 0, 35, 0, 0, 25, 19, 0, 0, 0, 0, 0, 28, 21, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 34, 0, 0, 0, 0, 0, 15, 0, 8, 0, 0, - 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 25, 14, 0, - 18, 14, 0, 27, 0, 0, 0, 37, 0, 14, 29, 24, 0, 0, - 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, - 14, 9, 0, 21, 0, 0, 0, 18, 0, 0, 11, 0, 0, 20, - 0, 0, 0, 0, 0, 32, 19, 0, 12, 0, 0, 0, 0, 32, - 0, 0, 0, 0, 0, 26, 20, 0, 28, 0, 0, 0, 0, 0, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 35, 15, 9, 0, 0, 0, 0, 0, 0, 0, - 0, 13, 0, 0, 0, 20, 28, 0, 0, 0, 0, 22, 0, 27, - 0, 0, 0, 0, 0, 16, 15, 0, 12, 0, 0, 11, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 13, - 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, - 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 25, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, - 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 9, 14, 0, 0, 0, 0, 0, 0, 0, 21, - 35, 13, 0, 0, 0, 0, 0, 17, 0, 0, 29, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, - 0, 0, 0, 0, 0, 25, 0, 25, 13, 25, 22, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, - 0, 12, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 24, 0, 0, 0, 0, 30, 0, 28, 0, 0, - 0, 35, 0, 0, 0, 13, 0, 10, 0, 0, 37, 0, 6, 13, - 0, 0, 0, 13, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, - 24, 0, 0, 24, 31, 0, 0, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 25, - 0, 0, 23, 23, 0, 0, 0, 0, 0, 18, 22, 0, 0, 0, - 0, 0, 20, 0, 0, 11, 12, 8, 30, 0, 0, 18, 0, 0, - 0, 3, 0, 4, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 14, 4, 6, 0, 0, 0, 0, 15, 2, 15, 0, - 19, 0, 15, 0, 18, 0, 12, 0, 0, 0, 9, 0, 0, 0, - 0, 0, 0, 2, 0, 0, 0, 0, 24, 0, 0, 0, 0, 19, - 31, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 0, 14, 8, 0, 0, 0, 18, 16, 0, 18, 22, - 0, 15, 0, 0, 0, 18, 18, 0, 0, 0, 14, 0, 15, 0, - 0, 0, 28, 0, 0, 0, 32, 0, 14, 0, 0, 0, 7, 23, - 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, - 35, 0, 0, 0, 0, 19, 0, 0, 10, 0, 0, 14, 0, 10, - 0, 0, 0, 0, 0, 0, 40, 0, 16, 24, 0, 0, 0, 8, - 0, 15, 0, 25, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, - 0, 0, 0, 0, 27, 0, 24, 15, 14, 17, 0, 0, 0, 0, - 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, - 22, 0, 0, 0, 18, 19, 0, 16, 0, 0, 0, 27, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 37, 0, 0, 0, 0, 0, 18, 10, 0, 14, 0, 0, 0, 0, - 0, 0, 0, 8, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, - 0, 0, 13, 0, 0, 0, 15, 0, 0, 0, 18, 0, 0, 0, - 28, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, - 24, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 15, - 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 11, 0, 0, - 0, 0, 20, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, - 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 28, 0, 9, - 0, 0, 0, 2, 0, 0, 22, 0, 0, 0, 0, 0, 0, 6, - 0, 0, 38, 13, 0, 6, 32, 18, 0, 0, 0, 12, 0, 15, - 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 22, 0, 0, 0, - 0, 0, 20, 0, 0, 0, 37, 0, 23, 0, 0, 0, 0, 0, - 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 12, 16, 36, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 35, 0, 0, 0, 0, 30, 0, 0, 0, 25, - 17, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, - 0, 20, 15, 0, 34, 0, 0, 0, 0, 0, 0, 0, 28, 24, - 0, 28, 0, 19, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, - 14, 0, 0, 0, 0, 16, 0, 0, 0, 0, 7, 0, 0, 14, - 0, 15, 0, 0, 25, 0, 0, 31, 0, 0, 0, 0, 13, 0, - 26, 18, 15, 0, 0, 0, 11, 12, 0, 0, 0, 0, 0, 0, - 0, 18, 0, 31, 0, 6, 0, 0, 0, 0, 0, 0, 29, 15, - 0, 0, 0, 0, 0, 31, 0, 0, 0, 30, 0, 0, 29, 0, - 0, 0, 15, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 19, 0, 0, 0, 0, 0, 0, 20, 30, 18, 0, 31, 0, - 0, 34, 22, 0, 0, 29, 0, 0, 24, 21, 0, 0, 0, 24, - 0, 15, 0, 0, 22, 3, 0, 28, 0, 0, 32, 26, 0, 0, - 0, 12, 26, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 9, 0, 6, 0, 0, 0, 4, 7, 4, 0, 0, 0, 10, 4, + 10, 7, 6, 0, 0, 7, 0, 8, 0, 6, 8, 8, 5, 6, + 10, 5, 4, 5, 0, 0, 6, 10, 0, 7, 6, 0, 10, 6, + 8, 9, 4, 0, 7, 10, 0, 10, 0, 7, 0, 0, 0, 10, + 0, 0, 5, 9, 0, 0, 6, 10, 0, 0, 0, 7, 3, 0, + 0, 0, 4, 7, 0, 9, 5, 0, 0, 0, 6, 0, 2, 5, + 0, 0, 10, 0, 8, 5, 0, 8, 3, 9, 10, 0, 0, 1, + 3, 0, 0, 0, 8, 2, 0, 10, 0, 5, 10, 8, 5, 0, + 6, 3, 9, 7, 0, 9, 2, 5, 9, 13, 5, 0, 0, 11, + 0, 0, 7, 0, 0, 0, 0, 0, 0, 8, 0, 10, 10, 11, + 0, 0, 6, 6, 6, 0, 4, 0, 0, 0, 7, 0, 0, 0, + 5, 0, 14, 0, 0, 0, 0, 0, 0, 5, 0, 8, 0, 8, + 4, 0, 0, 0, 0, 0, 4, 6, 0, 0, 0, 0, 0, 2, + 7, 0, 0, 0, 0, 0, 3, 0, 10, 0, 0, 0, 4, 0, + 0, 0, 9, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, + 0, 5, 0, 10, 0, 14, 8, 10, 0, 10, 0, 0, 0, 6, + 0, 0, 0, 5, 2, 4, 0, 9, 0, 13, 13, 0, 11, 0, + 6, 8, 0, 2, 8, 0, 0, 8, 7, 8, 0, 10, 0, 0, + 0, 0, 9, 0, 8, 0, 0, 0, 0, 5, 0, 0, 12, 9, + 0, 8, 0, 0, 0, 7, 0, 5, 0, 0, 0, 1, 0, 9, + 14, 10, 0, 10, 0, 0, 0, 0, 0, 17, 0, 0, 6, 0, + 0, 0, 0, 0, 0, 0, 0, 8, 10, 0, 0, 10, 6, 11, + 0, 0, 0, 6, 0, 5, 0, 7, 0, 0, 0, 8, 20, 0, + 10, 11, 0, 10, 0, 6, 7, 0, 0, 0, 0, 0, 19, 0, + 20, 0, 0, 2, 8, 0, 0, 0, 0, 3, 9, 8, 0, 0, + 0, 0, 0, 12, 0, 12, 0, 0, 0, 13, 0, 6, 0, 0, + 0, 0, 0, 0, 0, 11, 11, 14, 0, 8, 0, 0, 8, 0, + 0, 0, 0, 0, 10, 0, 0, 10, 6, 0, 0, 6, 0, 11, + 10, 9, 0, 3, 0, 0, 14, 0, 0, 8, 0, 0, 18, 14, + 0, 0, 0, 0, 0, 12, 0, 14, 12, 0, 14, 0, 0, 0, + 0, 5, 7, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 2, 0, 0, 5, 0, 0, 0, 8, + 0, 9, 12, 0, 13, 0, 14, 0, 15, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 14, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 7, 0, + 0, 0, 19, 10, 0, 3, 0, 0, 0, 9, 15, 0, 0, 0, + 0, 0, 3, 6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, + 23, 0, 0, 0, 0, 16, 0, 11, 0, 11, 0, 0, 8, 0, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 2, 13, 0, + 17, 9, 0, 17, 0, 0, 12, 13, 0, 0, 13, 14, 12, 11, + 0, 0, 0, 0, 15, 0, 0, 15, 0, 0, 17, 13, 11, 0, + 0, 0, 0, 2, 0, 0, 0, 0, 8, 0, 0, 13, 0, 13, + 3, 27, 4, 0, 3, 0, 0, 2, 0, 0, 0, 0, 12, 0, + 0, 0, 14, 13, 0, 0, 13, 0, 0, 0, 0, 18, 2, 0, + 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, + 0, 0, 0, 22, 0, 0, 0, 0, 15, 0, 0, 0, 0, 2, + 0, 0, 13, 19, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, + 0, 17, 18, 18, 9, 0, 0, 0, 15, 0, 0, 25, 0, 12, + 0, 0, 0, 0, 0, 0, 0, 17, 0, 13, 9, 11, 0, 0, + 0, 0, 0, 17, 22, 0, 0, 0, 0, 14, 0, 18, 0, 7, + 14, 12, 11, 0, 9, 0, 0, 10, 0, 0, 0, 39, 40, 2, + 0, 0, 0, 0, 17, 7, 8, 0, 0, 0, 0, 0, 0, 0, + 27, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 12, 6, 23, 0, 0, 0, + 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 12, 0, 0, 10, + 0, 0, 0, 14, 15, 0, 0, 11, 0, 24, 0, 0, 0, 12, + 0, 0, 0, 18, 10, 0, 15, 0, 0, 0, 37, 0, 0, 0, + 0, 0, 0, 12, 0, 0, 0, 0, 14, 0, 0, 0, 0, 2, + 13, 0, 0, 0, 0, 2, 0, 0, 0, 0, 15, 9, 0, 10, + 21, 0, 8, 0, 0, 0, 0, 0, 18, 9, 21, 9, 6, 0, + 0, 0, 0, 0, 15, 0, 8, 0, 0, 0, 0, 0, 0, 0, + 0, 13, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 0, 19, 0, + 0, 17, 0, 13, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 7, 0, 0, 2, 0, 0, 0, 0, 11, 0, 0, 0, + 7, 14, 0, 0, 16, 0, 0, 16, 0, 0, 23, 0, 0, 0, + 13, 18, 9, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 9, + 10, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 14, 15, 0, + 11, 10, 0, 0, 16, 30, 0, 21, 0, 0, 0, 0, 11, 0, + 20, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 0, 0, 8, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 10, + 0, 0, 0, 0, 31, 0, 22, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 10, 0, 0, 27, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 15, 0, 0, + 0, 0, 17, 1, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 12, + 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, + 17, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 10, 11, + 16, 0, 11, 15, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, + 15, 0, 0, 0, 0, 0, 24, 21, 0, 0, 3, 0, 15, 31, + 13, 0, 31, 0, 0, 0, 0, 3, 0, 13, 0, 0, 0, 0, + 19, 0, 0, 0, 11, 0, 0, 25, 0, 0, 0, 0, 0, 0, + 12, 15, 0, 0, 0, 0, 0, 0, 0, 30, 0, 15, 0, 14, + 0, 0, 0, 3, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 12, + 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 29, 0, + 0, 0, 0, 0, 13, 0, 0, 0, 0, 18, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 24, + 11, 10, 0, 0, 0, 0, 20, 0, 0, 0, 0, 3, 44, 0, + 0, 0, 0, 10, 9, 0, 0, 0, 0, 0, 16, 0, 0, 8, + 18, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 21, 0, 0, 0, 0, 15, 0, 15, 0, 0, 0, 0, 16, + 0, 11, 0, 14, 0, 0, 16, 48, 0, 22, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, + 0, 12, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 15, 0, + 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 30, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 24, 0, 0, 0, 0, 11, 0, 0, 0, 18, 13, 22, 0, 0, + 0, 0, 9, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 18, + 0, 0, 11, 0, 31, 0, 0, 0, 0, 0, 0, 21, 19, 0, + 23, 0, 0, 30, 0, 0, 19, 0, 12, 0, 25, 0, 0, 0, + 10, 42, 0, 0, 9, 1, 0, 0, 0, 0, 0, 12, 0, 0, + 0, 22, 0, 13, 0, 0, 0, 27, 0, 0, 0, 0, 0, 3, + 0, 0, 0, 14, 16, 15, 0, 3, 0, 0, 0, 0, 31, 0, + 15, 16, 17, 0, 0, 0, 0, 0, 12, 0, 31, 0, 0, 0, + 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 17, 0, + 0, 0, 0, 14, 0, 0, 35, 26, 0, 0, 30, 0, 0, 30, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 15, 14, 0, 0, + 0, 0, 0, 0, 0, 0, 34, 24, 5, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 26, 0, 0, 18, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 16, 0, 0, 23, 0, 0, 0, 16, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 18, 16, + 0, 0, 6, 0, 0, 0, 0, 0, 9, 21, 0, 13, 0, 0, + 0, 0, 16, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 19, 2, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 2, 0, 23, 0, 9, 26, 0, 0, + 0, 0, 0, 0, 0, 0, 7, 26, 0, 0, 0, 12, 0, 0, + 19, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, + 0, 0, 0, 19, 9, 0, 0, 0, 12, 0, 0, 0, 10, 0, + 19, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, + 23, 11, 17, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 13, + 0, 18, 0, 2, 0, 0, 0, 32, 0, 0, 0, 0, 26, 0, + 0, 20, 0, 0, 8, 0, 5, 16, 0, 4, 0, 25, 0, 11, + 13, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 0, + 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, + 0, 20, 0, 0, 0, 0, 10, 0, 0, 0, 27, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 32, 0, 0, 0, 22, 8, 12, 10, + 0, 0, 0, 0, 15, 0, 0, 13, 0, 0, 0, 0, 28, 0, + 0, 0, 13, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 25, 0, 0, 0, 0, 0, 0, 18, 0, 14, 0, 0, 11, 0, + 0, 10, 0, 9, 13, 0, 0, 25, 0, 9, 0, 0, 0, 15, + 10, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 10, 0, + 0, 20, 0, 0, 18, 27, 25, 0, 0, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 14, + 0, 0, 0, 29, 0, 0, 13, 9, 14, 0, 0, 0, 0, 13, + 0, 0, 0, 0, 0, 0, 12, 18, 0, 0, 11, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 30, 12, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, + 27, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 11, 20, 0, 14, 6, 0, 0, 0, 0, + 9, 0, 0, 0, 0, 0, 16, 0, 0, 0, 8, 0, 0, 0, + 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 24, 6, 0, 14, 0, 21, 0, 0, 14, + 0, 0, 0, 0, 0, 0, 0, 5, 0, 18, 0, 0, 0, 0, + 14, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 10, 0, 0, + 0, 0, 27, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, + 13, 14, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 10, 0, 10, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 9, 0, 0, 30, + 11, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 13, 0, 0, + 14, 0, 10, 0, 0, 0, 21, 19, 0, 13, 0, 0, 0, 23, + 0, 0, 0, 35, 0, 0, 0, 12, 0, 0, 0, 11, 0, 0, + 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 26, 0, + 0, 25, 0, 18, 0, 0, 15, 0, 0, 12, 0, 0, 0, 0, + 22, 0, 33, 0, 0, 0, 0, 0, 22, 0, 16, 0, 11, 0, + 0, 12, 17, 0, 0, 0, 0, 18, 0, 11, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 27, 3, 0, 0, 0, 0, 0, 20, 33, + 0, 0, 22, 17, 0, 0, 0, 0, 0, 10, 0, 0, 32, 0, + 0, 15, 0, 0, 0, 0, 0, 13, 42, 0, 20, 0, 0, 0, + 11, 0, 28, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, + 0, 0, 0, 13, 0, 0, 0, 0, 0, 19, 0, 0, 0, 28, + 11, 22, 0, 15, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, + 17, 35, 0, 0, 0, 0, 0, 0, 0, 20, 15, 0, 0, 0, + 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, + 0, 0, 0, 19, 11, 21, 0, 0, 0, 0, 0, 0, 0, 0, + 48, 0, 0, 0, 0, 9, 13, 0, 0, 16, 15, 0, 0, 0, + 19, 0, 0, 3, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, + 0, 30, 6, 23, 0, 0, 18, 30, 0, 18, 0, 12, 27, 0, + 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 12, 0, 0, 0, 0, 0, 11, 14, 0, 0, 0, 0, 0, 0, + 0, 0, 20, 0, 0, 18, 16, 13, 0, 0, 0, 0, 23, 0, + 0, 22, 0, 13, 0, 18, 0, 0, 0, 0, 24, 0, 13, 0, + 25, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 22, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 31, 24, 12, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 8, 0, + 0, 0, 0, 18, 0, 17, 0, 0, 0, 0, 0, 0, 14, 0, + 17, 3, 0, 0, 0, 0, 0, 11, 0, 0, 0, 2, 0, 0, + 0, 0, 0, 18, 0, 0, 9, 0, 9, 8, 20, 0, 0, 21, + 15, 11, 0, 0, 11, 0, 0, 24, 0, 14, 9, 0, 13, 0, + 9, 9, 0, 0, 39, 0, 0, 15, 0, 36, 13, 0, 0, 0, + 0, 0, 0, 9, 0, 0, 0, 23, 15, 0, 0, 0, 3, 0, + 23, 0, 0, 11, 29, 0, 0, 0, 2, 29, 0, 0, 0, 0, + 0, 0, 15, 45, 10, 0, 17, 0, 0, 0, 0, 7, 29, 0, + 0, 0, 0, 0, 14, 0, 29, 10, 0, 17, 0, 0, 0, 0, + 10, 0, 20, 9, 17, 0, 22, 0, 0, 0, 0, 0, 0, 0, + 0, 20, 23, 10, 33, 0, 0, 0, 15, 9, 17, 16, 17, 19, + 0, 20, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, + 16, 19, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 28, + 0, 10, 0, 0, 0, 11, 0, 0, 19, 0, 0, 0, 15, 0, + 0, 0, 0, 9, 9, 0, 0, 0, 24, 0, 10, 31, 0, 0, + 0, 0, 0, 16, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, + 0, 10, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 3, + 0, 0, 4, 9, 0, 0, 0, 0, 0, 0, 21, 15, 15, 0, + 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, + 18, 28, 0, 0, 24, 0, 0, 0, 0, 0, 0, 15, 0, 0, + 19, 0, 0, 0, 0, 14, 0, 0, 0, 0, 16, 0, 0, 0, + 30, 0, 15, 0, 0, 22, 0, 0, 19, 23, 18, 24, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 11, 0, 12, 0, + 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, + 0, 0, 0, 0, 0, 30, 14, 0, 20, 22, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 12, 0, + 0, 0, 0, 0, 15, 0, 15, 4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, + 28, 0, 10, 0, 32, 0, 0, 15, 0, 14, 0, 20, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 15, 0, 33, 0, 31, 0, 0, + 0, 2, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 3, + 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, + 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 27, 0, 0, 0, 0, 0, 0, 25, 0, + 0, 28, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, - 23, 0, 0, 73, 74, 0, 0, 37, 25, 0, 0, 0, 0, 38, - 0, 0, 0, 10, 0, 0, 0, 26, 0, 0, 0, 0, 0, 12, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 28, 0, 0, 24, 29, 11, 0, 29, 0, 0, 0, 0, - 0, 0, 0, 29, 0, 21, 0, 0, 0, 15, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 14, 0, 0, 31, 0, 0, 0, 0, 25, - 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 30, 0, 0, 24, 0, 0, 14, 0, 43, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 19, - 21, 0, 0, 0, 0, 0, 11, 0, 28, 0, 10, 0, 0, 26, - 17, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 35, 0, 24, 0, 0, 0, 23, 0, - 0, 0, 0, 20, 0, 0, 0, 29, 23, 0, 19, 0, 0, 0, - 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 12, - 0, 0, 11, 0, 0, 0, 0, 28, 0, 0, 0, 0, 17, 0, - 22, 13, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, - 0, 0, 0, 0, 13, 0, 0, 22, 0, 0, 0, 0, 22, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 27, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 25, 0, 0, - 0, 43, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 24, 0, - 14, 13, 0, 35, 36, 0, 0, 0, 0, 0, 0, 0, 0, 23, - 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 14, - 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 16, 23, 0, 0, - 0, 19, 0, 0, 0, 0, 9, 0, 0, 0, 10, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 33, 0, - 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 29, 16, 0, 14, - 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 29, 0, 0, 9, 15, 30, 23, 0, 0, 0, 0, - 0, 0, 34, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 5, - 0, 0, 0, 34, 0, 0, 0, 0, 0, 10, 0, 0, 0, 15, - 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 29, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, - 0, 11, 26, 0, 0, 0, 0, 14, 0, 10, 21, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, - 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 29, 35, 15, 0, - 0, 0, 0, 21, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 24, 0, - 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 14, 0, 0, 0, 10, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 16, 0, 32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, - 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 30, 0, 0, 21, - 0, 0, 0, 0, 2, 0, 28, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 17, 0, 0, 0, 21, 0, 0, 0, 0, 0, 17, 0, - 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 17, 0, 0, 23, - 0, 15, 0, 27, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 2, - 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 20, 2, 0, 0, 0, 15, 72, 0, 22, 0, - 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 19, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, - 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 16, 0, - 0, 0, 0, 0, 15, 0, 26, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, - 0, 0, 13, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 10, 0, 0, 0, 44, 0, 22, 0, 0, 11, 0, 30, - 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, - 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 17, 0, 0, - 0, 0, 0, 16, 0, 0, 0, 13, 0, 0, 0, 0, 22, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 16, 0, 0, 19, 0, 0, 0, 0, 0, - 14, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, - 0, 14, 0, 0, 13, 0, 0, 14, 0, 0, 0, 6, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, - 0, 9, 0, 27, 34, 0, 0, 0, 0, 0, 0, 7, 0, 0, - 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 13, 0, 29, 0, 25, 0, 0, 0, 38, 0, 0, 23, - 0, 14, 0, 0, 0, 24, 0, 0, 0, 25, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 24, 18, 0, 0, 0, 0, 30, - 36, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 16, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 27, + 0, 0, 0, 0, 0, 15, 0, 0, 25, 0, 27, 0, 23, 0, + 0, 15, 0, 30, 2, 0, 0, 14, 0, 0, 0, 0, 0, 0, + 20, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 0, 0, 11, 0, 0, 0, 14, 0, 0, 0, 21, 0, 0, + 11, 23, 0, 0, 14, 0, 17, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 10, 3, 0, 0, 18, 0, 0, 0, 0, 21, 0, 0, + 3, 0, 0, 1, 0, 0, 0, 0, 28, 26, 0, 0, 0, 22, + 0, 0, 0, 0, 0, 15, 21, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 23, 17, 0, 0, 0, 0, + 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, + 22, 0, 0, 0, 0, 0, 0, 28, 16, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 2, 4, 0, 21, + 0, 0, 0, 0, 18, 10, 0, 30, 0, 0, 0, 0, 35, 0, + 18, 0, 10, 24, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 31, 0, 0, 0, 0, 0, 11, 0, 0, 0, 17, + 0, 0, 15, 0, 0, 0, 22, 0, 0, 8, 14, 31, 16, 0, + 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, + 31, 0, 0, 0, 0, 0, 0, 0, 0, 14, 11, 0, 0, 0, + 23, 32, 0, 12, 0, 0, 0, 0, 16, 0, 12, 0, 0, 0, + 0, 0, 14, 15, 0, 18, 0, 0, 18, 0, 0, 0, 9, 0, + 0, 0, 17, 12, 0, 0, 0, 18, 0, 0, 0, 13, 23, 18, + 30, 0, 33, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 22, + 0, 0, 0, 0, 0, 0, 0, 19, 31, 26, 0, 21, 0, 0, + 0, 0, 0, 0, 31, 0, 0, 0, 0, 29, 16, 0, 0, 0, + 0, 0, 0, 15, 0, 0, 15, 8, 15, 12, 0, 0, 0, 0, + 0, 0, 0, 21, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, + 22, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 13, + 0, 6, 13, 33, 25, 0, 0, 0, 10, 0, 35, 0, 0, 0, + 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, + 0, 0, 0, 22, 0, 0, 0, 0, 17, 0, 0, 0, 27, 0, + 0, 16, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 16, + 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 20, 0, 0, 0, + 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, + 0, 0, 17, 12, 0, 0, 0, 15, 29, 0, 0, 0, 0, 16, + 0, 0, 0, 13, 0, 4, 0, 0, 0, 15, 0, 0, 0, 0, + 0, 33, 33, 14, 0, 38, 15, 0, 30, 0, 0, 0, 0, 0, + 0, 0, 42, 0, 20, 13, 0, 0, 15, 0, 0, 0, 6, 15, + 12, 0, 0, 0, 0, 0, 0, 11, 37, 0, 0, 0, 0, 9, + 11, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 13, + 13, 29, 0, 0, 0, 0, 7, 19, 15, 0, 0, 0, 0, 34, + 0, 0, 0, 0, 0, 0, 10, 34, 0, 0, 26, 0, 0, 0, + 0, 0, 13, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 11, 0, 0, 0, 15, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 10, 37, 20, + 0, 0, 0, 0, 14, 0, 0, 32, 33, 2, 0, 0, 3, 8, + 37, 32, 0, 0, 9, 0, 0, 0, 0, 0, 2, 0, 0, 0, + 0, 15, 0, 10, 31, 23, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 15, 0, 0, 0, 0, 7, 0, 0, 24, 37, 17, 24, 0, + 14, 30, 14, 0, 0, 24, 0, 0, 3, 0, 17, 0, 25, 0, + 0, 0, 13, 0, 0, 3, 0, 0, 0, 11, 24, 26, 0, 0, + 0, 14, 0, 0, 22, 0, 0, 0, 0, 15, 0, 0, 0, 0, + 0, 0, 0, 0, 10, 0, 14, 18, 0, 18, 0, 0, 29, 0, + 20, 0, 0, 23, 16, 0, 0, 0, 19, 0, 0, 0, 11, 0, + 13, 0, 0, 0, 12, 25, 0, 0, 11, 0, 0, 0, 0, 15, + 0, 0, 0, 0, 0, 0, 10, 0, 13, 0, 0, 0, 0, 0, + 15, 0, 40, 0, 11, 26, 15, 16, 0, 0, 0, 0, 0, 0, + 24, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 28, + 10, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 14, 37, 35, + 0, 0, 25, 9, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, + 0, 0, 0, 0, 22, 0, 0, 0, 0, 23, 20, 9, 0, 0, + 0, 12, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 29, 0, 35, 0, 0, 0, 22, 13, 0, 0, 0, 0, 0, 0, + 16, 0, 9, 0, 0, 17, 0, 20, 13, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, + 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 24, 0, 0, 27, 0, 14, 0, 0, 17, 0, 14, 0, 0, 0, + 0, 0, 0, 26, 20, 0, 15, 0, 0, 0, 0, 15, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 15, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 19, 27, 0, 16, 0, 23, 0, 0, + 14, 20, 0, 0, 20, 12, 25, 0, 0, 0, 18, 0, 0, 0, + 0, 0, 0, 19, 0, 23, 12, 0, 41, 0, 0, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 42, 21, + 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 13, 0, 0, 0, + 0, 0, 0, 14, 0, 20, 13, 13, 0, 24, 0, 0, 0, 20, + 11, 0, 0, 0, 0, 16, 18, 13, 0, 0, 0, 0, 0, 17, + 0, 0, 0, 0, 22, 35, 0, 0, 11, 0, 19, 0, 0, 0, + 0, 6, 29, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 22, + 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 29, 50, 0, 0, 0, 0, 0, 0, 0, 13, + 0, 0, 21, 0, 0, 0, 0, 12, 0, 12, 0, 0, 0, 0, + 0, 8, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, + 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 31, 30, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 19, 0, 16, + 0, 15, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, + 0, 0, 0, 2, 0, 0, 0, 0, 0, 21, 0, 11, 0, 0, + 0, 16, 47, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 15, + 0, 0, 8, 0, 17, 0, 0, 0, 6, 0, 0, 0, 50, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 17, 0, 0, + 0, 17, 0, 0, 0, 15, 0, 0, 20, 0, 0, 21, 0, 0, + 13, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 35, 24, 0, + 0, 0, 25, 0, 15, 15, 0, 0, 0, 21, 0, 0, 0, 0, + 0, 0, 0, 16, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 13, 11, 0, 0, 0, 26, 14, 0, 14, 14, 0, 0, 11, + 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24, + 0, 0, 0, 0, 0, 0, 16, 0, 0, 3, 0, 14, 0, 0, + 0, 0, 0, 0, 0, 0, 11, 0, 0, 21, 0, 0, 0, 8, + 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 35, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 11, 15, 0, 0, + 16, 2, 0, 0, 0, 18, 0, 12, 0, 0, 0, 0, 0, 0, + 0, 14, 0, 0, 24, 22, 0, 0, 0, 23, 0, 0, 0, 0, + 0, 0, 0, 32, 0, 0, 0, 0, 13, 0, 3, 0, 0, 0, + 0, 2, 0, 0, 0, 0, 28, 6, 0, 0, 0, 0, 8, 0, + 0, 0, 0, 0, 0, 21, 0, 0, 15, 0, 0, 0, 27, 17, + 0, 0, 23, 0, 0, 0, 8, 0, 22, 43, 3, 11, 0, 0, + 0, 15, 0, 0, 0, 0, 18, 6, 0, 29, 0, 0, 0, 0, + 0, 0, 0, 28, 0, 0, 15, 0, 0, 38, 0, 11, 0, 0, + 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, + 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, + 11, 0, 38, 34, 0, 13, 0, 0, 0, 0, 3, 0, 4, 0, + 0, 25, 0, 0, 0, 24, 0, 0, 0, 31, 23, 3, 0, 4, + 6, 0, 0, 39, 0, 27, 31, 0, 0, 0, 0, 29, 0, 0, + 0, 0, 0, 29, 0, 22, 0, 0, 15, 0, 0, 13, 0, 0, + 19, 33, 0, 0, 0, 0, 0, 0, 0, 11, 0, 15, 0, 0, + 0, 0, 0, 14, 0, 0, 16, 0, 0, 14, 0, 0, 0, 16, + 0, 0, 0, 15, 0, 0, 15, 28, 0, 0, 14, 0, 10, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, + 0, 0, 0, 0, 26, 12, 0, 0, 0, 0, 0, 31, 34, 0, + 0, 20, 0, 22, 13, 21, 0, 0, 22, 0, 0, 0, 0, 0, + 0, 11, 0, 12, 25, 0, 0, 15, 0, 0, 0, 27, 15, 0, + 23, 11, 43, 0, 0, 0, 0, 32, 0, 0, 32, 0, 0, 0, + 0, 35, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 0, 14, 0, 0, 30, 0, + 0, 0, 0, 0, 11, 0, 0, 0, 0, 22, 22, 0, 0, 0, + 0, 0, 0, 14, 9, 0, 28, 9, 0, 2, 0, 0, 7, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 6, 28, 0, + 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 8, + 0, 26, 23, 14, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, + 19, 0, 0, 0, 0, 15, 0, 0, 0, 22, 0, 0, 0, 18, + 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 8, 0, 26, + 3, 20, 4, 0, 0, 0, 0, 35, 0, 12, 2, 0, 0, 0, + 30, 3, 11, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 16, 12, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 19, 0, 0, 0, + 14, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, + 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 11, 13, 11, 0, 0, 0, 0, 0, + 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, + 0, 17, 0, 14, 11, 0, 0, 24, 0, 0, 0, 0, 0, 0, + 0, 8, 0, 0, 0, 0, 12, 0, 12, 14, 0, 0, 0, 0, + 0, 14, 0, 0, 0, 0, 0, 26, 0, 22, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 46, 15, 0, 13, 12, 0, 0, + 15, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, + 0, 20, 0, 0, 16, 0, 0, 0, 0, 0, 30, 0, 15, 3, + 0, 0, 0, 0, 15, 15, 0, 24, 9, 14, 0, 9, 0, 0, + 0, 0, 25, 2, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, + 0, 38, 0, 19, 0, 0, 12, 0, 0, 34, 0, 0, 15, 0, + 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, + 21, 0, 0, 0, 0, 0, 0, 35, 0, 73, 74, 12, 23, 0, + 0, 12, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 16, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, 0, 30, 0, 0, 27, 0, 0, 34, + 0, 0, 0, 0, 0, 0, 0, 31, 0, 23, 0, 0, 0, 0, + 0, 0, 32, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, + 0, 9, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 13, 0, + 23, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 16, 14, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 21, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 19, 0, 0, 28, 0, 24, 0, 0, 0, 0, 0, + 28, 0, 19, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 34, 0, 0, 11, 16, 0, 0, 17, 0, 0, 23, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, + 0, 0, 19, 0, 0, 0, 0, 2, 19, 0, 0, 0, 30, 0, + 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 27, + 0, 0, 15, 0, 0, 15, 16, 0, 0, 0, 31, 0, 0, 9, + 0, 0, 0, 0, 0, 0, 27, 0, 27, 0, 0, 0, 0, 0, + 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 16, 0, 0, 13, + 15, 15, 0, 12, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 20, 0, 12, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 13, 15, 18, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 16, 15, 0, 0, 0, 24, 0, 0, 13, + 0, 0, 0, 0, 0, 0, 0, 20, 0, 15, 0, 13, 0, 0, + 0, 0, 0, 0, 0, 0, 12, 72, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 32, 35, 31, 16, 24, 30, 0, 0, 0, + 23, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 10, 0, 0, 0, 0, 19, 18, 0, 27, 0, 0, 0, 11, 0, + 37, 0, 0, 28, 0, 31, 0, 0, 17, 0, 13, 0, 0, 0, + 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, + 0, 0, 0, 27, 0, 0, 11, 0, 0, 27, 0, 0, 13, 0, + 11, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 33, + 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 11, 0, 25, + 0, 12, 24, 0, 0, 20, 0, 18, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 15, 18, 0, 19, 0, 0, 12, 0, 0, 0, 0, + 13, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 28, + 0, 22, 0, 0, 0, 0, 0, 0, 37, 0, 23, 0, 0, 0, + 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 16, 0, 24, 0, + 11, 0, 0, 0, 0, 0, 15, 0, 0, 0, 12, 0, 0, 0, + 0, 0, 0, 0, 2, 0, 0, 0, 17, 0, 0, 0, 0, 0, + 0, 0, 0, 21, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 16, 0, 0, 18, 0, 29, 0, 20, 13, 15, + 0, 0, 30, 0, 0, 25, 32, 0, 0, 0, 0, 0, 0, 18, + 0, 31, 14, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, + 23, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 19, 0, + 13, 0, 0, 0, 23, 0, 26, 0, 0, 21, 18, 0, 0, 0, + 0, 22, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 26, 0, 0, 0, 0, 34, 0, 0, 0, 13, 0, 0, + 0, 18, 0, 0, 0, 0, 39, 0, 0, 0, 31, 0, 0, 2, + 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 13, 0, 0, + 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 20, 26, 18, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 44, + 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, + 8, 0, 0, 0, 30, 0, 0, 0, 25, 0, 0, 0, 0, 14, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 16, 0, 0, 0, + 0, 17, 0, 0, 0, 0, 0, 18, 0, 0, 0, 31, 0, 26, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 12, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, - 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, - 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 36, 0, 0, 0, - 0, 0, 0, 0, 0, 23, 0, 8, 0, 0, 0, 0, 0, 0, - 0, 19, 0, 12, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, - 0, 0, 24, 0, 0, 0, 0, 0, 0, 5, 30, 0, 0, 0, - 0, 0, 16, 0, 0, 0, 21, 0, 0, 10, 0, 27, 29, 0, - 0, 24, 0, 0, 0, 23, 26, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 14, 0, 0, 15, 0, 0, 0, 0, 0, - 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, - 17, 0, 0, 0, 24, 23, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 10, 0, 0, 15, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, - 0, 0, 0, 0, 0, 22, 0, 23, 0, 0, 0, 0, 22, 0, + 21, 0, 3, 0, 13, 0, 0, 0, 26, 0, 0, 0, 0, 19, + 12, 13, 0, 0, 9, 0, 0, 24, 0, 0, 0, 19, 0, 0, + 25, 0, 0, 0, 0, 0, 10, 17, 0, 0, 15, 0, 0, 0, + 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 15, + 0, 0, 0, 0, 30, 14, 0, 0, 0, 0, 0, 18, 14, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 34, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 6, + 0, 0, 0, 0, 13, 0, 0, 0, 0, 14, 0, 0, 14, 0, + 0, 0, 14, 0, 2, 0, 0, 0, 0, 39, 0, 40, 0, 0, + 0, 0, 23, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 23, + 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 13, 0, 0, 0, 0, 0, 0, 19, 0, 18, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 18, 15, 29, 0, 0, 0, 0, + 0, 0, 11, 18, 0, 0, 0, 0, 0, 0, 21, 0, 35, 18, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8, 0, 0, 0, 19, 0, 0, 17, 0, 0, 24, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 26, 0, 0, 0, 0, 0, 18, 0, 0, 0, 18, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 20, 0, 18, 0, 28, 0, 0, 29, 0, 0, + 24, 0, 0, 0, 25, 0, 0, 23, 0, 0, 0, 0, 19, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 14, 0, 0, 0, + 0, 0, 27, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 43, + 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, + 0, 21, 13, 0, 0, 0, 0, 18, 0, 0, 18, 0, 0, 19, + 32, 0, 4, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 12, + 0, 0, 41, 18, 0, 0, 0, 0, 0, 23, 0, 0, 0, 36, + 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 7, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, + 0, 0, 0, 0, 0, 15, 0, 0, 24, 0, 0, 0, 0, 0, + 4, 14, 0, 0, 14, 0, 0, 29, 0, 0, 0, 18, 0, 0, + 0, 24, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 18, 15, 28, 0, 27, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 14, 0, 28, 0, 14, 0, 0, 0, 0, 0, + 0, 0, 0, 23, 0, 15, 0, 0, 18, 0, 0, 0, 6, 17, + 0, 0, 0, 0, 0, 27, 0, 0, 0, 7, 28, 0, 0, 0, + 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 29, 27, 0, + 0, 19, 14, 0, 8, 0, 30, 0, 38, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 43, 0, 15, 0, 14, 21, 0, 26, + 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, + 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 10, 0, 0, 2, 0, 0, 18, 0, 0, 36, 0, 24, 0, 0, + 0, 0, 33, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, + 0, 35, 0, 0, 0, 0, 0, 0, 13, 14, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 11, + 27, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 27, + 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, + 0, 0, 0, 0, 0, 14, 0, 0, 11, 0, 0, 0, 0, 7, + 0, 0, 0, 0, 0, 14, 0, 0, 0, 13, 14, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 36, 0, 0, + 21, 0, 0, 36, 0, 0, 0, 0, 14, 0, 0, 15, 0, 0, + 0, 0, 13, 0, 0, 0, 28, 21, 0, 0, 15, 0, 0, 21, + 0, 0, 0, 24, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 21, 10, 11, 0, 0, 0, 0, 0, 30, 10, + 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 25, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 14, 0, + 0, 0, 0, 0, 0, 25, 0, 0, 14, 0, 22, 0, 0, 0, + 0, 0, 22, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, + 0, 14, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 32, + 29, 11, 15, 0, 13, 9, 0, 8, 0, 0, 0, 0, 0, 0, + 0, 0, 34, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 10, 26, 0, 14, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 11, 25, 0, 0, 0, 0, 0, 0, + 0, 0, 29, 0, 0, 0, 10, 0, 0, 0, 0, 13, 0, 0, + 0, 0, 0, 18, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, + 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, + 0, 0, 0, 29, 0, 0, 0, 0, 0, 22, 0, 14, 0, 6, + 0, 0, 0, 24, 30, 0, 0, 0, 0, 0, 29, 0, 0, 0, + 0, 0, 0, 14, 18, 0, 26, 0, 0, 0, 0, 31, 0, 9, + 0, 32, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, + 0, 29, 0, 22, 0, 0, 0, 0, 0, 8, 0, 0, 0, 9, + 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 14, 0, + 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 29, 0, 43, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 12, + 0, 0, 0, 0, 0, 0, 24, 0, 29, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 11, + 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 29, 0, 0, 3, 13, 0, 0, 0, 0, 0, 0, 0, 22, 29, + 0, 0, 0, 2, 34, 0, 0, 30, 0, 0, 0, 0, 14, 0, + 0, 0, 0, 0, 10, 22, 0, 0, 0, 0, 0, 0, 0, 0, + 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, + 0, 0, 0, 0, 16, 0, 14, 0, 37, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 17, 0, 43, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, - 0, 0, 0, 0, 0, 0, 17, 0, 24, 0, 0, 0, 0, 0, - 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 21, 0, 0, 22, 0, 31, 0, 0, 0, 0, 0, - 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 27, 0, 0, 6, 0, 0, 42, 0, 0, 0, - 0, 0, 0, 0, 35, 0, 0, 0, 0, 38, 30, 0, 0, 0, - 0, 28, 0, 0, 0, 0, 0, 0, 19, 8, 26, 0, 11, 0, - 0, 0, 33, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 27, 0, 0, - 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, - 0, 0, 0, 0, 0, 0, 31, 0, 4, 18, 37, 0, 0, 0, - 35, 36, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, - 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 13, - 0, 0, 18, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, - 14, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 16, 29, 33, 4, 13, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, - 0, 0, 0, 0, 0, 0, 23, 28, 0, 0, 0, 0, 0, 0, - 19, 8, 11, 0, 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, - 19, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, - 0, 22, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 0, 22, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 22, 0, 0, 0, - 0, 0, 22, 36, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 18, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 7, - 0, 0, 0, 0, 13, 6, 0, 0, 0, 0, 0, 22, 0, 0, - 0, 0, 25, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 22, 0, + 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 9, 21, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, + 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, + 0, 0, 0, 9, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, + 16, 0, 30, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 23, 35, 10, 0, + 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 20, 0, 0, 0, 0, 16, 0, 3, 0, 0, 0, 22, 0, 0, + 29, 0, 0, 0, 0, 16, 0, 0, 0, 0, 20, 0, 0, 0, + 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, + 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, + 0, 8, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 0, 15, 0, 0, 24, 35, + 27, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, - 0, 35, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 25, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, - 24, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 28, 8, 16, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, - 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 21, 11, 0, 25, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 37, 0, + 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, - 24, 0, 0, 0, 0, 35, 29, 0, 0, 0, 0, 29, 0, 0, - 0, 14, 0, 0, 0, 0, 0, 0, 11, 20, 0, 0, 0, 0, - 0, 0, 0, 9, 29, 0, 0, 27, 0, 0, 0, 0, 35, 0, - 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, - 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 15, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 23, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, - 0, 23, 27, 0, 0, 0, 23, 6, 0, 0, 30, 0, 0, 0, - 0, 14, 0, 7, 15, 14, 14, 0, 0, 0, 0, 31, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 23, 0, - 0, 0, 0, 0, 28, 0, 0, 0, 0, 16, 0, 0, 0, 0, - 0, 22, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, - 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 30, 14, 0, 0, 0, 0, 15, 0, 0, 13, 36, 0, 29, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 16, 11, 0, 0, 0, 0, 0, - 0, 0, 0, 34, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 16, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, - 21, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 7, 0, 0, 0, 14, 0, 0, 0, 0, - 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, + 0, 0, 10, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, + 0, 0, 0, 0, 0, 22, 0, 0, 30, 0, 30, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 33, 0, 22, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, + 0, 0, 23, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 23, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 11, 22, 0, 0, 0, 0, 0, + 0, 0, 0, 17, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, + 0, 22, 0, 7, 19, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 11, 0, 19, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 17, 17, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 28, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 27, 0, 0, 0, 0, 27, 0, 0, 0, 0, - 16, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, - 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 18, 0, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 33, 17, 0, 0, 0, + 22, 0, 0, 0, 0, 15, 0, 0, 0, 0, 19, 22, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 22, 16, 0, 0, 0, 0, 0, + 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 19, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 11, 0, 0, + 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 16, 0, 0, 0, 14, 0, 16, 0, 0, 22, 0, + 0, 0, 0, 0, 0, 0, 28, 0, 15, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 8, 0, 27, - 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 32, 0, - 0, 0, 0, 0, 0, 10, 0, 0, 17, 0, 24, 0, 0, 0, - 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 19, 8, 0, 0, - 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 16, 0, 0, 13, 27, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 27, 0, + 0, 0, 0, 27, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, + 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, + 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 31, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 19, 0, 0, 0, 0, 11, 0, 0, 43, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, + 0, 22, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 25, 0, + 0, 0, 0, 15, 0, 0, 0, 29, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 15, 0, 0, 0, + 0, 0, 27, 0, 28, 18, 0, 0, 0, 22, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 35, 20, 0, 0, 0, 0, 0, 12, 0, + 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 13, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 0, 28, 0, 0, 28, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, + 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 0, 27, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, + 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, + 0, 0, 0, 27, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 27, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, + 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 24, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 18, 0, 0, 24, 0, 0, 0, 0, 30, 0, 0, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 7, 0, 16, 0, 0, 0, 0, 0, + 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, + 0, 0, 43, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 8, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 22, 0, 0, 0, 34, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 14, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 15, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, + 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, + 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 24, 0, 0, 5, 24, 22, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 20, 14, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, + 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, - 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, - 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, - 0, 0, 0, 0, 28, 26, 0, 0, 0, 0, 0, 0, 13, 0, - 0, 0, 0, 16, 0, 0, 0, 17, 0, 0, 0, 0, 7, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, - 0, 0, 0, 16, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 0, 0, 7, 0, + 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 29, 0, 0, 0, 21, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, + 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 25, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 8, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, - 0, 0, 0, 15, 0, 2, 0, 43, 0, 0, 30, 0, 0, 0, + 30, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, - 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 2, 19, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, - 29, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 0, 0, + 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 25, 19, 0, 26, 0, 0, - 0, 14, 0, 33, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 22, - 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 25, - 22, 0, 16, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 16, 0, 0, 0, 11, 0, 0, 0, 0, - 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 20, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 24, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, - 13, 16, 0, 0, 0, 0, 0, 0, 0, 25, 22, 0, 0, 0, - 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, + 13, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, + 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, - 0, 0, 16, 0, 0, 25, 0, 37, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 26, - 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 35, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 17, 0, 0, 0, - 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 17, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 20, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, + 0, 26, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 17, 70, 0, 6, 0, 0, 0, 0, + 0, 0, 0, 14, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 22, 0, 0, + 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 0, 0, 25, 0, 0, 0, 15, + 0, 0, 0, 0, 26, 0, 0, 0, 24, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 13, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 25, 0, 0, - 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, - 0, 22, 0, 0, 16, 0, 0, 0, 31, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 40, 0, 0, - 0, 0, 0, 15, 15, 0, 0, 0, 22, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 4, 0, - 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, - 0, 19, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, - 17, 0, 0, 25, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, - 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 12, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 37, 0, + 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, + 0, 0, 19, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 17, 0, 0, + 0, 33, 40, 0, 0, 0, 0, 14, 17, 14, 0, 0, 0, 0, + 0, 0, 27, 0, 17, 0, 0, 27, 33, 0, 0, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 20, 14, 0, 0, 0, 0, 24, 0, + 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, + 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 20, 0, 0, 17, 0, 0, 0, 43, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, + 0, 0, 0, 0, 0, 0, 16, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, + 0, 31, 0, 0, 0, 0, 17, 0, 0, 0, 33, 0, 0, 0, + 0, 25, 0, 0, 0, 15, 15, 6, 0, 0, 0, 0, 0, 0, + 24, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, + 0, 25, 0, 0, 0, 15, 4, 0, 0, 0, 0, 0, 24, 0, + 24, 0, 15, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 17, 0, 0, 0, 14, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 21, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 25, 0, 17, 0, 0, 0, 20, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 15, + 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 26, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 25, 0, 0, + 16, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 14, 17, 0, 0, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 25, 0, 0, 0, + 0, 0, 0, 0, 0, 25, 14, 0, 7, 15, 0, 17, 0, 0, + 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 32, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 14, 14, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 25, 0, 0, 0, 0, 0, 15, 0, 0, 22, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 13, 14, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, - 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, + 0, 25, 0, 0, 32, 31, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 13, 0, 0, 15, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, + 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 22, + 0, 0, 0, 0, 0, 0, 6, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 17, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 17, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, + 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, + 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 24, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, + 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, + 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, - 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 24, 0, 0, - 16, 0, 0, 0, 14, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, + 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, - 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, - 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, - 0, 2, 37, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 17, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 17, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 13, - 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 3, 0, 14, - 0, 0, 7, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, - 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, + 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 28, 0, 15, 0, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 25, 0, 34, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 34, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 14, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 14, 0, 15, + 0, 0, 0, 36, 15, 0, 0, 0, 0, 0, 0, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, + 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 4, + 15, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 15, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 4, 0, + 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 23, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 14, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, - 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 6, + 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 15, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0, 6, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 6, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, + 0, 7, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 24, + 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 17, 13, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, + 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, - 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, - 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, + 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 28, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, - 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 28, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, + 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1205,58 +1196,69 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 6, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 17, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, - 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 13, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 7, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1266,24 +1268,26 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, + 0, 0, 0, 15, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, - 27, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1298,19 +1302,63 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 21, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, + 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1319,20 +1367,75 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 16, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1340,23 +1443,24 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1365,14 +1469,12 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1380,7 +1482,6 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1396,12 +1497,10 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1410,20 +1509,16 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1436,14 +1531,15 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1451,12 +1547,9 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, - 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1466,6 +1559,7 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1503,14 +1597,11 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1521,6 +1612,7 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1534,7 +1626,9 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1544,7 +1638,6 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1571,20 +1664,17 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1599,7 +1689,6 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1617,10 +1706,8 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1642,6 +1729,7 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1708,7 +1796,6 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1716,6 +1803,7 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1736,7 +1824,6 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1820,9 +1907,11 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1832,7 +1921,9 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1942,7 +2033,6 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1978,7 +2068,6 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1995,12 +2084,12 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2048,6 +2137,7 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2060,6 +2150,7 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2140,7 +2231,6 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2179,7 +2269,6 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2285,6 +2374,53 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2295,7 +2431,6 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2339,6 +2474,7 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -2479,4366 +2615,4751 @@ static const unsigned char lengthtable[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31 + 0, 0, 31 }; static const struct grib_keys_hash wordlist[] = { {""}, {""}, {""}, - {"n",1334}, - {""}, - {"nd",1344}, - {"ed",725}, - {"nnn",1348}, - {"td",2174}, - {"t",2163}, + {"n",1349}, {""}, - {"nt",1362}, - {"sd",1946}, - {"na",1337}, + {"nd",1359}, + {"ed",729}, + {"nnn",1363}, + {"td",2215}, + {"t",2204}, {""}, - {"m",1213}, + {"nt",1378}, + {"sd",1985}, + {"na",1352}, {""}, - {"dy",715}, - {"date",646}, + {"m",1225}, + {""}, {""}, + {"date",649}, + {""}, {""}, + {"name",1353}, + {"min",1308}, {""}, - {"year",2423}, - {"name",1338}, - {"min",1295}, - {"day",658}, - {"data",627}, + {"data",630}, {""}, {""}, - {"ident",961}, - {"one",1535}, - {"time",2200}, + {"ident",966}, + {"one",1558}, + {"time",2241}, {""}, {""}, {""}, - {"mars",1216}, + {"mars",1228}, {""}, {""}, - {"names",1343}, + {"names",1358}, {""}, {""}, {""}, - {"stream",2135}, - {"sort",2080}, + {"stream",2176}, + {"sort",2120}, {""}, - {"enorm",767}, + {"enorm",771}, {""}, {""}, - {"metadata",1291}, - {""}, - {"type",2246}, - {"system",2161}, - {"eps",772}, - {"domain",708}, - {"spare",2097}, + {"metadata",1304}, + {""}, {""}, {""}, + {"eps",776}, + {"domain",712}, + {"spare",2137}, {""}, {""}, {""}, - {"edition",726}, - {"oper",1547}, - {"present",1698}, - {"param",1646}, + {"edition",730}, + {"oper",1570}, + {"present",1721}, + {"param",1669}, {""}, {""}, {""}, {""}, {""}, {""}, - {"parameter",1652}, - {"iteration",1035}, + {"parameter",1675}, + {"iteration",1041}, {""}, - {"assertion",317}, - {"dimension",691}, + {"assertion",320}, + {"dimension",695}, {""}, - {"centre",401}, + {"centre",404}, {""}, {""}, {""}, - {"step",2124}, - {""}, - {"true",2235}, + {"step",2165}, + {"refdate",1814}, + {"true",2278}, {""}, {""}, {""}, - {"parameters",1660}, - {"core",602}, - {"timerepres",2214}, - {"opttime",1554}, - {"points",1686}, - {"J",93}, - {""}, - {"rectime",1785}, - {""}, {""}, - {"yFirst",2421}, - {"second",1947}, + {"parameters",1683}, + {"core",605}, + {"timerepres",2255}, + {"opttime",1577}, + {"points",1709}, {""}, {""}, - {"const",575}, - {"minute",1297}, - {"restricted",1826}, - {"dummy",710}, - {"stepZero",2134}, - {"units",2295}, - {"Xo",270}, + {"rectime",1808}, {""}, - {"radius",1760}, + {"dateTime",659}, + {""}, + {"second",1986}, + {"dataTime",645}, + {"stepZero",2175}, + {"const",578}, + {"minute",1310}, + {"restricted",1850}, + {"range",1788}, + {"grid",915}, + {"units",2346}, {""}, {""}, - {"section",1971}, - {"status",2123}, + {"radius",1783}, + {"identifier",970}, + {""}, + {"section",2011}, + {"status",2164}, {""}, - {"partitions",1665}, + {"partitions",1688}, + {"isSens",1027}, + {"leadtime",1106}, + {"direction",698}, + {"nref",1377}, {""}, - {"leadtime",1099}, - {"direction",694}, + {"radials",1782}, + {"instrument",998}, + {""}, + {"dataStream",643}, + {""}, + {"minimum",1309}, + {""}, {""}, {""}, + {"marsStream",1253}, {""}, {""}, - {"radials",1759}, - {"instrument",992}, + {"Latin",113}, + {"reference",1815}, {""}, {""}, - {"Xp",271}, - {"minimum",1296}, + {"origin",1582}, + {"statistics",2163}, {""}, {""}, {""}, - {"three",2187}, - {"dateTime",656}, + {"process",1751}, + {"ucs",2337}, + {""}, {""}, {""}, + {"file",855}, + {"endStep",763}, {""}, - {"hdate",933}, - {"dataTime",642}, - {"landtype",1056}, - {""}, {""}, - {"statistics",2122}, + {"precision",1716}, + {"false",848}, {""}, {""}, {""}, - {"process",1728}, - {"ucs",2288}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"precision",1693}, - {""}, {""}, - {"dataType",643}, + {"offset",1521}, {""}, - {"method",1292}, + {"TT",239}, + {"count",619}, {""}, {""}, - {"count",616}, - {"marsType",1244}, - {""}, {""}, {""}, {""}, - {"class",429}, - {"phase",1679}, + {"operStream",1571}, + {""}, + {"anoffset",315}, + {"class",432}, {""}, - {"uco",2287}, + {"marsStep",1252}, + {"uco",2336}, + {"startStep",2157}, + {"offsetdate",1555}, + {""}, {""}, + {"g",892}, + {"Lap",108}, {""}, {""}, {""}, - {"country",620}, - {""}, {""}, {""}, {""}, {""}, - {"latitude",1064}, - {"pl",1683}, - {"char",426}, - {"Dy",42}, - {"stepType",2130}, - {"model",1314}, - {"correction",607}, + {"latitude",1071}, + {"pl",1706}, {""}, - {"total",2216}, - {"Di",30}, - {"normal",1351}, + {"offsettime",1556}, {""}, - {"consensus",573}, - {"product",1730}, + {"model",1329}, + {"correction",610}, + {"fcperiod",852}, + {"total",2257}, {""}, - {"latitudes",1095}, - {"hundred",953}, - {""}, {""}, - {"Dstart",38}, - {"reportType",1805}, + {"normal",1366}, + {"Lop",142}, + {"consensus",576}, + {"product",1753}, {""}, - {"ieeeFloats",966}, - {"dataDate",630}, - {"range",1765}, - {"grid",911}, - {"million",1294}, - {"marsDir",1220}, - {"hour",944}, - {"dummyc",713}, + {"latitudes",1102}, + {"TS",237}, + {"three",2228}, + {"signature",2103}, + {"elementsTable",735}, + {"hdate",937}, {""}, {""}, - {"isSens",1021}, + {"endTimeStep",765}, {""}, {""}, - {"masterDir",1249}, - {"discipline",700}, - {""}, - {"codeType",553}, - {""}, - {"dataStream",640}, - {""}, {""}, {""}, {""}, {""}, - {"marsStream",1241}, - {""}, - {"refdate",1791}, + {"million",1307}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"platform",1707}, {""}, - {"thousand",2186}, - {""}, {""}, {""}, - {"elementsTable",731}, + {"categories",387}, + {"discipline",704}, + {"oceanStream",1519}, {""}, {""}, - {"origin",1559}, - {""}, {""}, {""}, {""}, - {"marsDomain",1221}, + {"daLoop",629}, + {"fgTime",854}, + {"method",1305}, {""}, - {"endStep",759}, - {""}, {""}, {""}, {""}, - {"dataKeys",632}, - {"temperature",2176}, - {""}, {""}, {""}, {""}, {""}, - {"identifier",965}, - {"operStream",1548}, - {""}, {""}, {""}, {""}, - {"marsStep",1240}, - {"month",1321}, - {"startStep",2116}, - {"TT",237}, - {""}, {""}, - {"accuracy",293}, - {"partitionTable",1664}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"rectimeDay",1786}, + {"year",2477}, {""}, {""}, {""}, - {"reference",1792}, - {""}, {""}, - {"notDecoded",1361}, + {"padding",1598}, + {""}, {""}, {""}, + {"phase",1702}, {""}, - {"two",2244}, + {"partitionTable",1687}, {""}, {""}, {""}, {""}, {""}, {""}, - {"reserved",1809}, - {"file",851}, + {"flags",872}, {""}, - {"signature",2063}, + {"section8",2050}, {""}, - {"false",844}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"local",1136}, - {""}, {""}, - {"unitsFactor",2301}, + {"efiOrder",733}, + {"char",429}, + {""}, {""}, {""}, {""}, {""}, + {"type",2289}, + {"system",2202}, + {""}, {""}, {""}, {""}, {""}, + {"gg",904}, + {"hundred",958}, + {""}, {""}, {""}, {""}, {""}, + {"two",2287}, {""}, - {"oceanStream",1496}, - {"standardDeviation",2109}, - {"categories",384}, + {"diagnostic",691}, {""}, {""}, {""}, - {"version",2349}, - {""}, - {"varno",2344}, - {""}, {""}, - {"marsQuantile",1237}, - {"eight",730}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"channel",424}, - {"fcperiod",848}, - {"endTimeStep",761}, + {"hour",948}, + {""}, {""}, {""}, + {"longitude",1184}, + {""}, {""}, {""}, {""}, + {"upperLimit",2368}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"eight",734}, {""}, - {"gridType",920}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"threshold",2188}, - {"localTime",1164}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"eleven",733}, + {"longitudes",1215}, {""}, - {"conceptDir",565}, - {""}, {""}, - {"platform",1684}, + {"selectedSecond",2087}, + {"thousand",2227}, + {"ieeeFloats",971}, {""}, - {"hideThis",938}, - {""}, {""}, - {"isFillup",1015}, - {""}, {""}, {""}, - {"diagnostic",687}, + {"dataOrigin",637}, {""}, {""}, {""}, - {"g",888}, + {"crcrlf",624}, {""}, {""}, {""}, - {"longitude",1172}, + {"local",1148}, + {"Di",30}, + {"flag",867}, {""}, - {"JS",94}, - {"typicalDay",2278}, - {"coefsFirst",557}, - {"aerosolType",299}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"matchSort",1256}, + {"localTime",1176}, {""}, - {"longitudes",1203}, + {"dataSelection",642}, + {"userTimeStart",2377}, {""}, - {"levtype",1120}, - {"elevation",732}, - {""}, {""}, {""}, - {"K",95}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"dataSelection",639}, - {"spectralType",2107}, - {""}, - {"codeFigure",552}, - {"localDir",1145}, - {""}, - {"localDate",1137}, + {"temperature",2217}, {""}, - {"typicalTime",2283}, - {""}, {""}, - {"localDay",1139}, + {"Dstart",38}, + {"dataType",646}, {""}, - {"TS",235}, - {"countTotal",619}, - {""}, {""}, {""}, - {"padding",1575}, - {""}, {""}, - {"productType",1735}, - {""}, {""}, {""}, {""}, {""}, - {"values",2332}, + {"KS",96}, + {"dataDate",633}, {""}, {""}, - {"levels",1119}, - {""}, {""}, {""}, {""}, {""}, - {"userTimeStart",2326}, - {"efiOrder",729}, - {"molarMass",1320}, - {""}, - {"offset",1498}, + {"marsType",1256}, + {"marsDir",1232}, + {"reserved",1833}, {""}, - {"levelist",1118}, - {"dataOrigin",634}, + {"coefsFirst",560}, {""}, {""}, {""}, {""}, - {"anoffset",312}, - {""}, {""}, - {"windSpeed",2393}, - {""}, {""}, - {"offsetdate",1532}, - {"recDateTime",1782}, - {"aerosolTypeName",300}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"ccsdsFlags",390}, - {""}, - {"offsettime",1533}, - {"average",321}, - {""}, {""}, {""}, {""}, {""}, - {"isSatellite",1019}, + {"masterDir",1261}, {""}, - {"typicalDate",2276}, - {""}, {""}, - {"flags",868}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"level",1115}, + {"landtype",1063}, {""}, {""}, {""}, {""}, - {"centreDescription",402}, - {""}, - {"marsModel",1235}, - {"fgTime",850}, - {""}, - {"TScalc",236}, - {""}, {""}, - {"forecastperiod",880}, + {"yLast",2476}, {""}, {""}, - {"categoryType",385}, + {"marsQuantile",1249}, + {"windSpeed",2447}, {""}, - {"userDateStart",2322}, - {""}, {""}, {""}, {""}, - {"statisticalProcess",2120}, + {"stepType",2171}, {""}, {""}, {""}, - {"fcmonth",847}, - {"oneThousand",1546}, - {"isOctahedral",1017}, + {"version",2400}, {""}, - {"dataFlag",631}, - {""}, {""}, - {"overlayTemplate",1569}, - {""}, {""}, - {"KS",96}, + {"varno",2395}, {""}, {""}, {""}, - {"selectedSecond",2047}, - {""}, {""}, {""}, {""}, {""}, - {"statisticalProcessesList",2121}, + {"K",95}, {""}, - {"endDescriptors",738}, - {"datasetForLocal",645}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"forecastTime",879}, - {"levelType",1117}, - {""}, {""}, {""}, - {"gg",900}, - {""}, {""}, {""}, {""}, - {"pv",1744}, - {""}, {""}, {""}, {""}, - {"indicatorOfParameter",979}, + {"matchSort",1268}, + {"forecastperiod",884}, + {"marsDomain",1233}, {""}, - {"fgDate",849}, - {"satelliteSeries",1890}, - {""}, {""}, {""}, - {"windDirection",2382}, - {""}, {""}, {""}, {""}, - {"band",329}, + {"reportType",1829}, + {""}, {""}, {""}, {""}, {""}, + {"truncateLaplacian",2281}, {""}, {""}, - {"Ly",153}, - {""}, {""}, {""}, {""}, - {"optionalData",1553}, - {"section8",2010}, + {"TScalc",238}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"codeType",556}, + {"unitOfTime",2343}, + {""}, {""}, + {"countTotal",622}, + {"eleven",737}, + {"coefsSecond",561}, {""}, {""}, {""}, - {"Latin",113}, + {"yFirst",2475}, {""}, - {"crcrlf",621}, - {""}, {""}, {""}, {""}, - {"yLast",2422}, - {"M",155}, - {"rdbtime",1771}, - {"oneMillionConstant",1537}, - {""}, {""}, {""}, {""}, - {"lev",1113}, - {"localDateTime",1138}, - {"nlev",1347}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"forecastSteps",878}, - {"mybits",1333}, - {"unitOfTime",2292}, + {"month",1336}, {""}, - {"runwayState",1885}, - {""}, {""}, - {"laplacianOperator",1057}, - {""}, {""}, {""}, {""}, - {"validityTime",2331}, - {""}, {""}, - {"MS",158}, - {"Lap",108}, - {""}, {""}, {""}, {""}, - {"Lcy",120}, + {"channel",427}, + {""}, {""}, {""}, + {"gridType",924}, + {"instrumentIdentifier",999}, {""}, - {"theMessage",2181}, + {"notDecoded",1376}, + {"unitsFactor",2352}, {""}, - {"avg",325}, - {""}, {""}, {""}, {""}, - {"obstype",1493}, - {"Lop",142}, - {"Luy",149}, + {"codeFigure",555}, {""}, - {"number",1363}, - {"flag",863}, + {"dummyc",717}, + {"average",324}, {""}, {""}, {""}, {""}, {""}, - {"bitmap",367}, - {""}, - {"clusterMember9",544}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"localSecond",1159}, + {"additionalParameter",300}, {""}, - {"controlForecastCluster",580}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"thisMarsType",2185}, - {"daLoop",626}, - {"aerosolpacking",302}, + {"indicatorOfParameter",984}, {""}, {""}, - {"unitsDecimalScaleFactor",2299}, - {""}, {""}, - {"referenceDate",1793}, - {""}, {""}, {""}, {""}, {""}, - {"longitudesList",1204}, + {"dy",719}, + {"dataFlag",634}, {""}, {""}, {""}, {""}, - {"coordinatesPresent",601}, - {"parameterDiscipline",1655}, + {"day",661}, + {"elevation",736}, + {"dataKeys",635}, {""}, {""}, {""}, {""}, {""}, - {"rdbType",1769}, - {""}, {""}, - {"derivedForecast",685}, - {"representationMode",1806}, - {""}, {""}, - {"freeFormData",883}, + {"forecastTime",883}, + {""}, + {"logTransform",1183}, {""}, {""}, {""}, - {"startTimeStep",2118}, + {"forecastSteps",882}, {""}, - {"earthMinorAxis",719}, - {"logTransform",1171}, + {"fgDate",853}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"waveDomain",2372}, + {"isSatellite",1025}, + {"oneThousand",1569}, + {"offsetSection9",1552}, {""}, - {"coefsSecond",558}, - {""}, {""}, {""}, {""}, - {"localMinute",1156}, - {"siteId",2070}, - {"periodOfTime",1675}, - {"localFlag",1147}, + {"hideThis",942}, {""}, {""}, - {"dateOfForecast",648}, - {"upperLimit",2317}, - {""}, - {"yearOfForecast",2427}, - {""}, - {"marsIdent",1227}, + {"isFillup",1021}, {""}, {""}, {""}, {""}, {""}, - {"timeOfForecast",2207}, + {"lowerLimit",1218}, {""}, {""}, - {"userDateTimeStart",2324}, - {""}, {""}, {""}, {""}, - {"paramId",1647}, + {"ccsdsFlags",393}, + {"values",2383}, + {""}, {""}, + {"levels",1129}, {""}, - {"operatingMode",1549}, - {""}, {""}, {""}, - {"offsetSection9",1529}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"longitudeOfCentrePoint",1176}, + {"localSecond",1171}, + {"conceptDir",568}, + {"threshold",2229}, + {""}, + {"avg",328}, + {""}, {""}, + {"aerosolpacking",305}, {""}, {""}, - {"angleMultiplier",307}, + {"levelist",1128}, {""}, {""}, - {"fireTemplate",853}, + {"statisticalProcess",2161}, + {"dateOfForecast",651}, + {""}, {""}, {""}, {""}, {""}, + {"marsLatitude",1243}, {""}, - {"firstDimension",854}, + {"offsetSection8",1551}, + {"siteLatitude",2111}, {""}, - {"rdbtimeDay",1773}, - {"localMonth",1157}, - {"marsStartStep",1239}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"timeOfForecast",2248}, + {""}, {""}, {""}, {""}, + {"dummy",714}, + {"fcmonth",851}, + {""}, {""}, {""}, {""}, {""}, + {"statisticalProcessesList",2162}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"band",332}, {""}, {""}, {""}, - {"iIncrement",958}, + {"Ly",153}, {""}, {""}, - {"angleDivisor",306}, - {""}, - {"laplacianOperatorIsSet",1058}, + {"level",1123}, {""}, {""}, {""}, - {"spectralMode",2106}, - {""}, {""}, {""}, {""}, {""}, - {"stepTypeForConversion",2131}, - {""}, {""}, - {"localDecimalScaleFactor",1140}, - {""}, {""}, - {"rdbtimeTime",1778}, + {"localDir",1157}, {""}, - {"latitudeSexagesimal",1092}, + {"localDate",1149}, + {"isOctahedral",1023}, {""}, - {"localTimeForecastList",1165}, - {""}, {""}, - {"truncateLaplacian",2238}, - {"thisMarsStream",2184}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"longitudeOfGridPoints",1183}, + {"userDateStart",2373}, {""}, - {"analysisOffsets",305}, - {"zeros",2432}, - {"dayOfForecast",661}, + {"longitudesList",1216}, {""}, - {"zero",2431}, - {"referenceStep",1800}, - {""}, {""}, {""}, - {"tubeDomain",2242}, + {"satelliteSeries",1915}, {""}, - {"anoffsetFirst",313}, - {""}, {""}, {""}, {""}, - {"tiggeModel",2193}, - {""}, {""}, {""}, {""}, {""}, - {"xFirst",2414}, + {"rdbtime",1794}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"decimalScaleFactor",667}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"centreForLocal",406}, + {""}, {""}, + {"periodOfTime",1698}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"rdbtimeDate",1772}, + {"country",623}, + {""}, {""}, {""}, + {"latitudeSexagesimal",1099}, + {"dataLength",636}, {""}, - {"lengthDescriptors",1104}, + {"Lcy",120}, + {""}, {""}, {""}, + {"marsLevel",1244}, + {"datasetForLocal",648}, {""}, {""}, {""}, {""}, {""}, - {"scanningMode",1939}, - {"defaultStepUnits",675}, - {"LaD",105}, + {"Luy",149}, + {"number",1379}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"bitmap",370}, + {""}, {""}, {""}, + {"referenceSampleInterval",1823}, + {""}, {""}, {""}, {""}, + {"forecastLeadTime",875}, {""}, - {"maximum",1261}, + {"aerosolType",302}, + {""}, + {"recDateTime",1805}, + {""}, {""}, + {"topLevel",2256}, {""}, - {"latitudeOfCentrePoint",1069}, + {"centreDescription",405}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"levtype",1130}, {""}, - {"validityDate",2330}, + {"pv",1767}, + {"startTimeStep",2159}, {""}, - {"subSetJ",2149}, - {"anoffsetFrequency",314}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"setDecimalPrecision",2053}, + {"standardDeviation",2149}, + {"localFlag",1159}, {""}, - {"computeStatistics",564}, - {""}, {""}, {""}, - {"originalSubCentreIdentifier",1563}, - {"reservedOctet",1814}, + {"laplacianOperator",1064}, {""}, {""}, - {"modelIdentifier",1316}, - {"hourOfForecast",947}, + {"spectralType",2147}, + {"referenceDate",1816}, {""}, {""}, - {"gridDefinition",913}, - {""}, - {"integerScaleFactor",996}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"verticalDomainTemplate",2359}, - {"lowerLimit",1206}, - {""}, {""}, {""}, - {"oldSubtype",1534}, - {""}, {""}, {""}, - {"offsetDescriptors",1512}, - {""}, {""}, {""}, - {"marsKeywords",1228}, + {"marsStartStep",1251}, + {"endDescriptors",742}, + {"fireTemplate",857}, + {"typicalTime",2332}, + {""}, {""}, {""}, {""}, + {"aerosolTypeName",303}, + {""}, {""}, + {"centreLongitude",410}, + {""}, {""}, + {"computeStatistics",567}, + {"referenceStep",1824}, + {"productType",1758}, + {""}, {""}, {""}, {""}, + {"Xo",272}, + {""}, {""}, {""}, {""}, + {"accuracy",295}, + {""}, {""}, + {"latitudesList",1103}, {""}, - {"offsetSection0",1518}, + {"windDirection",2436}, + {"lev",1121}, + {"originalSubCentreIdentifier",1586}, + {"nlev",1362}, {""}, - {"instrumentIdentifier",993}, - {"localDefinition",1143}, + {"LaD",105}, {""}, {""}, - {"pressureLevel",1718}, - {"ensembleSize",770}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"rdbDateTime",1767}, + {"Xp",273}, {""}, {""}, {""}, {""}, - {"incrementOfLengths",970}, - {"auxiliary",320}, + {"optionalData",1576}, + {""}, {""}, {""}, + {"yearOfForecast",2481}, + {"localDateTime",1150}, {""}, {""}, - {"visibility",2363}, + {"anoffsetFirst",316}, {""}, {""}, {""}, {""}, - {"monthOfForecast",1324}, - {"marsLatitude",1231}, - {""}, {""}, - {"siteLatitude",2071}, - {"extraDim",798}, + {"coordinatesPresent",604}, + {"Dy",42}, + {""}, {""}, {""}, {""}, + {"unitsDecimalScaleFactor",2350}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"global",901}, + {"longitudeOfCentrePoint",1188}, {""}, {""}, {""}, {""}, - {"dataLength",633}, - {"meanSize",1283}, - {""}, {""}, - {"marsLevel",1232}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"generatingProcessTemplate",897}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"integerScalingFactorAppliedToDirections",997}, - {"integerScalingFactorAppliedToFrequencies",998}, + {"laplacianOperatorIsSet",1065}, {""}, {""}, {""}, {""}, - {"topLevel",2215}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"ccccIdentifiers",387}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"representativeMember",1808}, - {""}, - {"expandedTypes",789}, + {"overlayTemplate",1592}, + {""}, {""}, {""}, {""}, + {"JS",94}, {""}, {""}, - {"centreForLocal",403}, + {"dimensionType",697}, + {"preferLocalConcepts",1720}, + {""}, {""}, {""}, {""}, + {"hourOfForecast",951}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"templatesLocalDir",2219}, + {"setLocalDefinition",2094}, + {"incrementOfLengths",975}, + {"levelType",1125}, {""}, {""}, {""}, - {"datumSize",657}, - {""}, - {"scaledDirections",1914}, - {""}, {""}, - {"secondSize",1960}, - {"secondOfForecast",1954}, + {"derivedForecast",689}, {""}, {""}, - {"minuteOfForecast",1300}, - {""}, {""}, - {"setLocalDefinition",2054}, - {"expver",796}, + {"generatingProcessTemplate",901}, + {""}, + {"freeFormData",887}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"distinctLatitudes",706}, {""}, - {"newSubtype",1346}, + {"pressureLevel",1741}, + {"marsRange",1250}, + {"runwayState",1909}, {""}, {""}, {""}, {""}, {""}, - {"latitudesList",1096}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"clusterMember8",543}, - {"atmosphericChemicalOrPhysicalConstituentType",318}, - {""}, {""}, - {"localTimeMethod",1166}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"marsLamModel",1230}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"boustrophedonic",374}, + {"offsetDescriptors",1535}, + {"controlForecastCluster",583}, {""}, {""}, {""}, {""}, - {"roundedMarsLatitude",1830}, + {"gridDefinition",917}, {""}, - {"referenceOfLengths",1796}, - {""}, {""}, {""}, {""}, - {"overlayTemplateNumber",1570}, - {""}, {""}, {""}, - {"lcwfvSuiteName",1098}, - {""}, {""}, - {"partitionItems",1662}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"preferLocalConcepts",1697}, - {"distinctLatitudes",702}, + {"referenceOfLengths",1819}, {""}, - {"roundedMarsLongitude",1832}, + {"obstype",1516}, + {"firstDimension",858}, + {"anoffsetLast",318}, + {"rdbtimeTime",1801}, {""}, - {"biFourierMakeTemplate",357}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"climateDateFrom",431}, + {"stepRange",2169}, + {""}, {""}, + {"rectimeDay",1809}, + {""}, {""}, {""}, + {"integerScalingFactorAppliedToDirections",1003}, + {"integerScalingFactorAppliedToFrequencies",1004}, + {"Nr",200}, + {""}, {""}, {""}, {""}, + {"userDateTimeStart",2375}, + {"rdbType",1792}, + {"ccsdsRsi",394}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"generatingProcessIdentifier",900}, {""}, {""}, - {"roundedMarsLevelist",1831}, + {"Ni",198}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"anoffsetFrequency",317}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"DyInMetres",44}, + {"categoryType",388}, + {"global",905}, + {"localDecimalScaleFactor",1152}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"parameterDiscipline",1678}, + {""}, {""}, {""}, {""}, {""}, + {"angleDivisor",309}, {""}, {""}, - {"DiInMetres",33}, + {"waveDomain",2424}, {""}, {""}, {""}, - {"subSetK",2150}, - {""}, - {"firstSize",862}, - {"startOfMessage",2114}, + {"groupSplitting",928}, + {"monthOfForecast",1339}, + {""}, {""}, + {"typicalDate",2325}, {""}, - {"typeOfStatisticalPostProcessingOfEnsembleMembers",2270}, + {"centreLongitudeInDegrees",411}, {""}, {""}, {""}, - {"numberOfFloats",1410}, - {"generatingProcessIdentifier",896}, - {"satelliteIdentifier",1888}, + {"ensembleSize",774}, {""}, {""}, {""}, - {"offsetSection8",1528}, - {""}, - {"centreLongitude",407}, + {"integerScaleFactor",1002}, + {"upperRange",2369}, {""}, - {"templatesLocalDir",2178}, + {"analysisOffsets",308}, {""}, {""}, {""}, - {"conceptsMasterDir",571}, - {""}, {""}, - {"iteratorDisableUnrotate",1037}, - {""}, {""}, - {"gridDefinitionSection",915}, - {""}, - {"indexingTime",975}, + {"generatingProcessIdentificationNumber",899}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"validityTime",2382}, + {""}, {""}, {""}, {""}, + {"lcwfvSuiteName",1105}, + {""}, {""}, {""}, {""}, + {"NT",190}, + {"parameterName",1680}, + {""}, {""}, {""}, {""}, + {"Nf",197}, + {""}, {""}, {""}, {""}, + {"localDefinition",1155}, + {"suiteName",2195}, {""}, - {"stretchingFactor",2137}, + {"tubeDomain",2285}, + {"localTimeForecastList",1177}, {""}, - {"indexTemplate",971}, + {"gridName",922}, + {""}, {""}, {""}, {""}, {""}, + {"decimalScaleFactor",671}, + {"modelName",1332}, + {"latitudeOfCentrePoint",1076}, + {"Nassigned",193}, + {"cfName",415}, + {""}, {""}, {""}, {""}, {""}, + {"heightLevelName",939}, {""}, - {"ccsdsRsi",391}, + {"localDay",1151}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"reservedOctet",1838}, {""}, {""}, {""}, {""}, {""}, - {"gridDefinitionDescription",914}, - {""}, {""}, {""}, {""}, - {"listOfScaledFrequencies",1135}, - {"expoffset",795}, - {""}, {""}, {""}, - {"latitudeOfCentrePointInDegrees",1070}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"groupSplitting",924}, + {"conceptsLocalDirAll",571}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"forecastLeadTime",871}, - {""}, {""}, - {"observedData",1492}, - {""}, {""}, {""}, {""}, - {"generatingProcessIdentificationNumber",895}, - {""}, {""}, {""}, {""}, - {"endOfInterval",755}, - {""}, {""}, {""}, {""}, - {"indicatorOfUnitForForecastTime",981}, + {"endOfRange",762}, + {"typeOfLevel",2303}, {""}, - {"referenceSampleInterval",1799}, + {"setDecimalPrecision",2093}, {""}, {""}, - {"typeOfStatisticalProcessing",2271}, + {"lengthDescriptors",1111}, {""}, - {"correction4Part",615}, + {"dayOfForecast",664}, {""}, {""}, - {"marsRange",1238}, - {"clusterSize",546}, + {"siteId",2110}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"marsIdent",1239}, + {"oldSubtype",1557}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"paramId",1670}, {""}, {""}, - {"diffInDays",689}, + {"NL",186}, + {""}, {""}, {""}, {""}, + {"rdbtimeDate",1795}, {""}, {""}, {""}, - {"yDirectionGridLength",2418}, - {""}, - {"longitudeSexagesimal",1202}, + {"subSetK",2191}, + {"offsetSection0",1541}, {""}, {""}, - {"listMembersUsed",1126}, - {""}, {""}, {""}, {""}, {""}, - {"stretchingFactorScaled",2138}, + {"secondOfForecast",1993}, {""}, {""}, - {"stepRange",2128}, - {"stepTypeInternal",2132}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"tablesMasterDir",2169}, - {"marsForecastMonth",1225}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"scanningMode8",1944}, - {"xLast",2415}, - {"heightLevelName",935}, - {""}, - {"horizontalCoordinateSupplement",940}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"offsetFreeFormData",1514}, - {""}, {""}, {""}, {""}, - {"typeOfLevel",2260}, - {""}, - {"bufrTemplate",379}, + {"minuteOfForecast",1313}, + {""}, {""}, + {"listOfScaledFrequencies",1145}, {""}, {""}, {""}, - {"sequences",2050}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"optimizeScaleFactor",1552}, - {"quantile",1756}, + {"matchLandType",1267}, + {"representationType",1831}, + {"shortName",2099}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"marsLevelist",1245}, {""}, {""}, {""}, - {"subSetM",2151}, - {""}, {""}, - {"rdbSubtype",1768}, - {"upperRange",2318}, + {"marsParam",1248}, + {"iIncrement",963}, {""}, {""}, - {"northernLatitudeOfDomain",1359}, + {"marsKeywords",1240}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"numberOfFloats",1427}, + {"boustrophedonic",377}, + {""}, + {"rdbDateTime",1790}, + {"lowerRange",1219}, {""}, {""}, - {"powerOfTenUsedToScaleClimateWeight",1690}, - {"rectimeMinute",1788}, + {"scaledDirections",1946}, + {"multiplicationFactorForLatLong",1348}, {""}, - {"radiusInMetres",1761}, - {"longitudinalDirectionGridLength",1205}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"conceptsLocalDirAll",568}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"qfe",1746}, + {"gridDefinitionSection",919}, {""}, {""}, {""}, {""}, - {"marsLevelist",1233}, + {"bottomLevel",376}, {""}, - {"levelIndicator",1116}, + {"longitudeSexagesimal",1214}, + {""}, + {"epsPoint",778}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"realPart",1803}, {""}, {""}, - {"qnh",1749}, - {""}, - {"horizontalCoordinateDefinition",939}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"conceptsMasterMarsDir",572}, + {"ifsParam",972}, + {""}, {""}, + {"typicalDay",2327}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"southernLatitudeOfDomain",2091}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfTimeSteps",1473}, - {""}, {""}, {""}, {""}, - {"numberOfDirections",1400}, - {"DyInDegrees",43}, - {""}, {""}, - {"DiInDegrees",32}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"indexingDate",974}, - {""}, {""}, {""}, {""}, {""}, - {"anoffsetLast",315}, + {"editionNumber",731}, {""}, - {"typicalMinute",2280}, - {"matchTimeRepres",1257}, + {"newSubtype",1361}, {""}, {""}, {""}, {""}, - {"numberOfFrequencies",1417}, + {"longitudinalDirectionGridLength",1217}, {""}, - {"groupSplittingMethodUsed",925}, - {"yDirectionGridLengthInMetres",2419}, + {"verticalDomainTemplate",2410}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"multiplicationFactorForLatLong",1332}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"bottomLevel",373}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"longitudeOfGridPoints",1195}, {""}, - {"rectimeSecond",1789}, - {""}, {""}, {""}, - {"missingDataFlag",1306}, - {""}, {""}, - {"dx",714}, - {""}, {""}, {""}, - {"crraSection",624}, - {""}, {""}, - {"numberOfDiamonds",1399}, - {""}, {""}, {""}, {""}, - {"max",1260}, - {""}, {""}, {""}, {""}, - {"optimisationTime",1551}, - {"conceptsLocalMarsDirAll",570}, + {"energyNorm",770}, {""}, {""}, - {"numberingOrderOfDiamonds",1485}, - {""}, {""}, - {"frequency",884}, - {""}, {""}, - {"numberOfSubsets",1469}, - {""}, {""}, - {"localDefinitionNumber",1144}, + {"typeOfStatisticalProcessing",2316}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"longitudeOfFirstGridPoint",1181}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"LyInMetres",154}, - {"clutterFilterIndicator",549}, + {"typeOfStatisticalPostProcessingOfEnsembleMembers",2315}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"sectionNumber",2059}, + {""}, {""}, {""}, {""}, + {"modelIdentifier",1331}, + {""}, {""}, {""}, {""}, + {"numberOfTimeSteps",1492}, + {"J",93}, + {""}, {""}, {""}, {""}, + {"matchTimeRepres",1269}, + {""}, {""}, {""}, {""}, {""}, + {"numberOfSection",1483}, {""}, {""}, {""}, {""}, - {"lowerRange",1207}, + {"northernLatitudeOfDomain",1374}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"bufrTemplate",382}, {""}, {""}, - {"secondOrderFlags",1957}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"defaultName",675}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"periodOfTimeIntervals",1676}, + {"Ny",207}, + {""}, {""}, + {"minuteOfReference",1316}, {""}, {""}, {""}, - {"FirstLatitude",67}, - {""}, {""}, {""}, {""}, - {"longitudeOfCentrePointInDegrees",1177}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"typicalSecond",2282}, + {"numberingOrderOfDiamonds",1508}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"typeOfStatisticalProcessingForTimeRangeForReferencePeriod",2317}, {""}, {""}, {""}, - {"typeOfDistributionFunction",2251}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Nr",198}, + {"rdbtimeDay",1796}, + {"headersOnly",938}, + {"defaultStepUnits",679}, {""}, - {"centreLatitude",405}, - {""}, {""}, {""}, {""}, - {"yDirectionGridLengthInMillimetres",2420}, - {"is_uerra",1030}, - {""}, {""}, {""}, - {"Ny",205}, - {""}, {""}, {""}, - {"conceptsLocalDirECMF",569}, - {"listOfModelIdentifiers",1133}, - {"Ni",196}, - {"masterTableNumber",1250}, + {"selectedDay",2082}, + {"dateOfReference",656}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"overlayTemplateNumber",1593}, + {""}, + {"timeOfReference",2251}, + {""}, {""}, {""}, {""}, {""}, + {"southernLatitudeOfDomain",2131}, + {"stepTypeForConversion",2172}, {""}, {""}, - {"numberOfForcasts",1411}, + {"Ncy",196}, {""}, - {"secondLatitude",1951}, + {"numberOfSubsets",1488}, + {"secondOfForecastUsedInLocalTime",1994}, + {"clusterNumber",548}, {""}, - {"numberOfSection",1464}, - {"endOfRange",758}, + {"minuteOfForecastUsedInLocalTime",1314}, + {""}, {""}, {""}, {""}, + {"Nuy",205}, {""}, - {"correction3Part",613}, + {"perturbedType",1701}, + {""}, {""}, {""}, {""}, + {"numberOfFrequencies",1434}, + {""}, {""}, {""}, + {"faFieldName",845}, {""}, {""}, - {"localSection",1160}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"gridDefinitionDescription",918}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"validityDate",2381}, + {"ccccIdentifiers",390}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"latitudeOfCentrePointInDegrees",1077}, {""}, - {"orderOfSpatialDifferencing",1556}, - {"Dx",39}, + {"angleOfRotation",311}, {""}, - {"numberOfForecastsInTube",1415}, - {""}, {""}, {""}, {""}, - {"indicatorOfUnitOfTimeRange",984}, - {""}, {""}, {""}, {""}, {""}, - {"listOfDistributionFunctionParameter",1131}, - {""}, {""}, {""}, {""}, {""}, - {"isEps",1014}, + {"forecastPeriod",878}, {""}, {""}, {""}, - {"Ncy",194}, - {""}, {""}, {""}, {""}, - {"short_name",2062}, - {""}, {""}, - {"_T",286}, - {"addressOfFileFreeSpaceInfo",298}, + {"qfe",1769}, {""}, - {"Nuy",203}, + {"defaultParameter",676}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"orderOfSpatialDifferencing",1579}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"expandedDescriptors",783}, + {"standardParallel",2150}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"numberOfModels",1434}, + {"visibility",2414}, {""}, {""}, {""}, {""}, - {"binaryScaleFactor",365}, - {""}, - {"parameterName",1657}, - {""}, {""}, {""}, - {"marsLongitude",1234}, - {"widthOfFirstOrderValues",2378}, - {""}, - {"siteLongitude",2072}, - {""}, {""}, - {"firstLatitude",857}, - {"suiteName",2154}, - {"localLatitude",1150}, - {"unsignedIntegers",2310}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"diagnosticNumber",688}, - {""}, {""}, - {"modelName",1317}, - {""}, - {"section_09",2029}, + {"observedData",1515}, + {""}, {""}, {""}, {""}, + {"scaleFactorOfSecondSize",1935}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"unitOfOffsetFromReferenceTime",2342}, + {""}, {""}, {""}, {""}, {""}, + {"channelNumber",428}, {""}, {""}, {""}, {""}, - {"is_aerosol",1022}, + {"epsStatisticsPoint",780}, + {""}, {""}, {""}, {""}, {""}, + {"forecastPeriodTo",880}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"LaR",107}, + {""}, {""}, + {"numberOfLocalDefinitions",1444}, + {"waveLevType",2426}, + {"rdbSubtype",1791}, {""}, {""}, {""}, {""}, - {"numberOfOperationalForecastTube",1437}, - {"secondDimension",1948}, + {"climatologicalRegime",436}, {""}, {""}, {""}, {""}, - {"_endStep",289}, - {"ensembleForecastNumbers",768}, - {"secondOfForecastUsedInLocalTime",1955}, - {"lengthOfMessage",1109}, - {""}, - {"minuteOfForecastUsedInLocalTime",1301}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"numberOfStatisticallyProcessedFieldsForLocalTime",1467}, - {""}, - {"spectralDataRepresentationType",2105}, - {"cnmc_isac",551}, - {""}, {""}, {""}, - {"shortName",2059}, + {"LoR",127}, + {"atmosphericChemicalOrPhysicalConstituentType",321}, {""}, {""}, {""}, {""}, - {"NT",188}, - {""}, {""}, - {"spectralDataRepresentationMode",2104}, - {""}, {""}, {""}, {""}, {""}, - {"SecondLatitude",226}, - {""}, {""}, {""}, - {"bitMapIndicator",366}, + {"modeNumber",1328}, + {"sequences",2090}, {""}, {""}, {""}, {""}, {""}, - {"tiggeSection",2194}, - {""}, - {"numberOfDataMatrices",1394}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"numberOfForcasts",1428}, {""}, {""}, - {"local_use",1170}, - {"productDefinition",1731}, - {"gridName",918}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Nassigned",191}, + {"quantile",1779}, + {"numberOfDirections",1417}, {""}, {""}, {""}, {""}, - {"gts_header",931}, - {""}, {""}, {""}, - {"LcyInMetres",121}, - {""}, {""}, - {"marsEndStep",1222}, - {"energyNorm",766}, - {"monthOfForecastUsedInLocalTime",1325}, - {""}, {""}, {""}, {""}, {""}, - {"LuyInMetres",150}, - {"editionNumber",727}, - {""}, {""}, {""}, - {"rdbtimeMinute",1775}, - {""}, {""}, {""}, - {"earthIsOblate",716}, - {"cnmc_cmcc",550}, - {"minuteOfReference",1303}, + {"satelliteIdentifier",1913}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"is_chemical",1024}, - {""}, {""}, {""}, - {"cfName",412}, - {""}, {""}, {""}, - {"unitOfOffsetFromReferenceTime",2291}, - {""}, - {"scaleFactorOfFirstSize",1898}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"dateOfReference",653}, - {""}, {""}, - {"yearOfReference",2430}, - {""}, {""}, {""}, - {"DxInMetres",41}, - {""}, {""}, - {"sectionNumber",2019}, - {"timeOfReference",2210}, - {""}, - {"efas_model",728}, - {""}, - {"numberOfIterations",1425}, - {""}, {""}, {""}, {""}, {""}, - {"section7",2006}, - {""}, - {"tigge_name",2196}, + {"localDefinitionNumber",1156}, + {""}, {""}, {""}, {""}, + {"yearOfReference",2484}, {""}, - {"is_localtime",1027}, + {"sectionPosition",2060}, {""}, {""}, {""}, {""}, - {"_TS",287}, + {"stretchingFactor",2178}, {""}, - {"centreLongitudeInDegrees",408}, + {"windPresent",2446}, + {""}, + {"partitionItems",1685}, {""}, {""}, - {"indicatorOfUnitForTimeIncrement",982}, + {"numberOfDiamonds",1416}, + {"numberOfStatisticallyProcessedFieldsForLocalTime",1486}, {""}, - {"dimensionType",693}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"scaleFactorOfFirstSize",1924}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"climatologicalRegime",433}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"_anoffset",288}, - {""}, {""}, - {"localLongitude",1153}, - {""}, {""}, {""}, - {"extractSubset",829}, - {""}, {""}, {""}, - {"simpleThinningSkip",2067}, - {""}, {""}, {""}, {""}, {""}, - {"observablePropertyTemplate",1487}, - {""}, {""}, - {"userTimeEnd",2325}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"rdbtimeSecond",1777}, - {""}, {""}, - {"marsParam",1236}, {""}, {""}, {""}, {""}, - {"angleOfRotation",308}, - {"biFourierTruncationType",364}, + {"rectimeSecond",1812}, + {""}, {""}, {""}, {""}, {""}, + {"uerraSection",2339}, {""}, {""}, {""}, {""}, - {"Nf",195}, + {"crraSection",627}, + {""}, {""}, {""}, {""}, {""}, + {"hourOfReference",954}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"clusterNumber",545}, - {""}, - {"xDirectionGridLength",2411}, + {"oceanLevName",1518}, {""}, {""}, {""}, {""}, - {"scaleFactorOfFirstFixedSurface",1897}, - {""}, {""}, - {"II",88}, - {"epsPoint",774}, - {""}, - {"verificationDate",2345}, + {"spectralDataRepresentationMode",2144}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"angleOfRotationInDegrees",312}, + {""}, {""}, {""}, {""}, + {"faLevelName",846}, {""}, {""}, {""}, - {"realPart",1780}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"userDateEnd",2321}, - {"observablePropertyTemplateNumber",1488}, - {"Lx",151}, - {"channelNumber",425}, - {""}, {""}, - {"scaleFactorOfStandardDeviation",1910}, - {"numberOfMembersInCluster",1428}, + {"forecastPeriodFrom",879}, + {"endOfInterval",759}, + {"stretchingFactorScaled",2179}, {""}, {""}, {""}, {""}, - {"siteElevation",2069}, - {"indexingTimeMM",978}, - {"numberOfDistinctSection9s",1407}, + {"legNumber",1109}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"originalParameterNumber",1584}, {""}, {""}, {""}, - {"scaleFactorOfStandardDeviationInTheCluster",1911}, + {"offsetFreeFormData",1537}, {""}, {""}, - {"numberOfLocalDefinitions",1426}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"totalNumber",2261}, {""}, - {"hourOfReference",950}, - {"faFieldName",841}, - {"timeIncrement",2204}, + {"generatingProcessTemplateNumber",902}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"trueLengthOfLastGroup",2279}, + {"referencePeriodList",1821}, + {""}, + {"numberOfForecastsInTube",1432}, {""}, {""}, - {"computeLaplacianOperator",563}, + {"scaleFactorOfStandardDeviation",1937}, {""}, {""}, - {"defaultName",671}, + {"dewPointTemperature",690}, {""}, - {"selectedDay",2042}, - {"section_8",2039}, + {"endOfProduct",761}, {""}, - {"scalingFactorForFrequencies",1937}, + {"standardParallelInDegrees",2151}, + {""}, {""}, {""}, + {"diffInDays",693}, + {"scaleFactorOfStandardDeviationInTheCluster",1938}, + {""}, {""}, + {"probPoint",1747}, + {"N",171}, + {""}, {""}, {""}, {""}, {""}, + {"tiggeSection",2235}, {""}, {""}, {""}, - {"selectedMonth",2046}, - {"unitsOfFirstFixedSurface",2303}, + {"treatmentOfMissingData",2277}, {""}, - {"LaDInDegrees",106}, + {"createNewData",625}, + {""}, {""}, {""}, + {"significanceOfReferenceTime",2105}, + {""}, {""}, {""}, {""}, {""}, + {"qnh",1772}, + {""}, {""}, {""}, + {"groupLeafNodeK",926}, + {"monthOfReference",1342}, + {"climateDateFrom",434}, {""}, - {"XRInMetres",269}, - {""}, {""}, - {"Lcx",118}, - {"userDateTimeEnd",2323}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"scaleFactorOfSecondSize",1908}, - {"iDirectionIncrement",954}, - {"Lux",147}, + {"SPD",227}, + {""}, {""}, {""}, {""}, + {"numberOfOperationalForecastTube",1455}, {""}, - {"northLatitudeOfCluster",1352}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"monthOfReference",1327}, + {"missingDataFlag",1320}, + {"optimisationTime",1574}, + {"masterTableNumber",1262}, + {""}, {""}, {""}, {""}, {""}, + {"localSection",1172}, {""}, - {"corr4Data",606}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"coordinate4Flag",595}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"XR",268}, + {"scaleFactorOfSecondFixedSurface",1934}, {""}, {""}, {""}, {""}, {""}, - {"sizeOfOffsets",2074}, + {"defaultFaFieldName",672}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"levTypeName",1122}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"latitudeLastInDegrees",1066}, + {"longitudeOfFirstGridPoint",1193}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"neitherPresent",1360}, + {"changingPrecision",426}, {""}, {""}, {""}, {""}, - {"dataValues",644}, - {""}, {""}, {""}, {""}, {""}, - {"scanningModeForOneDiamond",1945}, - {"simpleThinningStart",2068}, + {"postProcessing",1712}, {""}, {""}, - {"ifsParam",967}, - {""}, {""}, {""}, - {"southLatitudeOfCluster",2087}, + {"listOfDistributionFunctionParameter",1141}, + {"indicatorOfUnitOfTimeRange",990}, {""}, {""}, - {"section_08",2028}, - {"headersOnly",934}, - {"eastLongitudeOfCluster",721}, + {"scaleFactorOfFirstFixedSurface",1923}, {""}, {""}, - {"numberOfInts",1424}, - {"levTypeName",1114}, + {"spectralDataRepresentationType",2145}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"maximum",1274}, + {"numberOfRadials",1475}, + {"levelIndicator",1124}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"powerOfTenUsedToScaleClimateWeight",1713}, + {"computeLaplacianOperator",566}, + {"xLast",2469}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"DxInDegrees",40}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfMissing",1430}, - {""}, {""}, {""}, {""}, {""}, - {"pvlLocation",1745}, + {"longitudeOfIcosahedronPole",1196}, + {""}, {""}, + {"defaultFaLevelName",673}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"xDirectionGridLengthInMetres",2412}, - {"correction1Part",609}, - {""}, {""}, {""}, {""}, {""}, - {"applicationIdentifier",316}, + {""}, + {"secondOrderFlags",1997}, {""}, {""}, - {"gts_ddhh00",930}, - {"dirty_statistics",698}, + {"widthOfFirstOrderValues",2432}, + {""}, {""}, {""}, + {"defaultShortName",678}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"forecastMonth",872}, - {"corr2Data",604}, + {"averagingPeriod",327}, {""}, - {"representationType",1807}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"simpleThinningMissingRadius",2066}, + {"defaultTypeOfLevel",680}, + {"clusteringMethod",551}, {""}, {""}, - {"lengthIncrementForTheGroupLengths",1105}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"calendarIdPresent",381}, + {"xFirst",2468}, + {""}, {""}, {""}, {""}, {""}, + {"expoffset",799}, + {"periodOfTimeIntervals",1699}, {""}, - {"inputDelayedDescriptorReplicationFactor",986}, + {"typicalSecond",2331}, + {""}, {""}, {""}, {""}, + {"stepTypeInternal",2173}, {""}, - {"sfc_levtype",2056}, + {"numberOfForecastsUsedInLocalTime",1433}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"modeNumber",1313}, - {""}, {""}, - {"tileIndex",2199}, {""}, {""}, {""}, {""}, - {"standardParallel",2110}, - {""}, - {"numberOfForecastsUsedInLocalTime",1416}, - {"numberOfDistinctSection8s",1406}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"LxInMetres",152}, - {"numberInTheGridCoordinateList",1367}, + {"subcentreOfAnalysis",2193}, + {"Nb",194}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"MS",158}, {""}, - {"observationGeneratingProcessIdentifier",1490}, - {""}, {""}, - {"typeOfEnsembleForecast",2252}, - {""}, {""}, {""}, - {"numberOfModeOfDistribution",1433}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"createNewData",622}, - {"ensembleForecastNumbersList",769}, - {"unitsOfSecondFixedSurface",2304}, + {"boustrophedonicOrdering",378}, + {""}, + {"molarMass",1335}, + {"typeOfDistributionFunction",2294}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"subSetJ",2190}, + {"observablePropertyTemplate",1510}, {""}, {""}, {""}, - {"charValues",427}, + {"methodNumber",1306}, + {""}, {""}, + {"unitOfTimeIncrement",2344}, {""}, - {"faModelName",843}, - {""}, {""}, {""}, {""}, - {"defaultFaFieldName",668}, + {"ensembleForecastNumbers",772}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"globalDomain",902}, {""}, - {"referenceValue",1801}, + {"applicationIdentifier",319}, {""}, {""}, {""}, - {"g2grid",891}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"angleSubdivisions",311}, - {""}, {""}, {""}, {""}, - {"verifyingMonth",2348}, + {"waveDirectionNumber",2423}, + {"frequency",888}, {""}, {""}, {""}, - {"xDirectionGridLengthInMillimetres",2413}, - {""}, {""}, - {"secondDimensionPhysicalSignificance",1950}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"longitudeOfFirstGridPointInDegrees",1182}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"typeOfTimeIncrement",2272}, - {""}, {""}, - {"verificationMonth",2346}, - {""}, - {"forecastPeriod",874}, - {""}, {""}, - {"standardParallelInDegrees",2111}, - {""}, {""}, - {"defaultParameter",672}, + {"systemNumber",2203}, {""}, {""}, {""}, - {"selectedMinute",2045}, - {"sectionPosition",2020}, + {"orderOfSPD",1578}, + {""}, + {"iDirectionIncrement",959}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"marsModel",1247}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"iteratorDisableUnrotate",1043}, + {"pvlLocation",1768}, + {"productDefinition",1754}, {""}, {""}, {""}, - {"totalNumber",2220}, - {"parameterIndicator",1656}, - {"westLongitudeOfCluster",2374}, - {"SPD",225}, - {""}, {""}, {""}, {""}, {""}, - {"indicatorOfUnitForTimeRange",983}, + {"clutterFilterIndicator",552}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"firstLatitude",861}, {""}, - {"numberOfRadials",1457}, + {"simpleThinningSkip",2107}, + {""}, + {"XR",270}, {""}, {""}, {""}, - {"calendarIdentification",382}, - {""}, {""}, - {"unitOfTimeIncrement",2293}, - {"scaleFactorOfSecondFixedSurface",1907}, + {"observablePropertyTemplateNumber",1511}, + {""}, {""}, {""}, {""}, + {"addressOfFileFreeSpaceInfo",301}, {""}, {""}, - {"windPresent",2392}, + {"yDirectionGridLength",2472}, {""}, {""}, - {"floatVal",869}, - {"clusterMember7",542}, - {""}, {""}, {""}, {""}, - {"scaledFrequencies",1915}, - {"defaultTypeOfLevel",676}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"systemNumber",2162}, - {"internalVersion",1000}, + {"extraDim",802}, + {""}, + {"zeros",2487}, + {"unsignedIntegers",2361}, + {""}, + {"zero",2486}, + {""}, + {"inputDataPresentIndicator",991}, + {""}, + {"DiInDegrees",32}, + {"rdbtimeSecond",1800}, {""}, - {"neitherPresent",1345}, + {"expver",800}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"marsLongitude",1246}, + {"operatingMode",1572}, {""}, - {"significanceOfReferenceTime",2065}, + {"siteLongitude",2112}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"boustrophedonicOrdering",375}, + {""}, {""}, {""}, + {"longitudeOfCentrePointInDegrees",1189}, + {""}, + {"bitmapSectionPresent",372}, {""}, {""}, {""}, {""}, - {"treatmentOfMissingData",2234}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"accumulationInterval",292}, - {""}, {""}, - {"codedValues",556}, + {"tubeNumber",2286}, {""}, {""}, {""}, - {"numberOfIntegers",1423}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"legNumber",1102}, + {"ensembleForecastNumbersList",773}, + {""}, {""}, {""}, {""}, + {"P",211}, + {""}, {""}, {""}, {""}, + {"typeOfRelationToReferenceDataset",2311}, + {""}, {""}, {""}, + {"changeDecimalPrecision",421}, + {"meanSize",1296}, + {"indexingTime",980}, + {"theMessage",2222}, + {""}, {""}, {""}, {""}, + {"secondDimension",1987}, {""}, {""}, - {"ensembleStandardDeviation",771}, - {""}, {""}, {""}, {""}, {""}, - {"forecastPeriodTo",876}, - {"dataRepresentation",635}, + {"FirstLatitude",67}, {""}, {""}, {""}, {""}, - {"dateOfForecastRun",649}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"lengthOfProjectLocalTemplate",1118}, + {""}, {""}, {""}, + {"indexTemplate",976}, {""}, - {"originalParameterNumber",1561}, - {""}, {""}, - {"forecastPeriodFrom",875}, + {"typeOfTimeIncrement",2318}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"perturbedType",1678}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"coordinate3Flag",592}, + {"centreLatitude",408}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"is_aerosol_optical",1023}, - {""}, - {"offsetSection7",1527}, + {"numberOfDistinctSection9s",1424}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfMembersInEnsemble",1429}, + {"numberOfIterations",1442}, + {""}, + {"secondLatitude",1990}, {""}, {""}, - {"extractedDateTimeNumberOfSubsets",834}, - {"nameOfFirstFixedSurface",1341}, - {""}, {""}, {""}, {""}, - {"epsStatisticsPoint",776}, + {"tableNumber",2207}, {""}, {""}, - {"methodNumber",1293}, - {""}, {""}, {""}, {""}, - {"internationalDataSubCategory",1001}, + {"tiggeModel",2234}, {""}, - {"isConstant",1011}, + {"firstSize",866}, + {"localLatitude",1162}, {""}, {""}, - {"calendarIdentificationTemplateNumber",383}, - {"numberOfTimeIncrementsOfForecastsUsedInLocalTime",1471}, - {"earthMinorAxisInMetres",720}, + {"numberOfDistinctSection8s",1423}, {""}, - {"defaultFaModelName",670}, - {""}, {""}, {""}, {""}, - {"typeOfFirstFixedSurface",2254}, + {"datumSize",660}, {""}, {""}, {""}, - {"expandedNames",784}, - {"probPoint",1724}, + {"angleMultiplier",310}, + {"secondSize",2000}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"representationMode",1830}, {""}, {""}, - {"dewPointTemperature",686}, - {""}, - {"LIMITS",98}, - {""}, - {"lsdate_bug",1211}, + {"dataValues",647}, {""}, {""}, - {"typeOfEnsembleMember",2253}, + {"latitudeOfGridPoints",1080}, {""}, {""}, - {"LcxInMetres",119}, - {""}, {""}, {""}, - {"isHindcast",1016}, - {"lstime_bug",1212}, - {"dataRepresentationType",638}, - {""}, {""}, {""}, - {"matchLandType",1255}, - {"LuxInMetres",148}, - {""}, - {"productIdentifier",1734}, - {"generatingProcessTemplateNumber",898}, - {"is_chemical_distfn",1025}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"marsClass",1217}, + {"oneMillionConstant",1560}, + {"angleOfRotationOfProjection",313}, + {"unitsOfSecondFixedSurface",2355}, {""}, {""}, - {"lengthOfIndexTemplate",1108}, + {"NR",188}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"defaultSequence",673}, + {"simpleThinningStart",2108}, {""}, {""}, {""}, - {"longitudeFirstInDegrees",1173}, + {"SecondLatitude",228}, + {""}, {""}, {""}, + {"temperatureAndDewpointPresent",2218}, + {""}, {""}, + {"expandedTypes",793}, + {"PLPresent",214}, + {"referenceValue",1825}, {""}, {""}, {""}, {""}, - {"startStepInHours",2117}, + {"earthIsOblate",720}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"marsLamModel",1242}, + {"numberOfPartitions",1459}, + {""}, {""}, + {"DyInDegrees",43}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"clusterIdentifier",534}, + {"binaryScaleFactor",368}, {""}, {""}, {""}, {""}, - {"LaR",107}, + {"indicatorOfUnitForForecastTime",986}, + {"scanningMode",1978}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"memberNumber",1302}, + {"spectralMode",2146}, {""}, {""}, {""}, - {"sampleSizeOfModelClimate",1886}, - {""}, - {"numberInTheAuxiliaryArray",1366}, - {""}, - {"param_value_min",1651}, - {""}, - {"oceanLevName",1495}, + {"dayOfStartOfReferencePeriod",668}, {""}, {""}, {""}, {""}, - {"LoR",127}, + {"inputDelayedDescriptorReplicationFactor",992}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"localMinute",1168}, + {"typeOfPostProcessing",2307}, {""}, - {"latitudeOfGridPoints",1073}, + {"clusterMember9",547}, + {"Adelta",13}, + {""}, {""}, {""}, {""}, + {"auxiliary",323}, + {""}, {""}, {""}, {""}, {""}, + {"verificationDate",2396}, {""}, {""}, {""}, - {"temperatureAndDewpointPresent",2177}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"defaultShortName",674}, + {"floatVal",873}, + {""}, {""}, {""}, {""}, {""}, + {"LaDInDegrees",106}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"longitudeOfLastGridPoint",1197}, + {"isAuto",1011}, {""}, - {"Adelta",13}, + {"clusterMember8",546}, {""}, - {"scaleFactorOfDistributionFunctionParameter",1894}, + {"latitudeLastInDegrees",1073}, {""}, {""}, - {"scanningMode7",1943}, - {""}, - {"thresholdIndicator",2189}, - {"dataRepresentationTemplate",636}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"marsExpver",1224}, + {"earthMinorAxis",723}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"isEps",1020}, {""}, - {"inputDataPresentIndicator",985}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"monthlyVerificationTime",1330}, - {"floatValues",870}, + {"dataRepresentation",638}, + {""}, {""}, {""}, {""}, + {"thisMarsStream",2225}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"widthOfSPD",2434}, {""}, {""}, - {"section6",2002}, - {""}, {""}, {""}, - {"NL",184}, - {""}, - {"Nb",192}, + {"isConstant",1017}, + {""}, {""}, {""}, {""}, + {"scalingFactorForFrequencies",1976}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"additionalFlagPresent",299}, + {""}, {""}, {""}, {""}, + {"scanningMode8",1983}, + {"localLongitude",1165}, {""}, {""}, - {"isAuto",1005}, - {""}, {""}, {""}, - {"stringValues",2139}, - {""}, {""}, {""}, - {"CDFstr",22}, - {""}, {""}, {""}, - {"tablesVersion",2170}, - {"rectimeHour",1787}, + {"numberOfInts",1441}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"corr3Data",605}, - {""}, {""}, {""}, - {"TAFstr",233}, - {"standardParallelInMicrodegrees",2112}, + {"charValues",430}, + {""}, + {"localMonth",1169}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"TAFstr",235}, {""}, {""}, {""}, {""}, {""}, - {"parameterCode",1654}, + {"marsClass",1229}, + {""}, {""}, + {"interpretationOfNumberOfPoints",1008}, + {"marsEndStep",1234}, {""}, {""}, {""}, {""}, {""}, {""}, - {"angleOfRotationInDegrees",309}, - {"dataRepresentationTemplateNumber",637}, + {"eastLongitudeOfCluster",725}, {""}, {""}, {""}, - {"CDF",21}, - {"numberOfMissingInStatisticalProcess",1431}, + {"dataAccessors",631}, {""}, {""}, - {"changeDecimalPrecision",418}, - {""}, {""}, {""}, {""}, {""}, - {"defaultFaLevelName",669}, - {"clusteringMethod",548}, - {"corr1Data",603}, - {""}, {""}, {""}, - {"TAF",232}, + {"startOfMessage",2155}, {""}, - {"monthlyVerificationDate",1328}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"postProcessing",1689}, + {"qfePresent",1770}, {""}, {""}, {""}, - {"extractSubsetList",832}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"averagingPeriod",324}, + {"numberOfReservedBytes",1480}, + {"optimizeScaleFactor",1575}, {""}, - {"oneConstant",1536}, + {"parameterCode",1677}, {""}, {""}, {""}, - {"localHour",1149}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"bufrDataEncoded",376}, + {"totalNumberOfdimensions",2276}, {""}, {""}, {""}, - {"longitudeOfLastGridPoint",1185}, + {"secondDimensionPhysicalSignificance",1989}, {""}, {""}, {""}, - {"dataAccessors",628}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"faLevelName",842}, - {"marsExperimentOffset",1223}, - {"changingPrecision",423}, - {"typicalHour",2279}, - {""}, {""}, {""}, {""}, {""}, - {"constantFieldHalfByte",577}, + {"thisMarsType",2226}, + {""}, {""}, {""}, + {"clusterSize",549}, + {""}, {""}, {""}, + {"conceptsLocalMarsDirAll",573}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"orientationOfTheGrid",1557}, + {"scanPosition",1977}, {""}, {""}, {""}, {""}, - {"deleteExtraLocalSection",682}, - {""}, {""}, {""}, {""}, - {"orderOfSPD",1555}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"dataRepresentationTemplate",639}, {""}, {""}, - {"tubeNumber",2243}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"endOfProduct",757}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"secondsOfReference",1970}, + {"ensembleStandardDeviation",775}, {""}, - {"trueLengthOfLastGroup",2236}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"primaryMissingValue",1721}, + {"totalNumberOfTubes",2272}, + {""}, {""}, + {"internalVersion",1006}, + {""}, {""}, + {"indexingDate",979}, {""}, {""}, {""}, {""}, - {"default_max_val",677}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfReservedBytes",1461}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"tileClassification",2198}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"centuryOfReference",410}, - {""}, {""}, {""}, - {"indexTemplateNumber",972}, - {""}, {""}, {""}, - {"longitudeOfStretchingPole",1193}, + {"listOfModelIdentifiers",1143}, {""}, - {"meaningOfVerticalCoordinate",1288}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"subcentreOfAnalysis",2152}, - {""}, - {"tableNumber",2166}, + {"versionNumOfFilesFreeSpaceStorage",2401}, {""}, {""}, {""}, {""}, {""}, - {"tigge_short_name",2197}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"sphericalHarmonics",2108}, + {"northLatitudeOfCluster",1367}, {""}, - {"correction4",614}, - {""}, {""}, {""}, {""}, - {"numberOfDistinctSection7s",1405}, - {"bitmapSectionPresent",369}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"diagnosticNumber",692}, + {""}, + {"userTimeEnd",2376}, + {""}, {""}, + {"globalDomain",906}, + {"angleSubdivisions",314}, {""}, {""}, {""}, {""}, - {"memberNumber",1289}, + {"secondsOfReference",2010}, {""}, - {"jdSelected",1046}, + {"codedValues",559}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"scaleFactorAtReferencePoint",1916}, + {"TAF",234}, + {""}, {""}, {""}, {""}, {""}, + {"roundedMarsLongitude",1856}, + {"numberOfReferencePeriodTimeRanges",1476}, {""}, {""}, - {"doExtractDateTime",705}, + {"totalNumberOfQuantiles",2269}, + {"gridPointPosition",923}, + {""}, {""}, {""}, {""}, {""}, + {"qnhPresent",1774}, {""}, {""}, - {"targetCompressionRatio",2173}, - {""}, - {"tiggeCentre",2190}, + {"dataRepresentationTemplateNumber",640}, {""}, {""}, - {"iDirectionIncrementInDegrees",957}, - {"libraryVersion",1121}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"identificationNumber",962}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"verticalCoordinate",2357}, - {""}, {""}, {""}, - {"julianDay",1047}, + {"correction1Part",612}, + {""}, {""}, {""}, {""}, {""}, + {"setCalendarId",2092}, + {"scaleFactorOfDistributionFunctionParameter",1920}, + {""}, + {"orientationOfTheGrid",1580}, {""}, {""}, {""}, - {"typeOfHorizontalLine",2257}, + {"oneConstant",1559}, {""}, - {"parameterNumber",1658}, - {"iterationNumber",1036}, - {""}, {""}, - {"dimensionNumber",692}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"dayOfReference",664}, - {""}, {""}, {""}, {""}, - {"additionalFlagPresent",297}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"partitionNumber",1663}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"originatingCentre",1564}, + {"gridDefinitionTemplateNumber",920}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"southLatitudeOfCluster",2127}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"timeIncrement",2245}, + {""}, {""}, {""}, {""}, {""}, + {"roundedMarsLatitude",1854}, {""}, {""}, {""}, - {"parameterCategory",1653}, + {"verticalDomainTemplateNumber",2411}, + {"floatValues",874}, + {"dataRepresentationType",641}, + {""}, + {"section9Pointer",2055}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"iScansNegatively",964}, {""}, {""}, - {"directionNumber",695}, - {""}, {""}, {""}, {""}, - {"truncateDegrees",2237}, - {""}, {""}, {""}, {""}, {""}, - {"inputExtendedDelayedDescriptorReplicationFactor",987}, + {"calendarIdPresent",384}, + {"scaleFactorOfRadiusOfSphericalEarth",1933}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"primaryMissingValueSubstitute",1722}, - {""}, {""}, {""}, {""}, {""}, - {"nameOfSecondFixedSurface",1342}, + {"representativeMember",1832}, + {"section8Pointer",2052}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numericValues",1486}, + {"westLongitudeOfCluster",2428}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfDistributionFunctionParameters",1408}, - {"coordinate1Flag",587}, {""}, {""}, - {"typeOfSecondFixedSurface",2268}, + {"numberOfIntegers",1440}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"horizontalCoordinateDefinition",943}, + {""}, {""}, {""}, {""}, {""}, + {"expandedDescriptors",787}, + {"tiggeCentre",2231}, + {"biFourierMakeTemplate",360}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"numberOfTimeIncrementsOfForecastsUsedInLocalTime",1490}, + {""}, {""}, {""}, {""}, + {"corr4Data",609}, + {"tablesVersion",2211}, {""}, {""}, - {"monthlyVerificationMonth",1329}, + {"decimalPrecision",670}, + {"localTimeMethod",1178}, {""}, {""}, {""}, - {"biFourierSubTruncationType",363}, + {"roundedMarsLevelist",1855}, + {""}, {""}, + {"ITN",92}, {""}, {""}, {""}, - {"Nx",204}, + {"correction3Part",616}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"monthOfForecastUsedInLocalTime",1340}, + {"g2grid",895}, + {"heightOrPressureOfLevel",940}, + {""}, {""}, + {"offsetAfterPadding",1526}, + {"horizontalCoordinateSupplement",944}, {""}, - {"subCentre",2140}, - {""}, {""}, {""}, {""}, - {"numberOfRows",1462}, + {"tileClassification",2239}, {""}, - {"numberOfEffectiveValues",1409}, + {"nosigPresent",1375}, + {"meaningOfVerticalCoordinate",1301}, {""}, - {"satelliteNumber",1889}, + {"totalNumberOfFrequencies",2266}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"coordinate4OfLastGridPoint",597}, + {"CDFstr",22}, + {"stringValues",2180}, + {""}, {""}, {""}, {""}, {""}, + {"userDateEnd",2372}, + {"dayOfReference",667}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"radialAngularSpacing",1781}, + {""}, {""}, + {"parameterIndicator",1679}, + {"iScansPositively",965}, + {"falseNorthing",850}, + {""}, {""}, {""}, {""}, + {"totalNumberOfDirections",2264}, + {""}, {""}, + {"targetCompressionRatio",2214}, {""}, - {"extractSubsetIntervalEnd",830}, + {"siteElevation",2109}, {""}, - {"verticalDomainTemplateNumber",2360}, + {"centuryOfReference",413}, + {""}, {""}, {""}, {""}, + {"groupSplittingMethodUsed",929}, + {""}, + {"expandedNames",788}, + {""}, + {"longitudeOfStretchingPole",1205}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"indicatorOfUnitForTimeRange",988}, {""}, {""}, {""}, {""}, - {"tableCode",2165}, + {"functionCode",891}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"integerValues",999}, - {"functionCode",887}, - {"latLonValues",1063}, + {"calendarIdentification",385}, + {"offsetAfterLocalSection",1525}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"dateOfForecastRun",652}, + {""}, {""}, {""}, {""}, {""}, + {"productDefinitionTemplateNumber",1755}, + {"latitudeOfStretchingPole",1090}, + {"latLonValues",1070}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"_T",288}, {""}, {""}, - {"extractSubsetIntervalStart",831}, - {""}, {""}, {""}, - {"missingValue",1307}, + {"is_uerra",1036}, + {""}, {""}, {""}, {""}, + {"verticalCoordinate",2408}, {""}, - {"angleOfRotationOfProjection",310}, + {"conceptsMasterDir",574}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"isAccumulation",1010}, {""}, - {"Model_Identifier",168}, - {""}, {""}, {""}, {""}, - {"extraValues",802}, - {"widthOfSPD",2380}, + {"spatialProcessing",2142}, + {"CDF",21}, + {""}, {""}, {""}, {""}, {""}, + {"md5Section9",1289}, + {""}, {""}, {""}, + {"NP",187}, + {""}, {""}, {""}, {""}, {""}, + {"perturbationNumber",1700}, + {""}, {""}, + {"subCentre",2181}, + {""}, + {"corr3Data",608}, + {"_endStep",291}, + {"conceptsLocalDirECMF",572}, + {""}, {""}, + {"numberOfRemaininChars",1478}, + {"section0Pointer",2013}, + {"md5Section8",1288}, {""}, {""}, - {"grib2divider",906}, + {"levelValues",1126}, + {""}, {""}, + {"numberOfMembersInCluster",1446}, {""}, - {"localDefNumberTwo",1142}, + {"tableReference",2208}, + {"_anoffset",290}, {""}, - {"Ncx",193}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"extractSubset",833}, {""}, - {"Nux",202}, + {"tableCode",2206}, + {"corr2Data",607}, {""}, {""}, - {"orientationOfTheGridInDegrees",1558}, + {"productDefinitionTemplateNumberInternal",1756}, {""}, {""}, - {"lengthOfProjectLocalTemplate",1111}, + {"correction2Part",614}, + {""}, + {"calendarIdentificationTemplateNumber",386}, + {"sizeOfOffsets",2114}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"cfVarName",418}, {""}, {""}, {""}, - {"verticalCoordinateDefinition",2358}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"setCalendarId",2052}, - {""}, {""}, - {"rdbtimeHour",1774}, - {""}, {""}, {""}, {""}, - {"typeOfCompressionUsed",2250}, - {"clusterMember6",541}, - {""}, {""}, {""}, {""}, - {"typeOfSizeInterval",2269}, + {"monthlyVerificationTime",1346}, + {"userDateTimeEnd",2374}, + {""}, {""}, {""}, + {"_TS",289}, {""}, - {"groupLeafNodeK",922}, - {"firstMonthUsedToBuildClimateMonth2",860}, + {"biFourierTruncationType",367}, {""}, {""}, - {"startOfHeaders",2113}, + {"faModelName",847}, + {"offsetAfterCentreLocalSection",1523}, {""}, {""}, {""}, - {"endDayTrend4",737}, + {"II",88}, + {"numberInTheGridCoordinateList",1383}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"tablesMasterDir",2210}, + {"indicatorOfUnitForTimeRangeForReferencePeriod",989}, + {"tigge_name",2237}, {""}, - {"N",171}, + {"parameterCategory",1676}, + {""}, {""}, {""}, {""}, + {"md5Data",1275}, + {"orientationOfTheGridInDegrees",1581}, + {""}, {""}, {""}, {""}, {""}, + {"numberOfModels",1452}, {""}, - {"distanceFromTubeToEnsembleMean",701}, + {"monthOfStartOfReferencePeriod",1343}, + {"is_aerosol",1028}, {""}, - {"coordinateIndexNumber",600}, - {"tableReference",2167}, + {"productIdentifier",1757}, {""}, {""}, {""}, {""}, - {"isAccumulation",1004}, - {"monthOfModelVersion",1326}, + {"short_name",2102}, {""}, - {"secondOfModelVersion",1956}, - {"windVariableDirection",2403}, + {"identificationNumber",967}, + {"section_8",2079}, + {"marsForecastMonth",1237}, {""}, - {"minuteOfModelVersion",1302}, + {"minutesAfterDataCutoff",1318}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"plusOneinOrdersOfSPD",1708}, + {"longitudeFirstInDegrees",1185}, + {"efas_model",732}, + {"lengthIncrementForTheGroupLengths",1112}, + {""}, {""}, {""}, + {"correction4Part",618}, + {"cnmc_isac",554}, + {"localDefNumberOne",1153}, + {"streamOfAnalysis",2177}, + {"clusterIdentifier",537}, + {"indexTemplateNumber",977}, + {""}, + {"accumulationInterval",294}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"longitudeOfFirstGridPointInDegrees",1194}, + {""}, {""}, {""}, {""}, + {"startStepInHours",2158}, + {"tablesVersionLatest",2212}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"observationGeneratingProcessIdentifier",1513}, + {""}, {""}, + {"iDirectionIncrementInDegrees",962}, {""}, - {"longitudeOfIcosahedronPole",1184}, + {"gts_header",935}, + {""}, {""}, {""}, + {"baseAddress",333}, {""}, {""}, - {"latitudeOfStretchingPole",1083}, + {"localSectionPresent",1173}, {""}, {""}, {""}, - {"aerosolbinnumber",301}, + {"lengthOfMessage",1116}, {""}, {""}, {""}, {""}, - {"projString",1738}, - {"scanPosition",1938}, + {"corr1Data",606}, + {"local_use",1182}, + {""}, {""}, {""}, + {"totalNumberOfRepetitions",2270}, + {""}, + {"DiInMetres",33}, + {"totalNumberOfTileAttributePairs",2271}, + {""}, {""}, {""}, {""}, {""}, + {"minuteOfAnalysis",1311}, {""}, {""}, - {"isotopeIdentificationNumber",1034}, - {""}, {""}, {""}, {""}, - {"qnhPresent",1751}, - {"thisMarsClass",2183}, + {"indicatorOfUnitForTimeIncrement",987}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"LyInMetres",154}, {""}, {""}, {""}, {""}, - {"sensitiveAreaDomain",2049}, + {"typeOfEnsembleForecast",2295}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsTitle4",529}, - {"julianForecastDay",1048}, - {""}, {""}, {""}, - {"directionScalingFactor",697}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"numberOfPartitions",1441}, + {"NAT",174}, + {""}, {""}, + {"NFSP",181}, + {"cnmc_cmcc",553}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"typeOfCompressionUsed",2293}, + {"parameterNumber",1681}, + {"iterationNumber",1042}, + {""}, {""}, + {"dimensionNumber",696}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"bitmapPresent",371}, {""}, {""}, - {"extraDimensionPresent",799}, - {"offsetSection6",1526}, + {"defaultFaModelName",674}, + {"internationalDataSubCategory",1007}, + {""}, {""}, + {"latitudeOfFirstGridPoint",1078}, {""}, {""}, {""}, {""}, {""}, {""}, - {"clusterMember10",536}, - {"originatingClass",1566}, - {""}, {""}, {""}, - {"streamOfAnalysis",2136}, + {"partitionNumber",1686}, {""}, {""}, - {"latitudeOfFirstGridPoint",1071}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"typeOfPostProcessing",2264}, + {"sensitiveAreaDomain",2089}, + {""}, {""}, {""}, {""}, + {"radiusInMetres",1784}, + {""}, {""}, {""}, {""}, + {"endOfFileAddress",757}, {""}, {""}, {""}, - {"numberOfRemaininChars",1459}, - {"boot_edition",372}, - {""}, {""}, - {"section9Pointer",2015}, + {"versionNumberOfGribLocalTables",2405}, {""}, - {"scaleFactorOfRadiusOfSphericalEarth",1906}, + {"directionNumber",699}, {""}, {""}, - {"numberOfDistinctSection6s",1404}, + {"originOfPostProcessing",1583}, + {""}, {""}, + {"typeOfPreProcessing",2308}, + {"monthlyVerificationDate",1344}, + {"thresholdIndicator",2230}, + {"unitsOfFirstFixedSurface",2354}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"verticalCoordinateDefinition",2409}, + {""}, + {"is_chemical",1030}, + {""}, + {"md5Structure",1290}, {""}, {""}, {""}, {""}, - {"earthMajorAxis",717}, - {"qfePresent",1747}, + {"totalNumberOfForecastProbabilities",2265}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"complexPacking",563}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"standardParallelInMicrodegrees",2152}, + {"libraryVersion",1131}, + {""}, + {"numberOfDataMatrices",1411}, + {"numberOfVerticalPoints",1503}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"complexPacking",560}, + {""}, {""}, {""}, + {"yearOfStartOfReferencePeriod",2485}, + {""}, {""}, {""}, + {"is_localtime",1033}, + {""}, {""}, {""}, {""}, {""}, + {"classOfAnalysis",433}, {""}, - {"Azi",15}, + {"satelliteNumber",1914}, + {"NDSP",179}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"minuteOfAnalysis",1298}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"SecondOfModelVersion",227}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"gridDefinitionTemplateNumber",916}, - {"versionNumOfFilesFreeSpaceStorage",2350}, {""}, - {"local_padding",1169}, + {"numberOfVerticalCoordinateValues",1501}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"DyInMetres",44}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"hourOfStartOfReferencePeriod",955}, + {""}, + {"section_09",2069}, {""}, - {"listMembersMissing",1122}, + {"extractedDateTimeNumberOfSubsets",838}, {""}, {""}, - {"baseAddress",330}, - {"projectionCenterFlag",1742}, + {"bufrDataEncoded",379}, {""}, - {"offsetSection10",1520}, + {"numberOfPoints",1460}, {""}, - {"dayOfAnalysis",659}, - {""}, {""}, - {"consensusCount",574}, + {"md5TimeDomainSection",1291}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"monthOfAnalysis",1337}, {""}, - {"numberOfVerticalPoints",1484}, + {"longitudeOfLastGridPointInDegrees",1198}, {""}, - {"jIncrement",1042}, + {"numberOfVerticalGridDescriptors",1502}, + {""}, {""}, {""}, + {"dx",718}, + {"dataCategory",632}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"dayOfAnalysis",662}, + {"max",1272}, + {""}, {""}, + {"section_08",2068}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"laplacianScalingFactor",1059}, - {""}, {""}, {""}, {""}, - {"section0Pointer",1973}, + {"extractSubsetList",836}, {""}, - {"verticalVisibility",2361}, - {"jdLocal",1045}, - {"constituentType",578}, - {"section_7",2038}, - {"minutesAfterDataCutoff",1304}, - {""}, {""}, {""}, {""}, {""}, - {"timeDomainTemplate",2202}, + {"forecastProbabilityNumber",881}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"listMembersUsed",1136}, + {"tablesVersionLatestOfficial",2213}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"numberOfMembersInEnsemble",1447}, {""}, {""}, - {"scanningMode6",1942}, - {""}, {""}, {""}, - {"lengthOfHeaders",1107}, + {"centuryOfReferenceTimeOfData",414}, {""}, {""}, {""}, - {"shapeOfTheEarth",2057}, + {"numberOfChars",1398}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"scaledValueOfSecondSize",1966}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"projectionCentreFlag",1743}, + {"numberOfMissing",1448}, {""}, {""}, - {"numberOfVerticalCoordinateValues",1482}, - {""}, {""}, {""}, {""}, - {"climateDateTo",432}, - {"selectedHour",2044}, + {"scanningModeForOneDiamond",1984}, {""}, - {"missingValueManagement",1308}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"typicalDateTime",2277}, + {"isotopeIdentificationNumber",1040}, {""}, - {"productDefinitionTemplateNumber",1732}, + {"scaleFactorOfLowerLimit",1928}, {""}, {""}, - {"predefined_grid",1695}, + {"bitMapIndicator",369}, + {""}, + {"implementationDateOfModelCycle",974}, + {"Lx",151}, {""}, {""}, - {"scaleFactorOfLowerLimit",1902}, - {""}, {""}, {""}, {""}, - {"longitudeOfLastGridPointInDegrees",1186}, - {"radialAngularSpacing",1758}, + {"md5DataSection",1276}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"xDirectionGridLength",2465}, + {""}, + {"numberOfLevelValues",1443}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"isSatelliteType",1020}, - {"mAngleMultiplier",1214}, - {""}, {""}, {""}, - {"selectedFcIndex",2043}, + {"isEPS",1019}, {""}, {""}, - {"tablesVersionLatest",2171}, + {"LcyInMetres",121}, {""}, {""}, {""}, - {"endOfMessage",756}, - {""}, - {"constituentTypeName",579}, + {"dateOfAnalysis",650}, + {""}, {""}, {""}, + {"biFourierCoefficients",359}, {""}, {""}, - {"numberOfVerticalGridDescriptors",1483}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"MonthOfModelVersion",170}, + {"LuyInMetres",150}, + {"nameOfFirstFixedSurface",1356}, + {""}, {""}, + {"timeOfAnalysis",2247}, {""}, - {"groupWidth",926}, - {"coordinate3OfLastGridPoint",594}, - {"endOfHeadersMarker",754}, - {"MinuteOfModelVersion",159}, - {"modelVersionTime",1319}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"operationalForecastCluster",1550}, + {"normAtInitialTime",1365}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"jdSelected",1053}, + {"Lcx",118}, {""}, {""}, - {"interpretationOfNumberOfPoints",1002}, + {"timeRangeIndicator",2252}, + {""}, {""}, {""}, {""}, + {"windVariableDirection",2457}, {""}, {""}, - {"section_07",2027}, + {"Lux",147}, {""}, {""}, - {"projectLocalTemplate",1740}, - {"identificationOfProject",964}, + {"M",155}, + {""}, {""}, {""}, {""}, + {"originalParameterTableNumber",1585}, + {"operationalForecastCluster",1573}, {""}, {""}, {""}, - {"referenceReflectivityForEchoTop",1798}, - {""}, {""}, - {"scaleFactorAtReferencePoint",1891}, + {"scaledValueOfFirstSize",1955}, + {""}, {""}, {""}, {""}, {""}, + {"defaultSequence",677}, + {"extraDimensionPresent",803}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"numberOfModeOfDistribution",1451}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"stepInHours",2127}, + {"totalNumberOfIterations",2268}, + {"localDefNumberTwo",1154}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"northernLatitudeOfClusterDomain",1373}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"projString",1761}, {""}, - {"secondaryMissingValue",1967}, + {"totalInitialConditions",2259}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"yDirectionGridLengthInMetres",2473}, + {"numberOfAnalysis",1387}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"productDefinitionTemplateNumberInternal",1733}, - {"centralClusterDefinition",397}, + {"jdLocal",1052}, + {""}, {""}, {""}, {""}, + {"Dx",39}, + {"kurt",1060}, {""}, - {"perturbationNumber",1677}, - {""}, {""}, - {"totalInitialConditions",2218}, - {""}, {""}, {""}, - {"section8Pointer",2012}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"normAtInitialTime",1350}, + {"lengthOfIndexTemplate",1115}, {""}, {""}, {""}, {""}, - {"bufrHeaderCentre",377}, - {"centuryOfReferenceTimeOfData",411}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"modelVersionDate",1318}, - {""}, {""}, {""}, - {"decimalPrecision",666}, - {""}, {""}, - {"nosigPresent",1360}, - {""}, {""}, - {"addExtraLocalSection",296}, - {"numberOfOctetsExtraDescriptors",1436}, + {"is_aerosol_optical",1029}, + {"lsdate_bug",1223}, {""}, - {"epsContinous",773}, - {"timeRangeIndicator",2211}, + {"scaledValueOfStandardDeviation",1968}, {""}, {""}, {""}, {""}, - {"expandedCodes",779}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"numberOfMissingInStatisticalProcess",1449}, + {""}, + {"numberOfCharacters",1397}, + {""}, + {"lstime_bug",1224}, + {"centralClusterDefinition",400}, + {""}, + {"scaledValueOfStandardDeviationInTheCluster",1969}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"postAuxiliary",1687}, + {"southernLatitudeOfClusterDomain",2130}, + {""}, {""}, {""}, {""}, {""}, + {"DxInDegrees",40}, + {""}, {""}, {""}, + {"originatingCentre",1587}, + {""}, {""}, + {"coordinate1Flag",590}, + {""}, {""}, {""}, + {"directionScalingFactor",701}, {""}, {""}, - {"centralLongitude",398}, - {"dayOfEndOfOverallTimeInterval",660}, + {"kurtosis",1061}, + {"yearOfAnalysis",2478}, + {"listOfContributingSpectralBands",1140}, + {"modelVersionTime",1334}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"offsetAfterLocalSection",1502}, + {"projectLocalTemplate",1763}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"scaledValueOfSecondFixedSurface",1965}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"falseNorthing",846}, - {"extraLocalSectionPresent",801}, - {"implementationDateOfModelCycle",969}, + {"typeOfAnalysis",2290}, + {"sfc_levtype",2096}, + {""}, {""}, {""}, + {"typeOfFirstFixedSurface",2297}, + {"numberOfOctectsForNumberOfPoints",1453}, {""}, - {"doExtractSubsets",706}, - {"grib3divider",907}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"isCorrection",1018}, {""}, {""}, {""}, {""}, - {"patch_precip_fp",1670}, - {"default_step_units",679}, - {"typicalCentury",2275}, + {"stepRangeInHours",2170}, + {""}, + {"grib3divider",911}, + {""}, {""}, {""}, {""}, {""}, + {"hourOfAnalysis",949}, + {"offsetSection10",1543}, + {""}, + {"numberOfCategories",1396}, {""}, {""}, - {"reservedSection4",1817}, - {"averaging2Flag",323}, + {"groupInternalNodeK",925}, + {""}, {""}, {""}, + {"unitsBias",2347}, + {""}, {""}, {""}, + {"scaledFrequencies",1947}, + {"grib2divider",910}, + {""}, {""}, {""}, + {"verticalVisibility",2412}, + {""}, {""}, {""}, + {"rectimeMinute",1811}, + {"numberOfEffectiveValues",1426}, + {"numberOfDataPoints",1412}, + {"scaledValueOfFirstFixedSurface",1954}, + {""}, + {"yDirectionGridLengthInMillimetres",2474}, + {""}, {""}, {""}, {""}, + {"gridCoordinate",916}, + {""}, {""}, {""}, {""}, {""}, + {"preProcessingParameter",1715}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"matchAerosolPacking",1266}, + {"timeRangeIndicatorFromStepRange",2253}, + {"coordinate3OfLastGridPoint",597}, {""}, - {"groupWidths",927}, + {"coordinateIndexNumber",603}, {""}, {""}, {""}, {""}, {""}, {""}, - {"centreLatitudeInDegrees",406}, - {"offsetAfterPadding",1503}, - {"stepRangeInHours",2129}, - {""}, {""}, {""}, - {"grib1divider",903}, + {"referenceReflectivityForEchoTop",1822}, {""}, {""}, {""}, {""}, - {"componentIndex",561}, + {"gridDescriptionSectionPresent",921}, + {"dirty_statistics",702}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"section4Padding",2035}, + {""}, {""}, + {"truncateDegrees",2280}, + {"skewness",2118}, + {"coordinate3Flag",595}, + {"numberOfRows",1481}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"unitsConversionOffset",2348}, + {""}, {""}, {""}, + {"simpleThinningMissingRadius",2106}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"laplacianScalingFactor",1066}, + {""}, {""}, {""}, + {"driverInformationBlockAddress",713}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"selectedMonth",2086}, {""}, - {"localDefNumberOne",1141}, - {"WMO",261}, + {"keySat",1058}, + {"forecastMonth",876}, + {"latitudeOfStretchingPoleInDegrees",1091}, + {"localNumberOfObservations",1170}, {""}, {""}, {""}, - {"originatorLocalTemplate",1567}, - {"NR",186}, - {"numberOfChars",1381}, + {"md5Product",1279}, {""}, - {"secondLatitudeInDegrees",1952}, + {"codedNumberOfFirstOrderPackedValues",557}, {""}, {""}, {""}, {""}, {""}, - {"extraLocalSectionNumber",800}, - {""}, - {"easternLongitudeOfDomain",724}, - {""}, {""}, - {"offsetAfterCentreLocalSection",1500}, + {"unknown",2356}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"totalNumberOfdimensions",2233}, - {""}, {""}, - {"scaleFactorOfDistanceFromEnsembleMean",1893}, + {"numberOfForecastsInCluster",1429}, {""}, {""}, {""}, - {"nameLegacyECMF",1340}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"firstMonthUsedToBuildClimateMonth1",859}, + {"latitudeOfSouthernPole",1088}, {""}, {""}, {""}, {""}, - {"extendedFlag",797}, + {"referenceOfWidths",1820}, + {""}, {""}, {""}, + {"sampleSizeOfReferencePeriod",1911}, {""}, {""}, - {"yearOfCentury",2425}, + {"centralLongitude",401}, {""}, {""}, {""}, - {"endOfFileAddress",753}, + {"grib1divider",907}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"is_chemical_distfn",1031}, {""}, {""}, {""}, {""}, {""}, {""}, - {"longitudeOfStretchingPoleInDegrees",1194}, + {"modelVersionDate",1333}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"crraLocalVersion",626}, + {""}, {""}, {""}, {""}, + {"predefined_grid",1718}, + {""}, {""}, {""}, {""}, {""}, + {"numberOfPackedValues",1456}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Experiment_Identifier",55}, - {"versionOfModelClimate",2356}, + {"listMembersMissing",1132}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"Lar2InDegrees",112}, + {"epsStatisticsContinous",779}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"Lor2InDegrees",146}, - {"spare4",2101}, - {""}, - {"spatialProcessing",2102}, - {"isCorrection",1012}, - {""}, - {"heightOrPressureOfLevel",936}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"totalNumberOfTubes",2231}, - {"expandedOriginalCodes",785}, - {""}, {""}, - {"expandedOriginalWidths",788}, - {""}, {""}, - {"numberOfValues",1481}, - {""}, - {"numberOfForecastsInEnsemble",1413}, - {""}, - {"centralLongitudeInDegrees",399}, - {""}, {""}, {""}, {""}, - {"DjInMetres",37}, + {"nameOfSecondFixedSurface",1357}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"totalNumberOfFrequencies",2225}, {""}, {""}, {""}, {""}, - {"extractAreaWestLongitude",808}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section4",1993}, + {"identificationOfProject",969}, {""}, {""}, {""}, {""}, {""}, - {"localSectionPresent",1161}, + {"verificationMonth",2397}, + {"LoVInDegrees",129}, {""}, {""}, {""}, - {"mars_labeling",1247}, - {"tablesVersionLatestOfficial",2172}, - {""}, - {"bitmapPresent",368}, - {""}, - {"md5Data",1262}, - {""}, {""}, - {"timeRangeIndicatorFromStepRange",2212}, - {"totalNumberOfQuantiles",2228}, - {"numberOfCharacters",1380}, + {"default_max_val",681}, + {"dayOfEndOfOverallTimeInterval",663}, + {""}, {""}, {""}, {""}, + {"originatingClass",1589}, {""}, {""}, {""}, - {"P",209}, + {"primaryBitmap",1743}, + {""}, + {"skew",2117}, {""}, {""}, {""}, - {"messageLength",1290}, - {"cfVarName",415}, + {"param_value_min",1674}, + {""}, {""}, {""}, {""}, {""}, + {"longitudeOfFirstDiamondCentreLine",1191}, + {"longitudeOfFirstDiamondCenterLine",1190}, + {"upperThreshold",2370}, {""}, - {"expandedOriginalScales",787}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"versionNumberOfGribLocalTables",2354}, - {"isEPS",1013}, - {""}, {""}, {""}, {""}, - {"probContinous",1723}, - {""}, {""}, {""}, - {"secondDimensionCoordinateValueDefinition",1949}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"diffInHours",690}, - {""}, {""}, {""}, {""}, {""}, - {"northernLatitudeOfClusterDomain",1358}, + {"numberOfDistributionFunctionParameters",1425}, + {"section3Padding",2030}, {""}, - {"totalNumberOfDirections",2223}, - {"numberOfAnalysis",1370}, - {"biFourierCoefficients",356}, + {"distanceFromTubeToEnsembleMean",705}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"longitudeOfFirstDiamondCentreLineInDegrees",1192}, {""}, - {"La2InDegrees",104}, + {"projectionCenterFlag",1765}, + {"integerValues",1005}, + {""}, {""}, + {"coordinate2Flag",593}, + {""}, {""}, {""}, + {"LIMITS",98}, + {"section2Padding",2024}, + {"missingValue",1321}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfDistinctSection4s",1402}, - {"scaledValueOfFirstSize",1922}, + {"totalLength",2260}, + {"versionNumOfRootGroupSymbolTableEntry",2402}, + {""}, {""}, {""}, {""}, + {"PVPresent",216}, + {"legBaseTime",1108}, + {""}, {""}, {""}, {""}, + {"LoV",128}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"typicalMinute",2329}, + {"numericValues",1509}, + {"numberOfForecastsInTheCluster",1431}, + {""}, {""}, {""}, {""}, + {"keyData",1056}, + {"g1conceptsMasterDir",894}, + {"rangeBinSpacing",1789}, + {""}, {""}, {""}, {""}, + {"longitudeOfStretchingPoleInDegrees",1206}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Lo2InDegrees",126}, - {""}, - {"westernLongitudeOfDomain",2377}, - {"correction3",612}, + {"XRInMetres",271}, + {"significanceOfReferenceDateAndTime",2104}, {""}, {""}, - {"gridCoordinate",912}, - {"latitudeOfStretchingPoleInDegrees",1084}, - {""}, {""}, - {"LoVInDegrees",129}, + {"coordinate4OfLastGridPoint",600}, + {""}, {""}, {""}, {""}, {""}, + {"messageLength",1303}, {""}, - {"attributeOfTile",319}, - {""}, {""}, {""}, - {"md5Section9",1276}, - {"startingAzimuth",2119}, + {"easternLongitudeOfDomain",728}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"n2",1335}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"scaleFactorOfLengthOfSemiMinorAxis",1901}, {""}, {""}, {""}, {""}, {""}, - {"matrixOfValues",1259}, - {""}, {""}, - {"driverInformationBlockAddress",709}, - {""}, {""}, {""}, {""}, - {"southernLatitudeOfClusterDomain",2090}, + {"extraValues",806}, {""}, {""}, {""}, - {"_leg_number",290}, - {"ITN",92}, + {"coordinate4Flag",598}, + {"tigge_short_name",2238}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"sp2",2093}, - {""}, {""}, - {"extremeClockwiseWindDirection",835}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"spare2",2099}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"latitudeOfFirstGridPointInDegrees",1072}, - {""}, {""}, - {"X2",266}, - {"longitudeOfFirstDiamondCentreLine",1179}, - {"longitudeOfFirstDiamondCenterLine",1178}, - {""}, {""}, {""}, - {"default_min_val",678}, {""}, - {"correction2Part",611}, - {"kurt",1053}, - {"latitudeOfCentralPointInClusterDomain",1068}, - {"referenceValueError",1802}, + {"consensusCount",577}, + {""}, {""}, {""}, + {"isHindcast",1022}, + {"minutesAfterReferenceTimeOfDataCutoff",1319}, + {"projectionCentreFlag",1766}, {""}, {""}, {""}, {""}, - {"longitudeOfFirstDiamondCentreLineInDegrees",1180}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"verifyingMonth",2399}, + {""}, {""}, + {"longitudeOfNorthWestCornerOfArea",1199}, + {"latitudeOfFirstGridPointInDegrees",1079}, + {"Nx",206}, + {""}, {""}, + {"Azi",15}, + {"halfByte",936}, + {"latitudeOfCentralPointInClusterDomain",1075}, + {"scaleFactorOfPrimeMeridianOffset",1932}, + {""}, {""}, + {"julianDay",1054}, {""}, {""}, {""}, {""}, {""}, - {"dummy2",712}, + {"Yo",283}, + {""}, {""}, {""}, {""}, + {"section2Present",2026}, {""}, - {"listMembersUsed4",1129}, + {"groupWidth",930}, + {"productionStatusOfProcessedData",1759}, + {"originatorLocalTemplate",1590}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Yp",284}, + {"section1Padding",2021}, {""}, {""}, {""}, {""}, - {"scaledValueOfFirstFixedSurface",1921}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"expandedOriginalReferences",786}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"timeCoordinateDefinition",2201}, + {"subSetM",2192}, {""}, {""}, - {"numberOfForecastsInCluster",1412}, - {"kurtosis",1054}, - {""}, {""}, {""}, {""}, - {"fileConsistencyFlags",852}, - {""}, {""}, {""}, - {"scaledValueOfStandardDeviation",1934}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"projectLocalTemplateNumber",1741}, - {"scaledValueOfStandardDeviationInTheCluster",1935}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"marsType2",1246}, - {""}, {""}, {""}, - {"scaleFactorOfPrimeMeridianOffset",1905}, + {"typeOfSecondFixedSurface",2313}, + {"scaleFactorOfDistanceFromEnsembleMean",1919}, + {"julianForecastDay",1055}, + {"extraLocalSectionPresent",805}, {""}, - {"DjInDegrees",36}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"lowerThreshold",1220}, + {"numberOfOctetsExtraDescriptors",1454}, + {"twoOrdersOfSPD",2288}, {""}, {""}, - {"listOfContributingSpectralBands",1130}, - {""}, - {"quantileValue",1757}, - {""}, {""}, {""}, {""}, - {"endStepInHours",760}, + {"timeCoordinateDefinition",2242}, + {""}, {""}, + {"Ncx",195}, {""}, - {"numberOfCategories",1379}, + {"secondsOfAnalysis",2009}, {""}, - {"keySat",1051}, + {"centralLongitudeInDegrees",402}, {""}, {""}, {""}, - {"param_value_max",1650}, - {"keyData",1049}, - {"TIDE",234}, - {""}, {""}, {""}, {""}, {""}, - {"scaledValueOfSecondSize",1932}, - {""}, {""}, - {"centralLongitudeInMicrodegrees",400}, - {""}, - {"typeOfIntervalForFirstAndSecondSize",2258}, - {"crraLocalVersion",623}, - {""}, {""}, {""}, {""}, {""}, - {"scaleValuesBy",1913}, + {"rdbtimeMinute",1798}, {""}, {""}, - {"plusOneinOrdersOfSPD",1685}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"md5Section8",1275}, - {"predefined_grid_values",1696}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"unitsBias",2296}, - {""}, {""}, {""}, {""}, - {"paleontologicalOffset",1645}, - {"secondaryMissingValueSubstitute",1968}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"averaging1Flag",322}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Nux",204}, {""}, {""}, {""}, - {"endDayTrend3",736}, + {"packingType",1597}, + {"extractAreaWestLongitude",812}, + {"projectLocalTemplateNumber",1764}, {""}, {""}, {""}, - {"is_ocean2d_param",1028}, + {"averaging2Flag",326}, {""}, {""}, - {"md5Structure",1277}, + {"inputProcessIdentifier",996}, + {""}, {""}, {""}, {""}, + {"constituentType",581}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"gts_ddhh00",934}, + {""}, + {"typeOfCalendar",2292}, + {"timeDomainTemplate",2243}, + {""}, + {"typeOfSizeInterval",2314}, {""}, {""}, - {"section_6",2037}, - {"numberOfRepresentativeMember",1460}, - {"skewness",2078}, - {""}, {""}, {""}, {""}, {""}, - {"primaryBitmap",1720}, - {""}, {""}, {""}, {""}, {""}, - {"coordinate1Start",588}, - {""}, {""}, {""}, - {"reserved2",1811}, + {"biFourierResolutionParameterN",363}, {""}, - {"numberIncludedInAverage",1368}, + {"fileConsistencyFlags",856}, + {""}, {""}, + {"extraLocalSectionNumber",804}, + {"aerosolbinnumber",304}, {""}, {""}, {""}, - {"section7Pointer",2008}, + {"constituentTypeName",582}, {""}, {""}, {""}, - {"numberOfDataValues",1397}, - {"epsStatisticsContinous",775}, + {"rectimeHour",1810}, {""}, - {"selectStepTemplateInstant",2040}, - {"groupInternalNodeK",921}, - {""}, {""}, {""}, {""}, {""}, - {"flagForIrregularGridCoordinateList",865}, - {""}, {""}, {""}, {""}, {""}, - {"cloudsTitle3",524}, - {"startOfRange",2115}, - {"typeOfIntervalForFirstAndSecondWavelength",2259}, - {"centreForTable2",404}, - {""}, {""}, - {"numberOfPoints",1442}, - {""}, {""}, - {"unknown",2305}, - {""}, {""}, - {"unitsConversionOffset",2297}, + {"climateDateTo",435}, {""}, {""}, {""}, - {"keyMore",1050}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"groupLengths",927}, + {"latitudeOfIcosahedronPole",1081}, {""}, {""}, - {"expandedAbbreviations",778}, + {"legBaseDate",1107}, {""}, {""}, {""}, {""}, - {"numberOfForecastsInTheCluster",1414}, + {"isSatelliteType",1026}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"marsExpver",1236}, {""}, - {"extractDateTimeYearStart",828}, - {""}, {""}, {""}, - {"Lar1InDegrees",110}, - {""}, {""}, {""}, - {"formatVersionMajorNumber",881}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"expandedCodes",783}, + {""}, {""}, {""}, {""}, {""}, + {"secondaryBitmap",2002}, {""}, - {"Lor1InDegrees",144}, - {""}, {""}, - {"section_06",2026}, - {"qualityControl",1753}, + {"secondDimensionCoordinateValueDefinition",1988}, + {""}, + {"groupWidths",931}, + {"biFourierSubTruncationType",366}, + {"offsetBSection9",1530}, + {"section10Pointer",2016}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section_10",2031}, - {"widthOfLengths",2379}, + {"westernLongitudeOfDomain",2431}, {""}, {""}, {""}, {""}, - {"numberOfColumns",1388}, - {""}, {""}, {""}, {""}, - {"stepHumanReadable",2126}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"BufrTemplate",19}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"longitudeOfSubSatellitePoint",1207}, + {"jIncrement",1048}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"sectionLengthLimitForEnsembles",2057}, + {""}, + {"instrumentType",1000}, + {"longitudeOfSubSatellitePointInDegrees",1208}, + {"typeOfIntervalForFirstAndSecondSize",2301}, {""}, {""}, - {"NAT",174}, + {"numberOfDistinctSection4s",1419}, + {"localHour",1161}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"selectedYear",2088}, + {"epsContinous",777}, + {""}, {""}, {""}, {""}, {""}, + {"secondaryBitmapPresent",2003}, {""}, {""}, {""}, {""}, - {"upperThreshold",2319}, + {"deleteExtraLocalSection",686}, + {"addExtraLocalSection",298}, + {"localYear",1180}, {""}, {""}, {""}, - {"clusterMember4",539}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"startOfRange",2156}, + {""}, + {"averaging1Flag",325}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"endMinuteTrend4",748}, - {"typeOfOriginalFieldValues",2262}, - {""}, {""}, - {"typeOfCalendar",2249}, - {"gridPointPosition",919}, - {""}, {""}, {""}, {""}, - {"md5DataSection",1263}, - {"totalNumberOfForecastProbabilities",2224}, - {"section2Present",1986}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"totalNumberOfTileAttributePairs",2230}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"skew",2077}, {""}, - {"inputOriginatingCentre",988}, + {"listOfEnsembleForecastNumbers",1142}, + {""}, + {"biFourierResolutionSubSetParameterN",365}, + {""}, {""}, {""}, + {"radiusOfCentralCluster",1785}, + {"Lar2InDegrees",112}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"offsetBeforeData",1532}, {""}, - {"resolutionAndComponentFlags",1818}, + {"tileIndex",2240}, + {""}, {""}, + {"parametersVersion",1684}, {""}, - {"sectionLengthLimitForEnsembles",2017}, + {"marsExperimentOffset",1235}, + {"Lor2InDegrees",146}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"paleontologicalOffset",1668}, + {""}, {""}, {""}, {""}, + {"listOfParametersUsedForClustering",1144}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"extractSubsetIntervalEnd",834}, {""}, {""}, - {"md5TimeDomainSection",1278}, - {""}, {""}, - {"secondsOfAnalysis",1969}, + {"numberOfForecastsInEnsemble",1430}, {""}, - {"La1InDegrees",102}, + {"widthOfLengths",2433}, {""}, {""}, - {"iScansNegatively",959}, - {"stepUnits",2133}, + {"centuryOfAnalysis",412}, {""}, - {"PLPresent",212}, - {"windSpeedTrend4",2397}, - {""}, {""}, {""}, {""}, {""}, - {"halfByte",932}, + {"qualityControl",1776}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"extractSubsetIntervalStart",835}, + {"directionOfVariation",700}, {""}, - {"Lo1InDegrees",124}, + {"percentileValue",1697}, + {""}, {""}, {""}, {""}, + {"attributeOfTile",322}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"packingType",1574}, - {"scaledValueOfSecondFixedSurface",1931}, {""}, - {"offsetSection4",1524}, - {"totalNumberOfIterations",2227}, - {"frequencyNumber",885}, - {"referenceOfWidths",1797}, - {""}, {""}, {""}, - {"totalNumberOfDataValuesMissingInStatisticalProcess",2222}, - {""}, {""}, - {"centuryOfAnalysis",409}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"coordinate1End",586}, - {"extractDateTimeHourStart",815}, - {""}, {""}, - {"swapScanningX",2159}, - {"numberOfOctectsForNumberOfPoints",1435}, + {"numberOfDistinctSection6s",1421}, {""}, - {"windDirectionTrend4",2386}, + {"typicalDateTime",2326}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"La2",103}, + {"primaryMissingValue",1744}, + {"resolutionAndComponentFlags",1842}, {""}, - {"Lar2",111}, - {"nameECMF",1339}, - {""}, {""}, {""}, - {"azimuthalWidth",326}, - {""}, {""}, {""}, - {"numberOfDistinctSection3s",1401}, - {""}, {""}, {""}, - {"Lo2",125}, + {"mAngleMultiplier",1226}, {""}, - {"Lor2",145}, - {"Latin2",116}, + {"centreLatitudeInDegrees",409}, + {""}, {""}, + {"numberOfValues",1500}, + {"secondOfModelVersion",1995}, + {""}, {""}, + {"minuteOfModelVersion",1315}, + {"La2InDegrees",104}, + {"typeOfOriginalFieldValues",2305}, + {""}, {""}, {""}, + {"numberOfComponents",1406}, {""}, {""}, {""}, {""}, {""}, {""}, - {"secondaryBitmap",1962}, - {"7777",5}, + {"referenceValueError",1826}, + {""}, + {"secondLatitudeInDegrees",1991}, + {"Lo2InDegrees",126}, + {""}, + {"typeOfIntervalForFirstAndSecondWavelength",2302}, {""}, {""}, {""}, {""}, {""}, - {"legBaseTime",1101}, + {"LxInMetres",152}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Lar1InDegrees",110}, {""}, {""}, - {"LoV",128}, + {"scaledValueOfDistributionFunctionParameter",1951}, + {"conceptsMasterMarsDir",575}, {""}, {""}, {""}, {""}, {""}, - {"correction1",608}, + {"numberOfDistinctSection3s",1418}, + {""}, {""}, {""}, {""}, + {"Lor1InDegrees",144}, {""}, {""}, {""}, {""}, {""}, {""}, - {"radiusOfCentralCluster",1762}, - {"dataCategory",629}, + {"startOfHeaders",2154}, {""}, - {"lowerThreshold",1208}, + {"SecondOfModelVersion",229}, + {"probContinous",1746}, + {"postAuxiliary",1710}, + {""}, + {"reservedNeedNotBePresent",1837}, + {""}, {""}, {""}, + {"typeOfHorizontalLine",2300}, + {"typicalHour",2328}, + {""}, {""}, {""}, {""}, + {"secondaryBitmaps",2004}, + {"sphericalHarmonics",2148}, + {"local_padding",1181}, {""}, {""}, {""}, {""}, {""}, - {"cloudsTitle4Trend4",533}, + {"stepForClustering",2166}, + {""}, {""}, {""}, {""}, + {"predefined_grid_values",1719}, + {"scaledValueOfRadiusOfSphericalEarth",1964}, {""}, {""}, - {"typeOfAuxiliaryInformation",2248}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"clusterMember2",537}, + {"typicalYear",2333}, {""}, - {"marsStream1",1242}, - {""}, - {"unitsECMF",2300}, + {"waveFrequencyNumber",2425}, + {""}, {""}, {""}, {""}, + {"spare4",2141}, + {"primaryMissingValueSubstitute",1745}, {""}, {""}, {""}, {""}, {""}, - {"numberOfDataPoints",1395}, - {""}, {""}, {""}, - {"listOfEnsembleForecastNumbers",1132}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"endMinuteTrend2",746}, + {"coordinate1Start",591}, + {""}, {""}, {""}, {""}, + {"earthMinorAxisInMetres",724}, {""}, {""}, - {"legBaseDate",1100}, - {"scanningMode4",1940}, - {""}, {""}, {""}, {""}, {""}, - {"stepForClustering",2125}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"iScansPositively",960}, + {"resolutionAndComponentFlags8",1849}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"doSimpleThinning",707}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section6Pointer",2004}, - {""}, {""}, {""}, - {"selectStepTemplateInterval",2041}, + {"doExtractDateTime",709}, + {""}, + {"extremeClockwiseWindDirection",839}, + {"scaleFactorOfAdditionalParameterForReferencePeriod",1917}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"thisMarsClass",2224}, {""}, {""}, - {"windUnits",2398}, + {"secondaryBitmapsCount",2005}, + {""}, {""}, {""}, {""}, + {"La1InDegrees",102}, + {""}, + {"boot_edition",375}, {""}, {""}, {""}, {""}, {""}, - {"section4Padding",1995}, - {"_numberOfValues",291}, + {"section4",2033}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"Lo1InDegrees",124}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"uerraLocalVersion",2338}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberInMixedCoordinateDefinition",1365}, + {"lengthOfOriginatorLocalTemplate",1117}, + {"yCoordinateOfSubSatellitePoint",2471}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"reservedSection3",1816}, + {"numberOfDistinctSection5s",1420}, + {""}, {""}, + {"monthOfModelVersion",1341}, {""}, - {"windSpeedTrend2",2395}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"gridDescriptionSectionPresent",917}, + {"level_value_list",1127}, {""}, - {"monthOfEndOfOverallTimeInterval",1323}, - {"cloudsTitle4Trend2",531}, - {""}, {""}, {""}, {""}, - {"yearOfEndOfOverallTimeInterval",2426}, + {"lengthOfHeaders",1114}, {""}, {""}, {""}, {""}, - {"offsetSection2",1522}, + {"DxInMetres",41}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwaySideCodeState4",1884}, - {"secondaryBitmapPresent",1963}, - {""}, {""}, {""}, {""}, - {"table2Version",2164}, + {"rdbtimeHour",1797}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"frequencyScalingFactor",886}, - {""}, {""}, - {"is_ocean3d_param",1029}, + {"numberInTheAuxiliaryArray",1382}, {""}, {""}, {""}, - {"windDirectionTrend2",2384}, - {""}, {""}, - {"scaledValueOfDistributionFunctionParameter",1918}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"inputProcessIdentifier",990}, + {"NV",192}, + {""}, {""}, {""}, {""}, {""}, + {"constantFieldHalfByte",580}, + {""}, + {"rdbtimeYear",1802}, + {""}, {""}, {""}, + {"numberOfLogicals",1445}, + {"inputExtendedDelayedDescriptorReplicationFactor",993}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfLogicals",1427}, + {"scaleFactorOfLengthOfSemiMinorAxis",1927}, {""}, {""}, {""}, - {"lengthOfTimeRange",1112}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"totalNumberOfRepetitions",2229}, + {"frequencyNumber",889}, + {""}, {""}, + {"marsGrid",1238}, {""}, - {"section9Length",2014}, - {"indicatorOfTypeOfLevel",980}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section2Padding",1984}, - {""}, {""}, {""}, {""}, {""}, - {"biFourierResolutionParameterM",359}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayDepositState4",1844}, - {"secondaryBitmaps",1964}, + {"offsetAfterBitmap",1522}, {""}, {""}, {""}, - {"Ensemble_Identifier",51}, + {"LLCOSP",99}, + {""}, {""}, {""}, + {"totalNumberOfDataValuesMissingInStatisticalProcess",2263}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"jDirectionIncrement",1038}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"lengthOfOriginatorLocalTemplate",1110}, + {"numberOfDistinctSection7s",1422}, {""}, - {"typicalMonth",2281}, - {""}, {""}, - {"conceptsDir1",566}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"section10Pointer",1976}, + {"tiggeLocalVersion",2233}, {""}, {""}, {""}, - {"distinctLongitudes",703}, + {"lengthOfTimeRange",1119}, {""}, {""}, {""}, - {"numberOfComponents",1389}, + {"startingAzimuth",2160}, {""}, {""}, - {"pressureUnits",1719}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"latitudeOfSouthernPole",1081}, - {"secondaryBitMap",1961}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"endDayTrend1",734}, - {""}, {""}, {""}, {""}, {""}, - {"Yo",281}, + {"typeOfEnsembleMember",2296}, + {""}, {""}, + {"versionOfModelClimate",2407}, + {""}, {""}, + {"shortNameECMF",2100}, {""}, {""}, {""}, {""}, - {"secondaryBitmapsCount",1965}, + {"variationOfVisibilityDirection",2385}, + {""}, {""}, {""}, {""}, {""}, + {"variationOfVisibilityDirectionAngle",2386}, + {"formatVersionMajorNumber",885}, + {""}, {""}, {""}, + {"masterTablesVersionNumber",1263}, {""}, - {"section0Length",1972}, + {"numberOfColumns",1405}, + {"section4Pointer",2036}, + {""}, {""}, {""}, + {"expandedAbbreviations",782}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"firstOrderValues",865}, + {""}, {""}, + {"backgroundProcess",331}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"Yp",282}, {""}, {""}, {""}, {""}, - {"longitudeOfNorthWestCornerOfArea",1187}, + {"Experiment_Identifier",55}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"GTSstr",79}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"yearOfCentury",2479}, + {"LcxInMetres",119}, + {""}, {""}, {""}, + {"typeOfAuxiliaryInformation",2291}, + {"selectedMinute",2085}, {""}, - {"hourOfEndOfOverallTimeInterval",946}, - {"md5Section7",1274}, + {"compressedData",565}, + {"missing_values",1325}, {""}, {""}, - {"BufrTemplate",19}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfClusters",1384}, + {"LuxInMetres",148}, {""}, {""}, - {"expandBy",777}, + {"secondOrderValuesDifferentWidths",1999}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"sampleSizeOfModelClimate",1910}, + {"typeOfWavePeriodInterval",2322}, {""}, {""}, {""}, {""}, {""}, {""}, - {"resolutionAndComponentFlags8",1825}, + {"deleteCalendarId",685}, + {""}, {""}, + {"GTS",78}, {""}, - {"cloudsTitle1",514}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"g1conceptsMasterDir",890}, - {"deleteCalendarId",681}, + {"offsetSection4",1547}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"productionStatusOfProcessedData",1736}, - {"latitudeWhereDxAndDyAreSpecified",1093}, - {"runwaySideCodeState2",1882}, + {"qnhAPresent",1773}, {""}, {""}, - {"totalLength",2219}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"instrumentType",994}, - {""}, - {"coordinate2Flag",590}, - {"latitudeWhereDxAndDyAreSpecifiedInDegrees",1094}, + {"variationOfVisibility",2384}, + {""}, {""}, {""}, + {"section6",2042}, + {""}, {""}, {""}, {""}, {""}, + {"masterTablesVersionNumberLatest",1264}, + {""}, {""}, {""}, {""}, {""}, + {"lengthOfTimeRangeForReferencePeriod",1120}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"yCoordinateOfOriginOfSectorImage",2470}, {""}, {""}, - {"spaceUnitFlag",2095}, - {"indexedStorageInternalNodeK",973}, - {""}, - {"sectionLengthLimitForProbability",2018}, + {"reducedGrid",1813}, + {"section6Pointer",2044}, + {""}, {""}, + {"coordinate2Start",594}, + {"n3",1351}, + {""}, {""}, {""}, + {"distinctLongitudes",707}, {""}, - {"secondOrderOfDifferentWidth",1958}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"numberOfBits",1388}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"typicalCentury",2324}, + {""}, {""}, + {"monthlyVerificationMonth",1345}, + {"inputOriginatingCentre",994}, + {""}, {""}, {""}, + {"shapeOfVerificationArea",2098}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"sectionLengthLimitForProbability",2058}, + {""}, {""}, {""}, {""}, + {"mars_labeling",1259}, {""}, - {"swapScanningLat",2157}, + {"sp3",2134}, + {""}, {""}, {""}, {""}, + {"n2",1350}, + {""}, {""}, {""}, {""}, + {"xDirectionGridLengthInMetres",2466}, + {"spare3",2140}, + {""}, {""}, {""}, {""}, + {"deletePV",688}, {""}, {""}, {""}, {""}, {""}, {""}, - {"n3",1336}, - {"offsetAfterBitmap",1499}, - {"swapScanningLon",2158}, + {"gribDataQualityChecks",912}, {""}, {""}, - {"twoOrdersOfSPD",2245}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"section10Length",1975}, - {""}, {""}, {""}, {""}, - {"latitudeLongitudeValues",1067}, - {"monthOfAnalysis",1322}, - {"cloudsTitle3Trend4",528}, + {"section3Pointer",2031}, {""}, {""}, {""}, - {"classOfAnalysis",430}, - {""}, - {"bufrdcExpandedDescriptors",380}, + {"scaleFactorOfWaveDirections",1942}, + {"numberOfTimeRange",1491}, + {""}, {""}, + {"numberOfWaveFrequencies",1506}, {""}, {""}, {""}, - {"coordinateFlag2",599}, + {"windGust",2441}, {""}, - {"section8Length",2011}, - {""}, {""}, {""}, {""}, {""}, - {"sp3",2094}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayDepositState2",1842}, + {"localFlagLatestVersion",1160}, + {"scaleFactorOfWaveDirectionSequenceParameter",1941}, + {"sp2",2133}, + {"marsStream1",1254}, {""}, {""}, {""}, - {"spare3",2100}, + {"section2Pointer",2025}, {""}, {""}, {""}, {""}, - {"numberOfTimeRange",1472}, - {""}, {""}, {""}, - {"flagForAnyFurtherInformation",864}, + {"numberOfDataValues",1414}, + {"spare2",2139}, + {""}, + {"originatorLocalTemplateNumber",1591}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"scaleFactorOfWaveFrequencies",1943}, {""}, {""}, - {"parametersVersion",1661}, + {"shapeOfTheEarth",2097}, + {""}, {""}, + {"longitudeOfCentralPointInClusterDomain",1187}, {""}, - {"forecastProbabilityNumber",877}, + {"correction3",615}, + {""}, {""}, {""}, {""}, + {"spatialSmoothingOfProduct",2143}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"selectedFcIndex",2083}, + {"swapScanningLat",2198}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"swapScanningLon",2199}, + {""}, {""}, {""}, {""}, {""}, + {"correction1",611}, {""}, - {"secondOfEndOfOverallTimeInterval",1953}, - {"selectedYear",2048}, + {"basicAngleOfTheInitialProductionDomain",338}, + {"flagForIrregularGridCoordinateList",869}, {""}, - {"minuteOfEndOfOverallTimeInterval",1299}, + {"quantileValue",1780}, + {""}, {""}, {""}, {""}, + {"La2",103}, + {""}, + {"Lar2",111}, {""}, {""}, - {"rangeBinSpacing",1766}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"localYear",1168}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"offsetBSection9",1507}, + {"selectStepTemplateInstant",2080}, + {""}, {""}, {""}, + {"timeDomainTemplateNumber",2244}, + {""}, {""}, {""}, + {"monthOfEndOfOverallTimeInterval",1338}, + {"latitudeLongitudeValues",1074}, + {"Lo2",125}, + {""}, + {"Lor2",145}, + {"Latin2",116}, {""}, {""}, - {"listMembersUsed3",1128}, + {"firstDimensionCoordinateValueDefinition",859}, + {""}, + {"secondOrderOfDifferentWidth",1998}, + {"latitudeOfSouthernPoleInDegrees",1089}, + {""}, {""}, {""}, {""}, + {"biFourierResolutionParameterM",362}, {""}, {""}, {""}, {""}, {""}, - {"sp1",2092}, + {"scaleFactorOfSecondWavelength",1936}, + {""}, + {"indicatorOfTypeOfLevel",985}, {""}, {""}, - {"subDefinitions2",2142}, + {"section10Length",2015}, {""}, {""}, - {"typicalYear",2284}, - {"offsetBeforeData",1509}, - {""}, - {"minutesAfterReferenceTimeOfDataCutoff",1305}, - {""}, - {"spare1",2098}, + {"table2Version",2205}, + {""}, {""}, + {"jDirectionIncrement",1044}, + {"xDirectionGridLengthInMillimetres",2467}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"expandedCrex_scales",780}, - {"cloudsTitle3Trend2",526}, + {"correction4",617}, {""}, - {"X1",264}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"biFourierResolutionSubSetParameterM",361}, - {""}, {""}, - {"localNumberOfObservations",1158}, - {"typeOfPreProcessing",2265}, + {"section5Pointer",2040}, {""}, {""}, {""}, {""}, {""}, - {"Model_Additional_Information",167}, - {"localExtensionPadding",1146}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"section9Length",2054}, + {""}, {""}, + {"doSimpleThinning",711}, + {""}, {""}, + {"offsetSection6",1549}, {""}, {""}, {""}, - {"dummy1",711}, + {"bufrHeaderCentre",380}, + {""}, {""}, {""}, + {"section1Pointer",2022}, + {""}, {""}, + {"windSpeedTrend4",2451}, + {"numberOfRepresentativeMember",1479}, + {""}, {""}, + {"section8Length",2051}, + {""}, + {"typeOfGrid",2299}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"significanceOfReferenceDateAndTime",2064}, + {"DjInDegrees",36}, + {""}, {""}, {""}, {""}, + {"unitsConversionScaleFactor",2349}, + {"extendedFlag",801}, {""}, {""}, {""}, {""}, {""}, - {"observationType",1491}, + {"latitudeOfNorthWestCornerOfArea",1084}, + {"southEastLatitudeOfVerficationArea",2124}, + {""}, {""}, + {"missingValuesPresent",1324}, {""}, - {"section1",1974}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"percentileValue",1674}, + {"frequencyScalingFactor",890}, + {"scaleValuesBy",1945}, + {"expandedOriginalCodes",789}, + {""}, {""}, + {"expandedOriginalWidths",792}, {""}, {""}, {""}, {""}, {""}, {""}, - {"ijDirectionIncrementGiven",968}, - {"dateOfAnalysis",647}, + {"marsStream2",1255}, {""}, - {"expandedCrex_units",781}, - {"yearOfAnalysis",2424}, - {""}, - {"windVariableDirectionTrend4",2407}, + {"tiggeLAMName",2232}, + {"numberOfCoordinatesValues",1409}, + {""}, {""}, + {"default_min_val",682}, {""}, {""}, {""}, - {"versionNumOfRootGroupSymbolTableEntry",2351}, + {"indexedStorageInternalNodeK",978}, + {"section7Pointer",2048}, {""}, - {"timeOfAnalysis",2206}, - {"scaleFactorOfSecondWavelength",1909}, - {"timeDomainTemplateNumber",2203}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"unitOfTimeRange",2294}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"typeOfAnalysis",2247}, - {"marsType1",1245}, - {""}, - {"gribDataQualityChecks",908}, - {""}, {""}, {""}, - {"cloudsTitle4Trend3",532}, - {""}, {""}, - {"ls_labeling",1210}, + {"unpackedSubsetPrecision",2359}, + {"md5Section6",1286}, + {"scaleFactorOfWaveFrequencySequenceParameter",1944}, + {""}, {""}, {""}, {""}, + {"secondOfEndOfOverallTimeInterval",1992}, {""}, {""}, - {"directionOfVariation",696}, - {""}, {""}, {""}, {""}, {""}, - {"yCoordinateOfOriginOfSectorImage",2416}, - {"matchAerosolPacking",1254}, - {""}, - {"rdbtimeMonth",1776}, + {"minuteOfEndOfOverallTimeInterval",1312}, {""}, {""}, {""}, {""}, - {"versionNumberOfExperimentalSuite",2353}, + {"biFourierResolutionSubSetParameterM",364}, {""}, {""}, {""}, {""}, {""}, - {"accuracyMultipliedByFactor",294}, - {"numberOfPackedValues",1438}, - {""}, - {"scaleFactorOfFirstWavelength",1899}, - {""}, {""}, {""}, {""}, {""}, - {"cloudsTitle4Trend1",530}, + {"reserved3",1836}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"southEastLongitudeOfVerficationArea",2086}, - {"section4Pointer",1996}, - {"reserved3",1812}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"doExtractArea",704}, - {""}, {""}, {""}, - {"missingValuesPresent",1310}, - {"originalParameterTableNumber",1562}, {""}, {""}, {""}, {""}, - {"earthMajorAxisInMetres",718}, + {"dummy2",716}, {""}, - {"windVariableDirectionTrend2",2405}, + {"offsetBeforePL",1533}, + {""}, {""}, + {"yearOfEndOfOverallTimeInterval",2480}, {""}, {""}, {""}, {""}, {""}, - {"dateSSTFieldUsed",655}, - {"section3Padding",1990}, + {"correction2",613}, + {""}, {""}, {""}, {""}, + {"expandedOriginalScales",791}, + {"numberOfWaveDirections",1505}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"offsetSection3",1546}, + {"marsType2",1258}, {""}, - {"groupLengths",923}, + {"numberOfDataBinsAlongRadials",1410}, + {"reserved2",1835}, + {""}, + {"NC",176}, {""}, {""}, - {"md5Section6",1273}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"DiGiven",31}, + {""}, + {"sp1",2132}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"dayOfTheYearDate",669}, + {""}, + {"spare1",2138}, + {"rootGroupObjectHeaderAddress",1851}, {""}, {""}, {""}, {""}, {""}, - {"marsGrid",1226}, - {"presentTrend4",1702}, - {""}, {""}, - {"updateSequenceNumber",2316}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"hourOfEndOfOverallTimeInterval",950}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"section5",2038}, {""}, - {"section1Padding",1981}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"reserved1",1810}, + {"expandedOriginalReferences",790}, + {"scaledValueOfLowerLimit",1959}, + {"offsetSection2",1545}, + {""}, {""}, {""}, + {"unstructuredGrid",2362}, {""}, {""}, {""}, {""}, {""}, {""}, - {"longitudeOfReferencePoint",1188}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"numberOfCodedValues",1402}, {""}, {""}, {""}, {""}, - {"hourOfAnalysis",945}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"centreForTable2",407}, + {""}, {""}, {""}, + {"definitionFilesVersion",684}, + {""}, {""}, {""}, + {"localTablesVersion",1174}, + {""}, {""}, {""}, {""}, + {"numberOfParallelsBetweenAPoleAndTheEquator",1457}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section2Pointer",1985}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"SOH",224}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"firstDimensionCoordinateValueDefinition",855}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"section1",2014}, {""}, - {"southEastLatitudeOfVerficationArea",2084}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"unitsConversionScaleFactor",2298}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"southEastLatitudeOfLPOArea",2123}, + {"La1",101}, + {"unstructuredGridType",2364}, + {"Lar1",109}, + {""}, {""}, {""}, {""}, + {"totalNumberOfValuesInUnpackedSubset",2273}, + {""}, + {"endOfMessage",760}, + {"YR",279}, {""}, {""}, {""}, - {"section_4",2035}, - {"compressedData",562}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"variationOfVisibility",2333}, - {"scaledValueOfRadiusOfSphericalEarth",1930}, - {"section3Flags",1988}, - {""}, {""}, {""}, {""}, {""}, - {"backgroundProcess",328}, - {""}, {""}, - {"originatorLocalTemplateNumber",1568}, + {"latitudinalDirectionGridLength",1104}, + {"Lo1",123}, + {"stepInHours",2168}, + {"Lor1",143}, + {"Latin1",114}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"bitsPerValue",373}, {""}, {""}, {""}, {""}, {""}, {""}, - {"expandedCrex_widths",782}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"latitudeOfIcosahedronPole",1074}, - {""}, - {"spatialSmoothingOfProduct",2103}, - {"section1Flags",1979}, - {"Sub-Experiment_Identifier",231}, - {"originOfPostProcessing",1560}, + {"numberOfClusters",1401}, + {"cloudsTitle3",527}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"rdbtimeYear",1779}, + {"tiggeSuiteID",2236}, + {"windDirectionTrend4",2440}, {""}, {""}, {""}, - {"bitsPerValue",370}, + {"section0Length",2012}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"conceptsDir1",569}, {""}, {""}, {""}, - {"thisExperimentVersionNumber",2182}, + {"cloudsTitle1",517}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"clusterMember10",539}, + {""}, {""}, {""}, {""}, {""}, + {"keyMore",1057}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"diffInHours",694}, + {"rootTablesDir",1853}, + {"md5Section5",1285}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"scaleFactorOfFirstWavelength",1925}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"identificationOfOriginatingGeneratingCentre",968}, {""}, {""}, {""}, - {"reservedNeedNotBePresent",1813}, - {""}, {""}, {""}, {""}, - {"variationOfVisibilityDirection",2334}, - {""}, - {"longitudeOfSubSatellitePoint",1195}, - {""}, {""}, {""}, - {"variationOfVisibilityDirectionAngle",2335}, - {""}, {""}, {""}, - {"presentTrend2",1700}, + {"stepHumanReadable",2167}, {""}, - {"section_04",2024}, + {"earthMajorAxis",721}, + {"md5Section7",1287}, {""}, {""}, - {"longitudeOfSubSatellitePointInDegrees",1196}, + {"longitudeOfTangencyPoint",1209}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"section7",2046}, + {""}, {""}, {""}, {""}, + {"cloudsTitle4",532}, {""}, - {"GTSstr",79}, - {"expandedUnits",790}, - {""}, {""}, {""}, - {"shortNameECMF",2060}, + {"endDayTrend3",740}, + {"matrixOfValues",1271}, {""}, {""}, {""}, {""}, {""}, - {"NP",185}, - {""}, {""}, {""}, {""}, - {"formatVersionMinorNumber",882}, + {"tablesLocalDir",2209}, + {""}, {""}, {""}, {""}, {""}, + {"selectStepTemplateInterval",2081}, + {""}, + {"numberOfPointsInDomain",1471}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section9UniqueIdentifier",2016}, - {"runwayFrictionCoefficientState4",1880}, + {"numberOfAdditionalParametersForReferencePeriod",1386}, + {"tsectionNumber4",2283}, + {""}, + {"isRotatedGrid",1024}, + {"endDayTrend1",738}, {""}, {""}, - {"Dj",34}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"isectionNumber4",1039}, {""}, {""}, - {"cloudsCode4",509}, + {"updateSequenceNumber",2367}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"masterTablesVersionNumber",1251}, + {"dummy1",715}, + {""}, {""}, {""}, + {"runwaySideCodeState4",1908}, {""}, {""}, - {"shapeOfVerificationArea",2058}, - {"scaledValueOfLowerLimit",1926}, - {""}, {""}, {""}, {""}, {""}, - {"cloudsTitle1Trend4",518}, - {"preProcessingParameter",1692}, + {"reservedSection3",1840}, {""}, {""}, {""}, {""}, {""}, - {"secondaryBitmapsSize",1966}, - {""}, {""}, - {"reducedGrid",1790}, - {"tiggeLAMName",2191}, - {"windGust",2387}, - {"offsetFromReferenceOfFirstTime",1516}, - {""}, {""}, - {"cloudsTitle3Trend3",527}, - {""}, {""}, {""}, - {"La1",101}, + {"longitudeOfThePoleOfStretching",1210}, {""}, - {"Lar1",109}, - {"clusterMember3",538}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"Lo1",123}, - {"endMonthTrend4",752}, - {"Lor1",143}, - {"Latin1",114}, + {"windSpeedTrend3",2450}, + {"WMO",263}, {""}, {""}, {""}, {""}, - {"tsectionNumber4",2240}, - {"N2",173}, - {"endMinuteTrend3",747}, - {""}, - {"offsetICEFieldsUsed",1517}, + {"probabilityType",1749}, + {"_numberOfValues",293}, {""}, - {"isectionNumber4",1033}, + {"grib2LocalSectionPresent",909}, + {"marsType1",1257}, + {"offsetSection5",1548}, {""}, - {"cloudsTitle3Trend1",525}, - {""}, - {"numberOfBits",1371}, - {""}, {""}, {""}, - {"section_2",2033}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"NV",190}, - {""}, {""}, {""}, {""}, - {"grib2LocalSectionPresent",905}, + {"reserved1",1834}, {""}, {""}, {""}, {""}, - {"subLocalDefinition2",2144}, - {"runwayFrictionCoefficientState2",1878}, - {""}, - {"offsetEndSection4",1513}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"ijDirectionIncrementGiven",973}, + {"X2",268}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"gribTablesVersionNo",914}, {""}, {""}, {""}, {""}, - {"GTS",78}, - {""}, - {"clusterMember1",535}, - {"METARstr",157}, - {""}, {""}, {""}, - {"dateOfModelVersion",652}, - {"firstOrderValues",861}, - {""}, - {"yearOfModelVersion",2429}, - {"alternativeRowScanning",303}, - {""}, - {"windSpeedTrend3",2396}, - {""}, {""}, {""}, - {"cloudsTitle1Trend2",516}, - {"timeOfModelVersion",2209}, - {""}, {""}, {""}, - {"section7Length",2007}, - {""}, - {"endMinuteTrend1",745}, - {""}, {""}, {""}, - {"jDirectionIncrementInDegrees",1041}, - {""}, {""}, {""}, - {"secondOrderValuesDifferentWidths",1959}, + {"longitudeOfTheSouthernPoleOfProjection",1213}, {""}, - {"offsetSection3",1523}, - {""}, {""}, {""}, - {"DiGiven",31}, - {"grib2LocalSectionNumber",904}, - {"latitudeOfSouthernPoleInDegrees",1082}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"listOfParametersUsedForClustering",1134}, - {"physicalMeaningOfVerticalCoordinate",1682}, - {""}, {""}, {""}, {""}, - {"windDirectionTrend3",2385}, + {"probabilityTypeName",1750}, {""}, {""}, - {"typeOfGrid",2256}, + {"endDayTrend4",741}, {""}, {""}, - {"localLatitude2",1152}, - {""}, - {"section_02",2022}, + {"firstDimensionPhysicalSignificance",860}, + {""}, {""}, + {"windSpeedTrend2",2449}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"offsetSection1",1542}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberMissingFromAveragesOrAccumulations",1369}, - {""}, - {"padding_sec1_loc",1639}, - {"mixedCoordinateFieldFlag",1312}, - {""}, {""}, {""}, - {"qnhUnits",1752}, - {""}, - {"windSpeedTrend1",2394}, - {""}, - {"numberOfCoordinatesValues",1392}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"parameterUnits",1659}, + {"localExtensionPadding",1158}, {""}, {""}, {""}, {""}, {""}, {""}, - {"windVariableDirectionTrend3",2406}, + {"numberOfDaysInClimateSamplingWindow",1415}, {""}, - {"section8UniqueIdentifier",2013}, - {"normAtFinalTime",1349}, - {"offsetSection1",1519}, - {"dayOfModelVersion",663}, + {"numberOfCoefficientsOrValuesUsedToSpecifyFirstDimensionCoordinateFunction",1403}, + {"numberOfCoefficientsOrValuesUsedToSpecifySecondDimensionCoordinateFunction",1404}, + {"conceptsDir2",570}, + {"grib2LocalSectionNumber",908}, + {""}, {""}, + {"cloudsTitle2",522}, {""}, {""}, {""}, {""}, - {"numberOfDistinctSection5s",1403}, + {"expandBy",781}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"reservedSection4",1841}, {""}, {""}, - {"pentagonalResolutionParameterJ",1671}, - {""}, - {"extractDateTimeYearEnd",826}, - {""}, {""}, {""}, - {"dateOfSSTFieldUsed",654}, - {"windDirectionTrend1",2383}, - {""}, - {"dayOfTheYearDate",665}, - {""}, {""}, {""}, - {"windVariableDirectionTrend1",2404}, + {"sourceOfGridDefinition",2121}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"scaledValueOfDistanceFromEnsembleMean",1917}, - {""}, {""}, {""}, {""}, {""}, - {"typeOfSSTFieldUsed",2267}, - {"md5Product",1266}, - {""}, - {"endMonthTrend2",750}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"qfeUnits",1748}, - {""}, {""}, {""}, {""}, - {"isectionNumber2",1031}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"unpackedError",2307}, - {""}, {""}, {""}, - {"section3Pointer",1991}, - {""}, {""}, {""}, - {"hourOfModelVersion",949}, - {""}, {""}, {""}, - {"numberOfDataBinsAlongRadials",1393}, - {""}, {""}, {""}, {""}, {""}, - {"experimentVersionNumber",791}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"longitudeOfTangencyPoint",1197}, - {""}, {""}, {""}, {""}, - {"correction2",610}, + {"P_INST",217}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section1Pointer",1982}, - {""}, {""}, - {"paramIdECMF",1648}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfCodedValues",1385}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"marsStream2",1243}, + {"preBitmapValues",1714}, {""}, {""}, {""}, {""}, - {"runwaySideCodeState3",1883}, - {"Product_Identifier",218}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"DayOfModelVersion",29}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"pentagonalResolutionParameterK",1672}, + {"centralLongitudeInMicrodegrees",403}, {""}, {""}, - {"rootGroupObjectHeaderAddress",1827}, - {""}, - {"PVPresent",214}, - {""}, {""}, {""}, - {"P2",211}, - {""}, {""}, - {"definitionFilesVersion",680}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"FMULTM",66}, + {"windVariableDirectionTrend4",2461}, {""}, {""}, - {"longitudeOfCentralPointInClusterDomain",1175}, - {"marsKeywords1",1229}, - {""}, - {"ZLMULT",285}, - {"xCoordinateOfOriginOfSectorImage",2409}, - {"templatesMasterDir",2179}, - {""}, {""}, {""}, - {"packingError",1573}, + {"firstMonthUsedToBuildClimateMonth2",864}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"runwayFrictionCoefficientState4",1904}, {""}, - {"localLongitude2",1155}, + {"numberIncludedInAverage",1384}, {""}, {""}, {""}, {""}, {""}, {""}, - {"originatingCentreOfAnalysis",1565}, - {""}, {""}, {""}, - {"extractDateTimeHourEnd",813}, + {"versionNumberOfExperimentalSuite",2404}, {""}, {""}, {""}, {""}, {""}, - {"runwaySideCodeState1",1881}, + {"missingValueManagement",1322}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"stepUnits",2174}, {""}, {""}, {""}, - {"backgroundGeneratingProcessIdentifier",327}, + {"verticalVisibilityCoded",2413}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"maxLevelValue",1273}, {""}, - {"verticalVisibilityCoded",2362}, + {"NrInRadiusOfEarthScaled",202}, + {"endDayTrend2",739}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"offsetSection7",1550}, + {""}, {""}, + {"TIDE",236}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayDepositState3",1843}, + {"N2",173}, + {""}, + {"jScansNegatively",1050}, + {"componentIndex",564}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"falseEasting",845}, - {"unstructuredGrid",2311}, - {"************_EXPERIMENT_************",2}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"codedNumberOfFirstOrderPackedValues",554}, - {""}, {""}, {""}, {""}, - {"pentagonalResolutionParameterM",1673}, - {""}, {""}, {""}, - {"Total_Number_Members_Used",256}, - {"tiggeLocalVersion",2192}, - {""}, {""}, - {"numberOfUnexpandedDescriptors",1474}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"reservedSection2",1839}, + {""}, + {"secondaryMissingValue",2007}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"deletePV",684}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"runwayDepositState4",1868}, + {""}, {""}, + {"extractedAreaNumberOfSubsets",837}, {""}, - {"unstructuredGridType",2313}, - {"coordinateFlag1",598}, + {"extractDateTimeYearStart",832}, + {""}, {""}, {""}, {""}, {""}, + {"flagForAnyFurtherInformation",868}, {""}, - {"scaledValueOfLengthOfSemiMinorAxis",1925}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfClusterLowResolution",1383}, - {"oneMinuteMeanMaximumRVR4",1541}, + {"windDirectionTrend3",2439}, {""}, - {"dayOfForecastUsedInLocalTime",662}, + {"selectedHour",2084}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayDepositState1",1841}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"coordAveragingTims",585}, + {"firstMonthUsedToBuildClimateMonth1",863}, {""}, {""}, - {"section6Length",2003}, - {""}, {""}, {""}, {""}, - {"coordinate2Start",591}, - {""}, {""}, {""}, {""}, - {"rdb_key",1770}, - {""}, {""}, - {"beginDayTrend4",339}, - {""}, - {"probabilityType",1726}, + {"baseTimeEPS",336}, + {"is_ocean3d_param",1035}, {""}, {""}, - {"heightPressureEtcOfLevels",937}, + {"NrInRadiusOfEarth",201}, {""}, {""}, - {"latitudeOfNorthWestCornerOfArea",1077}, + {"unstructuredGridSubtype",2363}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"is_ocean2d_param",1034}, + {""}, {""}, {""}, + {"windDirectionTrend2",2438}, {""}, {""}, {""}, {""}, - {"rootTablesDir",1829}, - {""}, - {"numberOfUsedTileAttributes",1477}, - {"localTablesVersion",1162}, - {"coordAveraging0",581}, + {"X1",266}, + {"upperThresholdValue",2371}, {""}, {""}, {""}, - {"qnhAPresent",1750}, - {"conceptsDir2",567}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"dateOfIceFieldUsed",651}, - {""}, - {"masterTablesVersionNumberLatest",1252}, - {""}, - {"P_INST",215}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"biFourierResolutionParameterN",360}, - {"subDefinitions1",2141}, + {"forecastOrSingularVectorNumber",877}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"verificationYear",2398}, {""}, {""}, {""}, {""}, {""}, - {"runwayFrictionCoefficientState3",1879}, - {""}, {""}, {""}, - {"numberOfStepsUsedForClustering",1468}, + {"windVariableDirectionTrend3",2460}, {""}, {""}, - {"Total_Number_Members_Possible",255}, + {"windSpeedTrend1",2448}, + {""}, {""}, + {"normAtFinalTime",1364}, + {"jScansPositively",1051}, {""}, {""}, {""}, - {"dataSubCategory",641}, - {"endDayTrend2",735}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"runwayFrictionCoefficientState3",1903}, {""}, {""}, - {"probabilityTypeName",1727}, + {"windUnits",2452}, {""}, {""}, {""}, {""}, {""}, {""}, - {"extractDateTimeStart",825}, - {"yCoordinateOfSubSatellitePoint",2417}, - {"cloudsTitle1Trend3",517}, + {"windVariableDirectionTrend2",2459}, {""}, - {"runwayFrictionCoefficientState1",1877}, - {""}, {""}, - {"longitudeOfReferencePointInDegrees",1189}, - {"localFlagLatestVersion",1148}, - {""}, {""}, - {"numberOfClusterHighResolution",1382}, + {"latitudeOfSubSatellitePoint",1092}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"runwayFrictionCoefficientState2",1902}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"Model_Identifier",168}, {""}, {""}, - {"extractDateTimeMinuteEnd",816}, - {"changeIndicatorTrend4",422}, - {""}, {""}, {""}, - {"extractDateTimeSecondEnd",822}, + {"unpackedError",2358}, + {"tsectionNumber3",2282}, + {"secondaryBitMap",2001}, {""}, - {"Latin2InDegrees",117}, + {"wrongPadding",2462}, {""}, {""}, - {"numberOfPointsInDomain",1453}, - {"NUT",189}, + {"isectionNumber3",1038}, + {"observationType",1514}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"P2",213}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"runwaySideCodeState3",1907}, {""}, - {"extractedAreaNumberOfSubsets",833}, - {""}, {""}, - {"scaledValueOfPrimeMeridianOffset",1929}, - {"extractDateTimeMinuteStart",818}, - {""}, {""}, {""}, - {"cloudsTitle2",519}, - {"extractDateTimeSecondStart",824}, - {"cloudsTitle1Trend1",515}, + {"packingError",1596}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"presentTrend4",1725}, + {"patch_precip_fp",1693}, + {"default_step_units",683}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"extractDateTimeMonthEnd",819}, - {""}, {""}, {""}, {""}, {""}, - {"qualityControlIndicator",1754}, {""}, {""}, - {"numberOfCoefficientsOrValuesUsedToSpecifyFirstDimensionCoordinateFunction",1386}, - {"numberOfCoefficientsOrValuesUsedToSpecifySecondDimensionCoordinateFunction",1387}, - {""}, {""}, - {"versionNumOfSharedHeaderMessageFormat",2352}, - {"extractDateTimeMonthStart",821}, - {""}, {""}, {""}, {""}, - {"longitudeOfTheSouthernPoleOfProjection",1201}, + {"doExtractSubsets",710}, + {"isectionNumber2",1037}, {""}, {""}, {""}, - {"md5Headers",1265}, - {""}, {""}, {""}, - {"southEastLatitudeOfLPOArea",2083}, - {""}, {""}, {""}, {""}, {""}, - {"sizeOfLength",2073}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"resolutionAndComponentFlags7",1824}, + {"extractDateTimeHourStart",819}, {""}, {""}, - {"oneMinuteMeanMaximumRVR2",1539}, - {"dateOfForecastUsedInLocalTime",650}, - {"satelliteID",1887}, - {""}, - {"yearOfForecastUsedInLocalTime",2428}, + {"remarkPresent",1828}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"timeOfForecastUsedInLocalTime",2208}, + {"runwaySideCodeState2",1906}, {""}, - {"changeIndicatorTrend2",420}, - {""}, {""}, {""}, - {"preBitmapValues",1691}, + {"subDefinitions2",2183}, + {""}, + {"section3Flags",2028}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"typicalMonth",2330}, + {"typeOfTimeIncrementBetweenSuccessiveFieldsUsedInTheStatisticalProcessing",2319}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"beginDayTrend2",337}, {""}, {""}, - {"easternLongitudeOfClusterDomain",723}, - {""}, {""}, {""}, {""}, - {"subLocalDefinitionLength2",2146}, + {"scaledValueOfPrimeMeridianOffset",1963}, + {"southEastLongitudeOfVerficationArea",2126}, + {"reflectivityCalibrationConstant",1827}, + {"gaussianGridName",896}, + {"formatVersionMinorNumber",886}, + {"xCoordinateOfSubSatellitePoint",2464}, + {""}, {""}, {""}, + {"experimentVersionNumber",795}, + {""}, {""}, {""}, + {"longitudeOfSouthEastCornerOfArea",1202}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"N1",172}, + {"GDSPresent",68}, {""}, {""}, {""}, {""}, - {"beginMinuteTrend4",347}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"lowerThresholdValue",1221}, + {"coordAveragingTims",588}, + {""}, + {"windVariableDirectionTrend1",2458}, {""}, {""}, {""}, - {"longitudeOfThePoleOfStretching",1198}, + {"baseDateEPS",334}, + {""}, + {"scaledValueOfDistanceFromEnsembleMean",1950}, {""}, {""}, - {"numberOfUsedSpatialTiles",1476}, + {"numberOfClusterLowResolution",1400}, + {""}, + {"runwayFrictionCoefficientState1",1901}, {""}, {""}, - {"coordinate2End",589}, + {"getNumberOfValues",903}, {""}, - {"identificationOfOriginatingGeneratingCentre",963}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"pressureUnits",1742}, + {""}, {""}, {""}, + {"numberOfBytesPerInteger",1395}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"section_10",2071}, + {""}, {""}, {""}, + {"totalNumberOfWaveDirections",2274}, + {""}, {""}, + {"satelliteID",1912}, + {""}, {""}, + {"originatingCentreOfAnalysis",1588}, + {""}, {""}, + {"spaceUnitFlag",2135}, {""}, - {"latitudeOfSubSatellitePoint",1085}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"extractAreaEastLongitude",803}, + {"mBasicAngle",1227}, + {""}, {""}, {""}, + {"unitOfTimeRange",2345}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"numberInMixedCoordinateDefinition",1381}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"totalNumberOfWaveFrequencies",2275}, + {""}, {""}, + {"crraSuiteID",628}, + {""}, + {"heightPressureEtcOfLevels",941}, + {""}, + {"packedValues",1595}, + {"numberOfPointsAlongXAxis",1467}, + {""}, {""}, + {"MinuteOfModelVersion",159}, + {""}, + {"dateOfModelVersion",655}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"coordinateFlag2",602}, + {"timeOfModelVersion",2250}, + {""}, + {"windDirectionTrend1",2437}, + {""}, {""}, + {"rdbtimeMonth",1799}, + {""}, {""}, {""}, {""}, + {"swapScanningX",2200}, + {""}, {""}, {""}, {""}, {""}, + {"section1Flags",2019}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"jDirectionIncrementInDegrees",1047}, + {""}, + {"typeOfReferenceDataset",2310}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"backgroundGeneratingProcessIdentifier",330}, + {""}, + {"oceanAtmosphereCoupling",1517}, + {""}, {""}, {""}, {""}, {""}, + {"longitudeOfThePolePoint",1211}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"DjInMetres",37}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"runwayDepositState3",1867}, + {"dateSSTFieldUsed",658}, + {""}, + {"localTablesVersionNumber",1175}, + {""}, + {"_leg_number",292}, + {""}, {""}, {""}, {""}, {""}, + {"tsectionNumber5",2284}, + {""}, {""}, {""}, + {"sizeOfLength",2113}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"P1",212}, + {""}, {""}, {""}, + {"offsetEndSection4",1536}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"totalNumberOfClusters",2262}, + {""}, {""}, {""}, {""}, {""}, + {"runwayDepositState2",1866}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"subLocalDefinition2",2185}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"clusteringDomain",550}, + {""}, {""}, + {"endOfHeadersMarker",758}, + {""}, + {"numberOfClusterHighResolution",1399}, + {""}, + {"runwaySideCodeState1",1905}, + {"marsKeywords1",1241}, + {"subDefinitions1",2182}, + {""}, {""}, + {"numberOfBytesInLocalDefinition",1393}, + {""}, {""}, + {"longitudeOfReferencePoint",1200}, + {"xCoordinateOfOriginOfSectorImage",2463}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"integerPointValues",1001}, + {""}, + {"easternLongitudeOfClusterDomain",727}, + {"azimuthalWidth",329}, + {""}, {""}, {""}, + {"coordinate1End",589}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"latitudeOfTangencyPoint",1094}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"longitudeLastInDegrees",1186}, + {""}, {""}, {""}, {""}, + {"MonthOfModelVersion",170}, + {""}, + {"doExtractArea",708}, + {""}, {""}, {""}, + {"latitudeOfLastGridPoint",1082}, + {""}, + {"produceLargeConstantFields",1752}, + {""}, {""}, + {"deleteLocalDefinition",687}, + {"yearOfModelVersion",2483}, + {""}, {""}, {""}, {""}, + {"latitudeFirstInDegrees",1072}, + {""}, + {"numberOfControlForecastTube",1408}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"startDateOfReferencePeriod",2153}, + {""}, {""}, {""}, {""}, + {"northWestLatitudeOfVerficationArea",1370}, + {""}, {""}, {""}, + {"presentTrend3",1724}, + {""}, {""}, {""}, + {"cloudsTitle1Trend4",521}, + {""}, {""}, {""}, {""}, + {"numberOfWaveFrequencySequenceParameters",1507}, + {""}, {""}, {""}, + {"secondaryMissingValueSubstitute",2008}, + {""}, {""}, + {"AA",6}, + {""}, {""}, + {"hourOfModelVersion",953}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"endGridDefinition",743}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"secondaryBitmapsSize",2006}, + {""}, + {"presentTrend2",1723}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"kindOfProduct",1059}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"matrixBitmapsPresent",1270}, + {"southPoleOnProjectionPlane",2129}, + {"Product_Identifier",220}, + {"coordinateFlag1",601}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"timeIncrementBetweenSuccessiveFields",2246}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"inputShortDelayedDescriptorReplicationFactor",997}, {""}, {""}, {""}, {""}, {""}, - {"PUnset",213}, + {"INBITS",89}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"nameECMF",1354}, + {""}, {""}, {""}, + {"scaleFactorOfCentralWaveNumber",1918}, + {""}, {""}, {""}, + {"bufrdcExpandedDescriptors",383}, + {""}, {""}, {""}, {""}, + {"modelErrorType",1330}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"scaledValueOfAdditionalParameterForReferencePeriod",1948}, + {"section11Pointer",2018}, + {""}, {""}, {""}, {""}, + {"dayOfModelVersion",666}, {""}, {""}, {""}, {""}, {""}, - {"runwayDesignatorState4",1860}, + {"cloudsTitle3Trend4",531}, + {""}, {""}, {""}, + {"westernLongitudeOfClusterDomain",2430}, + {""}, + {"accuracyMultipliedByFactor",296}, + {""}, {""}, {""}, {""}, + {"mixedCoordinateFieldFlag",1327}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"matchAerosolBinNumber",1265}, + {""}, + {"NUT",191}, + {""}, + {"typeOfPacking",2306}, + {""}, {""}, {""}, + {"northWestLatitudeOfLPOArea",1369}, + {""}, {""}, {""}, {""}, + {"runwayDepositState1",1865}, + {"realPartOf00",1804}, + {"cfVarNameECMF",419}, + {""}, {""}, + {"unitsECMF",2351}, + {""}, {""}, + {"iDirectionIncrementGiven",960}, + {""}, {""}, {""}, + {"subLocalDefinition1",2184}, + {""}, {""}, + {"subLocalDefinitionLength2",2187}, + {""}, {""}, {""}, {""}, {""}, + {"md5Headers",1278}, + {"cavokOrVisibility",389}, + {""}, {""}, + {"coordAveraging0",584}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsTitle1Trend3",520}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"endMinuteTrend4",752}, + {""}, {""}, {""}, {""}, + {"offsetFromReferenceOfFirstTime",1539}, + {"nameLegacyECMF",1355}, + {""}, {""}, {""}, {""}, {""}, + {"cloudsTitle1Trend2",519}, + {"clusterMember4",542}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"qualityControlIndicator",1777}, + {""}, {""}, + {"scaledValueOfLengthOfSemiMinorAxis",1958}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"numberOfBytesOfFreeFormatData",1394}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"PUnset",215}, + {""}, {""}, {""}, {""}, + {"scanningMode4",1979}, + {""}, {""}, {""}, {""}, + {"offsetValuesBy",1554}, + {""}, {""}, + {"coordinate2End",592}, + {""}, {""}, {""}, + {"endStepInHours",764}, + {""}, + {"Dj",34}, + {""}, {""}, {""}, {""}, + {"numberOfWaveDirectionSequenceParameters",1504}, + {""}, + {"numberMissingFromAveragesOrAccumulations",1385}, + {""}, {""}, {""}, {""}, + {"referenceForGroupWidths",1818}, + {""}, {""}, {""}, + {"offsetICEFieldsUsed",1540}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"totalAerosolBinsNumbers",2258}, + {""}, + {"alternativeRowScanning",306}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"presentTrend1",1722}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"typeOfProcessedData",2309}, + {""}, + {"cloudsTitle3Trend3",530}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"cloudsTitle2Trend4",526}, + {"dataSubCategory",644}, + {"scaledValuesOfWaveFrequencies",1975}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"ls_labeling",1222}, + {"cloudsTitle3Trend2",529}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"unexpandedDescriptors",2340}, + {""}, + {"physicalMeaningOfVerticalCoordinate",1705}, + {"cloudsTitle1Trend1",518}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"flagShowingPostAuxiliaryArrayInUse",871}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"METARstr",157}, + {""}, {""}, {""}, + {"Ensemble_Identifier",51}, + {""}, {""}, + {"DayOfModelVersion",29}, + {""}, {""}, + {"extractDateTimeMinuteEnd",820}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"crraSuiteID",625}, + {"extractDateTimeMinuteStart",822}, {""}, {""}, {""}, {""}, {""}, - {"upperThresholdValue",2320}, - {"unexpandedDescriptors",2289}, + {"cloudsTitle4Trend4",536}, + {""}, {""}, {""}, + {"templatesMasterDir",2220}, + {""}, {""}, {""}, {""}, + {"unexpandedDescriptorsEncoded",2341}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"baseTimeEPS",333}, + {"unstructuredGridUUID",2365}, {""}, - {"Total_Number_Members_Missing",254}, + {"dateOfSSTFieldUsed",657}, {""}, - {"cfNameECMF",413}, + {"scaledValuesOfWaveDirections",1974}, {""}, {""}, - {"produceLargeConstantFields",1729}, - {"beginMinuteTrend2",345}, + {"iDirectionIncrementGridLength",961}, + {""}, {""}, + {"referenceForGroupLengths",1817}, + {""}, {""}, {""}, + {"subLocalDefinitionLength1",2186}, + {""}, {""}, + {"monthlyVerificationYear",1347}, + {""}, {""}, {""}, {""}, + {"expandedCrex_scales",784}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"latitudeOfSubSatellitePointInDegrees",1093}, + {"clusterMember6",544}, + {""}, {""}, {""}, {""}, {""}, + {"variationOfVisibilityTrend4",2394}, + {""}, {""}, + {"cloudsTitle3Trend1",528}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"extractDateTimeMonthEnd",823}, + {""}, {""}, {""}, {""}, {""}, + {"scaledValueOfWaveDirectionSequenceParameter",1972}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"extractDateTimeMonthStart",825}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"jPointsAreConsecutive",1049}, + {"scanningMode6",1981}, + {""}, {""}, {""}, {""}, + {"expandedCrex_units",785}, + {""}, {""}, + {"cloudsTitle2Trend3",525}, + {""}, {""}, + {"codedNumberOfGroups",558}, + {"latitudeWhereDxAndDyAreSpecified",1100}, + {""}, + {"mask",1260}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"longitudeOfSouthernPole",1203}, + {""}, {""}, {""}, + {"falseEasting",849}, + {""}, {""}, + {"latitudeWhereDxAndDyAreSpecifiedInDegrees",1101}, + {"cloudsTitle2Trend2",524}, + {""}, {""}, {""}, {""}, {""}, + {"scaleFactorOfUpperLimit",1939}, + {""}, {""}, {""}, + {"variationOfVisibilityDirectionTrend4",2390}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"numberOfContributingSpectralBands",1407}, + {""}, {""}, {""}, {"HDF5str",81}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"qfeUnits",1771}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"endMinuteTrend3",751}, + {""}, {""}, + {"section9UniqueIdentifier",2056}, + {""}, {""}, {""}, {""}, {""}, + {"pack",1594}, + {"localLatitude2",1164}, + {""}, {""}, + {"clusterMember3",541}, + {""}, {""}, + {"scaledValueOfSecondWavelength",1967}, + {""}, {""}, {""}, + {"cloudsTitle4Trend3",535}, + {""}, {""}, {""}, + {"section8UniqueIdentifier",2053}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"uuidOfVGrid",2379}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsTitle4Trend2",534}, + {"endMinuteTrend2",750}, + {"offsetFromOriginToInnerBound",1538}, + {""}, + {"thisExperimentVersionNumber",2223}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"clusterMember2",540}, + {""}, + {"dayOfForecastUsedInLocalTime",665}, + {""}, + {"parameterUnits",1682}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"totalNumberOfGridPoints",2267}, + {""}, + {"offsetAfterData",1524}, + {""}, {""}, + {"typeOfSSTFieldUsed",2312}, + {""}, {""}, {""}, + {"unpack",2357}, + {"paramIdLegacyECMF",1672}, + {""}, {""}, {""}, {""}, {""}, + {"variationOfVisibilityTrend3",2393}, + {""}, {""}, {""}, + {"rdb_key",1793}, + {"Model_Additional_Information",167}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsTitle2Trend1",523}, + {""}, {""}, {""}, {""}, {""}, + {"numberOfUnexpandedDescriptors",1493}, + {"variationOfVisibilityTrend2",2392}, + {""}, {""}, + {"expandedCrex_widths",786}, + {"beginDayTrend4",342}, + {""}, + {"qnhUnits",1775}, + {""}, + {"numberOfStepsUsedForClustering",1487}, + {""}, + {"numberOfPointsAlongXAxisInCouplingArea",1468}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"scaledValueOfWaveFrequencySequenceParameter",1973}, + {""}, + {"Latin2InDegrees",117}, + {""}, + {"numberOfGroups",1437}, + {"changeIndicatorTrend4",425}, + {""}, + {"numberOfUsedTileAttributes",1496}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"subLocalDefinitionNumber2",2189}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"param_value_max",1673}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"indexingTimeMM",983}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"variationOfVisibilityDirectionTrend3",2389}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"gts_TTAAii",933}, + {""}, {""}, + {"Nj",199}, {""}, {""}, - {"biFourierResolutionSubSetParameterN",362}, + {"cloudsTitle4Trend1",533}, + {""}, {""}, + {"variationOfVisibilityDirectionTrend2",2388}, {""}, - {"section7UniqueIdentifier",2009}, + {"numberOfUsedSpatialTiles",1495}, + {""}, {""}, {""}, {""}, + {"numberOfBitsForScaledGroupLengths",1390}, + {""}, {""}, {""}, {""}, {""}, + {"countOfICEFieldsUsed",621}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"northWestLongitudeOfVerficationArea",1372}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"recentWeather",1806}, + {"unpackedValues",2360}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"localLongitude2",1167}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"NrInRadiusOfEarthScaled",200}, + {"tempPressureUnits",2216}, + {""}, + {"commonBlock",562}, + {"variationOfVisibilityTrend1",2391}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"section_4",2075}, + {""}, {""}, {""}, {""}, {""}, + {"typeOfWaveFrequencySequence",2321}, + {""}, + {"marsClass2",1231}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Latin1InDegrees",115}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"section4Length",2034}, + {""}, {""}, + {"cloudsCode3",507}, {""}, {""}, {""}, {""}, - {"countOfICEFieldsUsed",618}, + {"WRAPstr",265}, + {""}, {""}, {""}, {""}, {""}, + {"localLatitude1",1163}, {""}, {""}, {""}, - {"hourOfForecastUsedInLocalTime",948}, - {"referenceForGroupWidths",1795}, + {"offsetBBitmap",1527}, + {"clusterMember5",543}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"cloudsCode1",497}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"endMinuteTrend1",749}, + {""}, + {"variationOfVisibilityDirectionTrend1",2387}, + {""}, {""}, + {"changeIndicatorTrend3",424}, + {""}, {""}, + {"************_PRODUCT_***************",3}, + {""}, {""}, {""}, {""}, + {"clusterMember1",538}, + {""}, {""}, + {"section11Length",2017}, + {""}, {""}, {""}, {""}, + {"scanningMode5",1980}, + {""}, {""}, {""}, + {"visibilityInKilometresTrend4",2418}, + {"changeIndicatorTrend2",423}, + {""}, {""}, + {"localUsePresent",1179}, + {""}, {""}, + {"numberOfMissingValues",1450}, + {""}, {""}, {""}, + {"extractAreaNorthLatitude",810}, + {""}, {""}, {""}, + {"scaledValueOfFirstWavelength",1956}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"theHindcastMarsStream",2221}, + {"cfNameECMF",416}, + {"cloudsCode4",512}, + {""}, {""}, {""}, {""}, {""}, + {"secondOfStartOfReferencePeriod",1996}, + {"YRInMetres",280}, {""}, - {"gribTablesVersionNo",910}, + {"minuteOfStartOfReferencePeriod",1317}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"METAR",156}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"section6Length",2043}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"numberOfGridInReference",1435}, + {"subLocalDefinitionNumber1",2188}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"latitudeOfReferencePoint",1085}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"numberOfGroupsOfDataValues",1438}, + {""}, {""}, + {"clusterMember7",545}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"postAuxiliaryArrayPresent",1711}, + {""}, {""}, + {"section3Length",2029}, + {""}, + {"ceilingAndVisibilityOK",395}, + {""}, {""}, {""}, {""}, {""}, + {"numberOfRadarSitesUsed",1474}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"changeIndicatorTrend1",422}, + {""}, {""}, {""}, {""}, {""}, + {"section2Length",2023}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"beginDayTrend3",341}, + {""}, {""}, {""}, {""}, + {"longitudeOfThePolePointInDegrees",1212}, + {"runwayFrictionCodeValueState4",1896}, + {"cloudsCode2",502}, + {"localLongitude1",1166}, + {""}, + {"scanningMode7",1982}, + {"section_6",2077}, + {""}, + {"ITERATOR",91}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"longitudeOfReferencePointInDegrees",1201}, + {""}, {""}, {""}, {""}, {""}, + {"firstLatitudeInDegrees",862}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"marsClass1",1230}, + {"numberOfDataPointsExpected",1413}, + {""}, + {"beginDayTrend2",340}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"dateOfForecastUsedInLocalTime",653}, + {"md5Section3",1283}, + {"Sub-Experiment_Identifier",233}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"timeOfForecastUsedInLocalTime",2249}, + {""}, {""}, {""}, + {"section_04",2064}, + {""}, {""}, {""}, {""}, + {"expandedUnits",794}, + {""}, {""}, {""}, {""}, {""}, + {"offsetBeforeBitmap",1531}, + {""}, {""}, {""}, {""}, {""}, + {"md5Section1",1280}, + {""}, {""}, {""}, {""}, + {"numberOfPointsAlongAMeridian",1461}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"extractDateTimeStart",829}, + {""}, {""}, {""}, {""}, + {"eastLongitudeOfDomainOfTubing",726}, + {""}, {""}, {""}, {""}, {""}, + {"runwayDesignatorState4",1884}, + {""}, + {"section5Length",2039}, + {""}, + {"ZLMULT",287}, + {""}, {""}, {""}, + {"extractDateTimeSecondEnd",826}, + {"runwayDepthOfDepositCodeState4",1872}, + {""}, {""}, {""}, {""}, {""}, + {"gribMasterTablesVersionNumber",913}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"section1Length",2020}, + {"dateOfIceFieldUsed",654}, + {""}, + {"extractDateTimeSecondStart",828}, + {""}, {""}, {""}, {""}, + {"numberOfSecondOrderPackedValues",1482}, + {""}, + {"section_3",2074}, + {""}, + {"latitudeOfLastGridPointInDegrees",1083}, + {""}, {""}, + {"md5Section4",1284}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"md5GridSection",1277}, + {""}, {""}, {""}, + {"numberOfPointsAlongSecondAxis",1464}, + {""}, + {"earthMajorAxisInMetres",722}, + {""}, {""}, {""}, {""}, {""}, + {"meanRVR4",1295}, + {""}, {""}, {""}, + {"section_2",2073}, + {""}, {""}, {""}, {""}, + {"northLatitudeOfDomainOfTubing",1368}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"integerPointValues",995}, + {"section7Length",2047}, + {""}, {""}, {""}, {""}, + {"runwayFrictionCodeValueState3",1895}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"scaleFactorOfLowerWavePeriodLimit",1929}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"runwayFrictionCodeValueState2",1894}, + {""}, + {"scaleFactorOfMajorAxisOfOblateSpheroidEarth",1930}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"visibilityInKilometresTrend3",2417}, + {"md5Section10",1281}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"disableGrib1LocalSection",703}, + {""}, + {"yearOfForecastUsedInLocalTime",2482}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"southLatitudeOfDomainOfTubing",2128}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"visibilityInKilometresTrend2",2416}, + {"md5Section2",1282}, + {""}, + {"runwayFrictionCoefficientCodeState4",1900}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"hourOfForecastUsedInLocalTime",952}, + {""}, {""}, + {"NRj",189}, + {"widthOfWidths",2435}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"runwayDesignatorState3",1883}, + {"westLongitudeOfDomainOfTubing",2429}, + {""}, {""}, {""}, + {"NB",175}, + {"scaleFactorOfLengthOfSemiMajorAxis",1926}, + {""}, {""}, + {"runwayDepthOfDepositCodeState3",1871}, + {""}, {""}, {""}, {""}, + {"beginDayTrend1",339}, + {""}, {""}, {""}, {""}, {""}, + {"section_06",2066}, + {"runwayDesignatorState2",1882}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"wrongPadding",2408}, + {"runwayDepthOfDepositCodeState2",1870}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"numberOfPointsAlongAParallel",1462}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"baseDateEPS",331}, + {"runwayFrictionCodeValueState1",1893}, + {""}, {""}, {""}, {""}, {""}, + {"addEmptySection2",297}, + {""}, + {"endMonthTrend4",756}, + {""}, + {"versionNumOfSharedHeaderMessageFormat",2403}, + {"extractDateTimeYearEnd",830}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"NC2",178}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"section_5",2076}, + {"probProductDefinition",1748}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"numberOfSingularVectorsComputed",1484}, + {""}, {""}, {""}, + {"pentagonalResolutionParameterK",1695}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"section_03",2063}, {""}, {""}, {""}, {""}, - {"unexpandedDescriptorsEncoded",2290}, + {"section_1",2070}, + {""}, {""}, {""}, + {"runwayDesignatorState1",1881}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_sec1_loc",1662}, + {""}, + {"runwayDepthOfDepositCodeState1",1869}, + {""}, + {"runwayFrictionCoefficientCodeState3",1899}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"legacyGaussSubarea",1110}, + {"runwayDepositCodeState4",1864}, + {"runwayFrictionCoefficientCodeState2",1898}, + {"section_02",2062}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"extractAreaEastLongitude",807}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"generalExtended2ordr",898}, {""}, {""}, {""}, {""}, - {"NrInRadiusOfEarth",199}, + {"recentWeatherTry",1807}, + {""}, + {"SOH",226}, + {""}, {""}, {""}, + {"extractDateTimeHourEnd",817}, + {""}, {""}, + {"Original_Parameter_Identifier",210}, + {""}, {""}, {""}, {""}, + {"listMembersUsed3",1138}, + {""}, {""}, {""}, {""}, + {"checkInternalVersion",431}, + {""}, {""}, {""}, {""}, {""}, + {"visibilityInKilometresTrend1",2415}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayDesignatorState2",1858}, - {"presentTrend3",1701}, + {"numberOfHorizontalPoints",1439}, + {""}, + {"meanRVR3",1294}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"totalNumberOfValuesInUnpackedSubset",2232}, + {"listOfWaveFrequencySequenceParameters",1147}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"section_7",2078}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"southEastLongitudeOfLPOArea",2125}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"meanRVR2",1293}, + {""}, + {"baseTimeOfThisLeg",337}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"NEAREST",180}, + {""}, {""}, {""}, {""}, + {"offsetSection11",1544}, + {""}, {""}, + {"typeOfWavelengthInterval",2323}, + {"runwayFrictionCoefficientCodeState1",1897}, + {"swapScanningAlternativeRows",2197}, + {""}, {""}, + {"listMembersUsed4",1139}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"listMembersMissing4",1135}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"horizontalDomainTemplate",946}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"NC1",177}, + {""}, {""}, {""}, {""}, {""}, + {"flagForNormalOrStaggeredGrid",870}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"observationDiagnostic",1512}, + {"paramIdECMF",1671}, + {""}, + {"spacingOfBinsAlongRadials",2136}, + {"WRAP",264}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"longitudeOfSouthernPoleInDegrees",1204}, + {""}, {""}, {""}, + {"numberOfReforecastYearsInModelClimate",1477}, + {""}, {""}, {""}, {""}, {""}, + {"section_05",2065}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"radiusOfTheEarth",1787}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"endMonthTrend3",755}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"listMembersUsed2",1137}, + {""}, {""}, {""}, + {"section_01",2061}, + {""}, + {"cloudsAbbreviation4",452}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"horizontalDimensionProcessed",945}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"endMonthTrend2",754}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"experimentVersionNumberOfAnalysis",798}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"baseDateOfThisLeg",335}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"isRotatedGrid",1018}, + {"cloudsBaseCoded1Trend4",481}, {""}, {""}, - {"latitudeFirstInDegrees",1065}, + {"scaledValueOfCentralWaveNumber",1949}, + {""}, + {"pentagonalResolutionParameterJ",1694}, + {""}, {""}, {""}, + {"beginMinuteTrend4",350}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"DjGiven",35}, + {""}, {""}, {""}, {""}, {""}, + {"latitudeOfReferencePointInDegrees",1086}, + {""}, + {"latitudeOfThePolePoint",1096}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"inputOverriddenReferenceValues",995}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"section2Used",2027}, + {""}, {""}, + {"runwayDepositCodeState3",1863}, + {""}, {""}, + {"meanRVR1",1292}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"section_07",2067}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"typeOfGeneratingProcess",2298}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"sourceOfGridDefinition",2081}, + {"runwayDepositCodeState2",1862}, + {""}, + {"numberOfSingularVectorsEvolved",1485}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"lengthOf4DvarWindow",1113}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsBaseCoded3Trend4",491}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"subdivisionsOfBasicAngle",2194}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsBase3",467}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"cloudsBase1",457}, + {"cloudsBaseCoded1Trend3",480}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"beginMinuteTrend3",349}, + {""}, {""}, {""}, {""}, {""}, + {"numberOfPressureLevelsUsedForClustering",1473}, + {""}, {""}, {""}, {""}, {""}, + {"cloudsBaseCoded1Trend2",479}, {""}, - {"westernLongitudeOfClusterDomain",2376}, - {"numberOfControlForecastTube",1391}, + {"endMark",748}, + {"listMembersMissing3",1134}, + {""}, {""}, {""}, {""}, {""}, + {"beginMinuteTrend2",348}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"NH",183}, + {""}, {""}, + {"endMonthTrend1",753}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsCode3",504}, - {"Local_Number_Members_Used",138}, + {"cloudsBase4",472}, + {""}, + {"listMembersMissing2",1133}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"unusedBitsInBitmap",2366}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"cloudsBaseCoded3",487}, + {""}, {""}, {""}, + {"sourceSinkChemicalPhysicalProcess",2122}, + {"padding_local40_1",1659}, + {""}, {""}, {""}, + {"cloudsBaseCoded3Trend3",490}, + {""}, {""}, {""}, {""}, + {"setBitsPerValue",2091}, + {""}, {""}, {""}, {""}, + {"cloudsAbbreviation3",447}, + {"cloudsBaseCoded2Trend4",486}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsBaseCoded3Trend2",489}, + {"cloudsBaseCoded1",477}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsBaseCoded1Trend1",478}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"beginMinuteTrend1",347}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"runwayDepositCodeState1",1861}, {""}, {""}, {""}, - {"scaleFactorOfMajorAxisOfOblateSpheroidEarth",1903}, + {"cloudsAbbreviation2",442}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"pastTendencyRVR3",1691}, + {""}, {""}, {""}, {""}, + {"cloudsBase2",462}, {""}, {""}, {""}, - {"latitudinalDirectionGridLength",1097}, + {"projTargetString",1762}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"referenceForGroupLengths",1794}, + {"cloudsBaseCoded4",492}, + {""}, {""}, {""}, + {"offsetBeforePV",1534}, {""}, - {"tablesLocalDir",2168}, - {"presentTrend1",1699}, + {"pastTendencyRVR1",1689}, + {""}, {""}, + {"cloudsBaseCoded4Trend4",496}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"resolutionAndComponentFlags4",1846}, {""}, - {"northWestLongitudeOfVerficationArea",1357}, - {"timeIncrementBetweenSuccessiveFields",2205}, + {"offsetBSection6",1529}, + {""}, {""}, + {"latitudeOfThePoleOfStretching",1095}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"projSourceString",1760}, + {""}, {""}, + {"scaledValueOfUpperLimit",1970}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"pastTendencyRVR4",1692}, + {""}, {""}, + {"physicalFlag2",1704}, + {"Ensemble_Combination_Number",50}, + {"cloudsBaseCoded3Trend1",488}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"Y2",277}, + {""}, + {"scaleFactorOfEarthMajorAxis",1921}, + {""}, {""}, {""}, {""}, + {"scaleFactorOfEarthMinorAxis",1922}, + {""}, {""}, {""}, {""}, + {"Total_Number_Members_Used",258}, + {""}, {""}, {""}, {""}, {""}, + {"cloudsBaseCoded2Trend3",485}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"cloudsBaseCoded2",482}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"unstructuredGridSubtype",2312}, + {"cloudsBaseCoded2Trend2",484}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"tiggeSuiteID",2195}, + {"shortNameLegacyECMF",2101}, {""}, {""}, {""}, {""}, - {"modelErrorType",1315}, + {"uuidOfHGrid",2378}, + {""}, {""}, + {"scaleFactorOfMinorAxisOfOblateSpheroidEarth",1931}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"packedValues",1572}, + {"pastTendencyRVR2",1690}, {""}, - {"reservedSection2",1815}, - {"scaleFactorOfUpperLimit",1912}, + {"cloudsBaseCoded4Trend3",495}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"cfNameLegacyECMF",417}, {""}, {""}, {""}, - {"lowerThresholdValue",1209}, + {"Local_Number_Members_Used",138}, {""}, {""}, {""}, {""}, - {"section_3",2034}, + {"typeOfLevelECMF",2304}, {""}, {""}, {""}, - {"marsClass2",1219}, + {"Total_Number_Members_Possible",257}, + {"cloudsBaseCoded4Trend2",494}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"NH",181}, + {"cloudsAbbreviation1",437}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"NC",176}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfContributingSpectralBands",1390}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"extractDateTimeEnd",812}, - {""}, {""}, - {"Local_Number_Members_Possible",134}, - {"verificationYear",2347}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"constantAntennaElevationAngle",579}, + {""}, {""}, {""}, {""}, + {"unitsLegacyECMF",2353}, + {""}, {""}, {""}, {""}, {""}, + {"coordinate3OfFirstGridPoint",596}, {""}, - {"section4Length",1994}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"N1",172}, + {"resolutionAndComponentFlags6",1847}, + {"numberOfPointsUsed",1472}, + {""}, {""}, {""}, + {"cloudsBaseCoded2Trend1",483}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"gribMasterTablesVersionNumber",909}, - {""}, {""}, - {"section_1",2030}, - {"typeOfLevelECMF",2261}, - {"numberOfBytesInLocalDefinition",1376}, - {"unpackedSubsetPrecision",2308}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"scaleFactorOfLengthOfSemiMajorAxis",1900}, + {"hoursAfterReferenceTimeOfDataCutoff",957}, + {"typicalYearOfCentury",2335}, + {""}, {""}, {""}, {""}, {""}, + {"timeUnitFlag",2254}, {""}, {""}, {""}, {""}, {""}, {""}, - {"subLocalDefinition1",2143}, - {""}, {""}, {""}, - {"METAR",156}, - {""}, {""}, {""}, - {"northWestLatitudeOfVerficationArea",1355}, + {"Total_Number_Members_Missing",256}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"section4UniqueIdentifier",2037}, + {"Local_Number_Members_Possible",134}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section_03",2023}, + {"radiusOfClusterDomain",1786}, {""}, {""}, {""}, - {"Latin1InDegrees",115}, - {""}, {""}, {""}, {""}, - {"numberOfHorizontalPoints",1422}, + {"physicalFlag1",1703}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"Original_Parameter_Identifier",208}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"flagShowingPostAuxiliaryArrayInUse",867}, + {""}, {""}, {""}, + {"cloudsBaseCoded4Trend1",493}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Y1",275}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section2Length",1983}, - {""}, {""}, {""}, {""}, {""}, - {"md5Section4",1271}, - {"southPoleOnProjectionPlane",2089}, - {""}, {""}, {""}, {""}, - {"localLatitude1",1151}, + {""}, {""}, + {"CLNOMA",23}, {""}, - {"section_01",2021}, - {"changeIndicatorTrend3",421}, + {"Local_Number_Members_Missing",130}, + {""}, {""}, + {"resolutionAndComponentFlags3",1845}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"DELETE",24}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section2Used",1987}, + {"offsetBSection5",1528}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"endMonthTrend3",751}, - {""}, {""}, {""}, {""}, - {"numberOfBytesOfFreeFormatData",1377}, - {"numberOfDaysInClimateSamplingWindow",1398}, - {"tsectionNumber3",2239}, - {""}, {""}, {""}, {""}, - {"changeIndicatorTrend1",419}, - {"isectionNumber3",1032}, + {"resolutionAndComponentFlags2",1844}, + {""}, {""}, {""}, + {"section6UniqueIdentifier",2045}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"visibilityTrend4",2371}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"section6UniqueIdentifier",2005}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"visibilityInKilometresTrend4",2367}, + {""}, {""}, + {"extractAreaSouthLatitude",811}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"endMonthTrend1",749}, {""}, {""}, {""}, - {"YRInMetres",278}, + {"northWestLongitudeOfLPOArea",1371}, + {""}, {""}, {""}, + {"laplacianScalingFactorUnset",1067}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"clusteringDomain",547}, {""}, - {"longitudeOfSouthEastCornerOfArea",1190}, + {"section3UniqueIdentifier",2032}, + {""}, + {"numberOfPointsAlongFirstAxis",1463}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"beginHourTrend4",346}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"beginYearTrend4",358}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"tempPressureUnits",2175}, + {"coordinate4OfFirstGridPoint",599}, + {""}, {""}, + {"ccsdsCompressionOptionsMask",392}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"typeOfWaveDirectionSequence",2320}, + {""}, {""}, + {"isCavok",1012}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"beginMinuteTrend3",346}, - {""}, {""}, {""}, {""}, - {"xCoordinateOfSubSatellitePoint",2410}, + {"numberOfPointsAlongYAxis",1469}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"pentagonalResolutionParameterM",1696}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"theHindcastMarsStream",2180}, - {""}, {""}, {""}, {""}, - {"YR",277}, - {""}, - {"Local_Number_Members_Missing",130}, + {"visibilityTrend3",2421}, + {"section5UniqueIdentifier",2041}, + {"HDF5",80}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"endGridDefinition",739}, {""}, {""}, {""}, - {"numberOfMissingValues",1432}, + {"typicalYear2",2334}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"visibilityTrend1",2419}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"beginMinuteTrend1",344}, - {""}, {""}, {""}, {""}, - {"unpackedValues",2309}, + {"intervalBetweenTimes",1009}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cavokOrVisibility",386}, + {"resolutionAndComponentFlags1",1843}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"latitudeOfTangencyPoint",1087}, - {""}, - {"localUsePresent",1167}, - {""}, - {"scaleFactorOfEarthMajorAxis",1895}, + {"extractDateTimeEnd",816}, + {""}, {""}, + {"section7UniqueIdentifier",2049}, {""}, {""}, {""}, {""}, - {"scaleFactorOfEarthMinorAxis",1896}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"listMembersUsed2",1127}, - {""}, {""}, {""}, - {"runwayDesignatorState3",1859}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"P1",210}, + {"horizontalDomainTemplateNumber",947}, {""}, {""}, {""}, {""}, - {"matrixBitmapsPresent",1258}, + {"visibilityTrend4",2422}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"unstructuredGridUUID",2314}, - {"Nj",197}, - {""}, {""}, {""}, - {"localLongitude1",1154}, - {"typeOfTimeIncrementBetweenSuccessiveFieldsUsedInTheStatisticalProcessing",2273}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"Date_E4",28}, {""}, - {"runwayDesignatorState1",1857}, + {"uvRelativeToGrid",2380}, + {""}, {""}, {""}, {""}, {""}, + {"sizeOfPostAuxiliaryArray",2115}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"scaledValueOfLowerWavePeriodLimit",1960}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"scaledValueOfMajorAxisOfOblateSpheroidEarth",1961}, {""}, {""}, {""}, {""}, - {"totalNumberOfClusters",2221}, + {"latitudeOfThePolePointInDegrees",1097}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"listMembersMissing4",1125}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"offsetValuesBy",1531}, {""}, {""}, {""}, {""}, - {"latitudeOfSubSatellitePointInDegrees",1086}, + {"jDirectionIncrementGiven",1045}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"resolutionAndComponentFlags6",1823}, - {"visibilityInKilometresTrend2",2365}, - {"beginMonthTrend4",351}, - {""}, {""}, {""}, {""}, {""}, - {"section5Pointer",2000}, - {""}, - {"numberOfDataPointsExpected",1396}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfRadarSitesUsed",1456}, + {"resolutionAndComponentFlags7",1848}, + {""}, {""}, {""}, {""}, + {"ICPLSIZE",87}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfGroups",1420}, - {""}, {""}, {""}, {""}, {""}, - {"physicalFlag2",1681}, - {""}, {""}, - {"Date_E4",28}, + {"presentWeather3Present",1736}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"gts_TTAAii",929}, + {"visibilityTrend2",2420}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"presentWeather2Present",1731}, {""}, {""}, {""}, - {"inputShortDelayedDescriptorReplicationFactor",991}, - {""}, - {"longitudeLastInDegrees",1174}, - {""}, {""}, - {"cloudsBase4",469}, + {"scaledValueOfLengthOfSemiMajorAxis",1957}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"forecastOrSingularVectorNumber",873}, + {"runwayDepthOfDepositState4",1876}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"beginHourTrend3",345}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"numberOfBitsContainingEachPackedValue",1389}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"mBasicAngle",1215}, + {"beginYearTrend3",357}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"beginHourTrend2",344}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsCode1",494}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Threshold_Or_Distribution_Units",247}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfPointsAlongXAxis",1449}, - {""}, {""}, {""}, - {"padding_local40_1",1636}, - {""}, {""}, {""}, {""}, {""}, - {"cloudsBaseCoded4",489}, {""}, {""}, {""}, - {"recentWeather",1783}, - {""}, {""}, {""}, {""}, - {"cloudsBaseCoded4Trend4",493}, + {"beginYearTrend2",356}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"oneMinuteMeanMinimumRVR4",1545}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"numberOfPointsAlongTheXAxis",1465}, {""}, {""}, {""}, - {"scaledValueOfSecondWavelength",1933}, + {"endHourTrend4",747}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"setToMissingIfOutOfRange",2095}, {""}, {""}, - {"oceanAtmosphereCoupling",1494}, + {"ECMWF",45}, + {"offsetToEndOf4DvarWindow",1553}, + {"presentWeather1Present",1726}, + {""}, + {"endYearTrend4",769}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section11Pointer",1978}, - {""}, {""}, - {"listMembersMissing2",1123}, - {""}, {""}, {""}, {""}, {""}, - {"section3Length",1989}, - {"oneMinuteMeanMaximumRVR3",1540}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"scaledValueOfFirstWavelength",1923}, - {""}, {""}, {""}, {""}, {""}, - {"beginDayTrend3",338}, - {""}, {""}, - {"remarkPresent",1804}, - {""}, {""}, - {"section1Length",1980}, - {""}, {""}, {""}, - {"DELETE",24}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"mixedCoordinateDefinition",1326}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"countOfGroupLengths",620}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBaseCoded4Trend2",491}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"Minute_E4",162}, - {""}, - {"variationOfVisibilityTrend4",2343}, - {"firstDimensionPhysicalSignificance",856}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"Date_E2",26}, - {""}, {""}, {""}, - {"oneMinuteMeanMaximumRVR1",1538}, + {"jDirectionIncrementGridLength",1046}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"jScansPositively",1044}, - {""}, {""}, {""}, {""}, {""}, - {"kindOfProduct",1052}, - {""}, - {"runwayFrictionCodeValueState4",1872}, - {""}, - {"subLocalDefinitionNumber2",2148}, - {""}, {""}, {""}, - {"basicAngleOfTheInitialProductionDomain",335}, + {"altitudeOfTheCameraFromTheEarthsCentreMeasuredInUnitsOfTheEarthsRadius",307}, {""}, {""}, - {"runwayDepositCodeState4",1840}, - {""}, - {"beginDayTrend1",336}, - {""}, {""}, {""}, - {"latitudeOfReferencePoint",1078}, + {"Date_E3",27}, + {""}, {""}, + {"NG",182}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"numberInHorizontalCoordinates",1380}, {""}, {""}, {""}, - {"subLocalDefinitionLength1",2145}, + {"g1conceptsLocalDirAll",893}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Date_E2",26}, {""}, {""}, {""}, {""}, {""}, {""}, - {"beginHourTrend4",343}, + {"HourOfModelVersion",82}, + {""}, {""}, {""}, {""}, + {"rootGroupSymbolTableEntry",1852}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"YearOfModelVersion",282}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"iDirectionIncrementGiven",955}, - {"cloudsTitle2Trend4",523}, - {""}, {""}, {""}, {""}, - {"inputOverriddenReferenceValues",989}, - {"variationOfVisibilityDirectionTrend4",2339}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section11Length",1977}, - {""}, - {"radiusOfTheEarth",1764}, + {""}, {""}, + {"beginHourTrend1",343}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"numberOfUsefulPointsAlongXAxis",1497}, {""}, {""}, {""}, {""}, - {"section4UniqueIdentifier",1997}, - {""}, - {"variationOfVisibilityTrend2",2341}, - {""}, {""}, {""}, {""}, - {"oneMinuteMeanMinimumRVR2",1543}, + {"beginYearTrend1",355}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"timeUnitFlag",2213}, - {""}, - {"deleteLocalDefinition",683}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"monthlyVerificationYear",1331}, - {""}, - {"runwayFrictionCodeValueState2",1870}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"INBITS",89}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfGroupsOfDataValues",1421}, + {"runwayDepthOfDepositState3",1875}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"cloudsTitle2Trend2",521}, {""}, {""}, {""}, {""}, {""}, - {"variationOfVisibilityDirectionTrend2",2337}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfBytesPerInteger",1378}, - {""}, - {"section5",1998}, + {"weightAppliedToClimateMonth1",2427}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"ZLBASE",286}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"lengthOf4DvarWindow",1106}, + {"runwayDepthOfDepositState2",1874}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"realPartOf00",1781}, - {""}, {""}, {""}, - {"Minute_E2",160}, + {"numberOfParametersUsedForClustering",1458}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"extractAreaNorthLatitude",806}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"ECMWF",45}, - {"numberOfSingularVectorsEvolved",1466}, - {""}, {""}, {""}, {""}, {""}, - {"gaussianGridName",892}, - {""}, {""}, {""}, - {"matchAerosolBinNumber",1253}, + {"endHourTrend3",746}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"listOfWaveDirectionSequenceParameters",1146}, {""}, {""}, - {"GDSPresent",68}, + {"endYearTrend3",768}, {""}, - {"Ensemble_Combination_Number",50}, - {"numberInHorizontalCoordinates",1364}, - {""}, {""}, - {"horizontalDomainTemplate",942}, - {""}, {""}, {""}, - {"runwayDepositCodeState2",1838}, - {"northWestLatitudeOfLPOArea",1354}, + {"latitudeOfTheSouthernPoleOfProjection",1098}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"padding_loc9_2",1632}, - {""}, {""}, - {"beginHourTrend2",341}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBaseCoded3Trend4",488}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"endHourTrend2",745}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"endYearTrend2",767}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"setToMissingIfOutOfRange",2055}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cfVarNameECMF",416}, - {""}, {""}, - {"padding_local_7_1",1638}, {""}, {""}, {""}, - {"sizeOfPostAuxiliaryArray",2075}, - {"longitudeOfThePolePoint",1199}, + {"extractDateTimeDayStart",815}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"marsClass1",1218}, - {""}, {""}, - {"offsetBSection6",1506}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"TYPE_FF",243}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"generalExtended2ordr",894}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"firstLatitudeInDegrees",858}, - {""}, - {"totalAerosolBinsNumbers",2217}, - {""}, {""}, {""}, {""}, - {"cloudsBaseCoded3Trend2",486}, - {""}, {""}, {""}, {""}, - {"Extra_Data_FreeFormat_0_none",56}, + {""}, {""}, {""}, + {"TYPE_OF",245}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"getNumberOfValues",899}, + {""}, {""}, + {"Threshold_Or_Distribution_Units",249}, {""}, - {"scaleFactorOfMinorAxisOfOblateSpheroidEarth",1904}, + {"numberOfTensOfThousandsOfYearsOfOffset",1489}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"md5Section3",1270}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"runwayDesignatorRVR4",1880}, + {"numberOfPointsAlongYAxisInCouplingArea",1470}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"cloudsCode1Trend4",501}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"AA",6}, - {"southEastLongitudeOfLPOArea",2085}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"sizeOfPostAuxiliaryArrayPlusOne",2116}, {""}, {""}, {""}, - {"cloudsBaseCoded4Trend3",492}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"paramIdLegacyECMF",1649}, + {"runwayDepthOfDepositState1",1873}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"versionNumberOfSuperblock",2406}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"padding_loc9_2",1655}, {""}, - {"localTablesVersionNumber",1163}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"shortNameLegacyECMF",2061}, + {"BUFR",18}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"visibilityTrend3",2370}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"jPointsAreConsecutive",1043}, + {"Original_CodeTable_2_Version_Number",208}, + {""}, + {"skipExtraKeyAttributes",2119}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"section_11",2072}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"lBB",1062}, {""}, {""}, - {"cloudsBaseCoded4Trend1",490}, + {"cloudsAbbreviation4Trend4",456}, + {""}, {""}, {""}, + {"windUnitsTrend4",2456}, + {""}, {""}, {""}, {""}, + {"superblockExtensionAddress",2196}, + {""}, {""}, {""}, + {"oneMinuteMeanMaximumRVR4",1564}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"cloudsCode3Trend4",511}, {""}, - {"reflectivityCalibrationConstant",1803}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"endHourTrend4",743}, + {"endHourTrend1",744}, + {""}, + {"runwayExtentOfContaminationState4",1892}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"endYearTrend1",766}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsCode1Trend3",500}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"laplacianScalingFactorUnset",1060}, - {""}, {""}, - {"LLCOSP",99}, {""}, {""}, - {"numberOfParallelsBetweenAPoleAndTheEquator",1439}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayFrictionCoefficientCodeState4",1876}, - {""}, {""}, {""}, {""}, - {"numberOfPointsAlongXAxisInCouplingArea",1450}, - {"scaleFactorOfCentralWaveNumber",1892}, + {"cloudsCode1Trend2",499}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"offsetFromOriginToInnerBound",1515}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation4",449}, - {"meanRVR4",1282}, - {"missingValueManagementUsed",1309}, - {""}, - {"md5Section5",1272}, - {""}, {""}, {""}, - {"numberOfBitsForScaledGroupLengths",1373}, - {""}, - {"variationOfVisibilityTrend3",2342}, + {"coordAveraging3",587}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"runwayFrictionCodeValueState3",1871}, {""}, {""}, {""}, {""}, {""}, - {"variationOfVisibilityTrend1",2340}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"offsetBeforePL",1510}, + {"coordAveraging2",586}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_local_35",1660}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsAbbreviation3Trend4",451}, {""}, {""}, {""}, - {"runwayFrictionCodeValueState1",1869}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfSingularVectorsComputed",1465}, - {""}, - {"mask",1248}, - {"cloudsTitle2Trend3",522}, - {"numberOfReforecastYearsInModelClimate",1458}, - {""}, {""}, {""}, - {"runwayFrictionCoefficientCodeState2",1874}, - {"variationOfVisibilityDirectionTrend3",2338}, - {"runwayDepthOfDepositCodeState4",1848}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"uuidOfVGrid",2328}, - {""}, - {"addEmptySection2",295}, + {"cfVarNameLegacyECMF",420}, + {"is_chemical_srcsink",1032}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsAbbreviation2Trend4",446}, + {""}, {""}, {""}, {""}, {""}, + {"cloudsCode3Trend3",510}, + {""}, {""}, {""}, + {"runwayExtentOfContaminationState3",1891}, + {"numberOfBitsUsedForTheScaledGroupLengths",1392}, + {""}, {""}, {""}, {""}, + {"padding_loc9_1",1654}, + {"cloudsCode2Trend4",506}, + {"padding_loc7_1",1653}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"scaledValueOfEarthMajorAxis",1952}, {""}, - {"section3UniqueIdentifier",1992}, - {"widthOfWidths",2381}, + {"cloudsCode3Trend2",509}, {""}, {""}, - {"cloudsTitle2Trend1",520}, + {"scaledValueOfEarthMinorAxis",1953}, + {"runwayExtentOfContaminationState2",1890}, {""}, {""}, {""}, {""}, {""}, - {"variationOfVisibilityDirectionTrend1",2336}, - {""}, {""}, {""}, {""}, {""}, - {"clusterMember5",540}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"visibilityInKilometresTrend3",2366}, + {"cloudsCode1Trend1",498}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"beginMonthTrend3",353}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"beginMonthTrend3",350}, - {"iDirectionIncrementGridLength",956}, - {"latitudeOfReferencePointInDegrees",1079}, - {"pack",1571}, - {"endHourTrend2",741}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"unitsLegacyECMF",2302}, {""}, {""}, - {"NRj",187}, + {"runwayDesignatorRVR3",1879}, + {"padding_loc6_1",1652}, + {""}, {""}, {""}, {""}, + {"experimentVersionNumber2",797}, + {""}, + {"windGustTrend4",2445}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"beginMonthTrend1",351}, {""}, {""}, - {"typeOfPacking",2263}, + {"padding_loc5_1",1651}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayDepthOfDepositCodeState2",1846}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"latitudeOfLastGridPoint",1075}, - {"visibilityInKilometresTrend1",2364}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation2",439}, - {"meanRVR2",1280}, - {"cloudsBase3",464}, {""}, - {"unpack",2306}, - {"NC2",178}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"typeOfProcessedData",2266}, + {"runwayDesignatorRVR2",1878}, + {""}, {""}, + {"cloudsCode4Trend4",516}, {""}, {""}, {""}, - {"offsetSection5",1525}, + {"scaledValueOfMinorAxisOfOblateSpheroidEarth",1962}, + {""}, {""}, {""}, {""}, {""}, + {"padding_grid90_1",1605}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"projTargetString",1739}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"physicalFlag1",1680}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"projSourceString",1737}, - {""}, - {"cloudsBaseCoded1Trend4",478}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBaseCoded3",484}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBaseCoded3Trend3",487}, {""}, - {"typeOfWavelengthInterval",2274}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"beginMonthTrend4",354}, + {"cloudsAbbreviation1Trend4",441}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"resolutionAndComponentFlags4",1822}, - {""}, - {"cloudsBaseCoded3Trend1",485}, - {""}, {""}, {""}, {""}, {""}, - {"Ensemble_Identifier_E4",54}, - {"************_PRODUCT_***************",3}, - {"listMembersMissing3",1124}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"HourOfModelVersion",82}, + {"latitudeOfSouthEastCornerOfArea",1087}, + {""}, {""}, {""}, {""}, + {"cloudsCode3Trend1",508}, + {""}, {""}, {""}, + {"runwayExtentOfContaminationState1",1889}, + {""}, {""}, {""}, {""}, + {"cloudsAbbreviation4Trend3",455}, + {""}, {""}, {""}, + {"windUnitsTrend3",2455}, + {"XpInGridLengths",274}, + {"FMULTM",66}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_grid90_1",1582}, + {"oneMinuteMeanMaximumRVR3",1563}, + {""}, {""}, {""}, {""}, {""}, + {"************_EXPERIMENT_************",2}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"checkInternalVersion",428}, - {"endMark",744}, - {""}, {""}, {""}, {""}, - {"scanningMode5",1941}, - {"LSTCUM",100}, + {"cloudsCode2Trend3",505}, + {""}, {""}, {""}, + {"cloudsAbbreviation4Trend2",454}, + {""}, {""}, {""}, + {"windUnitsTrend2",2454}, + {"CCCC",20}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBaseCoded1Trend2",476}, - {""}, {""}, {""}, {""}, - {"postAuxiliaryArrayPresent",1688}, - {"offsetSection11",1521}, + {"extractAreaLongitudeRank",809}, + {""}, + {"oneMinuteMeanMaximumRVR2",1562}, + {""}, + {"coordAveraging1",585}, + {""}, + {"cloudsCode2Trend2",504}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Date_E3",27}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"hoursAfterDataCutoff",956}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"commonBlock",559}, + {"beginMonthTrend2",352}, {""}, {""}, {""}, {""}, {""}, - {"Ensemble_Identifier_E2",52}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Minute_E4",162}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"md5Section1",1267}, - {""}, {""}, - {"Original_CodeTable_2_Version_Number",206}, - {"DjGiven",35}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"subLocalDefinitionNumber1",2147}, + {"ccsdsBlockSize",391}, {""}, {""}, {""}, - {"numberOfGridInReference",1418}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"oneMinuteMeanMinimumRVR3",1544}, - {""}, {""}, {""}, {""}, - {"northLatitudeOfDomainOfTubing",1353}, + {"cloudsCode4Trend3",515}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"numberOfPressureLevelsUsedForClustering",1455}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"resolutionAndComponentFlags2",1820}, - {"ITERATOR",91}, - {"visibilityTrend1",2368}, - {""}, {""}, {""}, {""}, {""}, - {"md5Section10",1268}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsCode2",499}, + {"cloudsCode4Trend2",514}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"section5Length",1999}, - {""}, - {"oneMinuteMeanMinimumRVR1",1542}, - {""}, {""}, {""}, {""}, - {"runwayFrictionCoefficientCodeState3",1875}, - {"southLatitudeOfDomainOfTubing",2088}, - {""}, {""}, {""}, {""}, - {"eastLongitudeOfDomainOfTubing",722}, - {""}, {""}, {""}, - {"padding_loc4_2",1626}, {""}, {""}, {""}, {""}, {""}, {""}, - {"uuidOfHGrid",2327}, - {"intervalBetweenTimes",1003}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Minute_E3",161}, - {"constantAntennaElevationAngle",576}, + {"experimentVersionNumber1",796}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"swapScanningAlternativeRows",2156}, - {""}, {""}, {""}, {""}, - {"runwayFrictionCoefficientCodeState1",1873}, + {"cloudsAbbreviation3Trend3",450}, + {""}, + {"cloudsCode2Trend1",503}, {""}, {""}, {""}, - {"disableGrib1LocalSection",699}, + {"runwayDesignatorRVR1",1877}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"cloudsAbbreviation2Trend3",445}, + {""}, + {"padding_loc50_1",1650}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"TYPE_PF",247}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"Local_Number_Members_Possible_E4",137}, + {""}, + {"cloudsAbbreviation3Trend2",449}, {""}, {""}, {""}, - {"runwayDepositCodeState3",1839}, + {"missingValueManagementUsed",1323}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"beginHourTrend3",342}, + {""}, + {"************_ENSEMBLE_**************",1}, {""}, {""}, {""}, {""}, {""}, - {"offsetAfterData",1501}, + {"cloudsAbbreviation2Trend2",444}, + {""}, {""}, + {"numberOfGridUsed",1436}, + {"qualityValueAssociatedWithParameter",1778}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"windGustTrend3",2444}, + {"cloudsCode4Trend1",513}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"scaleFactorOfUpperWavePeriodLimit",1940}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"cloudsAbbreviation4Trend1",453}, + {"windGustTrend2",2443}, {""}, - {"typeOfGeneratingProcess",2255}, - {"runwayDepthOfDepositCodeState3",1847}, + {"TYPE_FX",244}, + {"windUnitsTrend1",2453}, + {""}, + {"padding_local11_1",1656}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"oneMinuteMeanMaximumRVR1",1561}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"scaledValueOfMajorAxisOfOblateSpheroidEarth",1927}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"legacyGaussSubarea",1103}, - {""}, {""}, {""}, - {"runwayDepositCodeState1",1837}, - {"ccsdsCompressionOptionsMask",389}, - {""}, {""}, {""}, - {"longitudeOfSouthernPole",1191}, - {"FMULTE",65}, - {""}, {""}, - {"runwayDepthOfDepositCodeState1",1845}, - {""}, {""}, {""}, {""}, - {"padding_loc9_1",1631}, {""}, - {"WRAPstr",263}, - {"beginHourTrend1",340}, - {"padding_loc7_1",1630}, - {"padding_loc6_1",1629}, - {""}, {""}, {""}, {""}, + {"Local_Number_Members_Possible_E4",137}, {"Local_Number_Members_Missing_E4",133}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Local_Number_Members_Possible_E2",135}, - {""}, {""}, {""}, {""}, - {"scaledValueOfUpperLimit",1936}, - {""}, {""}, {""}, {""}, {""}, - {"horizontalDimensionProcessed",941}, - {""}, {""}, {""}, {""}, - {"beginMonthTrend1",348}, - {""}, {""}, {""}, {""}, {""}, - {"ceilingAndVisibilityOK",392}, + {""}, + {"cloudsAbbreviation1Trend3",440}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"TYPE_OR",246}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"longitudeOfThePolePointInDegrees",1200}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"hoursAfterReferenceTimeOfDataCutoff",952}, + {"cloudsAbbreviation1Trend2",439}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfUsefulPointsAlongXAxis",1478}, - {"indexingTimeHH",976}, - {""}, {""}, {""}, {""}, - {"windUnitsTrend4",2402}, - {""}, {""}, - {"offsetBBitmap",1504}, - {"Threshold_Or_Distribution_0_no_1_yes",246}, - {""}, - {"westLongitudeOfDomainOfTubing",2375}, + {"LSTCUM",100}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"indexingTimeHHMM",977}, - {"cloudsBase1",454}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"scaledValueOfLengthOfSemiMajorAxis",1924}, + {"padding_local_7_1",1661}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Local_Number_Members_Missing_E2",131}, + {"Minute_E3",161}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"cloudsCode4Trend4",513}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"cloudsAbbreviation3Trend1",448}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Minute_E2",160}, + {""}, + {"cloudsAbbreviation2Trend1",443}, {""}, {""}, - {"cloudsBaseCoded1Trend3",477}, + {"Local_Number_Members_Possible_E3",136}, + {"Local_Number_Members_Missing_E3",132}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBaseCoded1",474}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBaseCoded1Trend1",475}, - {""}, {""}, {""}, {""}, - {"observationDiagnostic",1489}, {""}, - {"Y2",275}, + {"Local_Number_Members_Possible_E2",135}, + {"Local_Number_Members_Missing_E2",131}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"Ensemble_Identifier_E3",53}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"NEAREST",179}, {""}, {""}, {""}, - {"padding_loc5_1",1628}, - {""}, {""}, {""}, {""}, - {"cloudsCode4Trend2",511}, + {"windGustTrend1",2442}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"Ensemble_Identifier_E4",54}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"experimentVersionNumberOfAnalysis",794}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"windUnitsTrend2",2400}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"codedNumberOfGroups",555}, - {""}, {""}, {""}, - {"Missing_Model_LBC",163}, - {"baseTimeOfThisLeg",334}, + {"ICEFieldsUsed",86}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Less_Than_Or_To_Overall_Distribution",122}, - {""}, - {"numberOfPointsUsed",1454}, + {"cloudsAbbreviation1Trend1",438}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"padding_loc50_1",1627}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"weightAppliedToClimateMonth1",2373}, - {""}, {""}, {""}, {""}, {""}, - {"padding_loc30_2",1621}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"baseDateOfThisLeg",332}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"scaledValueOfEarthMajorAxis",1919}, - {""}, {""}, {""}, {""}, - {"scaledValueOfEarthMinorAxis",1920}, - {""}, {""}, {""}, {""}, - {"pastTendencyRVR4",1669}, - {""}, {""}, - {"endHourTrend3",742}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"ECMWF_s",46}, + {"extractAreaLatitudeRank",808}, {""}, {""}, {""}, {""}, - {"section_5",2036}, + {"cloudsBase1Trend4",461}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"totalNumberOfGridPoints",2226}, + {"ceilingAndVisibilityOKTrend4",399}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"recentWeatherTry",1784}, - {""}, {""}, {""}, {""}, - {"offsetBeforeBitmap",1508}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation3",444}, - {"meanRVR3",1281}, - {""}, - {"northWestLongitudeOfLPOArea",1356}, - {""}, {""}, {""}, - {"endHourTrend1",740}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"latitudeOfLastGridPointInDegrees",1076}, - {""}, {""}, {""}, {""}, - {"Local_Number_Members_Possible_E3",136}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section_05",2025}, - {""}, {""}, - {"cloudsCode3Trend4",508}, + {"Ensemble_Identifier_E3",53}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"isCavokTrend4",1016}, + {""}, {""}, {""}, {""}, {""}, + {"Ensemble_Identifier_E2",52}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"RENAME",221}, {""}, - {"offsetToEndOf4DvarWindow",1530}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayExtentOfContaminationState4",1868}, + {"oneMinuteMeanMinimumRVR4",1568}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation1",434}, - {"meanRVR1",1279}, - {""}, {""}, {""}, - {"NC1",177}, + {"cloudsBase3Trend4",471}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section_11",2032}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"section5UniqueIdentifier",2001}, + {""}, {""}, {""}, + {"cloudsBase1Trend3",460}, {""}, - {"Local_Number_Members_Missing_E3",132}, + {"Number_Combination_Ensembles_1_none",203}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"tsectionNumber5",2241}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsCode3Trend2",506}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayExtentOfContaminationState2",1866}, + {"cloudsBase1Trend2",459}, + {"FMULTE",65}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"YY",281}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayDesignatorRVR4",1856}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsCode4Trend3",512}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"bufrHeaderSubCentre",381}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"radiusOfClusterDomain",1763}, + {""}, + {"cloudsBase3Trend3",470}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsCode4Trend1",510}, + {"cloudsBase2Trend4",466}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsBase3Trend2",469}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsBase1Trend1",458}, {""}, {""}, - {"lastMonthUsedToBuildClimateMonth2",1062}, - {""}, {""}, {""}, {""}, - {"resolutionAndComponentFlags3",1821}, + {"*********_EXTRA_DATA_***************",4}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_sec4_1",1644}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"presentWeather2Present",1708}, + {""}, {""}, {""}, {""}, + {"ceilingAndVisibilityOKTrend3",398}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc19_2",1602}, + {"cloudsBase4Trend4",476}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"resolutionAndComponentFlags1",1819}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"biFourierPackingModeForAxes",361}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"ceilingAndVisibilityOKTrend2",397}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"Hour_E4",85}, - {""}, {""}, {""}, - {"runwayDesignatorRVR2",1854}, - {"md5GridSection",1264}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"extractAreaSouthLatitude",807}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"isCavokTrend3",1015}, + {""}, {""}, + {"cloudsBase3Trend1",468}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"oneMinuteMeanMinimumRVR3",1567}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Extra_Data_FreeFormat_0_none",56}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"isCavokTrend2",1014}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsBase2Trend3",465}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"oneMinuteMeanMinimumRVR2",1566}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"cloudsBase2Trend2",464}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"extractDateTimeDayStart",811}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"latitudeOfThePolePoint",1089}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"beginYearTrend4",355}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"subdivisionsOfBasicAngle",2153}, + {"LBC_Initial_Conditions",97}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"probProductDefinition",1725}, + {"cloudsBase4Trend3",475}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"ECMWF_s",46}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsBase4Trend2",474}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"longitudeOfSouthernPoleInDegrees",1192}, + {""}, {""}, + {"TYPE_CF",241}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"md5Section2",1269}, - {""}, - {"coordinate4OfFirstGridPoint",596}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"sizeOfPostAuxiliaryArrayPlusOne",2076}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc18_2",1596}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfSecondOrderPackedValues",1463}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfPointsAlongAMeridian",1443}, - {"runwayDepthOfDepositState4",1852}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"ICEFieldsUsed",86}, {""}, {""}, {""}, {""}, - {"visibilityTrend2",2369}, + {"P_TACC",218}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsCode1Trend4",498}, - {""}, {""}, {""}, {""}, - {"Hour_E2",83}, + {"extractDateTimeDayEnd",813}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"cloudsBase2Trend1",463}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"ceilingAndVisibilityOKTrend1",396}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"cloudsCode3Trend3",507}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cfNameLegacyECMF",414}, - {""}, - {"runwayExtentOfContaminationState3",1867}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"ICPLSIZE",87}, - {""}, - {"cloudsCode3Trend1",505}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayExtentOfContaminationState1",1865}, - {""}, {""}, {""}, {""}, - {"padding_loc37_2",1623}, - {""}, - {"NB",175}, - {""}, - {"scaledValueOfMinorAxisOfOblateSpheroidEarth",1928}, {""}, {""}, - {"horizontalDomainTemplateNumber",943}, + {"cloudsBase4Trend1",473}, + {""}, + {"DIAG",25}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"beginYearTrend2",353}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"isCavokTrend1",1013}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsCode1Trend2",496}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"experimentVersionNumber2",793}, {""}, {""}, {""}, {""}, {""}, - {"padding_sec3_1",1643}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Y1",273}, - {"countOfGroupLengths",617}, + {"oneMinuteMeanMinimumRVR1",1565}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation4Trend4",453}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"spacingOfBinsAlongRadials",2096}, - {""}, {""}, - {"numberOfPointsAlongSecondAxis",1446}, - {""}, {""}, {""}, - {"coordAveraging2",583}, - {""}, {""}, {""}, - {"windUnitsTrend3",2401}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"mixedCoordinateDefinition",1311}, - {"cfVarNameLegacyECMF",417}, - {""}, - {"runwayDepthOfDepositState2",1850}, - {""}, {""}, {""}, - {"padding_loc3_1",1625}, - {""}, - {"lastMonthUsedToBuildClimateMonth1",1061}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"scaledValueOfCentralWaveNumber",1916}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"beginMonthTrend2",349}, - {""}, {""}, - {"presentWeather3Present",1713}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"windUnitsTrend1",2399}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfPointsAlongAParallel",1444}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation2Trend4",443}, - {"cloudsBaseCoded2Trend4",483}, - {""}, - {"padding_loc190_1",1597}, - {""}, {""}, {""}, - {"presentWeather1Present",1703}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"padding_local1_31",1635}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"pastTendencyRVR3",1668}, - {""}, {""}, {""}, - {"cloudsBase2",459}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc30_1",1620}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"typicalYearOfCentury",2286}, - {""}, {""}, {""}, {""}, - {"coordinate3OfFirstGridPoint",593}, - {""}, {""}, {""}, {""}, {""}, - {"jDirectionIncrementGiven",1039}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"padding_local_35",1637}, - {""}, {""}, - {"endYearTrend4",765}, - {"cloudsBaseCoded2",479}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation4Trend2",451}, - {"cloudsBaseCoded2Trend2",481}, {""}, {""}, {""}, {""}, {""}, - {"qualityValueAssociatedWithParameter",1755}, + {"runwayExtentOfContaminationCodeState4",1888}, + {""}, + {"Less_Than_Or_To_Overall_Distribution",122}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"HDF5",80}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"flagForNormalOrStaggeredGrid",866}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc19_2",1625}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc38_1",1624}, - {""}, {""}, - {"unusedBitsInBitmap",2315}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"TYPE_FF",241}, + {"padding_loc18_2",1619}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"TYPE_FX",242}, - {""}, {""}, {""}, {""}, - {"uvRelativeToGrid",2329}, - {""}, {""}, - {"cloudsAbbreviation2Trend2",441}, - {""}, - {"numberOfBitsContainingEachPackedValue",1372}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"padding_local11_1",1633}, {""}, - {"superblockExtensionAddress",2155}, - {""}, {""}, {""}, {""}, - {"padding_grid1_2",1577}, + {"swapScanningY",2201}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"latitudeOfThePoleOfStretching",1088}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"Number_Combination_Ensembles_1_none",201}, - {""}, {""}, {""}, {""}, - {"endYearTrend2",763}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"cloudsCode1Trend3",497}, {""}, - {"cloudsBase4Trend4",473}, - {""}, {""}, {""}, - {"TYPE_OF",243}, + {"runwayExtentOfContaminationCodeState3",1887}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"bufrHeaderSubCentre",378}, + {""}, {""}, {""}, {""}, {""}, + {"padding_sec2_3",1665}, + {""}, {""}, {""}, {""}, {""}, + {"runwayExtentOfContaminationCodeState2",1886}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"cloudsCode1Trend1",495}, - {""}, {""}, - {"CLNOMA",23}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"padding_loc17_2",1594}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_sec2_2",1664}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"Time_Range_One_E4",250}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc190_1",1620}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"numberOfParametersUsedForClustering",1440}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"cloudsBase4Trend2",471}, - {"altitudeOfTheCameraFromTheEarthsCentreMeasuredInUnitsOfTheEarthsRadius",304}, - {""}, - {"RENAME",219}, + {"octetAtWichPackedDataBegins",1520}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"latitudeOfThePolePointInDegrees",1090}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"padding_sec3_1",1666}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc2_2",1642}, + {""}, + {"padding_loc29_3",1640}, + {""}, {""}, {""}, + {"Threshold_Or_Distribution_0_no_1_yes",248}, + {"padding_loc18_1",1618}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation3Trend4",448}, + {"padding_local1_1",1657}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"YearOfModelVersion",280}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"runwayExtentOfContaminationCodeState1",1885}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayDesignatorRVR3",1855}, - {""}, {""}, {""}, {""}, - {"cloudsAbbreviation1Trend4",438}, - {""}, {""}, {""}, {""}, {""}, - {"Time_Range_One_E2",248}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfPointsAlongFirstAxis",1445}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_grid4_1",1602}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc29_2",1639}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"WRAP",262}, + {"padding_loc3_1",1648}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayDesignatorRVR1",1853}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBaseCoded2Trend3",482}, + {"padding_loc4_2",1649}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"extractDateTimeYearRank",831}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc30_2",1644}, {""}, {""}, - {"padding_local1_1",1634}, + {"GRIB",70}, + {"padding_grid1_2",1600}, {""}, {""}, {""}, - {"latitudeOfSouthEastCornerOfArea",1080}, + {"scaledValueOfUpperWavePeriodLimit",1971}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfPointsAlongTheXAxis",1447}, - {"numberOfBitsUsedForTheScaledGroupLengths",1375}, - {""}, {""}, {""}, {""}, {""}, - {"padding_loc10_1",1583}, - {"XpInGridLengths",272}, {""}, {""}, {""}, - {"cloudsBaseCoded2Trend1",480}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"pastTendencyRVR1",1666}, - {"BUFR",18}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"ZLBASE",284}, + {"numberOfPointsAlongTheYAxis",1466}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc38_1",1647}, + {"numberOfVGridUsed",1499}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"is_chemical_srcsink",1026}, - {""}, {""}, {""}, {""}, - {"padding_grid4_1",1579}, + {"padding_local1_31",1658}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation3Trend2",446}, + {"RVR4_1",225}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Hour_E3",84}, - {""}, {""}, {""}, {""}, {""}, - {"cloudsBase3Trend4",468}, + {""}, {""}, {""}, + {"Hour_E4",85}, {""}, {""}, - {"cloudsAbbreviation1Trend2",436}, - {""}, {""}, {""}, {""}, - {"jDirectionIncrementGridLength",1040}, + {"7777",5}, + {""}, {""}, {""}, {""}, {""}, + {"padding_sec2_1",1663}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc18_1",1595}, {""}, {""}, {""}, {""}, {""}, - {"windGustTrend4",2391}, + {"padding_grid3_1",1601}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"isCavok",1006}, + {"extractDateTimeHourRank",818}, + {"padding_loc10_1",1606}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"typicalYear2",2285}, + {""}, {""}, + {"padding_loc2_1",1641}, {""}, {""}, {""}, - {"sourceSinkChemicalPhysicalProcess",2082}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"latitudeOfTheSouthernPoleOfProjection",1091}, + {"padding_sec4_1",1667}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"X2InGridLengths",269}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"beginYearTrend3",354}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc29_1",1638}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_grid50_1",1603}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Time_Range_One_E4",252}, {""}, {""}, - {"cloudsBase3Trend2",466}, + {"padding_loc28_1",1637}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc37_1",1622}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"offsetBeforePV",1511}, + {"padding_grid5_1",1604}, + {"RVR3_1",224}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"coordAveraging3",584}, - {""}, {""}, - {"beginYearTrend1",352}, + {"numberOfUsefulPointsAlongYAxis",1498}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc30_1",1643}, + {""}, {""}, {""}, + {"padding_grid1_1",1599}, + {""}, + {"RVR2_1",223}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"experimentVersionNumber1",792}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"runwayDepthOfDepositState3",1851}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBase4Trend3",472}, + {""}, {""}, {""}, {""}, {""}, + {"X1InGridLengths",267}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"coordAveraging1",582}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBase4Trend1",470}, - {""}, {""}, {""}, - {"windGustTrend2",2389}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"runwayDepthOfDepositState1",1849}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"Time_Range_One_E3",249}, + {""}, {""}, {""}, {""}, + {"extractDateTimeMinuteRank",821}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"*********_EXTRA_DATA_***************",4}, + {""}, {""}, {""}, {""}, {""}, + {"TYPE_AN",240}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"RVR1_1",222}, {""}, - {"extractDateTimeDayEnd",809}, + {"Time_Range_One_E3",251}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"setBitsPerValue",2051}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"Time_Range_One_E2",250}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation4Trend3",452}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Hour_E3",84}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"indexingTimeHH",981}, + {""}, {""}, {""}, {""}, + {"extractDateTimeMonthRank",824}, + {"padding_loc20_1",1626}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"Missing_Model_LBC",163}, + {""}, {""}, {""}, + {"Hour_E2",83}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"numberOfGridUsed",1419}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"cloudsAbbreviation4Trend1",450}, - {""}, {""}, {""}, {""}, - {"rootGroupSymbolTableEntry",1828}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"gts_CCCC",932}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"GG",69}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation2Trend3",442}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_sec2_2",1641}, - {"ccsdsBlockSize",388}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"g1conceptsLocalDirAll",889}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation2Trend1",440}, - {""}, {""}, {""}, {""}, {""}, - {"padding_grid3_1",1578}, - {""}, {""}, - {"skipExtraKeyAttributes",2079}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"endYearTrend3",764}, - {"padding_loc2_2",1619}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc29_2",1616}, - {""}, {""}, {""}, - {"padding_grid1_1",1576}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"cloudsBase1Trend4",458}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBase3Trend3",467}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"endYearTrend1",762}, - {""}, {""}, - {"padding_loc14_2",1591}, - {""}, {""}, - {"cloudsBase3Trend1",465}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"BBB",16}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"cloudsBase1Trend2",456}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"GRIBEditionNumber",74}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"************_ENSEMBLE_**************",1}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayExtentOfContaminationCodeState4",1864}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"cloudsCode2Trend4",503}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -6847,225 +7368,212 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayExtentOfContaminationCodeState2",1862}, + {"presentWeather3PresentTrend4",1740}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"indexingTimeHHMM",982}, + {""}, {""}, {""}, {""}, {""}, + {"presentWeather2PresentTrend4",1735}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"cloudsCode2Trend2",501}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation3Trend3",447}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation1Trend3",437}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"padding_loc13_4",1588}, - {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation3Trend1",445}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsAbbreviation1Trend1",435}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"Ensemble_Combinat_Number_0_none_E4",49}, + {""}, {""}, {""}, {""}, + {"extractDateTimeDayRank",814}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc191_3",1600}, + {"presentWeather1PresentTrend4",1730}, + {"YpInGridLengths",285}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc16_1",1593}, - {""}, {""}, {""}, {""}, {""}, - {"Missing_Model_LBC_E4",166}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Local_Number_Members_Used_E4",141}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"padding_loc192_1",1601}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"extractDateTimeSecondRank",827}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"extractAreaLongitudeRank",805}, + {"TYPE_FC",242}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"cloudsBase1Trend3",457}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"pastTendencyRVR2",1667}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBase1Trend1",455}, - {""}, {""}, {""}, - {"numberOfPointsAlongYAxis",1451}, + {"Ensemble_Combinat_Number_0_none_E3",48}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_grid50_1",1580}, - {""}, {""}, {""}, - {"windGustTrend3",2390}, + {"Ensemble_Combinat_Number_0_none_E2",47}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"lastMonthUsedToBuildClimateMonth2",1069}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc13_2",1586}, + {"presentWeather3PresentTrend3",1739}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"presentWeather2PresentTrend3",1734}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"presentWeather3PresentTrend2",1738}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"presentWeather2PresentTrend2",1733}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"windGustTrend1",2388}, + {"padding_loc13_4",1611}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"isCavokTrend4",1010}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"Missing_Model_LBC_E2",164}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Local_Number_Members_Used_E2",139}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"TYPE_PF",245}, + {"lastMonthUsedToBuildClimateMonth1",1068}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"presentWeather1PresentTrend3",1729}, {""}, - {"runwayExtentOfContaminationCodeState3",1863}, + {"genVertHeightCoords",897}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"hoursAfterDataCutoff",951}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"Ensemble_Combinat_Number_0_none_E4",49}, - {""}, {""}, - {"NG",180}, - {"runwayExtentOfContaminationCodeState1",1861}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Model_LBC_Member_Identifier",169}, {""}, {""}, {""}, {""}, - {"cloudsCode2Trend3",502}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"presentWeather1PresentTrend2",1728}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsCode2Trend1",500}, - {""}, - {"padding_sec2_3",1642}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"padding_loc27_2",1613}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"Ensemble_Combinat_Number_0_none_E2",47}, - {""}, {""}, {""}, {""}, - {"isCavokTrend2",1008}, - {""}, {""}, - {"padding_sec2_1",1640}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc29_3",1617}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"presentWeather3PresentTrend1",1737}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc14_2",1614}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"numberOfTensOfThousandsOfYearsOfOffset",1470}, {""}, - {"lBB",1055}, - {""}, - {"padding_loc2_1",1618}, - {""}, {""}, - {"TYPE_OR",244}, + {"presentWeather2PresentTrend1",1732}, + {""}, {""}, {""}, {""}, {""}, + {"INGRIB",90}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc29_1",1615}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"ceilingAndVisibilityOKTrend4",396}, + {"precisionOfTheUnpackedSubset",1717}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"extremeCounterClockwiseWindDirection",840}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"padding_loc14_1",1590}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc191_1",1598}, + {"presentWeather1PresentTrend1",1727}, + {""}, {""}, {""}, + {"padding_loc13_3",1610}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"padding_loc192_1",1624}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc20_1",1603}, + {"padding_loc13_2",1609}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"offsetBSection5",1505}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"padding_grid5_1",1581}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc12_1",1584}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"CCCC",20}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"padding_loc14_1",1613}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"padding_loc191_3",1623}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"ceilingAndVisibilityOKTrend2",394}, - {""}, - {"padding_loc28_1",1614}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"RVR4_1",223}, {""}, {""}, {""}, - {"versionNumberOfSuperblock",2355}, - {""}, - {"Original_Parameter_Iden_CodeTable2",207}, - {""}, {""}, {""}, {""}, - {"X2InGridLengths",267}, + {"padding_loc191_1",1621}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"Original_Parameter_Iden_CodeTable2",209}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"Time_Range_Two_E4",253}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"TYPE_CF",239}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfPointsAlongYAxisInCouplingArea",1452}, + {"padding_loc16_1",1616}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"padding_loc17_2",1617}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc13_5",1612}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"RVR2_1",221}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"LBC_Initial_Conditions",97}, + {""}, {""}, {""}, + {"padding_loc13_1",1608}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Time_Range_Two_E2",251}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"Ensemble_Combinat_Number_0_none_E3",48}, + {"padding_loc12_1",1607}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"padding_loc191_2",1622}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"NINT_RITZ_EXP",185}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc37_2",1646}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7073,6 +7581,8 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"padding_loc15_1",1615}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7082,110 +7592,91 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"extractAreaLatitudeRank",804}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"biFourierPackingModeForAxes",358}, - {""}, {""}, {""}, {""}, - {"padding_loc13_3",1587}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfVGridUsed",1480}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"padding_loc26_1",1634}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"padding_loc27_2",1636}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc13_1",1585}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"extremeValuesRVR4",844}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"Missing_Model_LBC_E3",165}, + {""}, {""}, {""}, {""}, + {"runwayBrakingActionState4",1860}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc23_1",1628}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Local_Number_Members_Used_E3",140}, + {"padding_loc37_1",1645}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"extremeValuesRVR4",840}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"X1InGridLengths",265}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"cloudsBase2Trend4",463}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"RVR3_1",222}, - {""}, {""}, {""}, - {"extractDateTimeYearRank",827}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"extremeValuesRVR2",838}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"RVR1_1",220}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc21_1",1627}, {""}, {""}, {""}, {""}, {""}, - {"Time_Range_Two_E3",252}, + {"extremeValuesRVR3",843}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"cloudsBase2Trend2",461}, - {"isCavokTrend3",1009}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc27_1",1612}, + {""}, {""}, + {"extremeValuesRVR2",842}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"padding_loc27_1",1635}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"isCavokTrend1",1007}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"presentWeather2PresentTrend4",1712}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"extractDateTimeHourRank",814}, + {""}, {""}, {""}, {""}, {""}, + {"Local_Number_Members_Used_E4",141}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"extremeValuesRVR1",841}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"runwayBrakingActionState3",1859}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfUsefulPointsAlongYAxis",1479}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"runwayBrakingActionState2",1858}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"Model_LBC_Member_Identifier",169}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"ceilingAndVisibilityOKTrend3",395}, - {""}, {""}, {""}, - {"presentWeather2PresentTrend2",1710}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7193,48 +7684,39 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"ceilingAndVisibilityOKTrend1",393}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc26_1",1611}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"extremeValuesRVR3",839}, - {""}, {""}, - {"P_TACC",216}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"padding_loc191_2",1599}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"extremeValuesRVR1",837}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBase2Trend3",462}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"cloudsBase2Trend1",460}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"GRIBEXSection1Problem",71}, + {""}, {""}, {""}, {""}, + {"Time_Range_Two_E4",255}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"bitsPerValueAndRepack",374}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"Local_Number_Members_Used_E3",140}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"runwayBrakingActionState1",1857}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"presentWeather3PresentTrend4",1717}, + {""}, + {"Local_Number_Members_Used_E2",139}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"presentWeather1PresentTrend4",1707}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7242,30 +7724,29 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"precisionOfTheUnpackedSubset",1694}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"genVertHeightCoords",893}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"DIAG",25}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"Time_Range_Two_E3",254}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"Time_Range_Two_E2",253}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"meanValueRVR4",1300}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Y2InGridLengths",278}, {""}, {""}, {""}, - {"presentWeather3PresentTrend2",1715}, + {"numberOfUnusedBitsAtEndOfSection3",1494}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"swapScanningY",2160}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"presentWeather1PresentTrend2",1705}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7274,30 +7755,21 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"extractDateTimeMinuteRank",817}, - {""}, {""}, {""}, {""}, - {"extractDateTimeSecondRank",823}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"extractDateTimeMonthRank",820}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"Y1InGridLengths",276}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc15_1",1592}, + {"P_TAVG",219}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"gts_CCCC",928}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"octetAtWichPackedDataBegins",1497}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7314,21 +7786,21 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"meanValueRVR3",1299}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"extractDateTimeDayRank",810}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"YY",279}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"meanValueRVR2",1298}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"presentWeather2PresentTrend3",1711}, + {""}, {""}, + {"ExtremeValuesInMaximumRVR4",60}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7336,8 +7808,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"presentWeather2PresentTrend1",1709}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7346,37 +7816,28 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"At_least__Or_Distribut_Proportion_Of",14}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"padding_loc244_3",1631}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"ExtremeValuesRVR4",64}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"padding_loc244_1",1629}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"GRIBEditionNumber",74}, - {"extremeCounterClockwiseWindDirection",836}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"meanValueRVR1",1297}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"ExtremeValuesRVR2",62}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc23_1",1605}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc21_1",1604}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc244_3",1608}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7387,38 +7848,35 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, + {"padding_loc244_2",1630}, + {""}, {""}, {""}, {""}, + {"ExtremeValuesInMaximumRVR3",59}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"ExtremeValuesInMaximumRVR2",58}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"presentWeather3PresentTrend3",1716}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"presentWeather1PresentTrend3",1706}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"TYPE_FC",240}, {""}, {""}, {""}, {""}, - {"presentWeather3PresentTrend1",1714}, + {"padding_loc245_1",1632}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"presentWeather1PresentTrend1",1704}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"GRIB",70}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7430,28 +7888,22 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"ExtremeValuesRVR4",64}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"ExtremeValuesInMaximumRVR1",57}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"padding_loc245_2",1633}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"ExtremeValuesRVR3",63}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"NINT_RITZ_EXP",183}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"ExtremeValuesRVR1",61}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc13_5",1589}, - {""}, - {"numberOfPointsAlongTheYAxis",1448}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"YpInGridLengths",283}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7462,10 +7914,14 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"Missing_Model_LBC_E4",166}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc244_1",1606}, + {"ExtremeValuesRVR3",63}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"ExtremeValuesRVR2",62}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7481,6 +7937,9 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"ExtremeValuesRVR1",61}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7493,33 +7952,33 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"Show_Combination_Ensem_E4_0_no_1_yes",230}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"GG",69}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, + {"At_least__Or_Distribut_Proportion_Of",14}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"BUDG",17}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Show_Combination_Ensem_E2_0_no_1_yes",228}, + {"Missing_Model_LBC_E3",165}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"TYPE_AN",238}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"Missing_Model_LBC_E2",164}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"ExtremeValuesInMaximumRVR4",60}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"Used_Model_LBC",259}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7531,6 +7990,8 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"numberOfBitsUsedForTheGroupWidths",1391}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7542,8 +8003,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"ExtremeValuesInMaximumRVR2",58}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7551,13 +8010,9 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"Used_Model_LBC",257}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"meanValueRVR4",1287}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7570,13 +8025,8 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"numberOfUnusedBitsAtEndOfSection3",1475}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"Show_Combination_Ensem_E3_0_no_1_yes",229}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"BBB",16}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7586,8 +8036,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"meanValueRVR2",1285}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7597,8 +8045,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"bitsPerValueAndRepack",371}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7615,8 +8061,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayBrakingActionState4",1836}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7628,8 +8072,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"padding_loc244_2",1607}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7642,8 +8084,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayBrakingActionState2",1834}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7662,23 +8102,23 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"GRIBEXShBugPresent",72}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"ExtremeValuesInMaximumRVR3",59}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"GRIBEX_boustrophedonic",73}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"ExtremeValuesInMaximumRVR1",57}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7692,15 +8132,11 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc245_1",1609}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Y2InGridLengths",276}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7708,19 +8144,15 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"meanValueRVR3",1286}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, + {"NINT_LOG10_RITZ",184}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"INGRIB",90}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, - {"meanValueRVR1",1284}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7743,8 +8175,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"GRIBEXSection1Problem",71}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7765,18 +8195,12 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"runwayBrakingActionState3",1835}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Y1InGridLengths",274}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"runwayBrakingActionState1",1833}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7808,6 +8232,8 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"Show_Combination_Ensem_E4_0_no_1_yes",232}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7830,8 +8256,11 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"Show_Combination_Ensem_E3_0_no_1_yes",231}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"Show_Combination_Ensem_E2_0_no_1_yes",230}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7850,7 +8279,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"padding_loc245_2",1610}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7860,11 +8288,7 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"numberOfBitsUsedForTheGroupWidths",1374}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, - {"P_TAVG",217}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7917,8 +8341,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"BUDG",17}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7961,8 +8383,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"GRIBEX_boustrophedonic",73}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7971,8 +8391,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"Used_Model_LBC_E4",260}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -7984,8 +8402,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Used_Model_LBC_E2",258}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8001,6 +8417,9 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"AEC_PAD_RSI_OPTION_MASK",11}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8008,7 +8427,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"NINT_LOG10_RITZ",182}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8037,13 +8455,10 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"GRIBEXShBugPresent",72}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"Used_Model_LBC_E3",259}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8118,6 +8533,8 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"GRIB_DEPTH",75}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8181,8 +8598,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"GRIB_DEPTH",75}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8226,8 +8641,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, - {"AEC_PAD_RSI_OPTION_MASK",11}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8284,11 +8697,15 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, + {"Used_Model_LBC_E4",262}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"GRIB_LATITUDE",76}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8305,8 +8722,12 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"Used_Model_LBC_E3",261}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"Used_Model_LBC_E2",260}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8548,8 +8969,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"AEC_RESTRICTED_OPTION_MASK",12}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8559,6 +8978,8 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"GRIB_LONGITUDE",77}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8604,8 +9025,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"GRIB_LATITUDE",76}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8640,11 +9059,10 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, {""}, - {"AEC_DATA_SIGNED_OPTION_MASK",10}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"AEC_RESTRICTED_OPTION_MASK",12}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8664,6 +9082,8 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, + {"AEC_DATA_SIGNED_OPTION_MASK",10}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8859,8 +9279,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, - {"GRIB_LONGITUDE",77}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -8922,7 +9340,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {"AEC_DATA_3BYTE_OPTION_MASK",7}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -9015,6 +9432,8 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, + {"AEC_DATA_3BYTE_OPTION_MASK",7}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -9103,8 +9522,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {""}, - {"AEC_DATA_MSB_OPTION_MASK",8}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -9172,6 +9589,8 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {"AEC_DATA_MSB_OPTION_MASK",8}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, @@ -9391,7 +9810,6 @@ static const struct grib_keys_hash wordlist[] = {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, - {""}, {""}, {""}, {""}, {"AEC_DATA_PREPROCESS_OPTION_MASK",9} }; @@ -9423,10 +9841,6 @@ grib_keys_hash_get (const char *str, size_t len) * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/************************************** - * Enrico Fucile - **************************************/ - static const int mapping[] = { 0, /* 00 */ 0, /* 01 */ diff --git a/src/grib_iarray.cc b/src/grib_iarray.cc index 39f1439e1..93621dd83 100644 --- a/src/grib_iarray.cc +++ b/src/grib_iarray.cc @@ -26,24 +26,20 @@ void grib_iarray_print(const char* title, const grib_iarray* iarray) printf("\n"); } -#if 0 -grib_iarray* grib_iarray_new_from_array(grib_context* c, long* src_array, size_t size) -{ - size_t i; - grib_iarray* v; - - if (!c) - c = grib_context_get_default(); - - v = grib_iarray_new(c, size, 100); - for (i = 0; i < size; i++) - v->v[i] = src_array[i]; - v->n = size; - v->number_of_pop_front = 0; - v->context = c; - return v; -} -#endif +// grib_iarray* grib_iarray_new_from_array(grib_context* c, long* src_array, size_t size) +// { +// size_t i; +// grib_iarray* v; +// if (!c) +// c = grib_context_get_default(); +// v = grib_iarray_new(c, size, 100); +// for (i = 0; i < size; i++) +// v->v[i] = src_array[i]; +// v->n = size; +// v->number_of_pop_front = 0; +// v->context = c; +// return v; +// } grib_iarray* grib_iarray_new(grib_context* c, size_t size, size_t incsize) { @@ -221,7 +217,7 @@ long* grib_iarray_get_array(grib_iarray* v) long* vv; size_t i; grib_context* c = v->context; - DebugAssert(c); + DEBUG_ASSERT(c); vv = (long*)grib_context_malloc_clear(c, sizeof(long) * v->n); for (i = 0; i < v->n; i++) diff --git a/src/grib_ibmfloat.cc b/src/grib_ibmfloat.cc index 1b11ed3bf..d8dc76206 100644 --- a/src/grib_ibmfloat.cc +++ b/src/grib_ibmfloat.cc @@ -80,13 +80,13 @@ static void init_ibm_table() static void init_table_if_needed() { - GRIB_MUTEX_INIT_ONCE(&once, &init) - GRIB_MUTEX_LOCK(&mutex) + GRIB_MUTEX_INIT_ONCE(&once, &init); + GRIB_MUTEX_LOCK(&mutex); if (!ibm_table.inited) init_ibm_table(); - GRIB_MUTEX_UNLOCK(&mutex) + GRIB_MUTEX_UNLOCK(&mutex); } static void binary_search(const double xx[], const unsigned long n, double x, unsigned long* j) diff --git a/src/grib_ieeefloat.cc b/src/grib_ieeefloat.cc index 5ed74163a..8be76e556 100644 --- a/src/grib_ieeefloat.cc +++ b/src/grib_ieeefloat.cc @@ -10,7 +10,6 @@ /*************************************************************************** * Enrico Fucile - 06.01.2009 * - * * ***************************************************************************/ #include "grib_ieeefloat.h" @@ -86,13 +85,13 @@ static void init_ieee_table() static void init_table_if_needed() { - GRIB_MUTEX_INIT_ONCE(&once, &init) - GRIB_MUTEX_LOCK(&mutex) + GRIB_MUTEX_INIT_ONCE(&once, &init); + GRIB_MUTEX_LOCK(&mutex); if (!ieee_table.inited) init_ieee_table(); - GRIB_MUTEX_UNLOCK(&mutex) + GRIB_MUTEX_UNLOCK(&mutex); } static void binary_search(const double xx[], const unsigned long n, double x, unsigned long* j) @@ -331,7 +330,7 @@ int grib_nearest_smaller_ieee_float(double a, double* ret) unsigned long grib_ieee64_to_long(double x) { unsigned long lval; - DebugAssert(sizeof(double) == sizeof(long)); + DEBUG_ASSERT(sizeof(double) == sizeof(long)); memcpy(&lval, &x, sizeof(long)); return lval; } @@ -339,7 +338,7 @@ unsigned long grib_ieee64_to_long(double x) double grib_long_to_ieee64(unsigned long x) { double dval; - DebugAssert(sizeof(double) == sizeof(long)); + DEBUG_ASSERT(sizeof(double) == sizeof(long)); memcpy(&dval, &x, sizeof(long)); return dval; } diff --git a/src/grib_ieeefloat.h b/src/grib_ieeefloat.h index 4967a6129..74944f2ac 100644 --- a/src/grib_ieeefloat.h +++ b/src/grib_ieeefloat.h @@ -1,3 +1,13 @@ +/* + * (C) Copyright 2005- 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. + */ + #pragma once #include "grib_api_internal.h" diff --git a/src/grib_index.cc b/src/grib_index.cc index 4aeab0043..57efa359e 100644 --- a/src/grib_index.cc +++ b/src/grib_index.cc @@ -17,38 +17,36 @@ #define NOT_NULL_MARKER 255 /* #if GRIB_PTHREADS */ -#if 0 -static pthread_once_t once = PTHREAD_ONCE_INIT; -static pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; -static pthread_mutex_t mutex2 = PTHREAD_MUTEX_INITIALIZER; - -static void init() { - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&mutex1,&attr); - pthread_mutex_init(&mutex2,&attr); - pthread_mutexattr_destroy(&attr); - -} -/* #elif GRIB_OMP_THREADS */ -static int once = 0; -static omp_nest_lock_t mutex1; -static omp_nest_lock_t mutex2; - -static void init() -{ - GRIB_OMP_CRITICAL(lock_grib_index_c) - { - if (once == 0) - { - omp_init_nest_lock(&mutex1); - omp_init_nest_lock(&mutex2); - once = 1; - } - } -} -#endif +// static pthread_once_t once = PTHREAD_ONCE_INIT; +// static pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; +// static pthread_mutex_t mutex2 = PTHREAD_MUTEX_INITIALIZER; + +// static void init() { +// pthread_mutexattr_t attr; +// pthread_mutexattr_init(&attr); +// pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); +// pthread_mutex_init(&mutex1,&attr); +// pthread_mutex_init(&mutex2,&attr); +// pthread_mutexattr_destroy(&attr); + +// } +// /* #elif GRIB_OMP_THREADS */ +// static int once = 0; +// static omp_nest_lock_t mutex1; +// static omp_nest_lock_t mutex2; + +// static void init() +// { +// GRIB_OMP_CRITICAL(lock_grib_index_c) +// { +// if (once == 0) +// { +// omp_init_nest_lock(&mutex1); +// omp_init_nest_lock(&mutex2); +// once = 1; +// } +// } +// } static const char* mars_keys = "mars.date,mars.time,mars.expver,mars.stream,mars.class,mars.type," @@ -1271,168 +1269,167 @@ int ecc__codes_index_add_file(grib_index* index, const char* filename, int messa return GRIB_SUCCESS; } -#if 0 -int grib_index_add_file(grib_index* index, const char* filename) -{ - double dval; - size_t svallen; - long length,lval; - char buf[1024]={0,}; - int err=0; - grib_file* indfile; - grib_file* newfile; - - grib_index_key* index_key=NULL; - grib_handle* h=NULL; - grib_field* field; - grib_field_tree* field_tree; - grib_file* file=NULL; - grib_context* c; - - if (!index) return GRIB_NULL_INDEX; - c=index->context; - - file=grib_file_open(filename,"r",&err); - - if (!file || !file->handle) return err; - - if (!index->files) { - grib_filesid++; - newfile=(grib_file*)grib_context_malloc_clear(c,sizeof(grib_file)); - newfile->id=grib_filesid; - newfile->name=strdup(file->name); - newfile->handle = file->handle; - index->files=newfile; - } else { - indfile=index->files; - while(indfile) { - if (!strcmp(indfile->name,file->name)) return 0; - indfile=indfile->next; - } - indfile=index->files; - while(indfile->next) indfile=indfile->next; - grib_filesid++; - newfile=(grib_file*)grib_context_malloc_clear(c,sizeof(grib_file)); - newfile->id=grib_filesid; - newfile->name=strdup(file->name); - newfile->handle = file->handle; - indfile->next=newfile; - } - - fseeko(file->handle,0,SEEK_SET); - - while ((h=grib_handle_new_from_file(c,file->handle,&err))!=NULL) { - grib_string_list* v=0; - index_key=index->keys; - field_tree=index->fields; - index_key->value[0]=0; - - /* process only GRIB for the moment*/ - svallen=1024; - grib_get_string(h,"identifier",buf,&svallen); - if (strcmp(buf,"GRIB")) { - grib_handle_delete(h); - return 0; - } - - while (index_key) { - if (index_key->type==GRIB_TYPE_UNDEFINED) { - err=grib_get_native_type(h,index_key->name,&(index_key->type)); - if (err) index_key->type=GRIB_TYPE_STRING; - } - svallen=1024; - switch (index_key->type) { - case GRIB_TYPE_STRING: - err=grib_get_string(h,index_key->name,buf,&svallen); - if (err==GRIB_NOT_FOUND) snprintf(buf,1024,GRIB_KEY_UNDEF); - break; - case GRIB_TYPE_LONG: - err=grib_get_long(h,index_key->name,&lval); - if (err==GRIB_NOT_FOUND) snprintf(buf,1024,GRIB_KEY_UNDEF); - else snprintf(buf,1024,"%ld",lval); - break; - case GRIB_TYPE_DOUBLE: - err=grib_get_double(h,index_key->name,&dval); - if (err==GRIB_NOT_FOUND) snprintf(buf,1024,GRIB_KEY_UNDEF); - else snprintf(buf,1024,"%g",dval); - break; - default : - err=GRIB_WRONG_TYPE; - return err; - } - if (err && err != GRIB_NOT_FOUND) { - grib_context_log(c,GRIB_LOG_ERROR,"unable to create index. \"%s\": %s",index_key->name,grib_get_error_message(err)); - return err; - } - - if (!index_key->values->value) { - index_key->values->value=grib_context_strdup(c,buf); - index_key->values_count++; - } else { - v=index_key->values; - while (v->next && strcmp(v->value,buf)) v=v->next; - if (strcmp(v->value,buf)) { - index_key->values_count++; - if (v->next) v=v->next; - v->next=(grib_string_list*)grib_context_malloc_clear(c,sizeof(grib_string_list)); - v->next->value=grib_context_strdup(c,buf); - } - } - - if (!field_tree->value) { - field_tree->value=grib_context_strdup(c,buf); - } else { - while (field_tree->next && - (field_tree->value==NULL || - strcmp(field_tree->value,buf))) - field_tree=field_tree->next; - - if (!field_tree->value || strcmp(field_tree->value,buf)){ - field_tree->next= - (grib_field_tree*)grib_context_malloc_clear(c, - sizeof(grib_field_tree)); - field_tree=field_tree->next; - field_tree->value=grib_context_strdup(c,buf); - } - } - - if (index_key->next) { - if (!field_tree->next_level) { - field_tree->next_level= - (grib_field_tree*)grib_context_malloc_clear(c,sizeof(grib_field_tree)); - } - field_tree=field_tree->next_level; - } - index_key=index_key->next; - } - - field=(grib_field*)grib_context_malloc_clear(c,sizeof(grib_field)); - field->file=file; - index->count++; - field->offset=h->offset; - - err=grib_get_long(h,"totalLength",&length); - if (err) return err; - field->length=length; - - if (field_tree->field) { - grib_field* pfield=field_tree->field; - while (pfield->next) pfield=pfield->next; - pfield->next=field; - } else - field_tree->field=field; +// int grib_index_add_file(grib_index* index, const char* filename) +// { +// double dval; +// size_t svallen; +// long length,lval; +// char buf[1024]={0,}; +// int err=0; +// grib_file* indfile; +// grib_file* newfile; + +// grib_index_key* index_key=NULL; +// grib_handle* h=NULL; +// grib_field* field; +// grib_field_tree* field_tree; +// grib_file* file=NULL; +// grib_context* c; + +// if (!index) return GRIB_NULL_INDEX; +// c=index->context; + +// file=grib_file_open(filename,"r",&err); + +// if (!file || !file->handle) return err; + +// if (!index->files) { +// grib_filesid++; +// newfile=(grib_file*)grib_context_malloc_clear(c,sizeof(grib_file)); +// newfile->id=grib_filesid; +// newfile->name=strdup(file->name); +// newfile->handle = file->handle; +// index->files=newfile; +// } else { +// indfile=index->files; +// while(indfile) { +// if (!strcmp(indfile->name,file->name)) return 0; +// indfile=indfile->next; +// } +// indfile=index->files; +// while(indfile->next) indfile=indfile->next; +// grib_filesid++; +// newfile=(grib_file*)grib_context_malloc_clear(c,sizeof(grib_file)); +// newfile->id=grib_filesid; +// newfile->name=strdup(file->name); +// newfile->handle = file->handle; +// indfile->next=newfile; +// } + +// fseeko(file->handle,0,SEEK_SET); + +// while ((h=grib_handle_new_from_file(c,file->handle,&err))!=NULL) { +// grib_string_list* v=0; +// index_key=index->keys; +// field_tree=index->fields; +// index_key->value[0]=0; + +// /* process only GRIB for the moment*/ +// svallen=1024; +// grib_get_string(h,"identifier",buf,&svallen); +// if (strcmp(buf,"GRIB")) { +// grib_handle_delete(h); +// return 0; +// } + +// while (index_key) { +// if (index_key->type==GRIB_TYPE_UNDEFINED) { +// err=grib_get_native_type(h,index_key->name,&(index_key->type)); +// if (err) index_key->type=GRIB_TYPE_STRING; +// } +// svallen=1024; +// switch (index_key->type) { +// case GRIB_TYPE_STRING: +// err=grib_get_string(h,index_key->name,buf,&svallen); +// if (err==GRIB_NOT_FOUND) snprintf(buf,1024,GRIB_KEY_UNDEF); +// break; +// case GRIB_TYPE_LONG: +// err=grib_get_long(h,index_key->name,&lval); +// if (err==GRIB_NOT_FOUND) snprintf(buf,1024,GRIB_KEY_UNDEF); +// else snprintf(buf,1024,"%ld",lval); +// break; +// case GRIB_TYPE_DOUBLE: +// err=grib_get_double(h,index_key->name,&dval); +// if (err==GRIB_NOT_FOUND) snprintf(buf,1024,GRIB_KEY_UNDEF); +// else snprintf(buf,1024,"%g",dval); +// break; +// default : +// err=GRIB_WRONG_TYPE; +// return err; +// } +// if (err && err != GRIB_NOT_FOUND) { +// grib_context_log(c,GRIB_LOG_ERROR,"unable to create index. \"%s\": %s",index_key->name,grib_get_error_message(err)); +// return err; +// } + +// if (!index_key->values->value) { +// index_key->values->value=grib_context_strdup(c,buf); +// index_key->values_count++; +// } else { +// v=index_key->values; +// while (v->next && strcmp(v->value,buf)) v=v->next; +// if (strcmp(v->value,buf)) { +// index_key->values_count++; +// if (v->next) v=v->next; +// v->next=(grib_string_list*)grib_context_malloc_clear(c,sizeof(grib_string_list)); +// v->next->value=grib_context_strdup(c,buf); +// } +// } + +// if (!field_tree->value) { +// field_tree->value=grib_context_strdup(c,buf); +// } else { +// while (field_tree->next && +// (field_tree->value==NULL || +// strcmp(field_tree->value,buf))) +// field_tree=field_tree->next; + +// if (!field_tree->value || strcmp(field_tree->value,buf)){ +// field_tree->next= +// (grib_field_tree*)grib_context_malloc_clear(c, +// sizeof(grib_field_tree)); +// field_tree=field_tree->next; +// field_tree->value=grib_context_strdup(c,buf); +// } +// } + +// if (index_key->next) { +// if (!field_tree->next_level) { +// field_tree->next_level= +// (grib_field_tree*)grib_context_malloc_clear(c,sizeof(grib_field_tree)); +// } +// field_tree=field_tree->next_level; +// } +// index_key=index_key->next; +// } + +// field=(grib_field*)grib_context_malloc_clear(c,sizeof(grib_field)); +// field->file=file; +// index->count++; +// field->offset=h->offset; + +// err=grib_get_long(h,"totalLength",&length); +// if (err) return err; +// field->length=length; + +// if (field_tree->field) { +// grib_field* pfield=field_tree->field; +// while (pfield->next) pfield=pfield->next; +// pfield->next=field; +// } else +// field_tree->field=field; + +// if (h) grib_handle_delete(h); + +// } + +// grib_file_close(file->name, 0, &err); + +// if (err) return err; +// index->rewind=1; +// return GRIB_SUCCESS; +// } - if (h) grib_handle_delete(h); - - } - - grib_file_close(file->name, 0, &err); - - if (err) return err; - index->rewind=1; - return GRIB_SUCCESS; -} -#endif grib_index* grib_index_new_from_file(grib_context* c, const char* filename, const char* keys, int* err) { @@ -1750,7 +1747,7 @@ static void grib_dump_index_keys(FILE* fout, grib_index_key* keys) grib_dump_key_values(fout, keys->values); grib_dump_index_keys(fout, keys->next); } -#if 0 +#ifdef INDEX_DUMPS static void grib_dump_files(FILE* fout, grib_file* files) { if (!files) return; @@ -1875,6 +1872,7 @@ grib_handle* codes_new_from_index(grib_index* index, int message_type, int* err) grib_field_list *fieldset, *next; grib_handle* h = NULL; grib_context* c = NULL; + *err = 0; if (!index) return NULL; @@ -1941,34 +1939,32 @@ void grib_index_rewind(grib_index* index) index->rewind = 1; } -#if 0 -static grib_index_key* search_key(grib_index_key* keys, grib_index_key* to_search) -{ - if (!keys || !strcmp(keys->name, to_search->name)) - return keys; - return search_key(keys->next, to_search); -} - -int grib_index_search(grib_index* index, grib_index_key* keys) -{ - grib_index_key* ki = index->keys; - grib_index_key* ks = keys; - - while (ks) { - ki = search_key(ki, ks); - if (!ki) { - ki = index->keys; - ki = search_key(ki, ks); - } - if (ki) - snprintf(ki->value, 1024, "%s", ks->value); - ks = ks->next; - } - - grib_index_rewind(index); - return 0; -} -#endif +// static grib_index_key* search_key(grib_index_key* keys, grib_index_key* to_search) +// { +// if (!keys || !strcmp(keys->name, to_search->name)) +// return keys; +// return search_key(keys->next, to_search); +// } + +// int grib_index_search(grib_index* index, grib_index_key* keys) +// { +// grib_index_key* ki = index->keys; +// grib_index_key* ks = keys; + +// while (ks) { +// ki = search_key(ki, ks); +// if (!ki) { +// ki = index->keys; +// ki = search_key(ki, ks); +// } +// if (ki) +// snprintf(ki->value, 1024, "%s", ks->value); +// ks = ks->next; +// } + +// grib_index_rewind(index); +// return 0; +// } int codes_index_set_product_kind(grib_index* index, ProductKind product_kind) { diff --git a/src/grib_io.cc b/src/grib_io.cc index da16be6d4..d92f3565e 100644 --- a/src/grib_io.cc +++ b/src/grib_io.cc @@ -84,46 +84,59 @@ typedef struct reader } reader; -static int read_the_rest(reader* r, size_t message_length, unsigned char* tmp, int already_read, int check7777) +// If no_alloc argument is 1, then the content of the message are not stored. We just seek to the final 7777 +static int read_the_rest(reader* r, size_t message_length, unsigned char* tmp, int already_read, int check7777, int no_alloc) { int err = GRIB_SUCCESS; size_t buffer_size; size_t rest; - unsigned char* buffer; + unsigned char* buffer = NULL; grib_context* c = grib_context_get_default(); if (message_length == 0) return GRIB_BUFFER_TOO_SMALL; - buffer_size = message_length; + buffer_size = message_length; // store the whole message in the buffer + if (no_alloc) + buffer_size = 5; // big enough to store the 7777 rest = message_length - already_read; r->message_size = message_length; buffer = (unsigned char*)r->alloc(r->alloc_data, &buffer_size, &err); if (err) return err; - if (buffer == NULL || (buffer_size < message_length)) { - return GRIB_BUFFER_TOO_SMALL; + if (no_alloc) { + r->seek(r->read_data, rest - 4); // jump to the end before the 7777 + } else { + if (buffer == NULL || (buffer_size < message_length)) { + return GRIB_BUFFER_TOO_SMALL; + } + memcpy(buffer, tmp, already_read); } - memcpy(buffer, tmp, already_read); - - if ((r->read(r->read_data, buffer + already_read, rest, &err) != rest) || err) { - /*fprintf(stderr, "read_the_rest: r->read failed: %s\n", grib_get_error_message(err));*/ + bool read_failed = false; + if (no_alloc) { + read_failed = ((r->read(r->read_data, buffer, 4, &err) != 4) || err); + } + else { + read_failed = ((r->read(r->read_data, buffer + already_read, rest, &err) != rest) || err); + } + if (read_failed) { if (c->debug) - fprintf(stderr, "ECCODES DEBUG read_the_rest: Read failed (Coded length=%zu, Already read=%d)\n", - message_length, already_read); + fprintf(stderr, "ECCODES DEBUG %s: Read failed (Coded length=%zu, Already read=%d)", + __func__, message_length, already_read); return err; } + const size_t mlen = no_alloc ? 4 : message_length; if (check7777 && !r->headers_only && - (buffer[message_length - 4] != '7' || - buffer[message_length - 3] != '7' || - buffer[message_length - 2] != '7' || - buffer[message_length - 1] != '7')) + (buffer[mlen - 4] != '7' || + buffer[mlen - 3] != '7' || + buffer[mlen - 2] != '7' || + buffer[mlen - 1] != '7')) { if (c->debug) - fprintf(stderr, "ECCODES DEBUG read_the_rest: No final 7777 at expected location (Coded length=%zu)\n", message_length); + fprintf(stderr, "ECCODES DEBUG %s: No final 7777 at expected location (Coded length=%zu)\n", __func__, message_length); return GRIB_WRONG_LENGTH; } @@ -144,7 +157,7 @@ static int read_the_rest(reader* r, size_t message_length, unsigned char* tmp, i #define UINT3(a, b, c) (size_t)((a << 16) + (b << 8) + c); -static int read_GRIB(reader* r) +static int read_GRIB(reader* r, int no_alloc) { unsigned char* tmp = NULL; size_t length = 0; @@ -412,7 +425,7 @@ static int read_GRIB(reader* r) } /* Assert(i <= buf->length); */ - err = read_the_rest(r, length, tmp, i, 1); + err = read_the_rest(r, length, tmp, i, /*check7777=*/1, no_alloc); if (err) r->seek_from_start(r->read_data, r->offset + 4); @@ -421,7 +434,7 @@ static int read_GRIB(reader* r) return err; } -static int read_PSEUDO(reader* r, const char* type) +static int read_PSEUDO(reader* r, const char* type, int no_alloc) { unsigned char tmp[32]; /* Should be enough */ size_t sec1len = 0; @@ -467,10 +480,9 @@ static int read_PSEUDO(reader* r, const char* type) /* fprintf(stderr,"%s sec4len=%d i=%d l=%d\n",type,sec4len,i,4+sec1len+sec4len+4); */ Assert(i <= sizeof(tmp)); - return read_the_rest(r, 4 + sec1len + sec4len + 4, tmp, i, 1); + return read_the_rest(r, 4 + sec1len + sec4len + 4, tmp, i, /*check7777=*/1, no_alloc); } - static int read_HDF5_offset(reader* r, int length, unsigned long* v, unsigned char* tmp, int* i) { unsigned char buf[8]; @@ -655,7 +667,7 @@ static int read_HDF5(reader* r) } Assert(i <= sizeof(tmp)); - return read_the_rest(r, end_of_file_address, tmp, i, 0); + return read_the_rest(r, end_of_file_address, tmp, i, 0, 0); } static int read_WRAP(reader* r) @@ -688,10 +700,10 @@ static int read_WRAP(reader* r) } Assert(i <= sizeof(tmp)); - return read_the_rest(r, length, tmp, i, 1); + return read_the_rest(r, length, tmp, i, 1, 0); } -static int read_BUFR(reader* r) +static int read_BUFR(reader* r, int no_alloc) { /* unsigned char tmp[65536];*/ /* Should be enough */ size_t length = 0; @@ -837,7 +849,7 @@ static int read_BUFR(reader* r) } /* Assert(i <= sizeof(tmp)); */ - err = read_the_rest(r, length, tmp, i, 1); + err = read_the_rest(r, length, tmp, i, /*check7777=*/1, no_alloc); if (err) r->seek_from_start(r->read_data, r->offset + 4); @@ -846,7 +858,7 @@ static int read_BUFR(reader* r) return err; } -static int ecc_read_any(reader* r, int grib_ok, int bufr_ok, int hdf5_ok, int wrap_ok) +static int ecc_read_any(reader* r, int no_alloc, int grib_ok, int bufr_ok, int hdf5_ok, int wrap_ok) { unsigned char c; int err = 0; @@ -859,14 +871,14 @@ static int ecc_read_any(reader* r, int grib_ok, int bufr_ok, int hdf5_ok, int wr switch (magic & 0xffffffff) { case GRIB: if (grib_ok) { - err = read_GRIB(r); + err = read_GRIB(r, no_alloc); return err == GRIB_END_OF_FILE ? GRIB_PREMATURE_END_OF_FILE : err; /* Premature EOF */ } break; case BUFR: if (bufr_ok) { - err = read_BUFR(r); + err = read_BUFR(r, no_alloc); return err == GRIB_END_OF_FILE ? GRIB_PREMATURE_END_OF_FILE : err; /* Premature EOF */ } break; @@ -887,19 +899,19 @@ static int ecc_read_any(reader* r, int grib_ok, int bufr_ok, int hdf5_ok, int wr case BUDG: if (grib_ok) { - err = read_PSEUDO(r, "BUDG"); + err = read_PSEUDO(r, "BUDG", no_alloc); return err == GRIB_END_OF_FILE ? GRIB_PREMATURE_END_OF_FILE : err; /* Premature EOF */ } break; case DIAG: if (grib_ok) { - err = read_PSEUDO(r, "DIAG"); + err = read_PSEUDO(r, "DIAG", no_alloc); return err == GRIB_END_OF_FILE ? GRIB_PREMATURE_END_OF_FILE : err; /* Premature EOF */ } break; case TIDE: if (grib_ok) { - err = read_PSEUDO(r, "TIDE"); + err = read_PSEUDO(r, "TIDE", no_alloc); return err == GRIB_END_OF_FILE ? GRIB_PREMATURE_END_OF_FILE : err; /* Premature EOF */ } break; @@ -909,7 +921,7 @@ static int ecc_read_any(reader* r, int grib_ok, int bufr_ok, int hdf5_ok, int wr return err; } -static int read_any(reader* r, int grib_ok, int bufr_ok, int hdf5_ok, int wrap_ok) +static int read_any(reader* r, int no_alloc, int grib_ok, int bufr_ok, int hdf5_ok, int wrap_ok) { int result = 0; @@ -922,7 +934,7 @@ static int read_any(reader* r, int grib_ok, int bufr_ok, int hdf5_ok, int wrap_o GRIB_MUTEX_LOCK(&mutex1); #endif - result = ecc_read_any(r, grib_ok, bufr_ok, hdf5_ok, wrap_ok); + result = ecc_read_any(r, no_alloc, grib_ok, bufr_ok, hdf5_ok, wrap_ok); #ifndef ECCODES_EACH_THREAD_OWN_FILE GRIB_MUTEX_UNLOCK(&mutex1); @@ -1152,7 +1164,8 @@ static void* user_provider_buffer(void* data, size_t* length, int* err) return u->user_buffer; } -static int ecc_wmo_read_any_from_file(FILE* f, void* buffer, size_t* len, int grib_ok, int bufr_ok, int hdf5_ok, int wrap_ok) +static int ecc_wmo_read_any_from_file(FILE* f, void* buffer, size_t* len, off_t* offset, + int no_alloc, int grib_ok, int bufr_ok, int hdf5_ok, int wrap_ok) { int err; user_buffer_t u; @@ -1172,25 +1185,60 @@ static int ecc_wmo_read_any_from_file(FILE* f, void* buffer, size_t* len, int gr r.offset = 0; r.message_size = 0; - err = read_any(&r, grib_ok, bufr_ok, hdf5_ok, wrap_ok); + err = read_any(&r, no_alloc, grib_ok, bufr_ok, hdf5_ok, wrap_ok); *len = r.message_size; + *offset = r.offset; return err; } int wmo_read_any_from_file(FILE* f, void* buffer, size_t* len) { - return ecc_wmo_read_any_from_file(f, buffer, len, 1, 1, 1, 1); + off_t offset = 0; + return ecc_wmo_read_any_from_file(f, buffer, len, &offset, /*no_alloc=*/0, 1, 1, 1, 1); } - int wmo_read_grib_from_file(FILE* f, void* buffer, size_t* len) { - return ecc_wmo_read_any_from_file(f, buffer, len, 1, 0, 0, 0); + off_t offset = 0; + return ecc_wmo_read_any_from_file(f, buffer, len, &offset, /*no_alloc=*/0, 1, 0, 0, 0); } - int wmo_read_bufr_from_file(FILE* f, void* buffer, size_t* len) { - return ecc_wmo_read_any_from_file(f, buffer, len, 0, 1, 0, 0); + off_t offset = 0; + return ecc_wmo_read_any_from_file(f, buffer, len, &offset, /*no_alloc=*/0, 0, 1, 0, 0); +} + +// Fast versions +int wmo_read_any_from_file_fast(FILE* f, size_t* msg_len, off_t* msg_offset) +{ + unsigned char buffer[64] = {0,}; + *msg_len = sizeof(buffer); + return ecc_wmo_read_any_from_file(f, buffer, msg_len, msg_offset, /*no_alloc=*/1, 1, 1, 1, 1); +} +int wmo_read_grib_from_file_fast(FILE* f, size_t* msg_len, off_t* msg_offset) +{ + unsigned char buffer[64] = {0,}; + *msg_len = sizeof(buffer); + return ecc_wmo_read_any_from_file(f, buffer, msg_len, msg_offset, /*no_alloc=*/1, 1, 0, 0, 0); +} +int wmo_read_bufr_from_file_fast(FILE* f, size_t* msg_len, off_t* msg_offset) +{ + unsigned char buffer[64] = {0,}; + *msg_len = sizeof(buffer); + return ecc_wmo_read_any_from_file(f, buffer, msg_len, msg_offset, /*no_alloc=*/1, 0, 1, 0, 0); +} +int wmo_read_gts_from_file_fast(FILE* f, size_t* msg_len, off_t* msg_offset) +{ + //TODO(masn): Needs proper implementation; no malloc + unsigned char buffer[1024] = {0,}; + void* mesg = NULL; + int err = GRIB_SUCCESS; + grib_context* c = grib_context_get_default(); + + *msg_len = sizeof(buffer); + mesg = wmo_read_gts_from_file_malloc(f, 0, msg_len, msg_offset, &err); + grib_context_free(c, mesg); + return err; } int wmo_read_gts_from_file(FILE* f, void* buffer, size_t* len) @@ -1346,7 +1394,7 @@ int wmo_read_any_from_stream(void* stream_data, long (*stream_proc)(void*, void* r.alloc = &user_provider_buffer; r.headers_only = 0; - err = read_any(&r, 1, 1, 1, 1); + err = read_any(&r, /*no_alloc=*/0, 1, 1, 1, 1); *len = r.message_size; return err; @@ -1375,7 +1423,7 @@ void* wmo_read_any_from_stream_malloc(void* stream_data, long (*stream_proc)(voi r.alloc = &allocate_buffer; r.headers_only = 0; - *err = read_any(&r, 1, 1, 1, 1); + *err = read_any(&r, /*no_alloc=*/0, 1, 1, 1, 1); *size = r.message_size; return u.buffer; @@ -1482,7 +1530,7 @@ static void* ecc_wmo_read_any_from_file_malloc(FILE* f, int* err, size_t* size, r.headers_only = headers_only; r.offset = 0; - *err = read_any(&r, grib_ok, bufr_ok, hdf5_ok, wrap_ok); + *err = read_any(&r, /*no_alloc=*/0, grib_ok, bufr_ok, hdf5_ok, wrap_ok); *size = r.message_size; *offset = r.offset; @@ -1546,7 +1594,7 @@ int grib_read_any_headers_only_from_file(grib_context* ctx, FILE* f, void* buffe r.offset = 0; r.message_size = 0; - err = read_any(&r, 1, ECCODES_READS_BUFR, ECCODES_READS_HDF5, ECCODES_READS_WRAP); + err = read_any(&r, /*no_alloc=*/0, 1, ECCODES_READS_BUFR, ECCODES_READS_HDF5, ECCODES_READS_WRAP); *len = r.message_size; @@ -1576,7 +1624,7 @@ int grib_read_any_from_file(grib_context* ctx, FILE* f, void* buffer, size_t* le offset = ftello(f); - err = read_any(&r, 1, ECCODES_READS_BUFR, ECCODES_READS_HDF5, ECCODES_READS_WRAP); + err = read_any(&r, /*no_alloc=*/0, 1, ECCODES_READS_BUFR, ECCODES_READS_HDF5, ECCODES_READS_WRAP); if (err == GRIB_BUFFER_TOO_SMALL) { if (fseeko(f, offset, SEEK_SET)) @@ -1647,7 +1695,7 @@ int grib_read_any_from_memory_alloc(grib_context* ctx, unsigned char** data, siz r.offset = 0; r.message_size = 0; - err = read_any(&r, 1, ECCODES_READS_BUFR, ECCODES_READS_HDF5, ECCODES_READS_WRAP); + err = read_any(&r, /*no_alloc=*/0, 1, ECCODES_READS_BUFR, ECCODES_READS_HDF5, ECCODES_READS_WRAP); *buffer = u.buffer; *length = u.length; @@ -1681,7 +1729,7 @@ int grib_read_any_from_memory(grib_context* ctx, unsigned char** data, size_t* d r.offset = 0; r.message_size = 0; - err = read_any(&r, 1, ECCODES_READS_BUFR, ECCODES_READS_HDF5, ECCODES_READS_WRAP); + err = read_any(&r, /*no_alloc=*/0, 1, ECCODES_READS_BUFR, ECCODES_READS_HDF5, ECCODES_READS_WRAP); *len = r.message_size; *data_length = m.data_len; @@ -1706,11 +1754,9 @@ int grib_count_in_file(grib_context* c, FILE* f, int* n) } } else { - void* mesg = NULL; size_t size = 0; off_t offset = 0; - while ((mesg = wmo_read_any_from_file_malloc(f, 0, &size, &offset, &err)) != NULL && err == GRIB_SUCCESS) { - grib_context_free(c, mesg); + while ((err = wmo_read_any_from_file_fast(f, &size, &offset)) == GRIB_SUCCESS) { (*n)++; } } @@ -1737,15 +1783,15 @@ int grib_count_in_filename(grib_context* c, const char* filename, int* n) return err; } -typedef void* (*decoder_proc)(FILE* f, int headers_only, size_t* size, off_t* offset, int* err); +typedef int (*decoder_proc)(FILE* f, size_t* size, off_t* offset); static decoder_proc get_reader_for_product(ProductKind product) { decoder_proc decoder = NULL; - if (product == PRODUCT_GRIB) decoder = &wmo_read_grib_from_file_malloc; - else if (product == PRODUCT_BUFR) decoder = &wmo_read_bufr_from_file_malloc; - else if (product == PRODUCT_GTS) decoder = &wmo_read_gts_from_file_malloc; - else if (product == PRODUCT_ANY) decoder = &wmo_read_any_from_file_malloc; + if (product == PRODUCT_GRIB) decoder = &wmo_read_grib_from_file_fast; + else if (product == PRODUCT_BUFR) decoder = &wmo_read_bufr_from_file_fast; + else if (product == PRODUCT_GTS) decoder = &wmo_read_gts_from_file_fast; + else if (product == PRODUCT_ANY) decoder = &wmo_read_any_from_file_fast; return decoder; } @@ -1759,20 +1805,18 @@ static int count_product_in_file(grib_context* c, FILE* f, ProductKind product, decoder = get_reader_for_product(product); if (!decoder) { - grib_context_log(c, GRIB_LOG_ERROR, "count_product_in_file: not supported for given product"); + grib_context_log(c, GRIB_LOG_ERROR, "%s: Not supported for given product", __func__); return GRIB_INVALID_ARGUMENT; } if (c->multi_support_on && product == PRODUCT_GRIB) { - grib_context_log(c, GRIB_LOG_ERROR, "count_product_in_file: Multi-field GRIBs not supported"); + grib_context_log(c, GRIB_LOG_ERROR, "%s: Multi-field GRIBs not supported", __func__); err = GRIB_NOT_IMPLEMENTED; } else { - void* mesg = NULL; size_t size = 0; off_t offset = 0; - while ((mesg = decoder(f, 0, &size, &offset, &err)) != NULL && err == GRIB_SUCCESS) { - grib_context_free(c, mesg); + while ((err = decoder(f, &size, &offset)) == GRIB_SUCCESS) { (*count)++; } rewind(f); @@ -1784,7 +1828,6 @@ static int count_product_in_file(grib_context* c, FILE* f, ProductKind product, int codes_extract_offsets_malloc(grib_context* c, const char* filename, ProductKind product, off_t** offsets, int* length, int strict_mode) { int err = 0; - void* mesg = NULL; size_t size = 0; off_t offset = 0; int num_messages = 0, i = 0; @@ -1793,26 +1836,31 @@ int codes_extract_offsets_malloc(grib_context* c, const char* filename, ProductK decoder = get_reader_for_product(product); if (!decoder) { - grib_context_log(c, GRIB_LOG_ERROR, "codes_extract_offsets_malloc: not supported for given product"); + grib_context_log(c, GRIB_LOG_ERROR, "%s: Not supported for given product", __func__); return GRIB_INVALID_ARGUMENT; } if (!c) c = grib_context_get_default(); + + if (path_is_directory(filename)) { + grib_context_log(c, GRIB_LOG_ERROR, "%s: \"%s\" is a directory", __func__, filename); + return GRIB_IO_PROBLEM; + } f = fopen(filename, "rb"); if (!f) { - grib_context_log(c, GRIB_LOG_ERROR, "codes_extract_offsets_malloc: Unable to read file \"%s\"", filename); + grib_context_log(c, GRIB_LOG_ERROR, "%s: Unable to read file \"%s\"", __func__, filename); perror(filename); return GRIB_IO_PROBLEM; } err = count_product_in_file(c, f, product, &num_messages); if (err) { - grib_context_log(c, GRIB_LOG_ERROR, "codes_extract_offsets_malloc: Unable to count messages"); + grib_context_log(c, GRIB_LOG_ERROR, "%s: Unable to count messages (%s)", __func__, grib_get_error_message(err)); fclose(f); return err; } *length = num_messages; if (num_messages == 0) { - grib_context_log(c, GRIB_LOG_ERROR, "codes_extract_offsets_malloc: No messages in file"); + grib_context_log(c, GRIB_LOG_ERROR, "%s: No messages in file", __func__); fclose(f); return GRIB_INVALID_MESSAGE; } @@ -1827,28 +1875,16 @@ int codes_extract_offsets_malloc(grib_context* c, const char* filename, ProductK if (i >= num_messages) break; - mesg = decoder(f, 0, &size, &offset, &err); - if (mesg != NULL && err == 0) { + err = decoder(f, &size, &offset); + if (!err) { (*offsets)[i] = offset; - grib_context_free(c, mesg); } - if (mesg && err) { - if (strict_mode) { - grib_context_free(c, mesg); + else { + if (strict_mode && (err != GRIB_END_OF_FILE && err != GRIB_PREMATURE_END_OF_FILE)) { fclose(f); return GRIB_DECODING_ERROR; } } - if (!mesg) { - if (err != GRIB_END_OF_FILE && err != GRIB_PREMATURE_END_OF_FILE) { - /* An error occurred */ - grib_context_log(c, GRIB_LOG_ERROR, "codes_extract_offsets_malloc: Unable to read message"); - if (strict_mode) { - fclose(f); - return GRIB_DECODING_ERROR; - } - } - } ++i; } diff --git a/src/grib_iterator_class_gaussian.cc b/src/grib_iterator_class_gaussian.cc index 366505b71..7042b6233 100644 --- a/src/grib_iterator_class_gaussian.cc +++ b/src/grib_iterator_class_gaussian.cc @@ -12,7 +12,7 @@ **************************************/ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -148,7 +148,7 @@ static int init(grib_iterator* i, grib_handle* h, grib_arguments* args) if (jScansPositively) { for (lai = 0; lai < self->Nj; lai++) { - DebugAssert(istart >= 0); + DEBUG_ASSERT(istart >= 0); self->las[lai] = lats[istart--]; if (istart<0) istart=size-1; } @@ -191,34 +191,31 @@ static void binary_search_gaussian_latitudes(const double array[], const unsigne *j = -1; /* Not found */ } -#if 0 -static void binary_search_old(const double xx[], const unsigned long n, double x, long* j) -{ - /*This routine works only on descending ordered arrays*/ - unsigned long ju, jm, jl; - jl = 0; - ju = n; - if (fabs(x - xx[0]) < EPSILON) { - *j = 0; - return; - } - if (fabs(x - xx[n]) < EPSILON) { - *j = n; - return; - } - - while (ju - jl > 1) { - jm = (ju + jl) >> 1; - if (fabs(x - xx[jm]) < EPSILON) { - /* found something close enough. We're done */ - *j = jm; - return; - } - if (x < xx[jm]) - jl = jm; - else - ju = jm; - } - *j = jl; -} -#endif +// static void binary_search_old(const double xx[], const unsigned long n, double x, long* j) +// { +// /*This routine works only on descending ordered arrays*/ +// unsigned long ju, jm, jl; +// jl = 0; +// ju = n; +// if (fabs(x - xx[0]) < EPSILON) { +// *j = 0; +// return; +// } +// if (fabs(x - xx[n]) < EPSILON) { +// *j = n; +// return; +// } +// while (ju - jl > 1) { +// jm = (ju + jl) >> 1; +// if (fabs(x - xx[jm]) < EPSILON) { +// /* found something close enough. We're done */ +// *j = jm; +// return; +// } +// if (x < xx[jm]) +// jl = jm; +// else +// ju = jm; +// } +// *j = jl; +// } diff --git a/src/grib_iterator_class_gaussian_reduced.cc b/src/grib_iterator_class_gaussian_reduced.cc index 95608dd91..e48db0a68 100644 --- a/src/grib_iterator_class_gaussian_reduced.cc +++ b/src/grib_iterator_class_gaussian_reduced.cc @@ -14,7 +14,7 @@ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -230,15 +230,13 @@ static int iterate_reduced_gaussian_subarea_algorithm2(grib_iterator* iter, grib binary_search(lats, numlats - 1, lat_first, &l); Assert(l < numlats); -#if 0 - for(il=0; ile = 0; for (j = 0; j < plsize; j++) { @@ -255,7 +253,7 @@ static int iterate_reduced_gaussian_subarea_algorithm2(grib_iterator* iter, grib return GRIB_WRONG_GRID; } self->los[iter->e] = lon2; - DebugAssert(j + l < numlats); + DEBUG_ASSERT(j + l < numlats); self->las[iter->e] = lats[j + l]; iter->e++; } @@ -282,15 +280,13 @@ static int iterate_reduced_gaussian_subarea_wrapper(grib_iterator* iter, grib_ha { return iterate_reduced_gaussian_subarea_algorithm2(iter, h, lat_first, lon_first, lat_last, lon_last, lats, pl, plsize, numlats); -#if 0 - /* Try legacy approach, if that fails try the next algorithm */ - int err = iterate_reduced_gaussian_subarea(iter, h, lat_first, lon_first, lat_last, lon_last, lats, pl, plsize, 0); - if (err == GRIB_WRONG_GRID) { - /* ECC-445: First attempt failed. Try again with a different algorithm */ - err = iterate_reduced_gaussian_subarea_algorithm2(iter, h, lat_first, lon_first, lat_last, lon_last, lats, pl, plsize); - } - return err; -#endif + // Try legacy approach, if that fails try the next algorithm + // int err = iterate_reduced_gaussian_subarea(iter, h, lat_first, lon_first, lat_last, lon_last, lats, pl, plsize, 0); + // if (err == GRIB_WRONG_GRID) { + // /* ECC-445: First attempt failed. Try again with a different algorithm */ + // err = iterate_reduced_gaussian_subarea_algorithm2(iter, h, lat_first, lon_first, lat_last, lon_last, lats, pl, plsize); + // } + // return err; } static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) diff --git a/src/grib_iterator_class_lambert_azimuthal_equal_area.cc b/src/grib_iterator_class_lambert_azimuthal_equal_area.cc index f77b23afc..f9b76d702 100644 --- a/src/grib_iterator_class_lambert_azimuthal_equal_area.cc +++ b/src/grib_iterator_class_lambert_azimuthal_equal_area.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl diff --git a/src/grib_iterator_class_lambert_conformal.cc b/src/grib_iterator_class_lambert_conformal.cc index 8c5fed223..cf0000953 100644 --- a/src/grib_iterator_class_lambert_conformal.cc +++ b/src/grib_iterator_class_lambert_conformal.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -361,7 +361,7 @@ static int init_oblate(grib_handle* h, } lonRad = adjust_lon_radians(theta / ns + LoVInRadians); if (i == 0 && j == 0) { - DebugAssert(fabs(latFirstInRadians - latRad) <= EPSILON); + DEBUG_ASSERT(fabs(latFirstInRadians - latRad) <= EPSILON); } latDeg = latRad * RAD2DEG; /* Convert to degrees */ lonDeg = normalise_longitude_in_degrees(lonRad * RAD2DEG); diff --git a/src/grib_iterator_class_latlon_reduced.cc b/src/grib_iterator_class_latlon_reduced.cc index 90154ff22..c27dcb2d1 100644 --- a/src/grib_iterator_class_latlon_reduced.cc +++ b/src/grib_iterator_class_latlon_reduced.cc @@ -14,7 +14,7 @@ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl diff --git a/src/grib_iterator_class_mercator.cc b/src/grib_iterator_class_mercator.cc index fd67bd833..1f19af9a8 100644 --- a/src/grib_iterator_class_mercator.cc +++ b/src/grib_iterator_class_mercator.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -217,7 +217,7 @@ static int init_mercator(grib_handle* h, } lonRad = adjust_lon_radians(orientationInRadians + _x / (earthMajorAxisInMetres * m1)); if (i == 0 && j == 0) { - DebugAssert(fabs(latFirstInRadians - latRad) <= EPSILON); + DEBUG_ASSERT(fabs(latFirstInRadians - latRad) <= EPSILON); } latDeg = latRad * RAD2DEG; /* Convert to degrees */ lonDeg = normalise_longitude_in_degrees(lonRad * RAD2DEG); diff --git a/src/grib_iterator_class_polar_stereographic.cc b/src/grib_iterator_class_polar_stereographic.cc index 1f8b0d17b..753649141 100644 --- a/src/grib_iterator_class_polar_stereographic.cc +++ b/src/grib_iterator_class_polar_stereographic.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -292,68 +292,66 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) } y += Dy; } -#if 0 - /*standardParallel = (southPoleOnPlane == 1) ? -90 : +90;*/ - if (jPointsAreConsecutive) - { - x=xFirst; - for (i=0;i360) *lons -= 360; - lons++; - lats++; - - y+=Dy; - } - x+=Dx; - } - } - else - { - y=yFirst; - for (j=0;j360) *lons -= 360; - lons++; - lats++; - - x+=Dx; - } - y+=Dy; - } - } -#endif + +// /*standardParallel = (southPoleOnPlane == 1) ? -90 : +90;*/ +// if (jPointsAreConsecutive) +// { +// x=xFirst; +// for (i=0;i360) *lons -= 360; +// lons++; +// lats++; +// y+=Dy; +// } +// x+=Dx; +// } +// } +// else +// { +// y=yFirst; +// for (j=0;j360) *lons -= 360; +// lons++; +// lats++; +// x+=Dx; +// } +// y+=Dy; +// } +// } + iter->e = -1; /* Apply the scanning mode flags which may require data array to be transformed */ diff --git a/src/grib_iterator_class_regular.cc b/src/grib_iterator_class_regular.cc index ddbaa3044..cc870e70a 100644 --- a/src/grib_iterator_class_regular.cc +++ b/src/grib_iterator_class_regular.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl diff --git a/src/grib_iterator_class_space_view.cc b/src/grib_iterator_class_space_view.cc index 70299278b..c2e402e59 100644 --- a/src/grib_iterator_class_space_view.cc +++ b/src/grib_iterator_class_space_view.cc @@ -9,7 +9,7 @@ */ #include "grib_api_internal.h" -#include +#include /* This is used by make_class.pl @@ -97,47 +97,45 @@ static int next(grib_iterator* iter, double* lat, double* lon, double* val) return 1; } -#if 0 -static void adjustBadlyEncodedEcmwfGribs(grib_handle* h, - long* nx, long* ny, double* dx, double* dy, double* xp, double* yp) -{ - /* Correct the information provided in the headers of certain satellite imagery that - * we have available. This is specific to ECMWF. - * Obtained through trial-and-error to get the best match with the coastlines. - * - * Copied from Magics GribSatelliteInterpretor::AdjustBadlyEncodedGribs() - */ - long centre = 0; - int err = grib_get_long(h, "centre", ¢re); - if (!err && centre == 98) { - int err1 = 0, err2 = 0, err3 = 0; - long satelliteIdentifier, channelNumber, functionCode; - /* These keys are defined in the ECMWF local definition 24 - Satellite image simulation */ - err1 = grib_get_long(h, "satelliteIdentifier", &satelliteIdentifier); - err2 = grib_get_long(h, "channelNumber", &channelNumber); - err3 = grib_get_long(h, "functionCode", &functionCode); - if (!err1 && !err2 && !err3) { - if (satelliteIdentifier == 54 && channelNumber == 2 && *dx == 1179) { /* Meteosat 7, channel 2 */ - *nx = *ny = 900; - *dx = *dy = 853; - *xp = *yp = 450; - } - else if (satelliteIdentifier == 54 && channelNumber == 3 && *dx == 1179) { /* Meteosat 7, channel 3 */ - *dx = *dy = 1184; - *xp = *yp = 635; - } - else if (satelliteIdentifier == 259 && channelNumber == 4 && *dx == 1185) { /* GOES-15 (West) channel 4 */ - *dx = *dy = 880; - *xp = *yp = 450; - } - else if (satelliteIdentifier == 57 && *dx == 1732) { /* MSG (Meteosat second generation), non-HRV channels */ - *dx = *dy = 1811; - *xp = *yp = 928; - } - } - } -} -#endif +// static void adjustBadlyEncodedEcmwfGribs(grib_handle* h, +// long* nx, long* ny, double* dx, double* dy, double* xp, double* yp) +// { +// /* Correct the information provided in the headers of certain satellite imagery that +// * we have available. This is specific to ECMWF. +// * Obtained through trial-and-error to get the best match with the coastlines. +// * +// * Copied from Magics GribSatelliteInterpretor::AdjustBadlyEncodedGribs() +// */ +// long centre = 0; +// int err = grib_get_long(h, "centre", ¢re); +// if (!err && centre == 98) { +// int err1 = 0, err2 = 0, err3 = 0; +// long satelliteIdentifier, channelNumber, functionCode; +// /* These keys are defined in the ECMWF local definition 24 - Satellite image simulation */ +// err1 = grib_get_long(h, "satelliteIdentifier", &satelliteIdentifier); +// err2 = grib_get_long(h, "channelNumber", &channelNumber); +// err3 = grib_get_long(h, "functionCode", &functionCode); +// if (!err1 && !err2 && !err3) { +// if (satelliteIdentifier == 54 && channelNumber == 2 && *dx == 1179) { /* Meteosat 7, channel 2 */ +// *nx = *ny = 900; +// *dx = *dy = 853; +// *xp = *yp = 450; +// } +// else if (satelliteIdentifier == 54 && channelNumber == 3 && *dx == 1179) { /* Meteosat 7, channel 3 */ +// *dx = *dy = 1184; +// *xp = *yp = 635; +// } +// else if (satelliteIdentifier == 259 && channelNumber == 4 && *dx == 1185) { /* GOES-15 (West) channel 4 */ +// *dx = *dy = 880; +// *xp = *yp = 450; +// } +// else if (satelliteIdentifier == 57 && *dx == 1732) { /* MSG (Meteosat second generation), non-HRV channels */ +// *dx = *dy = 1811; +// *xp = *yp = 928; +// } +// } +// } +// } #define RAD2DEG 57.29577951308232087684 /* 180 over pi */ #define DEG2RAD 0.01745329251994329576 /* pi over 180 */ diff --git a/src/grib_itrie.cc b/src/grib_itrie.cc index b6c0dc105..0421e4b84 100644 --- a/src/grib_itrie.cc +++ b/src/grib_itrie.cc @@ -319,7 +319,7 @@ grib_itrie* grib_itrie_new(grib_context* c, int* count) void grib_itrie_delete(grib_itrie* t) { - GRIB_MUTEX_INIT_ONCE(&once, &init) + GRIB_MUTEX_INIT_ONCE(&once, &init); GRIB_MUTEX_LOCK(&mutex); if (t) { diff --git a/src/grib_itrie_keys.cc b/src/grib_itrie_keys.cc index 64995dfa4..a0a154427 100644 --- a/src/grib_itrie_keys.cc +++ b/src/grib_itrie_keys.cc @@ -8,10 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/************************************** - * Enrico Fucile - **************************************/ - static const int mapping[] = { 0, /* 00 */ 0, /* 01 */ diff --git a/src/grib_loader_from_array.cc b/src/grib_loader_from_array.cc index 8876d493a..c60f233d1 100644 --- a/src/grib_loader_from_array.cc +++ b/src/grib_loader_from_array.cc @@ -13,7 +13,7 @@ #include "grib_api_internal.h" -#include +#include int grib_lookup_long_from_array(grib_context* gc, grib_loader* loader, const char* name, long* lvalue) { @@ -55,176 +55,176 @@ int grib_lookup_long_from_array(grib_context* gc, grib_loader* loader, const cha return GRIB_SUCCESS; } -#if 0 -int grib_init_accessor_from_array(grib_loader* loader, grib_accessor* ga, grib_arguments* default_value) -{ - grib_handle* h = grib_handle_of_accessor(ga); - int retval = GRIB_SUCCESS; - char* strvalue; - size_t len = 0; - int type = 0; - double* dvalue = 0; - long* lvalue = 0; - long lval = 0; - double dval = 0; - int i = 0; - grib_associative_array* ar = NULL; - grib_runtime_type* value = NULL; - - ar = (grib_associative_array*)loader->data; - - grib_context_log(h->context, GRIB_LOG_DEBUG, "Initialize %s", ga->name); - - retval = grib_associative_array_get(ar, ga->name, &value); - - if ((retval != GRIB_ARRAY_SUCCESS) && default_value) { - grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting %s to default value", ga->name); - grib_pack_expression(ga, grib_arguments_get_expression(h, default_value, 0)); - return GRIB_SUCCESS; - } - if (ga->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) { - grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting %s ignored (read only)", ga->name); - return GRIB_SUCCESS; - } - - if (retval != GRIB_ARRAY_SUCCESS) { - grib_context_log(h->context, GRIB_LOG_DEBUG, - "Grib array error %d", retval); - if ((ga->flags & GRIB_ACCESSOR_FLAG_CAN_BE_MISSING)) { - grib_context_log(h->context, GRIB_LOG_DEBUG, - "Setting %s ignored (optional or can be missing)", ga->name); - return GRIB_SUCCESS; - } - else { - grib_context_log(h->context, GRIB_LOG_ERROR, "%s required", ga->name); - return retval; - } - } - - if (value && grib_runtimetype_get_type(value, &type) == GRIB_RUNTIMETYPE_SUCCESS) { - if (type == GRIB_RUNTIMETYPE_CHAR) { - grib_runtimetype_get_char(value, &strvalue, &len); - switch (grib_accessor_get_native_type(ga)) { - case GRIB_TYPE_STRING: - grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting %s to string %s", - ga->name, strvalue); - grib_set_string_internal(h, ga->name, strvalue, &len); - break; - - case GRIB_TYPE_LONG: - if (!strcmp(strvalue, "MISSING")) - lval = GRIB_MISSING_LONG; - else - lval = atol(strvalue); - grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting %s to long %ld", ga->name, lval); - grib_set_long_internal(h, ga->name, lval); - break; - - case GRIB_TYPE_DOUBLE: - if (!strcmp(strvalue, "MISSING")) - dval = GRIB_MISSING_DOUBLE; - else if (sscanf(strvalue, "%lg", &dval) != 1) { - grib_context_log(h->context, GRIB_LOG_ERROR, "Unable to set %s wrong value format", ga->name); - } - grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting %s to double %lg (%s)", ga->name, dval, strvalue); - grib_set_double_internal(h, ga->name, dval); - break; - - case GRIB_TYPE_BYTES: - grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting %s to string %s", - ga->name, strvalue); - grib_set_bytes_internal(h, ga->name, (unsigned char*)strvalue, &len); - break; - - case GRIB_TYPE_LABEL: - break; - - default: - grib_context_log(h->context, GRIB_LOG_ERROR, "Setting %s, cannot establish type %d [%s]", ga->name, grib_accessor_get_native_type(ga), ga->creator->cclass->name); - break; - } - } - else { - if (grib_runtimetype_get_double(value, &dvalue, &len) == GRIB_RUNTIMETYPE_SUCCESS) { - switch (grib_accessor_get_native_type(ga)) { - case GRIB_TYPE_LONG: - lvalue = (long*)malloc(sizeof(long) * len); - Assert(lvalue); - for (i = 0; i < len; i++) - lvalue[i] = (long)dvalue[i]; - grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting long array %s", ga->name); - grib_set_long_array(h, ga->name, lvalue, len); - free(lvalue); - break; - - case GRIB_TYPE_DOUBLE: - grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting double array %s", ga->name); - grib_set_double_array(h, ga->name, dvalue, len); - break; - - default: - grib_context_log(h->context, GRIB_LOG_ERROR, "Setting array %s, wrong type [%d]", ga->name, grib_accessor_get_native_type(ga)); - break; - } - } - else - grib_context_log(h->context, GRIB_LOG_ERROR, "Unable to set %s to double, wrong type (%d)", - ga->name, type); - } -#if 0 - switch(grib_accessor_get_native_type(ga)) - { - case GRIB_TYPE_STRING: - if (grib_runtimetype_get_char(value,&strvalue,&strvalue_size) == GRIB_RUNTIMETYPE_SUCCESS) { - grib_context_log(h->context,GRIB_LOG_DEBUG, "Setting %s to string %s", - ga->name, strvalue); - len=strlen(strvalue); - grib_set_string_internal(h,ga->name,strvalue,&len); - } else - grib_context_log(h->context,GRIB_LOG_ERROR, "Unable to set %s to string, wrong type", - ga->name); - break; +// int grib_init_accessor_from_array(grib_loader* loader, grib_accessor* ga, grib_arguments* default_value) +// { +// grib_handle* h = grib_handle_of_accessor(ga); +// int retval = GRIB_SUCCESS; +// char* strvalue; +// size_t len = 0; +// int type = 0; +// double* dvalue = 0; +// long* lvalue = 0; +// long lval = 0; +// double dval = 0; +// int i = 0; +// grib_associative_array* ar = NULL; +// grib_runtime_type* value = NULL; + +// ar = (grib_associative_array*)loader->data; + +// grib_context_log(h->context, GRIB_LOG_DEBUG, "Initialize %s", ga->name); + +// retval = grib_associative_array_get(ar, ga->name, &value); + +// if ((retval != GRIB_ARRAY_SUCCESS) && default_value) { +// grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting %s to default value", ga->name); +// grib_pack_expression(ga, grib_arguments_get_expression(h, default_value, 0)); +// return GRIB_SUCCESS; +// } + +// if (ga->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) { +// grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting %s ignored (read only)", ga->name); +// return GRIB_SUCCESS; +// } + +// if (retval != GRIB_ARRAY_SUCCESS) { +// grib_context_log(h->context, GRIB_LOG_DEBUG, +// "Grib array error %d", retval); +// if ((ga->flags & GRIB_ACCESSOR_FLAG_CAN_BE_MISSING)) { +// grib_context_log(h->context, GRIB_LOG_DEBUG, +// "Setting %s ignored (optional or can be missing)", ga->name); +// return GRIB_SUCCESS; +// } +// else { +// grib_context_log(h->context, GRIB_LOG_ERROR, "%s required", ga->name); +// return retval; +// } +// } + +// if (value && grib_runtimetype_get_type(value, &type) == GRIB_RUNTIMETYPE_SUCCESS) { +// if (type == GRIB_RUNTIMETYPE_CHAR) { +// grib_runtimetype_get_char(value, &strvalue, &len); +// switch (grib_accessor_get_native_type(ga)) { +// case GRIB_TYPE_STRING: +// grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting %s to string %s", +// ga->name, strvalue); +// grib_set_string_internal(h, ga->name, strvalue, &len); +// break; + +// case GRIB_TYPE_LONG: +// if (!strcmp(strvalue, "MISSING")) +// lval = GRIB_MISSING_LONG; +// else +// lval = atol(strvalue); +// grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting %s to long %ld", ga->name, lval); +// grib_set_long_internal(h, ga->name, lval); +// break; + +// case GRIB_TYPE_DOUBLE: +// if (!strcmp(strvalue, "MISSING")) +// dval = GRIB_MISSING_DOUBLE; +// else if (sscanf(strvalue, "%lg", &dval) != 1) { +// grib_context_log(h->context, GRIB_LOG_ERROR, "Unable to set %s wrong value format", ga->name); +// } +// grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting %s to double %lg (%s)", ga->name, dval, strvalue); +// grib_set_double_internal(h, ga->name, dval); +// break; + +// case GRIB_TYPE_BYTES: +// grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting %s to string %s", +// ga->name, strvalue); +// grib_set_bytes_internal(h, ga->name, (unsigned char*)strvalue, &len); +// break; + +// case GRIB_TYPE_LABEL: +// break; + +// default: +// grib_context_log(h->context, GRIB_LOG_ERROR, "Setting %s, cannot establish type %d [%s]", ga->name, grib_accessor_get_native_type(ga), ga->creator->cclass->name); +// break; +// } +// } +// else { +// if (grib_runtimetype_get_double(value, &dvalue, &len) == GRIB_RUNTIMETYPE_SUCCESS) { +// switch (grib_accessor_get_native_type(ga)) { +// case GRIB_TYPE_LONG: +// lvalue = (long*)malloc(sizeof(long) * len); +// Assert(lvalue); +// for (i = 0; i < len; i++) +// lvalue[i] = (long)dvalue[i]; +// grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting long array %s", ga->name); +// grib_set_long_array(h, ga->name, lvalue, len); +// free(lvalue); +// break; + +// case GRIB_TYPE_DOUBLE: +// grib_context_log(h->context, GRIB_LOG_DEBUG, "Setting double array %s", ga->name); +// grib_set_double_array(h, ga->name, dvalue, len); +// break; + +// default: +// grib_context_log(h->context, GRIB_LOG_ERROR, "Setting array %s, wrong type [%d]", ga->name, grib_accessor_get_native_type(ga)); +// break; +// } +// } +// else +// grib_context_log(h->context, GRIB_LOG_ERROR, "Unable to set %s to double, wrong type (%d)", +// ga->name, type); +// } +// #if defined(OLD_IMPL) +// switch(grib_accessor_get_native_type(ga)) +// { +// case GRIB_TYPE_STRING: +// if (grib_runtimetype_get_char(value,&strvalue,&strvalue_size) == GRIB_RUNTIMETYPE_SUCCESS) { +// grib_context_log(h->context,GRIB_LOG_DEBUG, "Setting %s to string %s", +// ga->name, strvalue); +// len=strlen(strvalue); +// grib_set_string_internal(h,ga->name,strvalue,&len); +// } else +// grib_context_log(h->context,GRIB_LOG_ERROR, "Unable to set %s to string, wrong type", +// ga->name); +// break; + +// case GRIB_TYPE_LONG: +// if (grib_runtimetype_get_long(value,&lval,&len) == GRIB_RUNTIMETYPE_SUCCESS) { +// grib_context_log(h->context,GRIB_LOG_DEBUG, "Setting %s to long %d", ga->name, lval); +// grib_set_long_internal(h,ga->name,*lval); +// } else +// grib_context_log(h->context,GRIB_LOG_ERROR, "Unable to set %s to long, wrong type", +// ga->name); +// break; + +// case GRIB_TYPE_DOUBLE: +// if (grib_runtimetype_get_double(value,&dval,&len) == GRIB_RUNTIMETYPE_SUCCESS) { +// grib_context_log(h->context,GRIB_LOG_DEBUG, "Setting %s to long %d", ga->name, dval); +// grib_set_double_internal(h,ga->name,*dval); +// } else +// grib_context_log(h->context,GRIB_LOG_ERROR, "Unable to set %s to double, wrong type", +// ga->name); +// break; + +// case GRIB_TYPE_BYTES: +// if (grib_runtimetype_get_char(value,&strvalue,&len) == GRIB_RUNTIMETYPE_SUCCESS) { +// grib_context_log(h->context,GRIB_LOG_DEBUG, "Setting %s to string %s", +// ga->name, strvalue); +// grib_set_bytes_internal(h,ga->name,(unsigned char*)strvalue,&len); +// } else +// grib_context_log(h->context,GRIB_LOG_ERROR, "Unable to set %s to string, wrong type", +// ga->name); +// break; + +// case GRIB_TYPE_LABEL: +// break; + +// default: +// grib_context_log(h->context,GRIB_LOG_ERROR, "Setting %s, cannot establish type %d [%s]" +// , ga->name,grib_accessor_get_native_type(ga),ga->creator->cclass->name); +// break; +// } +// #endif +// } + +// return retval; +// } - case GRIB_TYPE_LONG: - if (grib_runtimetype_get_long(value,&lval,&len) == GRIB_RUNTIMETYPE_SUCCESS) { - grib_context_log(h->context,GRIB_LOG_DEBUG, "Setting %s to long %d", ga->name, lval); - grib_set_long_internal(h,ga->name,*lval); - } else - grib_context_log(h->context,GRIB_LOG_ERROR, "Unable to set %s to long, wrong type", - ga->name); - break; - - case GRIB_TYPE_DOUBLE: - if (grib_runtimetype_get_double(value,&dval,&len) == GRIB_RUNTIMETYPE_SUCCESS) { - grib_context_log(h->context,GRIB_LOG_DEBUG, "Setting %s to long %d", ga->name, dval); - grib_set_double_internal(h,ga->name,*dval); - } else - grib_context_log(h->context,GRIB_LOG_ERROR, "Unable to set %s to double, wrong type", - ga->name); - break; - - case GRIB_TYPE_BYTES: - if (grib_runtimetype_get_char(value,&strvalue,&len) == GRIB_RUNTIMETYPE_SUCCESS) { - grib_context_log(h->context,GRIB_LOG_DEBUG, "Setting %s to string %s", - ga->name, strvalue); - grib_set_bytes_internal(h,ga->name,(unsigned char*)strvalue,&len); - } else - grib_context_log(h->context,GRIB_LOG_ERROR, "Unable to set %s to string, wrong type", - ga->name); - break; - - case GRIB_TYPE_LABEL: - break; - - default: - grib_context_log(h->context,GRIB_LOG_ERROR, "Setting %s, cannot establish type %d [%s]" - , ga->name,grib_accessor_get_native_type(ga),ga->creator->cclass->name); - break; - } -#endif - } - - return retval; -} -#endif diff --git a/src/grib_loader_from_handle.cc b/src/grib_loader_from_handle.cc index 4f481d10a..e47f9fa92 100644 --- a/src/grib_loader_from_handle.cc +++ b/src/grib_loader_from_handle.cc @@ -51,13 +51,9 @@ int grib_lookup_long_from_handle(grib_context* gc, grib_loader* loader, const ch if (b) return grib_unpack_long(b, value, &len); - /* TODO: fix me. For now, we don't fail on a lookup. */ -#if 1 + /* TODO: fix me. For now, we don't fail on a lookup. */ *value = -1; return GRIB_SUCCESS; -#else - return GRIB_NOT_FOUND; -#endif } int grib_init_accessor_from_handle(grib_loader* loader, grib_accessor* ga, grib_arguments* default_value) @@ -96,14 +92,12 @@ int grib_init_accessor_from_handle(grib_loader* loader, grib_accessor* ga, grib_ return GRIB_SUCCESS; } -#if 0 - if(h->values) - if(copy_values(h,ga) == GRIB_SUCCESS) - { - grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying: setting %s to multi-set-value", ga->name); - return GRIB_SUCCESS; - } -#endif +// if(h->values) +// if(copy_values(h,ga) == GRIB_SUCCESS) +// { +// grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying: setting %s to multi-set-value", ga->name); +// return GRIB_SUCCESS; +// } #if 0 if(h->loader) @@ -162,9 +156,13 @@ int grib_init_accessor_from_handle(grib_loader* loader, grib_accessor* ga, grib_ pack_missing = 1; } - switch (grib_accessor_get_native_type(ga)) { - case GRIB_TYPE_STRING: + long ga_type = grib_accessor_get_native_type(ga); + if (STR_EQUAL(name,"level")) { // See ECC-1560 + ga_type = GRIB_TYPE_DOUBLE; + } + switch (ga_type) { + case GRIB_TYPE_STRING: /*ecc__grib_get_string_length(ga,&len); See ECC-490 */ grib_get_string_length(h, name, &len); sval = (char*)grib_context_malloc(h->context, len); diff --git a/src/grib_memory.cc b/src/grib_memory.cc index a73e965a8..5eebf7965 100644 --- a/src/grib_memory.cc +++ b/src/grib_memory.cc @@ -108,8 +108,8 @@ static void* fast_new(size_t s, mempool* pool) char* p; memblk* m; - GRIB_MUTEX_INIT_ONCE(&once, &init) - GRIB_MUTEX_LOCK(&mutex) + GRIB_MUTEX_INIT_ONCE(&once, &init); + GRIB_MUTEX_LOCK(&mutex); m = (memblk*)pool->priv; @@ -141,7 +141,7 @@ static void* fast_new(size_t s, mempool* pool) p = (memblk*)(pool->clear ? calloc(size, 1) : malloc(size)); if (!p) { - GRIB_MUTEX_UNLOCK(&mutex) + GRIB_MUTEX_UNLOCK(&mutex); return NULL; } @@ -156,7 +156,7 @@ static void* fast_new(size_t s, mempool* pool) m->left -= s; m->cnt++; - GRIB_MUTEX_UNLOCK(&mutex) + GRIB_MUTEX_UNLOCK(&mutex); return p; } @@ -167,8 +167,8 @@ static void fast_delete(void* p, mempool* pool) memblk* m; memblk* n = NULL; - GRIB_MUTEX_INIT_ONCE(&once, &init) - GRIB_MUTEX_LOCK(&mutex) + GRIB_MUTEX_INIT_ONCE(&once, &init); + GRIB_MUTEX_LOCK(&mutex); m = (memblk*)pool->priv; @@ -183,7 +183,7 @@ static void fast_delete(void* p, mempool* pool) pool->priv = (void*)m->next; free((void*)m); } - GRIB_MUTEX_UNLOCK(&mutex) + GRIB_MUTEX_UNLOCK(&mutex); return; } @@ -208,26 +208,20 @@ static void* fast_realloc(void* p, size_t s, mempool* pool) return q; } -#if 0 /* - void fast_memory_info(const char *title,mempool *pool) - { + void fast_memory_info(const char *title,mempool *pool) { memblk *m = (memblk*)pool->priv; int count = 0; int size = 0; - while(m) - { - count++; - size += m->size; - m = m->next; + while(m) { + count++; + size += m->size; + m = m->next; } - marslog(LOG_INFO,"%s : %sbytes %d blocks", - title, - bytename(size),count); + marslog(LOG_INFO,"%s : %sbytes %d blocks", title, bytename(size),count); } - void memory_info() - { + void memory_info() { memblk *r = reserve; long size = 0; while(r) @@ -237,13 +231,11 @@ static void* fast_realloc(void* p, size_t s, mempool* pool) size += r->size; r = r->next; } - marslog(LOG_INFO,"Total large : %sbytes",bytename(size)); fast_memory_info("Transient memory",transient_mem); fast_memory_info("Permanent memory",permanent_mem); } */ -#endif void* grib_transient_malloc(const grib_context* c, size_t s) { @@ -279,8 +271,8 @@ void* grib_buffer_malloc(const grib_context* c, size_t s) { memblk* r; - GRIB_MUTEX_INIT_ONCE(&once, &init) - GRIB_MUTEX_LOCK(&mutex) + GRIB_MUTEX_INIT_ONCE(&once, &init); + GRIB_MUTEX_LOCK(&mutex); s = ((s + WORD - 1) / WORD) * WORD; r = reserve; @@ -305,7 +297,7 @@ void* grib_buffer_malloc(const grib_context* c, size_t s) r->size = s; r->cnt = 1; - GRIB_MUTEX_UNLOCK(&mutex) + GRIB_MUTEX_UNLOCK(&mutex); return &r->buffer[0]; } @@ -315,8 +307,8 @@ void grib_buffer_free(const grib_context* c, void* p) memblk* r; memblk* s; - GRIB_MUTEX_INIT_ONCE(&once, &init) - GRIB_MUTEX_LOCK(&mutex) + GRIB_MUTEX_INIT_ONCE(&once, &init); + GRIB_MUTEX_LOCK(&mutex); r = (memblk*)(((char*)p) - HEADER_SIZE); s = reserve; @@ -328,7 +320,7 @@ void grib_buffer_free(const grib_context* c, void* p) s->cnt = 0; } - GRIB_MUTEX_UNLOCK(&mutex) + GRIB_MUTEX_UNLOCK(&mutex); } void* grib_buffer_realloc(const grib_context* c, void* p, size_t s) diff --git a/src/grib_nearest_class_regular.cc b/src/grib_nearest_class_regular.cc index ab2793181..4e007ce7a 100644 --- a/src/grib_nearest_class_regular.cc +++ b/src/grib_nearest_class_regular.cc @@ -102,117 +102,6 @@ static int init(grib_nearest* nearest, grib_handle* h, grib_arguments* args) return 0; } -#if 0 -static int find(grib_nearest* nearest, grib_handle* h, - double inlat, double inlon,unsigned long flags, - double* outlats,double* outlons, - double *values,double *distances,int* indexes, size_t *len) { - grib_nearest_regular* self = (grib_nearest_regular*) nearest; - int ret=0,kk=0,ii=0,jj=0; - size_t nvalues=0; - double radiusInKm; - - if ((ret = grib_nearest_get_radius(h, &radiusInKm)) != GRIB_SUCCESS) - return ret; - - if (!nearest->h || (flags & GRIB_NEAREST_SAME_DATA)==0 || nearest->h!=h) { - grib_iterator* iter=NULL; - double lat=0,lon=0; - - if( (ret = grib_get_size(h,self->values_key,&nvalues))!= GRIB_SUCCESS) - return ret; - nearest->values_count = nvalues; - if (nearest->values) grib_context_free(nearest->context,nearest->values); - nearest->values = grib_context_malloc(h->context,nvalues*sizeof(double)); - if (!nearest->values) return GRIB_OUT_OF_MEMORY; - - ret=grib_get_double_array_internal( h,self->values_key, - nearest->values,&(nearest->values_count)); - if (ret!=GRIB_SUCCESS) grib_context_log(nearest->context,GRIB_LOG_ERROR, - "nearest: unable to get values array"); - - if (!nearest->h || (flags & GRIB_NEAREST_SAME_GRID)==0) { - double dummy=0; - double olat=1.e10, olon=1.e10; - int ilat=0,ilon=0; - long n=0; - - if( (ret = grib_get_long(h,self->Ni,&n))!= GRIB_SUCCESS) - return ret; - self->lons_count=n; - - if( (ret = grib_get_long(h,self->Nj,&n))!= GRIB_SUCCESS) - return ret; - self->lats_count=n; - - if (self->lats) grib_context_free(nearest->context,self->lats); - self->lats=grib_context_malloc( nearest->context, - self->lats_count* sizeof(double)); - if (!self->lats) return GRIB_OUT_OF_MEMORY; - - if (self->lons) grib_context_free(nearest->context,self->lons); - self->lons=grib_context_malloc( nearest->context, - self->lons_count*sizeof(double)); - if (!self->lons) return GRIB_OUT_OF_MEMORY; - - iter=grib_iterator_new(h,0,&ret); - if (ret) { - grib_context_log(nearest->context,GRIB_LOG_ERROR,"unable to create iterator"); - return ret; - } - while(grib_iterator_next(iter,&lat,&lon,&dummy)) { - if (olat != lat) { - self->lats[ilat++]=lat; - olat=lat; - } - if (ilonlons_count && olon != lon) { - self->lons[ilon++]=lon; - olon=lon; - } - } - grib_iterator_delete(iter); - - } - nearest->h=h; - } - - if (!self->distances || (flags & GRIB_NEAREST_SAME_POINT)==0 - || (flags & GRIB_NEAREST_SAME_GRID)==0) { - - grib_binary_search(self->lats,self->lats_count-1,inlat, - &(self->j[0]),&(self->j[1])); - grib_binary_search(self->lons,self->lons_count-1,inlon, - &(self->i[0]),&(self->i[1])); - if (!self->distances) - self->distances=(double*)grib_context_malloc( nearest->context,NUM_NEIGHBOURS*sizeof(double)); - if (!self->k) - self->k=(int*)grib_context_malloc( nearest->context,NUM_NEIGHBOURS*sizeof(int)); - kk=0; - for (ii=0;ii<2;ii++) { - for (jj=0;jj<2;jj++) { - self->k[kk]=self->i[ii]+self->lons_count*self->j[jj]-1; - self->distances[kk]=geographic_distance_spherical(radius,inlon,inlat, - self->lons[self->i[ii]],self->lats[self->j[jj]]); - kk++; - } - } - } - - kk=0; - for (ii=0;ii<2;ii++) { - for (jj=0;jj<2;jj++) { - distances[kk]=self->distances[kk]; - outlats[kk]=self->lats[self->j[jj]]; - outlons[kk]=self->lons[self->i[ii]]; - values[kk]=nearest->values[self->k[kk]]; - indexes[kk]=self->k[kk]; - kk++; - } - } - - return GRIB_SUCCESS; -} -#else static bool is_rotated_grid(grib_handle* h) { long is_rotated = 0; @@ -222,6 +111,9 @@ static bool is_rotated_grid(grib_handle* h) return false; } +// Old implementation in +// src/deprecated/grib_nearest_class_regular.cc +// static int find(grib_nearest* nearest, grib_handle* h, double inlat, double inlon, unsigned long flags, double* outlats, double* outlons, @@ -467,7 +359,6 @@ static int find(grib_nearest* nearest, grib_handle* h, return GRIB_SUCCESS; } -#endif static int destroy(grib_nearest* nearest) { diff --git a/src/grib_oarray.cc b/src/grib_oarray.cc index 5e51751c5..54a4ca2a5 100644 --- a/src/grib_oarray.cc +++ b/src/grib_oarray.cc @@ -82,23 +82,21 @@ void grib_oarray_delete(grib_context* c, grib_oarray* v) grib_context_free(c, v); } -#if 0 -void grib_oarray_delete_content(grib_context* c, grib_oarray* v) -{ - int i; - if (!v || !v->v) - return; - if (!c) - c = grib_context_get_default(); - for (i = 0; i < v->n; i++) { - if (v->v[i]) { - grib_context_free(c, v->v[i]); - v->v[i] = 0; - } - } - v->n = 0; -} -#endif +// void grib_oarray_delete_content(grib_context* c, grib_oarray* v) +// { +// int i; +// if (!v || !v->v) +// return; +// if (!c) +// c = grib_context_get_default(); +// for (i = 0; i < v->n; i++) { +// if (v->v[i]) { +// grib_context_free(c, v->v[i]); +// v->v[i] = 0; +// } +// } +// v->n = 0; +// } void** grib_oarray_get_array(grib_context* c, grib_oarray* v) { @@ -114,7 +112,7 @@ void** grib_oarray_get_array(grib_context* c, grib_oarray* v) void* grib_oarray_get(grib_oarray* v, int i) { - DebugAssert(i >= 0); + DEBUG_ASSERT(i >= 0); if (v == NULL || (size_t)i > v->n - 1) return NULL; return v->v[i]; diff --git a/src/grib_optimize_decimal_factor.cc b/src/grib_optimize_decimal_factor.cc index f3b5eeaf5..ea6ac3a08 100644 --- a/src/grib_optimize_decimal_factor.cc +++ b/src/grib_optimize_decimal_factor.cc @@ -8,9 +8,10 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ +#include "grib_scaling.h" #include "grib_api_internal.h" #include "grib_optimize_decimal_factor.h" -#include +#include #include #include @@ -50,9 +51,9 @@ static void factec(int* krep, const double pa, const int knbit, const long kdec, } /* Binary scale factor associated to kdec */ - *ke = floor(log2((pa * grib_power(kdec, 10)) / (grib_power(knbit, 2) - 0.5))) + 1; + *ke = floor(log2((pa * codes_power(kdec, 10)) / (codes_power(knbit, 2) - 0.5))) + 1; /* Encoded value for pa = max - min */ - *knutil = floor(0.5 + pa * grib_power(kdec, 10) * grib_power(-*ke, 2)); + *knutil = floor(0.5 + pa * codes_power(kdec, 10) * codes_power(-*ke, 2)); end: return; @@ -98,14 +99,14 @@ int grib_optimize_decimal_factor(grib_accessor* a, const char* reference_value, xtinyr4 = FLT_MIN; xhuger4 = FLT_MAX; - inbint = grib_power(knbit, 2) - 1; + inbint = codes_power(knbit, 2) - 1; xnbint = (double)inbint; /* Test decimal scale factors; keep the most suitable */ for (jdec = idecmin; jdec <= idecmax; jdec++) { /* Fix a problem in GRIBEX */ if (compat_gribex) - if (pa * grib_power(jdec, 10) <= 1.E-12) + if (pa * codes_power(jdec, 10) <= 1.E-12) continue; /* Check it will be possible to decode reference value with 32bit floats */ @@ -125,7 +126,7 @@ int grib_optimize_decimal_factor(grib_accessor* a, const char* reference_value, /* Check it will be possible to decode the maximum value of the fields using 32bit floats */ if (compat_32bit) - if (pmin * grib_power(jdec, 10) + xnbint * grib_power(ie, 2) >= xhuger4) + if (pmin * codes_power(jdec, 10) + xnbint * codes_power(ie, 2) >= xhuger4) continue; /* GRIB1 demands that the binary scale factor be encoded in a single byte */ @@ -141,8 +142,8 @@ int grib_optimize_decimal_factor(grib_accessor* a, const char* reference_value, } if (inumax > 0) { - double decimal = grib_power(+*kdec, 10); - double divisor = grib_power(-*kbin, 2); + double decimal = codes_power(+*kdec, 10); + double divisor = codes_power(-*kbin, 2); double min = pmin * decimal; long vmin, vmax; if (grib_get_nearest_smaller_value(gh, reference_value, min, ref) != GRIB_SUCCESS) { @@ -164,9 +165,9 @@ int grib_optimize_decimal_factor(grib_accessor* a, const char* reference_value, int last = compat_gribex ? 99 : 127; double min = pmin, max = pmax; double range = max - min; - double f = grib_power(knbit, 2) - 1; - double minrange = grib_power(-last, 2) * f; - double maxrange = grib_power(+last, 2) * f; + double f = codes_power(knbit, 2) - 1; + double minrange = codes_power(-last, 2) * f; + double maxrange = codes_power(+last, 2) * f; double decimal = 1; int err; diff --git a/src/grib_parse_utils.cc b/src/grib_parse_utils.cc index 93d4ce50d..e7c752f09 100644 --- a/src/grib_parse_utils.cc +++ b/src/grib_parse_utils.cc @@ -158,15 +158,15 @@ int grib_recompose_name(grib_handle* h, grib_accessor* observer, const char* una else if (uname[i] == '[') mode = 0; else { -#if 0 - int llen=strlen(fname); /* The strlen cost is too high */ - fname[llen]=uname[i]; - fname[llen+1]='\0'; -#else - /* Performance: faster to avoid call to strlen. Append to end */ + // Old way: Slow; The strlen cost is too high + //int llen=strlen(fname); + //fname[llen]=uname[i]; + //fname[llen+1]='\0'; + + // Faster to avoid call to strlen. Append to end *ptrEnd_fname++ = uname[i]; *ptrEnd_fname = '\0'; -#endif + type = GRIB_TYPE_STRING; } i++; @@ -175,131 +175,129 @@ int grib_recompose_name(grib_handle* h, grib_accessor* observer, const char* una return GRIB_SUCCESS; } -#if 0 -int grib_accessor_print(grib_accessor* a, const char* name, int type, const char* format, - const char* separator, int maxcols, int* newline, FILE* out) -{ - size_t size = 0; - char* sval = NULL; - char* p = NULL; - double* dval = 0; - long* lval = 0; - char sbuf[1024] = {0,}; - size_t replen = 0; - int ret = 0; - char* myformat = NULL; - char* myseparator = NULL; - char double_format[] = "%.12g"; /* default format for printing double keys */ - char long_format[] = "%ld"; /* default format for printing integer keys */ - char default_separator[] = " "; - grib_handle* h = grib_handle_of_accessor(a); - - if (type == -1) - type = grib_accessor_get_native_type(a); - switch (type) { - case GRIB_TYPE_STRING: - replen = sizeof(sbuf) / sizeof(*sbuf); - ret = grib_unpack_string(a, sbuf, &replen); - fprintf(out, "%s", sbuf); - break; - case GRIB_TYPE_DOUBLE: - myformat = format ? (char*)format : double_format; - myseparator = separator ? (char*)separator : default_separator; - if (name[0] == '/' || name[0] == '#') { - long count; - ret = grib_value_count(a, &count); - size = count; - } - else { - ret = ecc__grib_get_size(h, a, &size); - } - if (ret) return ret; - dval = (double*)grib_context_malloc_clear(h->context, sizeof(double) * size); - if (name[0] == '/' || name[0] == '#') { - replen = size; - ret = grib_unpack_double(a, dval, &replen); - } - else { - replen = 0; - ret = ecc__grib_get_double_array_internal(h, a, dval, size, &replen); - } - if (replen == 1) - fprintf(out, myformat, dval[0]); - else { - int i = 0; - int cols = 0; - for (i = 0; i < replen; i++) { - *newline = 1; - fprintf(out, myformat, dval[i]); - if (i < replen - 1) - fprintf(out, "%s", myseparator); - cols++; - if (cols >= maxcols) { - fprintf(out, "\n"); - *newline = 1; - cols = 0; - } - } - } - grib_context_free(h->context, dval); - break; - case GRIB_TYPE_LONG: - myformat = format ? (char*)format : long_format; - myseparator = separator ? (char*)separator : default_separator; - if (name[0] == '/' || name[0] == '#') { - long count; - ret = grib_value_count(a, &count); - size = count; - } - else { - ret = ecc__grib_get_size(h, a, &size); - } - if (ret) return ret; - lval = (long*)grib_context_malloc_clear(h->context, sizeof(long) * size); - if (name[0] == '/' || name[0] == '#') { - replen = size; - ret = grib_unpack_long(a, lval, &replen); - } - else { - replen = 0; - ret = ecc__grib_get_long_array_internal(h, a, lval, size, &replen); - } - if (replen == 1) - fprintf(out, myformat, lval[0]); - else { - int i = 0; - int cols = 0; - for (i = 0; i < replen; i++) { - *newline = 1; - fprintf(out, myformat, lval[i]); - if (i < replen - 1) - fprintf(out, "%s", myseparator); - cols++; - if (cols >= maxcols) { - fprintf(out, "\n"); - *newline = 1; - cols = 0; - } - } - } - grib_context_free(h->context, lval); - break; - case GRIB_TYPE_BYTES: - replen = a->length; - sval = (char*)grib_context_malloc(h->context, replen * sizeof(char)); - ret = grib_unpack_string(a, sval, &replen); - p = sval; - while ((replen--) > 0) - fprintf(out, "%c", *(p++)); - grib_context_free(h->context, sval); - *newline = 0; - break; - default: - grib_context_log(h->context, GRIB_LOG_WARNING, "grib_accessor_print: Problem to print \"%s\", invalid type %d", a->name, type); - } - return ret; -} -#endif +// int grib_accessor_print(grib_accessor* a, const char* name, int type, const char* format, +// const char* separator, int maxcols, int* newline, FILE* out) +// { +// size_t size = 0; +// char* sval = NULL; +// char* p = NULL; +// double* dval = 0; +// long* lval = 0; +// char sbuf[1024] = {0,}; +// size_t replen = 0; +// int ret = 0; +// char* myformat = NULL; +// char* myseparator = NULL; +// char double_format[] = "%.12g"; /* default format for printing double keys */ +// char long_format[] = "%ld"; /* default format for printing integer keys */ +// char default_separator[] = " "; +// grib_handle* h = grib_handle_of_accessor(a); + +// if (type == -1) +// type = grib_accessor_get_native_type(a); +// switch (type) { +// case GRIB_TYPE_STRING: +// replen = sizeof(sbuf) / sizeof(*sbuf); +// ret = grib_unpack_string(a, sbuf, &replen); +// fprintf(out, "%s", sbuf); +// break; +// case GRIB_TYPE_DOUBLE: +// myformat = format ? (char*)format : double_format; +// myseparator = separator ? (char*)separator : default_separator; +// if (name[0] == '/' || name[0] == '#') { +// long count; +// ret = grib_value_count(a, &count); +// size = count; +// } +// else { +// ret = ecc__grib_get_size(h, a, &size); +// } +// if (ret) return ret; +// dval = (double*)grib_context_malloc_clear(h->context, sizeof(double) * size); +// if (name[0] == '/' || name[0] == '#') { +// replen = size; +// ret = grib_unpack_double(a, dval, &replen); +// } +// else { +// replen = 0; +// ret = ecc__grib_get_double_array_internal(h, a, dval, size, &replen); +// } +// if (replen == 1) +// fprintf(out, myformat, dval[0]); +// else { +// int i = 0; +// int cols = 0; +// for (i = 0; i < replen; i++) { +// *newline = 1; +// fprintf(out, myformat, dval[i]); +// if (i < replen - 1) +// fprintf(out, "%s", myseparator); +// cols++; +// if (cols >= maxcols) { +// fprintf(out, "\n"); +// *newline = 1; +// cols = 0; +// } +// } +// } +// grib_context_free(h->context, dval); +// break; +// case GRIB_TYPE_LONG: +// myformat = format ? (char*)format : long_format; +// myseparator = separator ? (char*)separator : default_separator; +// if (name[0] == '/' || name[0] == '#') { +// long count; +// ret = grib_value_count(a, &count); +// size = count; +// } +// else { +// ret = ecc__grib_get_size(h, a, &size); +// } +// if (ret) return ret; +// lval = (long*)grib_context_malloc_clear(h->context, sizeof(long) * size); +// if (name[0] == '/' || name[0] == '#') { +// replen = size; +// ret = grib_unpack_long(a, lval, &replen); +// } +// else { +// replen = 0; +// ret = ecc__grib_get_long_array_internal(h, a, lval, size, &replen); +// } +// if (replen == 1) +// fprintf(out, myformat, lval[0]); +// else { +// int i = 0; +// int cols = 0; +// for (i = 0; i < replen; i++) { +// *newline = 1; +// fprintf(out, myformat, lval[i]); +// if (i < replen - 1) +// fprintf(out, "%s", myseparator); +// cols++; +// if (cols >= maxcols) { +// fprintf(out, "\n"); +// *newline = 1; +// cols = 0; +// } +// } +// } +// grib_context_free(h->context, lval); +// break; +// case GRIB_TYPE_BYTES: +// replen = a->length; +// sval = (char*)grib_context_malloc(h->context, replen * sizeof(char)); +// ret = grib_unpack_string(a, sval, &replen); +// p = sval; +// while ((replen--) > 0) +// fprintf(out, "%c", *(p++)); +// grib_context_free(h->context, sval); +// *newline = 0; +// break; +// default: +// grib_context_log(h->context, GRIB_LOG_WARNING, "grib_accessor_print: Problem to print \"%s\", invalid type %d", a->name, type); +// } +// return ret; +// } int grib_accessors_list_print(grib_handle* h, grib_accessors_list* al, const char* name, int type, const char* format, const char* separator, int maxcols, int* newline, FILE* out) @@ -316,7 +314,7 @@ int grib_accessors_list_print(grib_handle* h, grib_accessors_list* al, const cha char long_format[] = "%ld"; /* default format for printing integer keys */ char default_separator[] = " "; grib_accessor* a = al->accessor; - DebugAssert(a); + DEBUG_ASSERT(a); /* Number of columns specified as 0 means print on ONE line i.e. num cols = infinity */ if (maxcols == 0) @@ -754,12 +752,12 @@ static grib_action* grib_parse_stream(grib_context* gc, const char* filename) if (parse(gc, filename) == 0) { if (grib_parser_all_actions) { - GRIB_MUTEX_UNLOCK(&mutex_stream) + GRIB_MUTEX_UNLOCK(&mutex_stream); return grib_parser_all_actions; } else { grib_action* ret = grib_action_create_noop(gc, filename); - GRIB_MUTEX_UNLOCK(&mutex_stream) + GRIB_MUTEX_UNLOCK(&mutex_stream); return ret; } } diff --git a/src/grib_query.cc b/src/grib_query.cc index df9aca973..c543f478a 100644 --- a/src/grib_query.cc +++ b/src/grib_query.cc @@ -78,7 +78,7 @@ static void rebuild_hash_keys(grib_handle* h, grib_section* s) int i = 0; int id = -1; const char* p; - DebugAssert(h == grib_handle_of_accessor(a)); + DEBUG_ASSERT(h == grib_handle_of_accessor(a)); while (i < MAX_ACCESSOR_NAMES && ((p = a->all_names[i]) != NULL)) { if (*p != '_') { @@ -88,7 +88,7 @@ static void rebuild_hash_keys(grib_handle* h, grib_section* s) grib_handle* hand = grib_handle_of_accessor(a); a->same = hand->accessors[id]; hand->accessors[id] = a; - DebugAssert(a->same != a); + DEBUG_ASSERT(a->same != a); } } i++; @@ -149,7 +149,7 @@ static char* get_rank(grib_context* c, const char* name, int* rank) *rank = -1; } else { - DebugAssert(c); + DEBUG_ASSERT(c); end++; ret = grib_context_strdup(c, end); } @@ -521,7 +521,7 @@ static grib_accessor* _grib_find_accessor(const grib_handle* ch, const char* nam grib_handle* h = (grib_handle*)ch; grib_accessor* a = NULL; char* p = NULL; - DebugAssert(name); + DEBUG_ASSERT(name); p = strchr((char*)name, '.'); if (p) { @@ -614,7 +614,7 @@ grib_accessor* grib_find_accessor_fast(grib_handle* h, const char* name) { grib_accessor* a = NULL; char* p = NULL; - DebugAssert(name); + DEBUG_ASSERT(name); p = strchr((char*)name, '.'); if (p) { diff --git a/src/grib_rules.cc b/src/grib_rules.cc index f6b0db81f..3f090d875 100644 --- a/src/grib_rules.cc +++ b/src/grib_rules.cc @@ -18,19 +18,6 @@ grib_rule_entry* grib_new_rule_entry(grib_context* c, const char* name, grib_exp return e; } -#if 0 -/* GCC compiler complains function is defined but not used*/ -static void grib_rule_entry_delete(grib_context* c,grib_rule_entry* e) -{ - if(e) { - grib_context_free_persistent(c,e->name); - grib_rule_entry_delete(c,e->next); - grib_context_free_persistent(c,e); - - } -} -#endif - grib_rule* grib_new_rule(grib_context* c, grib_expression* condition, grib_rule_entry* entries) { grib_rule* r = (grib_rule*)grib_context_malloc_clear_persistent(c, sizeof(grib_rule)); diff --git a/src/grib_scaling.cc b/src/grib_scaling.cc index d7654889f..41e77e28e 100644 --- a/src/grib_scaling.cc +++ b/src/grib_scaling.cc @@ -12,25 +12,13 @@ * Enrico Fucile **************************************/ +#include "grib_scaling.h" #include "grib_api_internal.h" -/* Return n to the power of s */ -double grib_power(long s, long n) -{ - double divisor = 1.0; - if (s == 0) - return 1.0; - if (s == 1) - return n; - while (s < 0) { - divisor /= n; - s++; - } - while (s > 0) { - divisor *= n; - s--; - } - return divisor; +// Unfortunately, metkit uses grib_power() (illegal usage of private API) +// As soon as it is fixed, the wrapper below can be deleted +double grib_power(long s, long n) { + return codes_power(s, n); } long grib_get_binary_scale_fact(double max, double min, long bpval, int* ret) @@ -43,14 +31,14 @@ long grib_get_binary_scale_fact(double max, double min, long bpval, int* ret) const size_t ulong_size = sizeof(maxint) * 8; /* See ECC-246 - unsigned long maxint = grib_power(bpval,2) - 1; + unsigned long maxint = codes_power(bpval,2) - 1; double dmaxint=(double)maxint; */ if (bpval >= ulong_size) { *ret = GRIB_OUT_OF_RANGE; /*overflow*/ return 0; } - const double dmaxint = grib_power(bpval, 2) - 1; + const double dmaxint = codes_power(bpval, 2) - 1; maxint = (unsigned long)dmaxint; /* Now it's safe to cast */ *ret = 0; @@ -101,7 +89,7 @@ long grib_get_bits_per_value(double max, double min, long binary_scale_factor) long scale = 0; const long last = 127; /* Depends on edition, should be parameter */ - unsigned long maxint = grib_power(binary_scale_factor, 2) - 1; + unsigned long maxint = codes_power(binary_scale_factor, 2) - 1; double dmaxint = (double)maxint; if (maxint == 0) @@ -145,10 +133,10 @@ long grib_get_decimal_scale_fact(double max, double min, long bpval, long binary long scale = 0; const long last = 127; /* Depends on edition, should be parameter */ - unsigned long maxint = grib_power(bpval, 2) - 1; + unsigned long maxint = codes_power(bpval, 2) - 1; double dmaxint = (double)maxint; - range *= grib_power(-binary_scale, 2); + range *= codes_power(-binary_scale, 2); Assert(bpval >= 1); if (range == 0) diff --git a/src/grib_scaling.h b/src/grib_scaling.h new file mode 100644 index 000000000..53e3b1d4d --- /dev/null +++ b/src/grib_scaling.h @@ -0,0 +1,23 @@ +#pragma once + +template T codes_power(long s, long n); + +/* Return n to the power of s */ +template +T codes_power(long s, long n) +{ + T divisor = 1.0; + if (s == 0) + return 1.0; + if (s == 1) + return n; + while (s < 0) { + divisor /= n; + s++; + } + while (s > 0) { + divisor *= n; + s--; + } + return divisor; +} diff --git a/src/grib_templates.cc b/src/grib_templates.cc index 24648d61f..01e0bc39f 100644 --- a/src/grib_templates.cc +++ b/src/grib_templates.cc @@ -14,33 +14,28 @@ #include #endif -#if 0 -/* This is a mechanism where we generate C code in grib_templates.h - * from our GRIB sample files and then include the header so one - * can instantiate samples without any disk access. - * This is now superseded by MEMFS - */ -typedef struct grib_templates { - const char* name; - const unsigned char* data; - size_t size; -} grib_templates; - -#include "grib_templates.h" - -#define NUMBER(x) (sizeof(x) / sizeof(x[0])) - -grib_handle* grib_internal_sample(grib_context* c,const char* name) -{ - size_t i; - const size_t num_samples = NUMBER(templates); - Assert(0); - for(i = 0; i < num_samples; i++) - if(strcmp(name,templates[i].name) == 0) - return grib_handle_new_from_message_copy(c,templates[i].data,templates[i].size); - return NULL; -} -#endif +// This is a mechanism where we generate C code in grib_templates.h +// from our GRIB sample files and then include the header so one +// can instantiate samples without any disk access. +// Note: This is now superseded by MEMFS +// +// typedef struct grib_templates { +// const char* name; +// const unsigned char* data; +// size_t size; +// } grib_templates; + +// #define NUMBER(x) (sizeof(x) / sizeof(x[0])) +// grib_handle* grib_internal_sample(grib_context* c,const char* name) +// { +// size_t i; +// const size_t num_samples = NUMBER(templates); +// Assert(0); +// for(i = 0; i < num_samples; i++) +// if(strcmp(name,templates[i].name) == 0) +// return grib_handle_new_from_message_copy(c,templates[i].data,templates[i].size); +// return NULL; +// } /* Windows always has a colon in pathnames e.g. C:\temp\file. It uses semi-colons as delimiter */ #ifdef ECCODES_ON_WINDOWS @@ -97,7 +92,7 @@ static grib_handle* try_product_template(grib_context* c, ProductKind product_ki g = codes_bufr_handle_new_from_file(c, f, &err); } else { /* Note: Pseudo GRIBs like DIAG and BUDG also come here */ - DebugAssert(product_kind == PRODUCT_GRIB); + DEBUG_ASSERT(product_kind == PRODUCT_GRIB); g = grib_handle_new_from_file(c, f, &err); } if (!g) { diff --git a/src/grib_trie_with_rank.cc b/src/grib_trie_with_rank.cc index c02e3e35a..9fd326701 100644 --- a/src/grib_trie_with_rank.cc +++ b/src/grib_trie_with_rank.cc @@ -361,7 +361,7 @@ static void grib_trie_with_rank_delete_container_list(grib_context* c,grib_trie_ static void _grib_trie_with_rank_delete_container(grib_trie_with_rank* t) { int i; - DebugAssert(t); + DEBUG_ASSERT(t); for (i = t->first; i <= t->last; i++) if (t->next[i]) { grib_trie_with_rank_delete_container(t->next[i]); @@ -382,7 +382,7 @@ void grib_trie_with_rank_delete_container(grib_trie_with_rank* t) GRIB_MUTEX_UNLOCK(&mutex); } -#if 0 +#ifdef TRIE_WITH_RANK_OLD static void grib_trie_with_rank_delete_list(grib_context* c,grib_trie_with_rank_list *list) { grib_trie_with_rank_list* next=list; @@ -453,7 +453,7 @@ int grib_trie_with_rank_insert(grib_trie_with_rank* t, const char* key, void* da { grib_trie_with_rank* last = t; const char* k = key; - DebugAssert(t); + DEBUG_ASSERT(t); if (!t) return -1; GRIB_MUTEX_INIT_ONCE(&once, &init); diff --git a/src/grib_util.cc b/src/grib_util.cc index dc3bc8cb7..9e69d269d 100644 --- a/src/grib_util.cc +++ b/src/grib_util.cc @@ -434,23 +434,22 @@ static void print_values(grib_context* c, fprintf(stderr, "ECCODES DEBUG grib_util: packing_spec->packing_type = %s\n", get_packing_spec_packing_type_name(packing_spec->packing_type)); -#if 0 - if (spec->bitmapPresent) { - int missing = 0; - size_t j = 0; - double min = 1e100; - for(j = 0; j < data_values_count ; j++) - { - double d = data_values[j] - spec->missingValue; - if(d < 0) d = -d; - if(d < min) { - min = d; - } - if(data_values[j] == spec->missingValue) - missing++; - } - } -#endif +// if (spec->bitmapPresent) { +// int missing = 0; +// size_t j = 0; +// double min = 1e100; +// for(j = 0; j < data_values_count ; j++) +// { +// double d = data_values[j] - spec->missingValue; +// if(d < 0) d = -d; +// if(d < min) { +// min = d; +// } +// if(data_values[j] == spec->missingValue) +// missing++; +// } +// } + } /* @@ -459,33 +458,32 @@ static int DBL_EQUAL(double d1, double d2, double tolerance) return fabs(d1-d2) < tolerance; } */ -#if 0 -/* Returns a boolean: 1 if angle can be encoded, 0 otherwise */ -static int grib1_angle_can_be_encoded(const double angle) -{ - const double angle_milliDegrees = angle * 1000; - double rounded = (int)(angle_milliDegrees+0.5)/1000.0; - if (angle<0) { - rounded = (int)(angle_milliDegrees-0.5)/1000.0; - } - if (angle == rounded) return 1; - return 0; /* sub millidegree. Cannot be encoded in grib1 */ -} -/* Returns a boolean: 1 if angle can be encoded, 0 otherwise */ -static int angle_can_be_encoded(const double angle, const double angular_precision) -{ - const double angle_expanded = angle * angular_precision; - Assert(angular_precision>0); - double rounded = (long)(angle_expanded+0.5)/angular_precision; - if (angle<0) { - rounded = (long)(angle_expanded-0.5)/angular_precision; - } - if (angle == rounded) return 1; - /*printf(" ......... angle cannot be encoded: %.10e\n", angle);*/ - return 0; /* Cannot be encoded */ -} -#endif +// /* Returns a boolean: 1 if angle can be encoded, 0 otherwise */ +// static int grib1_angle_can_be_encoded(const double angle) +// { +// const double angle_milliDegrees = angle * 1000; +// double rounded = (int)(angle_milliDegrees+0.5)/1000.0; +// if (angle<0) { +// rounded = (int)(angle_milliDegrees-0.5)/1000.0; +// } +// if (angle == rounded) return 1; +// return 0; /* sub millidegree. Cannot be encoded in grib1 */ +// } + +// /* Returns a boolean: 1 if angle can be encoded, 0 otherwise */ +// static int angle_can_be_encoded(const double angle, const double angular_precision) +// { +// const double angle_expanded = angle * angular_precision; +// Assert(angular_precision>0); +// double rounded = (long)(angle_expanded+0.5)/angular_precision; +// if (angle<0) { +// rounded = (long)(angle_expanded-0.5)/angular_precision; +// } +// if (angle == rounded) return 1; +// /*printf(" ......... angle cannot be encoded: %.10e\n", angle);*/ +// return 0; /* Cannot be encoded */ +// } /* Returns a boolean: 1 if angle can be encoded, 0 otherwise */ static int angle_can_be_encoded(grib_handle* h, const double angle) @@ -636,7 +634,7 @@ static int check_geometry(grib_handle* handle, const grib_util_grid_spec2* spec, return err; } -#if 0 +#if defined(CHECK_HANDLE_AGAINST_SPEC) /* Check what is coded in the handle is what is requested by the spec. */ /* Return GRIB_SUCCESS if the geometry matches, otherwise the error code */ static int check_handle_against_spec(grib_handle* handle, const long edition, @@ -1612,17 +1610,17 @@ grib_handle* grib_util_set_spec2(grib_handle* h, } /* Disable check: need to re-examine GRIB-864 */ -#if 0 - if ( (*err = check_handle_against_spec(h_out, editionNumber, spec, global_grid)) != GRIB_SUCCESS) { - grib_context* c=grib_context_get_default(); - fprintf(stderr,"GRIB_UTIL_SET_SPEC: Geometry check failed: %s\n", grib_get_error_message(*err)); - if (editionNumber == 1) { - fprintf(stderr,"Note: in GRIB edition 1 latitude and longitude values cannot be represented with sub-millidegree precision.\n"); - } - if (c->write_on_fail) grib_write_message(h_out,"error.grib","w"); - goto cleanup; - } -#endif + +// if ( (*err = check_handle_against_spec(h_out, editionNumber, spec, global_grid)) != GRIB_SUCCESS) { +// grib_context* c=grib_context_get_default(); +// fprintf(stderr,"GRIB_UTIL_SET_SPEC: Geometry check failed: %s\n", grib_get_error_message(*err)); +// if (editionNumber == 1) { +// fprintf(stderr,"Note: in GRIB edition 1 latitude and longitude values cannot be represented with sub-millidegree precision.\n"); +// } +// if (c->write_on_fail) grib_write_message(h_out,"error.grib","w"); +// goto cleanup; +// } + if (h->context->debug == -1) fprintf(stderr, "ECCODES DEBUG grib_util: grib_util_set_spec end\n"); return h_out; @@ -1632,94 +1630,93 @@ grib_handle* grib_util_set_spec2(grib_handle* h, grib_handle_delete(h_out); return NULL; } -#if 0 -int grib_moments(grib_handle* h, double east, double north, double west, double south, int order, double* moments, long* count) -{ - grib_iterator* iter = NULL; - int ret = 0, i, j, l; - size_t n = 0, numberOfPoints = 0; - double *lat, *lon, *values; - double vlat, vlon, val; - double dx, dy, ddx, ddy; - double mass, centroidX, centroidY; - double missingValue; - grib_context* c = grib_context_get_default(); - - ret = grib_get_size(h, "values", &n); - if (ret) - return ret; - - lat = (double*)grib_context_malloc_clear(c, sizeof(double) * n); - lon = (double*)grib_context_malloc_clear(c, sizeof(double) * n); - values = (double*)grib_context_malloc_clear(c, sizeof(double) * n); - - iter = grib_iterator_new(h, 0, &ret); - numberOfPoints = 0; - while (grib_iterator_next(iter, &vlat, &vlon, &val)) { - if (vlon >= east && vlon <= west && vlat >= south && vlat <= north) { - lat[numberOfPoints] = vlat; - lon[numberOfPoints] = vlon; - values[numberOfPoints] = val; - numberOfPoints++; - } - } - grib_iterator_delete(iter); - - ret = grib_get_double(h, "missingValue", &missingValue); - - centroidX = 0; - centroidY = 0; - mass = 0; - *count = 0; - for (i = 0; i < numberOfPoints; i++) { - if (values[i] != missingValue) { - centroidX += lon[i] * values[i]; - centroidY += lat[i] * values[i]; - mass += values[i]; - (*count)++; - } - } - centroidX /= mass; - centroidY /= mass; - mass /= *count; - - for (j = 0; j < order * order; j++) - moments[j] = 0; - - for (i = 0; i < numberOfPoints; i++) { - if (values[i] != missingValue) { - dx = (lon[i] - centroidX); - dy = (lat[i] - centroidY); - ddx = 1; - for (j = 0; j < order; j++) { - ddy = 1; - for (l = 0; l < order; l++) { - moments[j * order + l] += ddx * ddy * values[i]; - ddy *= dy; - } - ddx *= dx; - } - } - } - for (j = 0; j < order; j++) { - for (l = 0; l < order; l++) { - if (j + l > 1) { - moments[j * order + l] = pow(fabs(moments[j * order + l]), 1.0 / (j + l)) / *count; - } - else { - moments[j * order + l] /= *count; - } - } - } - grib_context_free(c, lat); - grib_context_free(c, lon); - grib_context_free(c, values); - (void)mass; - - return ret; -} -#endif +// int grib_moments(grib_handle* h, double east, double north, double west, double south, int order, double* moments, long* count) +// { +// grib_iterator* iter = NULL; +// int ret = 0, i, j, l; +// size_t n = 0, numberOfPoints = 0; +// double *lat, *lon, *values; +// double vlat, vlon, val; +// double dx, dy, ddx, ddy; +// double mass, centroidX, centroidY; +// double missingValue; +// grib_context* c = grib_context_get_default(); + +// ret = grib_get_size(h, "values", &n); +// if (ret) +// return ret; + +// lat = (double*)grib_context_malloc_clear(c, sizeof(double) * n); +// lon = (double*)grib_context_malloc_clear(c, sizeof(double) * n); +// values = (double*)grib_context_malloc_clear(c, sizeof(double) * n); + +// iter = grib_iterator_new(h, 0, &ret); +// numberOfPoints = 0; +// while (grib_iterator_next(iter, &vlat, &vlon, &val)) { +// if (vlon >= east && vlon <= west && vlat >= south && vlat <= north) { +// lat[numberOfPoints] = vlat; +// lon[numberOfPoints] = vlon; +// values[numberOfPoints] = val; +// numberOfPoints++; +// } +// } +// grib_iterator_delete(iter); + +// ret = grib_get_double(h, "missingValue", &missingValue); + +// centroidX = 0; +// centroidY = 0; +// mass = 0; +// *count = 0; +// for (i = 0; i < numberOfPoints; i++) { +// if (values[i] != missingValue) { +// centroidX += lon[i] * values[i]; +// centroidY += lat[i] * values[i]; +// mass += values[i]; +// (*count)++; +// } +// } +// centroidX /= mass; +// centroidY /= mass; +// mass /= *count; + +// for (j = 0; j < order * order; j++) +// moments[j] = 0; + +// for (i = 0; i < numberOfPoints; i++) { +// if (values[i] != missingValue) { +// dx = (lon[i] - centroidX); +// dy = (lat[i] - centroidY); +// ddx = 1; +// for (j = 0; j < order; j++) { +// ddy = 1; +// for (l = 0; l < order; l++) { +// moments[j * order + l] += ddx * ddy * values[i]; +// ddy *= dy; +// } +// ddx *= dx; +// } +// } +// } +// for (j = 0; j < order; j++) { +// for (l = 0; l < order; l++) { +// if (j + l > 1) { +// moments[j * order + l] = pow(fabs(moments[j * order + l]), 1.0 / (j + l)) / *count; +// } +// else { +// moments[j * order + l] /= *count; +// } +// } +// } + +// grib_context_free(c, lat); +// grib_context_free(c, lon); +// grib_context_free(c, values); +// (void)mass; + +// return ret; +// } // Helper function for 'parse_keyval_string' static void set_value(grib_values* value, char* str, int equal) @@ -2142,8 +2139,11 @@ int grib_util_grib_data_quality_check(grib_handle* h, double min_val, double max bool is_error = true; char description[1024] = {0,}; char step[32] = "unknown"; - char shortName[32] = {0,}; - size_t len = 32; + char shortName[64] = {0,}; + char name[526] = {0,}; + size_t len = 0; + const char* invalid_shortName = "unknown"; + const char* invalid_name = "Experimental product"; // If grib_data_quality_checks == 1, limits failure results in an error // If grib_data_quality_checks == 2, limits failure results in a warning @@ -2151,10 +2151,19 @@ int grib_util_grib_data_quality_check(grib_handle* h, double min_val, double max Assert(ctx->grib_data_quality_checks == 1 || ctx->grib_data_quality_checks == 2); is_error = (ctx->grib_data_quality_checks == 1); + len = sizeof(shortName); err = grib_get_string(h, "shortName", shortName, &len); - if (err || STR_EQUAL(shortName, "unknown")) { - fprintf(stderr, "ECCODES %s : Invalid metadata: shortName=unknown\n", - (is_error ? "ERROR" : "WARNING")); + if (err || STR_EQUAL(shortName, invalid_shortName)) { + fprintf(stderr, "ECCODES %s : Invalid metadata: shortName='%s'\n", + (is_error ? "ERROR" : "WARNING"), invalid_shortName); + if (is_error) return GRIB_INVALID_MESSAGE; + } + + len = sizeof(name); + err = grib_get_string(h, "name", name, &len); + if (err || STR_EQUAL(name, invalid_name)) { + fprintf(stderr, "ECCODES %s : Invalid metadata: name='%s'\n", + (is_error ? "ERROR" : "WARNING"), invalid_name); if (is_error) return GRIB_INVALID_MESSAGE; } diff --git a/src/grib_value.cc b/src/grib_value.cc index b2c67c9a9..38745c39f 100644 --- a/src/grib_value.cc +++ b/src/grib_value.cc @@ -9,12 +9,12 @@ */ /*************************************************************************** * Jean Baptiste Filippi - 01.11.2005 - * Enrico Fucile * ***************************************************************************/ -#include "grib_api_internal_cpp.h" -#include - +#include "grib_api_internal.h" +#include "grib_value.h" +#include "grib_accessor.h" +#include /* Note: A fast cut-down version of strcmp which does NOT return -1 */ /* 0 means input strings are equal and 1 means not equal */ @@ -1125,23 +1125,6 @@ int grib_get_float_element_set(const grib_handle* h, const char* name, const siz return GRIB_NOT_FOUND; } -int grib_points_get_values(grib_handle* h, grib_points* points, double* val) -{ - int i, ret; - grib_accessor* a = NULL; - fprintf(stderr, "Warning: The grib_points_get_values function is deprecated and will be removed later."); - - a = grib_find_accessor(h, "values"); - - for (i = 0; i < points->n_groups; i++) { - ret = grib_unpack_double_subarray(a, val, points->group_start[i], points->group_len[i]); - if (ret) - return ret; - val += points->group_len[i]; - } - return GRIB_SUCCESS; -} - int grib_get_double_elements(const grib_handle* h, const char* name, const int* index_array, long len, double* val_array) { double* values = 0; @@ -1257,7 +1240,7 @@ int grib_get_native_type(const grib_handle* h, const char* name, int* type) grib_accessor* a = NULL; *type = GRIB_TYPE_UNDEFINED; - DebugAssert(name != NULL && strlen(name) > 0); + DEBUG_ASSERT(name != NULL && strlen(name) > 0); if (name[0] == '/') { al = grib_find_accessors_list(h, name); @@ -1349,7 +1332,7 @@ int grib_get_float_array(const grib_handle* h, const char* name, float* val, siz //[> TODO: For now only GRIB supported... no BUFR keys <] if (h->product_kind != PRODUCT_GRIB) { - grib_context_log(h->context, GRIB_LOG_ERROR, "grib_get_float_array only supported for GRIB"); + //grib_context_log(h->context, GRIB_LOG_ERROR, "grib_get_float_array only supported for GRIB"); return GRIB_NOT_IMPLEMENTED; } Assert(name[0]!='/'); diff --git a/src/grib_value.h b/src/grib_value.h index b0485de40..f2fd079be 100644 --- a/src/grib_value.h +++ b/src/grib_value.h @@ -1,9 +1,22 @@ +/* + * (C) Copyright 2005- 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. + */ + #pragma once #include "grib_api_internal.h" -#include #include +template const char* type_to_string(T) { return "unknown"; } +template<> inline const char* type_to_string<>(double) { return "double"; } +template<> inline const char* type_to_string<>(float) { return "float"; } + template int grib_get_array(const grib_handle* h, const char* name, T* val, size_t* length); @@ -13,10 +26,12 @@ int grib_get_array_internal(const grib_handle* h, const char* name, T* val, size static_assert(std::is_floating_point::value, "Requires floating point numbers"); int ret = grib_get_array(h, name, val, length); - if (ret != GRIB_SUCCESS) + if (ret != GRIB_SUCCESS) { + // Note: typeid(T).name() returns "f" or "d". Not very helpful grib_context_log(h->context, GRIB_LOG_ERROR, - "unable to get %s as %s array (%s)", - name, typeid(T).name(), grib_get_error_message(ret)); + "unable to get %s as %s array (each array element being %zu bytes): %s", + name, type_to_string(*val), sizeof(T), grib_get_error_message(ret)); + } return ret; } diff --git a/src/grib_viarray.cc b/src/grib_viarray.cc index dde75f8de..5a9aa4ddb 100644 --- a/src/grib_viarray.cc +++ b/src/grib_viarray.cc @@ -8,12 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/*************************************************************************** - * - * Enrico Fucile - * - ***************************************************************************/ - #include "grib_api_internal.h" /* For debugging purposes */ @@ -110,19 +104,19 @@ void grib_viarray_delete_content(grib_context* c, grib_viarray* v) v->n = 0; } -grib_iarray** grib_viarray_get_array(grib_context* c, grib_viarray* v) -{ - grib_iarray** ret; - size_t i = 0; - if (!v) - return NULL; - ret = (grib_iarray**)grib_context_malloc_clear(c, sizeof(grib_iarray*) * v->n); - for (i = 0; i < v->n; i++) - ret[i] = v->v[i]; - return ret; -} +// grib_iarray** grib_viarray_get_array(grib_context* c, grib_viarray* v) +// { +// grib_iarray** ret; +// size_t i = 0; +// if (!v) +// return NULL; +// ret = (grib_iarray**)grib_context_malloc_clear(c, sizeof(grib_iarray*) * v->n); +// for (i = 0; i < v->n; i++) +// ret[i] = v->v[i]; +// return ret; +// } -size_t grib_viarray_used_size(grib_viarray* v) -{ - return v->n; -} +// size_t grib_viarray_used_size(grib_viarray* v) +// { +// return v->n; +// } diff --git a/src/jgribapi_GribFile.h b/src/jgribapi_GribFile.h deleted file mode 100644 index 580118d80..000000000 --- a/src/jgribapi_GribFile.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * (C) Copyright 2005- 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. - */ - -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class jgribapi_GribFile */ - -#ifndef _Included_jgribapi_GribFile -#define _Included_jgribapi_GribFile -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: jgribapi_GribFile - * Method: gribGetNextHandle - * Signature: (J)Ljgribapi/GribHandle; - */ -JNIEXPORT jobject JNICALL Java_jgribapi_GribFile_gribGetNextHandle(JNIEnv*, jobject, jlong); - -/* - * Class: jgribapi_GribFile - * Method: gribEOFReached - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_jgribapi_GribFile_gribEOFReached(JNIEnv*, jobject, jlong); - -/* - * Class: jgribapi_GribFile - * Method: gribGetGribFile - * Signature: (Ljava/lang/String;)J - */ -JNIEXPORT jlong JNICALL Java_jgribapi_GribFile_gribGetGribFile(JNIEnv*, jobject, jstring); - -/* - * Class: jgribapi_GribFile - * Method: gribCloseFile - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_jgribapi_GribFile_gribCloseFile(JNIEnv*, jobject, jlong); - -/* - * Class: jgribapi_GribFile - * Method: gribNewFile - * Signature: (Ljava/lang/String;)J - */ -JNIEXPORT jlong JNICALL Java_jgribapi_GribFile_gribNewFile(JNIEnv*, jobject, jstring); - -/* - * Class: jgribapi_GribFile - * Method: gribWriteHandle - * Signature: (JJ)V - */ -JNIEXPORT void JNICALL Java_jgribapi_GribFile_gribWriteHandle(JNIEnv*, jobject, jlong, jlong); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/jgribapi_GribHandle.h b/src/jgribapi_GribHandle.h deleted file mode 100644 index 668ea4f1f..000000000 --- a/src/jgribapi_GribHandle.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * (C) Copyright 2005- 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. - */ - -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class jgribapi_GribHandle */ - -#ifndef _Included_jgribapi_GribHandle -#define _Included_jgribapi_GribHandle -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: jgribapi_GribHandle - * Method: getIteratorID - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_jgribapi_GribHandle_getIteratorID(JNIEnv*, jobject, jlong); - -/* - * Class: jgribapi_GribHandle - * Method: gribGetString - * Signature: (JLjava/lang/String;)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetString(JNIEnv*, jobject, jlong, jstring); - -/* - * Class: jgribapi_GribHandle - * Method: gribGetLong - * Signature: (JLjava/lang/String;)J - */ -JNIEXPORT jlong JNICALL Java_jgribapi_GribHandle_gribGetLong(JNIEnv*, jobject, jlong, jstring); - -/* - * Class: jgribapi_GribHandle - * Method: gribGetDouble - * Signature: (JLjava/lang/String;)D - */ -JNIEXPORT jdouble JNICALL Java_jgribapi_GribHandle_gribGetDouble(JNIEnv*, jobject, jlong, jstring); - -/* - * Class: jgribapi_GribHandle - * Method: gribGetLongArray - * Signature: (JLjava/lang/String;)[J - */ -JNIEXPORT jlongArray JNICALL Java_jgribapi_GribHandle_gribGetLongArray(JNIEnv*, jobject, jlong, jstring); - -/* - * Class: jgribapi_GribHandle - * Method: gribGetDoubleArray - * Signature: (JLjava/lang/String;)[D - */ -JNIEXPORT jdoubleArray JNICALL Java_jgribapi_GribHandle_gribGetDoubleArray(JNIEnv*, jobject, jlong, jstring); - -/* - * Class: jgribapi_GribHandle - * Method: gribSetString - * Signature: (JLjava/lang/String;Ljava/lang/String;)I - */ -JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetString(JNIEnv*, jobject, jlong, jstring, jstring); - -/* - * Class: jgribapi_GribHandle - * Method: gribCreateNext - * Signature: (J)Ljgribapi/GribKey; - */ -JNIEXPORT jobject JNICALL Java_jgribapi_GribHandle_gribCreateNext(JNIEnv*, jobject, jlong); - -/* - * Class: jgribapi_GribHandle - * Method: gribSetSearch - * Signature: (JLjava/lang/String;)J - */ -JNIEXPORT jlong JNICALL Java_jgribapi_GribHandle_gribSetSearch(JNIEnv*, jobject, jlong, jstring); - -/* - * Class: jgribapi_GribHandle - * Method: gribSetLong - * Signature: (JLjava/lang/String;J)I - */ -JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetLong(JNIEnv*, jobject, jlong, jstring, jlong); - -/* - * Class: jgribapi_GribHandle - * Method: gribSetDouble - * Signature: (JLjava/lang/String;D)I - */ -JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetDouble(JNIEnv*, jobject, jlong, jstring, jdouble); - -/* - * Class: jgribapi_GribHandle - * Method: gribSetLongArray - * Signature: (JLjava/lang/String;[J)I - */ -JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetLongArray(JNIEnv*, jobject, jlong, jstring, jlongArray); - -/* - * Class: jgribapi_GribHandle - * Method: gribSetDoubleArray - * Signature: (JLjava/lang/String;[D)I - */ -JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribSetDoubleArray(JNIEnv*, jobject, jlong, jstring, jdoubleArray); - -/* - * Class: jgribapi_GribHandle - * Method: gribGetXml - * Signature: (J)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetXml__J(JNIEnv*, jobject, jlong); - -/* - * Class: jgribapi_GribHandle - * Method: gribGetXml - * Signature: (JLjava/lang/String;)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetXml__JLjava_lang_String_2(JNIEnv*, jobject, jlong, jstring); - -/* - * Class: jgribapi_GribHandle - * Method: gribGetAscii - * Signature: (JLjava/lang/String;)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_jgribapi_GribHandle_gribGetAscii(JNIEnv*, jobject, jlong, jstring); - -/* - * Class: jgribapi_GribHandle - * Method: gribGetBytes - * Signature: (JLjava/lang/String;)[B - */ -JNIEXPORT jbyteArray JNICALL Java_jgribapi_GribHandle_gribGetBytes(JNIEnv*, jobject, jlong, jstring); - -/* - * Class: jgribapi_GribHandle - * Method: gribDeleteHandle - * Signature: (J)I - */ -JNIEXPORT jint JNICALL Java_jgribapi_GribHandle_gribDeleteHandle(JNIEnv*, jobject, jlong); - -/* - * Class: jgribapi_GribHandle - * Method: gribResetHandle - * Signature: (J)V - */ -JNIEXPORT void JNICALL Java_jgribapi_GribHandle_gribResetHandle(JNIEnv*, jobject, jlong); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/jgribapi_GribIterator.h b/src/jgribapi_GribIterator.h deleted file mode 100644 index fcbad5b7b..000000000 --- a/src/jgribapi_GribIterator.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright 2005- 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. - */ - -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* Header for class jgribapi_GribIterator */ - -#ifndef _Included_jgribapi_GribIterator -#define _Included_jgribapi_GribIterator -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: jgribapi_GribIterator - * Method: gribIteratorGetNext - * Signature: (J)Ljgribapi/GribPoint; - */ -JNIEXPORT jobject JNICALL Java_jgribapi_GribIterator_gribIteratorGetNext(JNIEnv*, jobject, jlong); - -/* - * Class: jgribapi_GribIterator - * Method: gribIteratorHasNext - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL Java_jgribapi_GribIterator_gribIteratorHasNext(JNIEnv*, jobject, jlong); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/src/md5.cc b/src/md5.cc index 7bf2279e3..3231be905 100644 --- a/src/md5.cc +++ b/src/md5.cc @@ -37,19 +37,6 @@ static const unsigned long k[] = { 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 }; -#if 0 -static const unsigned long t = 32; - -static unsigned long rotate(unsigned long x,unsigned long c) { return (x << c) | (x >> (t-c)); } - - -static unsigned long F(unsigned long x,unsigned long y,unsigned long z) { return (x&y)|((~x)&z); } -static unsigned long G(unsigned long x,unsigned long y,unsigned long z) { return (x&z)|(y&(~z)); } -static unsigned long H(unsigned long x,unsigned long y,unsigned long z) { return x^y^z; } -static unsigned long I(unsigned long x,unsigned long y,unsigned long z) { return y^(x|(~z)); } -#endif - - #define ROT(x, c) ((x << c) | (x >> (32 - c))) #define ECC_F(x, y, z) ((x & y) | ((~x) & z)) @@ -80,7 +67,6 @@ static unsigned long I(unsigned long x,unsigned long y,unsigned long z) { return static void grib_md5_flush(grib_md5_state* s) { -#if 1 unsigned long a = s->h0; unsigned long b = s->h1; unsigned long c = s->h2; @@ -167,60 +153,6 @@ static void grib_md5_flush(grib_md5_state* s) I_(c, d, a, b, 2, 62); I_(b, c, d, a, 9, 63); -#else - unsigned long i, g; - unsigned long a = s->h0; - unsigned long b = s->h1; - unsigned long c = s->h2; - unsigned long d = s->h3; - unsigned long f; - unsigned long temp; - unsigned long* w = &s->words[0]; - unsigned long h; - for (i = 0; i < 16; i++) { - f = F(b, c, d); - g = i; - temp = d; - d = c; - c = b; - h = a + f + k[i] + w[g]; - b = b + rotate(h, r[i]); - a = temp; - } - - for (i = 16; i < 32; i++) { - f = G(b, c, d); - g = (5 * i + 1) % 16; - temp = d; - d = c; - c = b; - h = a + f + k[i] + w[g]; - b = b + rotate(h, r[i]); - a = temp; - } - for (i = 32; i < 48; i++) { - f = H(b, c, d); - g = (3 * i + 5) % 16; - temp = d; - d = c; - c = b; - h = a + f + k[i] + w[g]; - b = b + rotate(h, r[i]); - a = temp; - } - for (i = 48; i < 64; i++) { - f = I(b, c, d); - g = (7 * i) % 16; - temp = d; - d = c; - c = b; - h = a + f + k[i] + w[g]; - b = b + rotate(h, r[i]); - a = temp; - } - -#endif - s->h0 += a; s->h1 += b; s->h2 += c; @@ -288,7 +220,7 @@ void grib_md5_end(grib_md5_state* s, char* digest) U(s->h3 & 0xff), U((s->h3 >> 8) & 0xff), U((s->h3 >> 16) & 0xff), U((s->h3 >> 24) & 0xff)); } -#if 0 +#if defined(TESTING_MD5) main(int argc, char **argv) { diff --git a/src/string_util.cc b/src/string_util.cc index 9ba818b97..65583f93e 100644 --- a/src/string_util.cc +++ b/src/string_util.cc @@ -40,7 +40,7 @@ void string_rtrim(char* s) void string_lrtrim(char** x, int do_left, int do_right) { - DebugAssert(do_left || do_right); + DEBUG_ASSERT(do_left || do_right); if (do_left) { while (isspace(**x) && **x != '\0') (*x)++; @@ -91,8 +91,8 @@ char** string_split(char* inputString, const char* delimiter) size_t index = 0; char delimiterChar = 0; - DebugAssert(inputString); - DebugAssert(delimiter && (strlen(delimiter) == 1)); + DEBUG_ASSERT(inputString); + DEBUG_ASSERT(delimiter && (strlen(delimiter) == 1)); delimiterChar = delimiter[0]; while (*p) { const char ctmp = *p; @@ -165,8 +165,8 @@ int string_ends_with(const char* s, const char* suffix) int string_count_char(const char* str, char c) { int i = 0, count = 0; - DebugAssert(str); - for(i=0; str[i]; i++) { + DEBUG_ASSERT(str); + for (i=0; str[i]; i++) { if (str[i] == c) count++; } return count; @@ -213,7 +213,7 @@ const char* grib_get_type_name(int type) /* Replace all occurrences of character in string. * Returns pointer to the NUL byte at the end of 's' */ -char *string_replace_char(char *s, char oldc, char newc) +char* string_replace_char(char *s, char oldc, char newc) { for (; *s; ++s) if (*s == oldc) @@ -222,9 +222,10 @@ char *string_replace_char(char *s, char oldc, char newc) } /* Remove all instances of character 'c' from 'str' */ -void string_remove_char(char * str, char c) +void string_remove_char(char* str, char c) { size_t i, j; + DEBUG_ASSERT(str); size_t len = strlen(str); for(i=0; i> $fLog +f='PraticaTemp.bufr' +${tools_dir}/codes_bufr_filter -o $fBufrTmp - $f < + +// Get the X part of a BUFR descriptor (FXY) and determine if it +// is a coordinate. +// See https://confluence.ecmwf.int/display/UDOC/What+are+coordinate+descriptors+-+ecCodes+BUFR+FAQ +static int is_coord_using_Xcode(const char* X) +{ + if (strcmp(X, "01") == 0) return 1; + if (strcmp(X, "02") == 0) return 1; + if (strcmp(X, "04") == 0) return 1; + if (strcmp(X, "05") == 0) return 1; + if (strcmp(X, "06") == 0) return 1; + if (strcmp(X, "07") == 0) return 1; + if (strcmp(X, "08") == 0) return 1; + return 0; +} + +int main(int argc, char* argv[]) +{ + int err = 0; + codes_handle* h = NULL; + char* filename = NULL; + FILE* fin = NULL; + int is_coord = 0; + + assert (argc == 2); + filename = argv[1]; + + fin = fopen(filename, "rb"); + assert(fin); + while ((h = codes_handle_new_from_file(NULL, fin, PRODUCT_BUFR, &err)) != NULL || err != CODES_SUCCESS) { + codes_bufr_keys_iterator* kiter = NULL; + CODES_CHECK(codes_set_long(h, "unpack", 1), 0); + kiter = codes_bufr_keys_iterator_new(h, 0); + assert(kiter); + while (codes_bufr_keys_iterator_next(kiter)) { + char* name = codes_bufr_keys_iterator_get_name(kiter); + if (strcmp(name, "subsetNumber") == 0) continue; + if (!codes_bufr_key_is_header(h, name, &err) && !err) { + char name1[256] = {0,}; + char scode[256] = {0,}; + char X[3] = {0,}; // the 'X' part of FXY + size_t slen = 256; + snprintf(name1, 256, "%s->code", name); + int error = codes_get_string(h, name1, scode, &slen); + if (!error) { + assert(strlen(scode) == 6); + X[0] = scode[1]; + X[1] = scode[2]; + X[2] = 0; + int is_X_coord = is_coord_using_Xcode(X); + is_coord = codes_bufr_key_is_coordinate(h, name, &error); + assert(!error); + if (is_coord != is_X_coord) { + fprintf(stderr, "ERROR: %s X=%s is_coord=%d is_X_coord=%d\n", name, X, is_coord, is_X_coord); + return 1; + } + } + } + else { + // header keys cannot be coordinate descriptors + is_coord = codes_bufr_key_is_coordinate(h, name, &err); + assert(!is_coord); + } + } + + is_coord = codes_bufr_key_is_coordinate(h, "nosuchkey", &err); + assert(err == CODES_NOT_FOUND); + + codes_bufr_keys_iterator_delete(kiter); + codes_handle_delete(h); + } + fclose(fin); + return 0; +} diff --git a/tests/bufr_coordinate_descriptors.sh b/tests/bufr_coordinate_descriptors.sh new file mode 100755 index 000000000..41aebf8ba --- /dev/null +++ b/tests/bufr_coordinate_descriptors.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# (C) Copyright 2005- 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.ctest.sh + +label="bufr_coordinate_descriptors_test" +temp=temp.$label.txt + +bufr_files=`cat ${data_dir}/bufr/bufr_data_files.txt` +for f in ${bufr_files}; do + fpath=${data_dir}/bufr/$f + ${test_dir}/bufr_coordinate_descriptors $fpath +done +rm -f $temp diff --git a/tests/bufr_dump_data.sh b/tests/bufr_dump_data.sh index b8c5184a7..1eacbb1f8 100755 --- a/tests/bufr_dump_data.sh +++ b/tests/bufr_dump_data.sh @@ -25,7 +25,6 @@ fi # Test downloaded data files #============================================== bufr_files=`cat ${data_dir}/bufr/bufr_data_files.txt` -REDIRECT=/dev/null for file in ${bufr_files}; do ${tools_dir}/bufr_dump -O ${data_dir}/bufr/$file >/dev/null diff --git a/tests/bufr_dump_decode_filter.sh b/tests/bufr_dump_decode_filter.sh index fff9129f6..f36b03577 100755 --- a/tests/bufr_dump_decode_filter.sh +++ b/tests/bufr_dump_decode_filter.sh @@ -53,4 +53,14 @@ do rm -f $fRules fi done + +# Check expected failures +set +e +${tools_dir}/bufr_dump -Dfilter ${data_dir}/bufr/tropical_cyclone.bufr > $fLog 2>&1 +status=$? +set -e +[ $status -eq 1 ] +grep -q "Cannot dump filter for multi-message BUFR files" $fLog + +# Clean up rm -f $fLog $fRules diff --git a/tests/bufr_ecc-1259.sh b/tests/bufr_ecc-1259.sh index a65e65be5..107a25823 100755 --- a/tests/bufr_ecc-1259.sh +++ b/tests/bufr_ecc-1259.sh @@ -9,10 +9,8 @@ # . ./include.ctest.sh -set -u -REDIRECT=/dev/null -label="bufr_ecc-1259_test" +label="bufr_ecc-1259_test" tempBufr=temp.$label.bufr tempFilt=temp.$label.filt tempOut=temp.$label.out diff --git a/tests/bufr_ecc-1290.sh b/tests/bufr_ecc-1290.sh index 9d426ef5d..90b774cd1 100755 --- a/tests/bufr_ecc-1290.sh +++ b/tests/bufr_ecc-1290.sh @@ -9,8 +9,7 @@ # . ./include.ctest.sh -set -u -REDIRECT=/dev/null + label="bufr_ecc-1290_test" temp=temp.$label tempRules=temp.${label}.filter diff --git a/tests/bufr_ecc-1304.sh b/tests/bufr_ecc-1304.sh index a7cf5dcd7..2ffd34711 100755 --- a/tests/bufr_ecc-1304.sh +++ b/tests/bufr_ecc-1304.sh @@ -9,9 +9,7 @@ # . ./include.ctest.sh -set -u -REDIRECT=/dev/null label="bufr_ecc-1304_test" tempBufr=temp.$label.bufr diff --git a/tests/bufr_ecc-1305.sh b/tests/bufr_ecc-1305.sh index 477404ed5..ac22c948c 100755 --- a/tests/bufr_ecc-1305.sh +++ b/tests/bufr_ecc-1305.sh @@ -9,8 +9,7 @@ # . ./include.ctest.sh -set -u -REDIRECT=/dev/null + label="bufr_ecc-1305_test" temp=temp.$label diff --git a/tests/bufr_ecc-1623.sh b/tests/bufr_ecc-1623.sh new file mode 100755 index 000000000..9709a6cee --- /dev/null +++ b/tests/bufr_ecc-1623.sh @@ -0,0 +1,75 @@ +#!/bin/sh +# (C) Copyright 2005- 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.ctest.sh + +label="bufr_ecc-1623_test" +tempBufrA=temp.$label.A.bufr +tempBufrB=temp.$label.B.bufr +tempFilt=temp.$label.filt +tempText=temp.$label.txt +tempRef=temp.$label.ref + +sample_bufr4=$ECCODES_SAMPLES_PATH/BUFR4.tmpl + +# Test 1 +# ------------------------ +cat > $tempFilt < $tempText + +cat > $tempRef< $tempFilt < $tempFilt < $tempLog +grep -q "ecCodes Version" $tempLog + +# Check output is nonzero +result=`${tools_dir}/codes_info -v` +[ -n "$result" ] +result=`${tools_dir}/codes_info -s` +[ -n "$result" ] + +# Invalid option +set +e +${tools_dir}/codes_info -X > $tempLog 2>&1 +status=$? +set -e +[ $status -eq 1 ] + + +# Clean up +rm -f $tempLog diff --git a/tests/extract_offsets.sh b/tests/extract_offsets.sh index 243fcc7dd..828a4dd3f 100755 --- a/tests/extract_offsets.sh +++ b/tests/extract_offsets.sh @@ -11,31 +11,42 @@ . ./include.ctest.sh # Define a common label for all the tmp files -label="bufr_extract_offsets_test" +label="extract_offsets_test" temp1="temp.${label}.1" temp2="temp.${label}.2" +tempLog="temp.${label}.log" echo "Multi-message BUFR..." # --------------------------- input=${data_dir}/bufr/aeolus_wmo_26.bufr $EXEC ${test_dir}/extract_offsets $input > $temp1 -${tools_dir}/bufr_get -p offset:i $input > $temp2 +${tools_dir}/bufr_get -p offset:i $input > $temp2 diff $temp1 $temp2 -echo "Multi-message GRIB..." +echo "Multi-message GRIBs..." # -------------------------- -input=${data_dir}/mixed.grib -$EXEC ${test_dir}/extract_offsets $input > $temp1 -${tools_dir}/grib_get -p offset:i $input > $temp2 -diff $temp1 $temp2 - +inputs="${data_dir}/mixed.grib ${data_dir}/test.grib1 ${data_dir}/v.grib2" +for input in $inputs; do + $EXEC ${test_dir}/extract_offsets $input > $temp1 + ${tools_dir}/grib_get -p offset:i $input > $temp2 + diff $temp1 $temp2 +done echo "Test with invalid inputs..." # --------------------------------- set +e -$EXEC ${test_dir}/extract_offsets ${data_dir} +$EXEC ${test_dir}/extract_offsets ${data_dir} > $tempLog 2>&1 +status=$? +set -e +[ $status -ne 0 ] +grep -q "is a directory" $tempLog + +set +e +$EXEC ${test_dir}/extract_offsets ${data_dir}/bad.grib > $tempLog 2>&1 status=$? set -e [ $status -ne 0 ] +grep -q "Wrong message length" $tempLog -rm -f $temp1 $temp2 +# Clean up +rm -f $temp1 $temp2 $tempLog diff --git a/tests/grib2_chemicals_aerosols.sh b/tests/grib2_chemicals_aerosols.sh index f70689e88..192cd6340 100755 --- a/tests/grib2_chemicals_aerosols.sh +++ b/tests/grib2_chemicals_aerosols.sh @@ -124,8 +124,8 @@ ${tools_dir}/grib_ls -p firstSize,secondSize $temp ${tools_dir}/grib_set -s paramId=228104,setLocalDefinition=1,localDefinitionNumber=1 $sample2 $temp grib_check_key_equals $temp paramId,productDefinitionTemplateNumber,is_chemical_srcsink,localUsePresent '228104 76 1 1' -${tools_dir}/grib_set -s stepType=accum,paramId=228104 $sample2 $temp -grib_check_key_equals $temp shortName,productDefinitionTemplateNumber,is_chemical_srcsink 'e_WLCH4 78 1' +${tools_dir}/grib_set -s paramId=228104 $sample2 $temp +grib_check_key_equals $temp shortName,productDefinitionTemplateNumber,is_chemical_srcsink 'e_WLCH4 76 1' ${tools_dir}/grib_set -s setLocalDefinition=1,localDefinitionNumber=1 $temp $temp1 ${tools_dir}/grib_compare -b totalLength,numberOfSection $temp $temp1 grib_check_key_equals $temp1 localUsePresent 1 diff --git a/tests/grib2_templates.sh b/tests/grib2_templates.sh index 403010e2a..93daa7e5d 100755 --- a/tests/grib2_templates.sh +++ b/tests/grib2_templates.sh @@ -19,6 +19,19 @@ tempFilt=temp.$label.filt tempText=temp.$label.txt sample2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl +# Go thru all templates listed in the most recent Code Table 4.0 +# and ensure each has a template in section 4 +# ----------------------------------------------- +latestOfficial=`${tools_dir}/grib_get -p tablesVersionLatestOfficial $sample2` + +latest_codetable_file=$ECCODES_DEFINITION_PATH/grib2/tables/$latestOfficial/4.0.table +awk '$1 !~ /#/ && $1 < 65000 {print $1}' $latest_codetable_file | while read pdtn; do + if [ ! -f "$ECCODES_DEFINITION_PATH/grib2/template.4.$pdtn.def" ]; then + echo "GRIB2 template for product definition $pdtn does not exist!" + exit 1 + fi +done + # Template 4.86 # ------------- diff --git a/tests/grib2_wave_spectra.sh b/tests/grib2_wave_spectra.sh new file mode 100755 index 000000000..f610a08bb --- /dev/null +++ b/tests/grib2_wave_spectra.sh @@ -0,0 +1,50 @@ +#!/bin/sh +# (C) Copyright 2005- 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.ctest.sh + +label="grib2_wave_spectra_test" +temp=temp.$label +tempSample=temp.$label.tmpl +sample2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl + +latest=`${tools_dir}/grib_get -p tablesVersionLatest $sample2` + +# Wave 2D spectra with explicit list of frequencies and directions +${tools_dir}/grib_set -s tablesVersion=$latest,productDefinitionTemplateNumber=99 $sample2 $tempSample +${tools_dir}/grib_set -s numberOfWaveDirections=3,numberOfWaveFrequencies=3 $tempSample $temp + +# Wave 2D spectra with explicit list of frequencies and directions, ensemble +${tools_dir}/grib_set -s tablesVersion=$latest,productDefinitionTemplateNumber=100 $sample2 $tempSample +grib_check_key_equals $tempSample numberOfWaveDirections,numberOfWaveFrequencies,perturbationNumber '1 1 0' + +# Wave 2D spectra with frequencies and directions defined by formulae +${tools_dir}/grib_set -s tablesVersion=$latest,productDefinitionTemplateNumber=101 $sample2 $tempSample +${tools_dir}/grib_set -s numberOfWaveDirections=3,numberOfWaveFrequencies=3 $tempSample $temp +grib_check_key_equals $temp numberOfWaveFrequencySequenceParameters 1 +grib_check_key_equals $temp numberOfWaveDirectionSequenceParameters 1 + +# Wave 2D spectra with frequencies and directions defined by formulae, ensemble +${tools_dir}/grib_set -s tablesVersion=$latest,productDefinitionTemplateNumber=102 $sample2 $tempSample +${tools_dir}/grib_set -s numberOfWaveDirections=3,numberOfWaveFrequencies=3 $tempSample $temp +grib_check_key_equals $temp perturbationNumber 0 +grib_check_key_equals $temp typeOfWaveFrequencySequence 0 +grib_check_key_equals $temp typeOfWaveDirectionSequence 0 + +# Wave waves selected by period range +${tools_dir}/grib_set -s tablesVersion=$latest,productDefinitionTemplateNumber=103 $sample2 $temp +grib_check_key_equals $temp scaleFactorOfLowerWavePeriodLimit,scaledValueOfLowerWavePeriodLimit 'MISSING MISSING' + +${tools_dir}/grib_set -s tablesVersion=$latest,productDefinitionTemplateNumber=104 $sample2 $temp +grib_check_key_equals $temp scaleFactorOfLowerWavePeriodLimit,scaledValueOfLowerWavePeriodLimit,perturbationNumber 'MISSING MISSING 0' + + +# Clean up +rm -f $tempSample $temp diff --git a/tests/grib2to3.sh b/tests/grib2to3.sh index ae4a4d339..e58d1f9e5 100755 --- a/tests/grib2to3.sh +++ b/tests/grib2to3.sh @@ -9,8 +9,6 @@ # . ./include.ctest.sh -REDIRECT=/dev/null - label="grib2to3_test" temp=temp.$label.grib3 sample_g2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl diff --git a/tests/grib3_templates.sh b/tests/grib3_templates.sh index decba118a..08a5aa012 100755 --- a/tests/grib3_templates.sh +++ b/tests/grib3_templates.sh @@ -9,8 +9,6 @@ # . ./include.ctest.sh -REDIRECT=/dev/null - label="grib3_templates_test" temp1=temp1.$label.grib3 temp2=temp2.$label.grib3 diff --git a/tests/grib_bitmap.sh b/tests/grib_bitmap.sh index e2a237531..e2765806e 100755 --- a/tests/grib_bitmap.sh +++ b/tests/grib_bitmap.sh @@ -118,9 +118,16 @@ grib_check_key_equals $tempSimple bitmapPresent,numberOfMissing,numberOfValues,n stats=`${tools_dir}/grib_get -F%.2f -p max,min,avg $tempSimple` [ "$stats" = "2.81 0.00 0.30" ] +# Repack +${tools_dir}/grib_copy -r $infile $temp2 +${tools_dir}/grib_compare -c data:n $infile $temp2 +grib_check_key_equals $temp2 bitsPerValue 9 # Note: The input file has bpv=9 + + # Simple to grid_complex tempComplex=temp.grib_bitmap.complex.grib -${tools_dir}/grib_set -r -s packingType=grid_complex $tempSimple $tempComplex +#${tools_dir}/grib_set -r -s packingType=grid_complex $tempSimple $tempComplex # TODO: fix re-packing +${tools_dir}/grib_set -s packingType=grid_complex $tempSimple $tempComplex grib_check_key_equals $tempComplex packingType,bitmapPresent,numberOfMissing,numberOfValues,numberOfPoints "grid_complex 1 556901 481339 1038240" stats=`${tools_dir}/grib_get -F%.2f -p max,min,avg $tempComplex` [ "$stats" = "2.81 0.00 0.30" ] @@ -128,7 +135,8 @@ rm -f $tempComplex # Simple to grid_complex_spatial_differencing tempComplexSD=temp.grib_bitmap.complexSD.grib -${tools_dir}/grib_set -r -s packingType=grid_complex_spatial_differencing $tempSimple $tempComplexSD +#${tools_dir}/grib_set -r -s packingType=grid_complex_spatial_differencing $tempSimple $tempComplexSD # TODO: fix re-packing +${tools_dir}/grib_set -s packingType=grid_complex_spatial_differencing $tempSimple $tempComplexSD grib_check_key_equals $tempComplexSD packingType "grid_complex_spatial_differencing" grib_check_key_equals $tempComplexSD bitmapPresent,numberOfMissing,numberOfValues,numberOfPoints "1 556901 481339 1038240" stats=`${tools_dir}/grib_get -F%.2f -p max,min,avg $tempComplexSD` diff --git a/tests/grib_ccsds.sh b/tests/grib_ccsds.sh index 03c6fcbfa..bb37f060c 100755 --- a/tests/grib_ccsds.sh +++ b/tests/grib_ccsds.sh @@ -146,18 +146,21 @@ ${tools_dir}/grib_compare -c data:n $outfile1 $outfile2 # Test increasing bitsPerValue # ----------------------------- -# TODO: This one is broken for some BPV values. It has AEC_DATA_3BYTE_OPTION_MASK==0 -# input=${data_dir}/ccsds.grib2 - -ifs_samples="gg_ml.tmpl gg_sfc_grib2.tmpl" ifs_dir=${proj_dir}/ifs_samples/grib1_mlgrib2_ccsds +inputs=" + $data_dir/ccsds.grib2 + $ifs_dir/gg_ml.tmpl + $ifs_dir/gg_sfc_grib2.tmpl +" +grib_check_key_equals $data_dir/ccsds.grib2 'bitsPerValue,packingType,AEC_DATA_3BYTE_OPTION_MASK' '14 grid_ccsds 0' +grib_check_key_equals $ifs_dir/gg_ml.tmpl 'bitsPerValue,packingType,AEC_DATA_3BYTE_OPTION_MASK' '16 grid_ccsds 1' +grib_check_key_equals $ifs_dir/gg_sfc_grib2.tmpl 'bitsPerValue,packingType,AEC_DATA_3BYTE_OPTION_MASK' '16 grid_ccsds 1' + MAX_BPV=32 # libaec cannot handle more than this -for sample in $ifs_samples; do - input=$ifs_dir/$sample +for input in $inputs; do MIN_BPV=`${tools_dir}/grib_get -p bitsPerValue $input` stats1=`${tools_dir}/grib_get -F%.3f -p min,max,avg,sd $input` - grib_check_key_equals $input 'bitsPerValue,packingType,AEC_DATA_3BYTE_OPTION_MASK' '16 grid_ccsds 1' for bpv in `seq $MIN_BPV $MAX_BPV`; do ${tools_dir}/grib_set -s setBitsPerValue=$bpv $input $outfile2 ${tools_dir}/grib_compare -c data:n $input $outfile2 @@ -183,6 +186,14 @@ infile=${data_dir}/ccsds_szip.grib2 res=`${tools_dir}/grib_get '-F%.3f' -p min,max,avg $infile` [ "$res" = "-180.000 180.000 -0.044" ] +# Conversion from JPEG to CCSDS (binaryScaleFactor=0, decimalScaleFactor!=0) +# ------------------------------------------------------------------------- +if [ $HAVE_JPEG -eq 1 ]; then + ${tools_dir}/grib_copy -w count=2 ${data_dir}/v.grib2 $outfile1 + grib_check_key_equals $outfile1 packingType,bitsPerValue,binaryScaleFactor,decimalScaleFactor 'grid_jpeg 10 0 1' + ${tools_dir}/grib_set -r -s packingType=grid_ccsds $outfile1 $outfile2 + ${tools_dir}/grib_compare -c data:n $outfile1 $outfile2 +fi # Clean up rm -f $outfile1 $outfile2 $logfile diff --git a/tests/grib_change_scanning.sh b/tests/grib_change_scanning.sh index 1f2f5ab29..2312c1ca3 100755 --- a/tests/grib_change_scanning.sh +++ b/tests/grib_change_scanning.sh @@ -128,6 +128,11 @@ grib_check_key_equals "$ECCODES_SAMPLES_PATH/GRIB1.tmpl" jScansNegatively,jScans grib_check_key_equals "$ECCODES_SAMPLES_PATH/GRIB2.tmpl" iScansNegatively,iScansPositively '0 1' grib_check_key_equals "$ECCODES_SAMPLES_PATH/GRIB2.tmpl" jScansNegatively,jScansPositively '1 0' +# Rare case of pack_string for an integer key +${tools_dir}/grib_set -s swapScanningX:s=1 $ECCODES_SAMPLES_PATH/GRIB2.tmpl $tempGribA 2>/dev/null +${tools_dir}/grib_set -s swapScanningX:i=1 $ECCODES_SAMPLES_PATH/GRIB2.tmpl $tempGribB 2>/dev/null +cmp $tempGribA $tempGribB + # Clean up rm -f $tempFilt $tempGribA $tempGribB $tempRef $tempText rm -f ${data_dir}/scan1.grib ${data_dir}/scan.grib diff --git a/tests/grib_check_param_concepts.sh b/tests/grib_check_param_concepts.sh index 405e39afd..d16fe3135 100755 --- a/tests/grib_check_param_concepts.sh +++ b/tests/grib_check_param_concepts.sh @@ -23,6 +23,7 @@ $EXEC ${test_dir}/grib_check_param_concepts paramId $ECCODES_DEFINITION_PATH/gri $EXEC ${test_dir}/grib_check_param_concepts paramId $ECCODES_DEFINITION_PATH/grib2/localConcepts/hydro/paramId.def $EXEC ${test_dir}/grib_check_param_concepts paramId $ECCODES_DEFINITION_PATH/grib2/localConcepts/tigge/paramId.def $EXEC ${test_dir}/grib_check_param_concepts paramId $ECCODES_DEFINITION_PATH/grib2/localConcepts/s2s/paramId.def +$EXEC ${test_dir}/grib_check_param_concepts paramId $ECCODES_DEFINITION_PATH/grib2/localConcepts/era6/paramId.def $EXEC ${test_dir}/grib_check_param_concepts shortName $ECCODES_DEFINITION_PATH/grib2/shortName.def $EXEC ${test_dir}/grib_check_param_concepts shortName $ECCODES_DEFINITION_PATH/grib2/localConcepts/ecmf/shortName.def @@ -30,6 +31,7 @@ $EXEC ${test_dir}/grib_check_param_concepts shortName $ECCODES_DEFINITION_PATH/g $EXEC ${test_dir}/grib_check_param_concepts shortName $ECCODES_DEFINITION_PATH/grib2/localConcepts/hydro/shortName.def $EXEC ${test_dir}/grib_check_param_concepts shortName $ECCODES_DEFINITION_PATH/grib2/localConcepts/tigge/shortName.def $EXEC ${test_dir}/grib_check_param_concepts shortName $ECCODES_DEFINITION_PATH/grib2/localConcepts/s2s/shortName.def +$EXEC ${test_dir}/grib_check_param_concepts shortName $ECCODES_DEFINITION_PATH/grib2/localConcepts/era6/shortName.def # Check the group: name.def paramId.def shortName.def units.def cfVarName.def # ---------------------------------------------------------------------------- @@ -78,6 +80,25 @@ done cd $test_dir +# ------------------------------- +echo "WMO legacy parameters..." +# ------------------------------- +ECMF_DIR=$ECCODES_DEFINITION_PATH/grib2 + +tempDir=temp.${label}.dir +rm -fr $tempDir +mkdir -p $tempDir +cd $tempDir +#cp $ECMF_DIR/cfName.legacy.def cfName.def +#cp $ECMF_DIR/cfVarName.legacy.def cfVarName.def +cp $ECMF_DIR/name.legacy.def name.def +cp $ECMF_DIR/paramId.legacy.def paramId.def +cp $ECMF_DIR/shortName.legacy.def shortName.def +cp $ECMF_DIR/units.legacy.def units.def +$CHECK_DEFS +cd $test_dir +rm -fr $tempDir + # ------------------------------- echo "ECMWF legacy parameters..." # ------------------------------- @@ -94,6 +115,8 @@ cp $ECMF_DIR/paramId.legacy.def paramId.def cp $ECMF_DIR/shortName.legacy.def shortName.def cp $ECMF_DIR/units.legacy.def units.def $CHECK_DEFS +cd $test_dir +rm -fr $tempDir # ------------------------------- echo "Check duplicates" diff --git a/tests/grib_count.sh b/tests/grib_count.sh new file mode 100755 index 000000000..43b4c2246 --- /dev/null +++ b/tests/grib_count.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# (C) Copyright 2005- 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.ctest.sh + +label="grib_count_test" + +grib_files=`cat ${data_dir}/grib_data_files.txt` +for file in ${grib_files}; do + if [ "$file" = "bad.grib" -o "$file" = "budg" ]; then continue; fi + input=${data_dir}/$file + ${tools_dir}/grib_count $input +done + +# Specific files +count=`${tools_dir}/grib_count ${data_dir}/test.grib1` +[ $count -eq 42 ] + +count=`${tools_dir}/grib_count ${data_dir}/mixed.grib` +[ $count -eq 14 ] + +count=`${tools_dir}/grib_count ${data_dir}/tigge_ecmwf.grib2` +[ $count -eq 248 ] diff --git a/tests/grib_data_quality_checks.sh b/tests/grib_data_quality_checks.sh index 4123a2785..81657d24b 100755 --- a/tests/grib_data_quality_checks.sh +++ b/tests/grib_data_quality_checks.sh @@ -209,7 +209,8 @@ if [ $HAVE_AEC -eq 1 ]; then [ $status -ne 0 ] fi -# Invalid shortName +# Invalid shortName/name +# ------------------------- export ECCODES_GRIB_DATA_QUALITY_CHECKS=1 input2=${data_dir}/reduced_gaussian_surface.grib2 ${tools_dir}/grib_set -s discipline=254 $input2 $tempOut @@ -219,7 +220,19 @@ ${tools_dir}/grib_set -s scaleValuesBy=2 $tempOut $tempGrib2 2>$tempErr status=$? set -e [ $status -ne 0 ] -grep -q "Invalid metadata: shortName=unknown" $tempErr +grep -q "Invalid metadata: shortName='unknown'" $tempErr + +# Invalid name (ECC-793) +${tools_dir}/grib_set -s paramId=129080 $input2 $tempOut 2>$tempErr +grib_check_key_equals $tempOut 'name' 'Experimental product' +# Repacking causes the values to be set +set +e +${tools_dir}/grib_set -r -s paramId=129080 $input2 $tempOut 2>$tempErr +status=$? +set -e +[ $status -ne 0 ] +grep -q "Invalid metadata: name='Experimental product'" $tempErr + # Clean up rm -rf $tempDir diff --git a/tests/grib_dump_debug.sh b/tests/grib_dump_debug.sh index d5bceb4f7..b5397cb47 100755 --- a/tests/grib_dump_debug.sh +++ b/tests/grib_dump_debug.sh @@ -12,8 +12,6 @@ label="grib_dump_debug_test" temp=temp.$label.txt -REDIRECT=/dev/null - if [ $HAVE_MEMFS -eq 1 ]; then unset ECCODES_DEFINITION_PATH unset ECCODES_SAMPLES_PATH @@ -95,11 +93,14 @@ for file in $files; do done # ECC-1247: indicate which keys can have values which are 'missing' +# ECC-1584: indicate which keys are 'read-only' # ------------------------------------------------------------------ infile=${data_dir}/sample.grib2 ${tools_dir}/grib_dump -D $infile > $temp grep -q "unsigned hoursAfterDataCutoff = 0 (can be missing)" $temp grep -q "unsigned iDirectionIncrement = 2000000 (can be missing)" $temp +grep -q "constant zero = 0 (read-only)" $temp +grep -q "unsigned reserved = MISSING (can be missing) (read-only)" $temp - +# Clean up rm -f $temp diff --git a/tests/grib_ecc-1230.sh b/tests/grib_ecc-1230.sh index a6f91e674..a20b0b461 100755 --- a/tests/grib_ecc-1230.sh +++ b/tests/grib_ecc-1230.sh @@ -10,7 +10,6 @@ . ./include.ctest.sh -REDIRECT=/dev/null label="prod_ECC-1230_test" temp1=temp1.$label temp2=temp2.$label diff --git a/tests/grib_ecc-1260.sh b/tests/grib_ecc-1260.sh index 23f4f5c82..f33de4eb6 100755 --- a/tests/grib_ecc-1260.sh +++ b/tests/grib_ecc-1260.sh @@ -10,7 +10,6 @@ . ./include.ctest.sh -REDIRECT=/dev/null label="grib_ecc-1260_test" tempGrib=temp.$label.grib tempRef=temp.$label.ref diff --git a/tests/grib_ecc-1315.sh b/tests/grib_ecc-1315.sh index 81a3be7de..73653b77d 100755 --- a/tests/grib_ecc-1315.sh +++ b/tests/grib_ecc-1315.sh @@ -10,7 +10,6 @@ . ./include.ctest.sh -REDIRECT=/dev/null label="grib_ecc-1313_test" tempOut=temp.$label.text tempRef=temp.$label.ref diff --git a/tests/grib_ecc-1322.sh b/tests/grib_ecc-1322.sh index a3024ecf4..d1f61206b 100755 --- a/tests/grib_ecc-1322.sh +++ b/tests/grib_ecc-1322.sh @@ -9,8 +9,7 @@ # . ./include.ctest.sh -set -u -REDIRECT=/dev/null + label="grib_ecc-1322_test" tempGrb=temp.$label.grib diff --git a/tests/grib_ecc-1406.sh b/tests/grib_ecc-1406.sh index 38d9d34c8..901833c07 100755 --- a/tests/grib_ecc-1406.sh +++ b/tests/grib_ecc-1406.sh @@ -9,8 +9,7 @@ # . ./include.ctest.sh -set -u -REDIRECT=/dev/null + label="grib_ecc-1406_test" tempGrib=temp.$label.grib diff --git a/tests/grib_ecc-1431.cc b/tests/grib_ecc-1431.cc index ea799f2a3..39454b203 100644 --- a/tests/grib_ecc-1431.cc +++ b/tests/grib_ecc-1431.cc @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -31,7 +32,7 @@ struct Range // // Test: This test doesn't accept errors after decompression. // -void test_full() +int main(int argc, char** argv) { std::vector ranges; ranges.push_back({ flt::max() / 10, flt::max() }); @@ -41,24 +42,21 @@ void test_full() ranges.push_back({ 1e-1, 1e-0 }); ranges.push_back({ 1e-2, 1e-1 }); ranges.push_back({ 1e-11, 1e-10 }); - // TODO - // The test fails for the following ranges - // These tests can be performed when the problem is solved with small values. - // ranges.push_back({flt::min()*10 , flt::min()*100 } ); - // ranges.push_back({flt::min() , flt::min()*10 } ); - // ranges.push_back({flt::min() , flt::max() } ); + ranges.push_back({ flt::min() * 10, flt::min() * 100 }); + ranges.push_back({ flt::min(), flt::min() * 10 }); + ranges.push_back({ flt::min(), flt::max() }); std::vector values_lens = { 1, 10, 100, 100000, - 10000000, }; int err; std::default_random_engine re; + size_t in_values_ecc_1612_workaround_len = 0; size_t grid_simple_values_len = 0; size_t grid_ccsds_values_len = 0; std::string packing_type = ""; @@ -67,14 +65,20 @@ void test_full() for (const size_t in_values_len : values_lens) { for (const Range range : ranges) { Assert(range.min < range.max); - std::cout << "Testing: " << in_values_len << " " << range.min << " " << range.max << std::endl; - std::uniform_real_distribution unif(range.min, range.max); + std::cout << "Testing: " + << "n_vals : " << std::setw(7) << in_values_len + << " range(" << std::scientific << std::setw(12) << range.min << ", " << std::setw(12) << range.max << ") " + << std::endl; + std::uniform_real_distribution + unif(range.min, range.max); codes_handle* handle = codes_grib_handle_new_from_samples(0, "reduced_gg_pl_128_grib2"); double* in_values = new double[in_values_len]; + double* in_values_ecc_1612_workaround = new double[in_values_len]; double* grid_simple_values = new double[in_values_len]; double* grid_ccsds_values = new double[in_values_len]; + in_values_ecc_1612_workaround_len = in_values_len; grid_simple_values_len = in_values_len; grid_ccsds_values_len = in_values_len; @@ -83,9 +87,16 @@ void test_full() in_values[i] = unif(re); } - // Convert original values to quantized values, by grid_simple - CODES_CHECK(codes_set_double_array(handle, "values", in_values, in_values_len), 0); - CODES_CHECK(codes_get_double_array(handle, "values", grid_simple_values, &grid_simple_values_len), 0); + // Convert original values to quantized values using grid_simple + { // Workaround ECC-1612. Can be removed when fixed. Use code below instead. + CODES_CHECK(codes_set_double_array(handle, "values", in_values, in_values_len), 0); + CODES_CHECK(codes_get_double_array(handle, "values", in_values_ecc_1612_workaround, &in_values_ecc_1612_workaround_len), 0); + CODES_CHECK(codes_set_double_array(handle, "values", in_values_ecc_1612_workaround, in_values_ecc_1612_workaround_len), 0); + CODES_CHECK(codes_get_double_array(handle, "values", grid_simple_values, &grid_simple_values_len), 0); + //CODES_CHECK(codes_set_double_array(handle, "values", in_values, in_values_len), 0); + //CODES_CHECK(codes_get_double_array(handle, "values", grid_simple_values, &grid_simple_values_len), 0); + } + Assert(in_values_len == grid_simple_values_len); // Test grid_ccsds @@ -112,100 +123,10 @@ void test_full() codes_handle_delete(handle); delete[] in_values; + delete[] in_values_ecc_1612_workaround; delete[] grid_simple_values; delete[] grid_ccsds_values; } } -} - - -// -// Test: This test accepts tolerates errors. Values after decompression must be within a certain user defined range. -// -void test_simplified() -{ - std::vector ranges; - ranges.push_back({ flt::max() / 10, flt::max() }); - ranges.push_back({ flt::max() / 100, flt::max() / 10 }); - ranges.push_back({ 1e+9, 1e+10 }); - ranges.push_back({ 1e+0, 1e+1 }); - ranges.push_back({ 1e-1, 1e-0 }); - ranges.push_back({ 1e-2, 1e-1 }); - ranges.push_back({ 1e-11, 1e-10 }); - // TODO - // The test fails for the following ranges - // These tests can be performed when the problem is solved with small values. - // ranges.push_back({flt::min()*10 , flt::min()*100 } ); - // ranges.push_back({flt::min() , flt::min()*10 } ); - // ranges.push_back({flt::min() , flt::max() } ); - - std::vector values_lens = { - 1, - 10, - 100, - 100000, - 10000000, - }; - - int err; - - std::default_random_engine re; - size_t grid_ccsds_values_len = 0; - std::string packing_type = ""; - size_t size = 0; - - for (const size_t in_values_len : values_lens) { - for (const Range range : ranges) { - Assert(range.min < range.max); - std::cout << "Testing: " << in_values_len << " " << range.min << " " << range.max << std::endl; - std::uniform_real_distribution unif(range.min, range.max); - - codes_handle* handle = codes_grib_handle_new_from_samples(0, "reduced_gg_pl_128_grib2"); - double* in_values = new double[in_values_len]; - double* grid_ccsds_values = new double[in_values_len]; - - grid_ccsds_values_len = in_values_len; - - // Initialize with random values - for (size_t i = 0; i < in_values_len; ++i) { - in_values[i] = unif(re); - } - - // Test grid_ccsds - packing_type = "grid_ccsds"; - size = packing_type.size(); - CODES_CHECK(codes_set_string(handle, "packingType", packing_type.c_str(), &size), 0); - if ((err = codes_set_double_array(handle, "values", in_values, in_values_len)) != 0) { - Assert(!"CCSDS encoding failed"); - } - if ((err = codes_get_double_array(handle, "values", grid_ccsds_values, &grid_ccsds_values_len)) != 0) { - Assert(!"CCSDS decoding failed"); - } - Assert(grid_ccsds_values_len == in_values_len); - - // Test buffers - double tolerance = 0.000001; - for (size_t i = 0; i < grid_ccsds_values_len; ++i) { - if (!((grid_ccsds_values[i] < (in_values[i] * (1 + tolerance))) && - grid_ccsds_values[i] > (in_values[i] / (1 + tolerance)))) { - std::cout.precision(dbl::max_digits10); - std::cout << "Test failed: " << grid_ccsds_values[i] << " != " << in_values[i] << std::endl; - Assert(0); - } - } - - codes_handle_delete(handle); - - delete[] in_values; - delete[] grid_ccsds_values; - } - } -} - - -int main(int argc, char** argv) -{ - test_simplified(); - //test_full(); return 0; } diff --git a/tests/grib_ecc-1433.cc b/tests/grib_ecc-1433.cc new file mode 100644 index 000000000..ed2ac04aa --- /dev/null +++ b/tests/grib_ecc-1433.cc @@ -0,0 +1,62 @@ +/* + * (C) Copyright 2005- 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 "grib_api_internal.h" +#include +#include +#include +#include +#include +#include +#include +#include + +typedef std::numeric_limits dbl; +typedef std::numeric_limits flt; + +int main(int argc, char** argv) +{ + size_t values_len = 10; + std::default_random_engine re; + std::uniform_real_distribution unif(flt::min(), flt::min() * 10); + + codes_handle* handle = codes_grib_handle_new_from_samples(0, "reduced_gg_pl_128_grib2"); + double* values = new double[values_len]; + double* grid_ccsds_values = new double[values_len]; + + // Initialize with small random values + for (size_t i = 0; i < values_len; ++i) { + values[i] = unif(re); + } + + // Test grid_ccsds + std::string packing_type = "grid_ccsds"; + size_t size = packing_type.size(); + CODES_CHECK(codes_set_double_array(handle, "values", values, values_len), 0); + CODES_CHECK(codes_set_string(handle, "packingType", packing_type.c_str(), &size), 0); + CODES_CHECK(codes_get_double_array(handle, "values", grid_ccsds_values, &values_len), 0); + + // Test buffers + double tolerance = 0.000001; + for (size_t i = 0; i < values_len; ++i) { + if (!((grid_ccsds_values[i] < (values[i] * (1 + tolerance))) && + grid_ccsds_values[i] > (values[i] / (1 + tolerance)))) { + std::cout.precision(dbl::max_digits10); + std::cout << "Test failed: " << grid_ccsds_values[i] << " != " << values[i] << std::endl; + Assert(0); + } + } + + codes_handle_delete(handle); + + delete[] values; + delete[] grid_ccsds_values; + return 0; +} diff --git a/tests/grib_ecc-1433.sh b/tests/grib_ecc-1433.sh new file mode 100755 index 000000000..9fd834346 --- /dev/null +++ b/tests/grib_ecc-1433.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# (C) Copyright 2005- 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.ctest.sh + +label="grib_ecc-1433_test" +temp=temp.$label + +$EXEC $test_dir/grib_ecc-1433 + +rm -f $temp diff --git a/tests/grib_ecc-1467.cc b/tests/grib_ecc-1467.cc index 69c5f73e9..34d7867e6 100644 --- a/tests/grib_ecc-1467.cc +++ b/tests/grib_ecc-1467.cc @@ -66,11 +66,11 @@ int main(int argc, char** argv) if (!((dmin <= fval) && (fval <= dmax))) { fprintf(stderr, "Error:\n"); fprintf(stderr, "dvalue: %f, fvalue: %f\n", dvalues[i], fvalues[i]); - fprintf(stderr, "\tmin < fvalue < max = %.20e < %.20e < %.20e FAILED\n", + fprintf(stderr, "\tmin < fvalue < max = %.20e < %.20e < %.20e FAILED\n", dmin, fvalues[i], dmax); - fprintf(stderr, "\tfvalue - min = %.20e (%s)\n", + fprintf(stderr, "\tfvalue - min = %.20e (%s)\n", fvalues[i] - dmin, fvalues[i] - dmin >= 0 ? "OK" : "FAILED (should be positive)"); - fprintf(stderr, "\tmax - fvalue = %.20e (%s)\n", + fprintf(stderr, "\tmax - fvalue = %.20e (%s)\n", dmax - fvalues[i], dmax - fvalues[i] >= 0 ? "OK" : "FAILED (should be positive)"); Assert(!"Relative tolerance test failed\n"); diff --git a/tests/grib_ecc-1467.sh b/tests/grib_ecc-1467.sh index e666f7a0d..fb5d0bd1c 100755 --- a/tests/grib_ecc-1467.sh +++ b/tests/grib_ecc-1467.sh @@ -30,7 +30,7 @@ gfiles="$gfiles spherical_pressure_level.grib2" # spectral_complex, edition=2 gfiles="$gfiles gfs.complex.mvmu.grib2" # grid_complex, edition=2, g22order_packing # Second order -gfiles="$gfiles lfpw.grib1" # grid_second_order, edition=1 +gfiles="$gfiles lfpw.grib1 gen.grib gen_ext.grib second_ord_rbr.grib1" # grid_second_order, edition=1 #gfiles="$gfiles " # grid_second_order, edition=2 # CCSDS diff --git a/tests/grib_ecc-1560.sh b/tests/grib_ecc-1560.sh new file mode 100755 index 000000000..b83eda55c --- /dev/null +++ b/tests/grib_ecc-1560.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# (C) Copyright 2005- 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.ctest.sh + +label="grib_ecc-1560_test" +temp_PDTN08_Grib=temp.$label.PDTN08.grib +temp_PDTN11_Grib=temp.$label.PDTN11.grib +tempGrib=temp.$label.grib +sample_grib2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl + +# We set PDTN=8 and level to 1.5 metres above ground +${tools_dir}/grib_set -s \ + productDefinitionTemplateNumber=8,typeOfFirstFixedSurface=103,scaledValueOfFirstFixedSurface=15,scaleFactorOfFirstFixedSurface=1 \ + $sample_grib2 $temp_PDTN08_Grib +grib_check_key_equals $temp_PDTN08_Grib level:d 1.5 + +# Now we change to PDTN 11 +${tools_dir}/grib_set -s productDefinitionTemplateNumber=11 $temp_PDTN08_Grib $temp_PDTN11_Grib +grib_check_key_equals $temp_PDTN11_Grib level:d 1.5 +grib_check_key_equals $temp_PDTN11_Grib scaledValueOfFirstFixedSurface 15 +grib_check_key_equals $temp_PDTN11_Grib scaleFactorOfFirstFixedSurface 1 + + +# Set whole value using the int/double encoding +# ----------------------------------------------- +${tools_dir}/grib_set -s typeOfFirstFixedSurface=105,level:i=34 $sample_grib2 $tempGrib +grib_check_key_equals $tempGrib scaleFactorOfFirstFixedSurface 0 +grib_check_key_equals $tempGrib scaledValueOfFirstFixedSurface 34 + +${tools_dir}/grib_set -s typeOfFirstFixedSurface=105,level:d=34 $sample_grib2 $tempGrib +grib_check_key_equals $tempGrib scaleFactorOfFirstFixedSurface 0 +grib_check_key_equals $tempGrib scaledValueOfFirstFixedSurface 34 + +${tools_dir}/grib_set -s typeOfFirstFixedSurface=105,level:d=3.456 $sample_grib2 $tempGrib +grib_check_key_equals $tempGrib scaleFactorOfFirstFixedSurface 3 +grib_check_key_equals $tempGrib scaledValueOfFirstFixedSurface 3456 + + +# Clean up +rm -f $temp_PDTN08_Grib $temp_PDTN11_Grib $tempGrib diff --git a/tests/grib_ecc-1571.sh b/tests/grib_ecc-1571.sh new file mode 100755 index 000000000..80865ae78 --- /dev/null +++ b/tests/grib_ecc-1571.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# (C) Copyright 2005- 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.ctest.sh + +label="grib_ecc-1571" +tempGribA=temp1.$label.grib2 +tempGribB=temp2.$label.grib2 +sample_grib2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl + +# 1st we create a sample file for UERRA with centre lfpw +${tools_dir}/grib_set -s centre=lfpw,productionStatusOfProcessedData=8 ${sample_grib2} ${tempGribA} +# Now we use the UERRA sample and add a local section to it +${tools_dir}/grib_set -s setLocalDefinition=1,grib2LocalSectionNumber=0,uerraLocalVersion=1 ${tempGribA} ${tempGribB} + +# We should have a local section with uerraLocalVersion=1,experimentVersionNumber=0002 +grib_check_key_equals ${tempGribB} uerraLocalVersion,experimentVersionNumber "1 0002" +grib_check_key_equals ${tempGribB} 'marsExpver,mars.expver' '0002 0002' + +# set other expver +${tools_dir}/grib_set -s setLocalDefinition=1,grib2LocalSectionNumber=0,uerraLocalVersion=1,experimentVersionNumber=1234 ${tempGribA} ${tempGribB} +grib_check_key_equals ${tempGribB} uerraLocalVersion,experimentVersionNumber "1 1234" + +rm -f ${tempGribA} ${tempGribB} + + + + + diff --git a/tests/grib_ecc-922.sh b/tests/grib_ecc-922.sh index c04201f65..81e995633 100755 --- a/tests/grib_ecc-922.sh +++ b/tests/grib_ecc-922.sh @@ -15,7 +15,6 @@ # grib_get_data should fail on incorrectly coded grid # --------------------------------------------------------- -REDIRECT=/dev/null label="grib_ecc-922_test" temp=temp.$label sample_grib2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl diff --git a/tests/grib_ecc-984.sh b/tests/grib_ecc-984.sh index caebd55a9..b692e5eeb 100755 --- a/tests/grib_ecc-984.sh +++ b/tests/grib_ecc-984.sh @@ -27,5 +27,11 @@ ${tools_dir}/grib_get_data -F%.2f $tempGrb >$tempOut 2>$tempErr grep -q "2.000 20.000 302.53" $tempOut # grep -q "Cannot use jDirectionIncrement" $tempErr +# ECC-1586 +${tools_dir}/grib_set -s jDirectionIncrement=MISSING,iDirectionIncrement=MISSING $input $tempGrb +${tools_dir}/grib_get_data -F%.2f $tempGrb >$tempOut 2>$tempErr +grep -q "2.000 20.000 302.53" $tempOut + + # Clean up rm -f $tempGrb $tempOut $tempErr diff --git a/tests/grib_filter.sh b/tests/grib_filter.sh index c6c0a48f7..ff5f81b83 100755 --- a/tests/grib_filter.sh +++ b/tests/grib_filter.sh @@ -199,11 +199,20 @@ cat >$tempFilt <$tempFilt < $tempLog + set +e + grep -q "packingType" $tempLog + status=$? + set -e + [ $status -ne 0 ] +done + +${tools_dir}/grib_dump -M -x -O $sample_g1 > $tempLog +${tools_dir}/grib_dump -M -x -O $sample_g2 > $tempLog + + +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_surface.grib1 +reduced_gaussian_surface.grib2 +reduced_latlon_surface.grib1 +reduced_latlon_surface.grib2 +regular_gaussian_pressure_level.grib1 +regular_gaussian_pressure_level.grib2 +regular_gaussian_surface.grib1 +regular_gaussian_surface.grib2 +regular_latlon_surface.grib1 +regular_latlon_surface.grib2 +" + +for f in $files; do + file=$data_dir/$f + echo $file + ${tools_dir}/grib_ls -M -x $file > $tempLog + ${tools_dir}/grib_dump -O -M -x $file > $tempLog +done + +# Clean up +rm -f $tempText $tempLog diff --git a/tests/grib_level.sh b/tests/grib_level.sh index e545e6e2a..578095c62 100755 --- a/tests/grib_level.sh +++ b/tests/grib_level.sh @@ -65,13 +65,13 @@ diff temp.level.good test.dump ${tools_dir}/grib_set -s typeOfFirstFixedSurface=103,level=24 $sample_g2 $temp grib_check_key_equals $temp level,scaledValueOfFirstFixedSurface,scaleFactorOfFirstFixedSurface '24 24 0' ${tools_dir}/grib_set -s typeOfFirstFixedSurface=103,level=2.4 $sample_g2 $temp -grib_check_key_equals $temp level:d,scaledValueOfFirstFixedSurface,scaleFactorOfFirstFixedSurface '2.4 240 2' +grib_check_key_equals $temp level:d,scaledValueOfFirstFixedSurface,scaleFactorOfFirstFixedSurface '2.4 24 1' # Use a parameter which has two levels ${tools_dir}/grib_set -s paramId=228086,topLevel=1.3,bottomLevel=5.4 $sample_g2 $temp grib_check_key_equals $temp 'topLevel:d,bottomLevel:d' '1.3 5.4' -grib_check_key_equals $temp scaleFactorOfFirstFixedSurface,scaledValueOfFirstFixedSurface '2 130' -grib_check_key_equals $temp scaleFactorOfSecondFixedSurface,scaledValueOfSecondFixedSurface '2 540' +grib_check_key_equals $temp scaleFactorOfFirstFixedSurface,scaledValueOfFirstFixedSurface '1 13' +grib_check_key_equals $temp scaleFactorOfSecondFixedSurface,scaledValueOfSecondFixedSurface '1 54' # GRIB-492 ${tools_dir}/grib_set -s indicatorOfTypeOfLevel=110 $sample_g1 $temp diff --git a/tests/grib_ls.sh b/tests/grib_ls.sh index 0c19230bc..b9a3d7b4b 100755 --- a/tests/grib_ls.sh +++ b/tests/grib_ls.sh @@ -106,6 +106,8 @@ grep -q 'Point chosen #3 index=21 .* distance=11\.' $tempText ${tools_dir}/grib_ls -l 53,2,1,reduced_gaussian_lsm.grib1 reduced_gaussian_surface.grib1 >$tempText grep -q 'Point chosen #2 index=749 .* distance=204\.' $tempText +${tools_dir}/grib_get -F%.2f -l 85,13,1,reduced_gaussian_lsm.grib1 reduced_gaussian_surface.grib1 >$tempText +grep -q '252.88' $tempText echo "ECC-278: grib_ls -n namespace..." # ---------------------------------------------------------- diff --git a/tests/grib_md5.sh b/tests/grib_md5.sh index 810328076..6c02f0a01 100755 --- a/tests/grib_md5.sh +++ b/tests/grib_md5.sh @@ -10,6 +10,9 @@ . ./include.ctest.sh +label="grib_md5_test" +temp=temp.$label.grib + test_md5() { file=$ECCODES_SAMPLES_PATH/$1 @@ -19,7 +22,8 @@ test_md5() [ "$result" = "$expected" ] } -####################################################################### +# Check the md5GridSection for some sample files +# ------------------------------------------------ # GRIB edition 1 test_md5 "sh_sfc_grib1.tmpl" "5b68b3d2c6e834fd501a123391b6b8a2" test_md5 "sh_pl_grib1.tmpl" "5b68b3d2c6e834fd501a123391b6b8a2" @@ -29,3 +33,14 @@ test_md5 "gg_sfc_grib1.tmpl" "97451fbe92a77bdeb4582fadc9b65e9d" test_md5 "sh_sfc_grib2.tmpl" "b10d32ebf4f91e52df0fc5d1deb57c3d" test_md5 "rotated_ll_pl_grib2.tmpl" "775bd4622d6becca2d2da9e308c97a7d" test_md5 "gg_sfc_grib2.tmpl" "a63333bd3cb80563e66907bb66d82cda" + +# Change some keys in the Grid Section and test md5 is different +# ------------------------------------------------ +input=$ECCODES_SAMPLES_PATH/GRIB2.tmpl +${tools_dir}/grib_set -s swapScanningX=1 $input $temp +md1=`${tools_dir}/grib_get -p md5GridSection:s $input` +md2=`${tools_dir}/grib_get -p md5GridSection:s $temp` +[ "$md1" != "$md2" ] + +# Clean up +rm -f $temp diff --git a/tests/grib_nearest_test.sh b/tests/grib_nearest_test.sh index 6e0716afd..998af27c9 100755 --- a/tests/grib_nearest_test.sh +++ b/tests/grib_nearest_test.sh @@ -96,7 +96,7 @@ ${tools_dir}/grib_ls -l 70,345.2,1 $input_grb > $temp grep -q "Grid Point chosen #4 index=0 " $temp -# CCDSDS regular lat/lon +# CCSDS regular lat/lon # ---------------------------------------- if [ $HAVE_AEC -eq 1 ]; then input_grb=${data_dir}/ccsds.grib2 @@ -111,6 +111,13 @@ if [ $HAVE_AEC -eq 1 ]; then grep -q "1" $temp fi +# JPEG regular lat/lon +# ---------------------------------------- +if [ $HAVE_JPEG -eq 1 ]; then + input_grb=${data_dir}/jpeg.grib2 + res=$(${tools_dir}/grib_get -l 0,0,1 $input_grb | tr -d ' ') + [ "$res" = "101309" ] +fi # GRIB2 Complex packing regular lat/lon # ---------------------------------------- diff --git a/tests/grib_neg_fctime.sh b/tests/grib_neg_fctime.sh index 3d0e5f88d..95d72a3a3 100755 --- a/tests/grib_neg_fctime.sh +++ b/tests/grib_neg_fctime.sh @@ -10,7 +10,6 @@ . ./include.ctest.sh -REDIRECT=/dev/null label="grib_neg_fctime_test" temp=temp.$label.grib input=${data_dir}/sample.grib2 diff --git a/tests/grib_octahedral.sh b/tests/grib_octahedral.sh index b4f3ebf07..967eecc1a 100755 --- a/tests/grib_octahedral.sh +++ b/tests/grib_octahedral.sh @@ -10,8 +10,6 @@ . ./include.ctest.sh -REDIRECT=/dev/null - label="grib_octahedral_test" temp=temp.$label.txt diff --git a/tests/grib_packing_order.sh b/tests/grib_packing_order.sh index 3cadb3f91..ffa758446 100755 --- a/tests/grib_packing_order.sh +++ b/tests/grib_packing_order.sh @@ -10,7 +10,6 @@ . ./include.ctest.sh -REDIRECT=/dev/null label="grib_packing_order_test" temp=${label}".grib.tmp" temp_simple1=${label}".simple1.tmp" diff --git a/tests/grib_partial_message.cc b/tests/grib_partial_message.cc new file mode 100644 index 000000000..e2030b478 --- /dev/null +++ b/tests/grib_partial_message.cc @@ -0,0 +1,54 @@ +/* + * (C) Copyright 2005- 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 "grib_api_internal.h" + +int main(int argc, char** argv) +{ + FILE* in = NULL; + int err = 0; + grib_handle* h_full = NULL; + grib_keys_iterator* iter = NULL; + const char* name = NULL; + const void* msg1 = NULL; + const char* infilename = NULL; + size_t size1 = 0; + grib_handle* h_partial = 0; + + Assert(argc == 2); + infilename = argv[1]; + + printf("Processing file %s\n", infilename); + in = fopen(infilename, "rb"); + Assert(in); + + h_full = grib_handle_new_from_file(0, in, &err); + Assert(h_full); + Assert(!err); + + GRIB_CHECK(grib_get_message_headers(h_full, &msg1, &size1), 0); + + h_partial = grib_handle_new_from_partial_message(h_full->context, msg1, size1); + Assert(h_partial); + + iter = grib_keys_iterator_new(h_partial, GRIB_KEYS_ITERATOR_SKIP_COMPUTED, NULL); + Assert(iter); + + while (grib_keys_iterator_next(iter)) { + name = grib_keys_iterator_get_name(iter); + printf("Header key=%s\n", name); + } + + grib_keys_iterator_delete(iter); + grib_handle_delete(h_partial); + grib_handle_delete(h_full); + fclose(in); + return 0; +} diff --git a/tests/grib_partial_message.sh b/tests/grib_partial_message.sh new file mode 100755 index 000000000..61bbb35c8 --- /dev/null +++ b/tests/grib_partial_message.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# (C) Copyright 2005- 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.ctest.sh + +input=${data_dir}/test_file.grib2 +$EXEC ${test_dir}/grib_partial_message $input + +input=${data_dir}/regular_latlon_surface.grib1 +$EXEC ${test_dir}/grib_partial_message $input diff --git a/tests/grib_proj_string.sh b/tests/grib_proj_string.sh index 866cea794..9dc1e8557 100755 --- a/tests/grib_proj_string.sh +++ b/tests/grib_proj_string.sh @@ -47,24 +47,25 @@ done # Various grid types # ECC-1552: To be done later. Current behaviour is to return KeyNotFound -set +e -${tools_dir}/grib_get -p projString $grib2_sample > $tempText 2>&1 -status=$? -set -e -[ $status -ne 0 ] -grep -q "Key/value not found" $tempText +# set +e +# ${tools_dir}/grib_get -p projString $grib2_sample > $tempText 2>&1 +# status=$? +# set -e +# [ $status -ne 0 ] +# grep -q "Key/value not found" $tempText rm -f $tempText -# ${tools_dir}/grib_get -p projString $grib2_sample > $tempText -# grep -q "proj=longlat +R=6367470" $tempText +${tools_dir}/grib_get -p projString $grib2_sample > $tempText +grep -q "+proj=longlat +datum=WGS84" $tempText +${tools_dir}/grib_get -p projString $ECCODES_SAMPLES_PATH/reduced_gg_pl_32_grib2.tmpl > $tempText +grep -q "+proj=longlat +datum=WGS84" $tempText + # ${tools_dir}/grib_get -p projString $ECCODES_SAMPLES_PATH/regular_ll_pl_grib2.tmpl > $tempText # grep -q "proj=longlat +R=6371229" $tempText # ${tools_dir}/grib_get -p projString $ECCODES_SAMPLES_PATH/regular_gg_ml_grib1.tmpl > $tempText # grep -q "proj=longlat +R=6367470" $tempText # ${tools_dir}/grib_get -p projString $ECCODES_SAMPLES_PATH/reduced_ll_sfc_grib1.tmpl > $tempText # grep -q "proj=longlat +R=6367470" $tempText -# ${tools_dir}/grib_get -p projString $ECCODES_SAMPLES_PATH/reduced_gg_pl_32_grib2.tmpl > $tempText -# grep -q "proj=longlat +R=6371229" $tempText ${tools_dir}/grib_set -s gridType=lambert_azimuthal_equal_area $grib2_sample $tempGrib @@ -79,5 +80,23 @@ ${tools_dir}/grib_set -s gridType=polar_stereographic $grib2_sample $tempGrib ${tools_dir}/grib_get -p projString $tempGrib > $tempText grep -q "proj=stere" $tempText +# Test invalid decode +set +e +${tools_dir}/grib_get -p projString:i $grib2_sample > $tempText 2>&1 +status=$? +set -e +[ $status -ne 0 ] +grep -q "ERROR.*Cannot unpack projTargetString as long" $tempText +grep -q "Hint: Try unpacking as string" $tempText + +set +e +${tools_dir}/grib_get -p projString:d $grib2_sample > $tempText 2>&1 +status=$? +set -e +[ $status -ne 0 ] +grep -q "ERROR.*Cannot unpack projTargetString as double" $tempText +grep -q "Hint: Try unpacking as string" $tempText + +# Clean up rm -f $tempGrib $tempText diff --git a/tests/grib_set.sh b/tests/grib_set.sh index 6aa665a60..9d35ad349 100755 --- a/tests/grib_set.sh +++ b/tests/grib_set.sh @@ -75,6 +75,23 @@ set -e [ $status -ne 0 ] grep -q "Trying to encode a negative value of -1 for key of type unsigned" $temp +# ECC-1605: Out-of-bounds value for signed keys +# ---------------------------------------------------- +if [ $ECCODES_ON_WINDOWS -eq 0 ]; then + input=$ECCODES_SAMPLES_PATH/GRIB2.tmpl + set +e + ${tools_dir}/grib_set -s forecastTime=2147483648 $input $outfile 2>$temp + status=$? + set -e + [ $status -ne 0 ] + grep -q "Trying to encode value of 2147483648 but the allowable range is -2147483647 to 2147483647" $temp + + set +e + ${tools_dir}/grib_set -s forecastTime=-2147483650 $input $outfile 2>$temp + status=$? + set -e + [ $status -ne 0 ] +fi # GRIB-941: encoding of GRIB2 angles # ----------------------------------- diff --git a/tests/grib_sh_spectral_complex.cc b/tests/grib_sh_spectral_complex.cc deleted file mode 100644 index 188736e14..000000000 --- a/tests/grib_sh_spectral_complex.cc +++ /dev/null @@ -1,98 +0,0 @@ -/* - * (C) Copyright 2005- 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 "grib_api_internal.h" - -#include "grib_sh_values.h" /* array 'values' defined here*/ - -#define ILCHAM 992 -#define MTRONC 30 -#define STRONC 10 -static const char* TEMPFILE = "output.grib_sh_spectral_complex.grib"; - -int main(int argc, char* argv[]) -{ - size_t len, size; - grib_handle* h; - double zval[ILCHAM]; - int i, m, n, k, err; - FILE* fin = NULL; - FILE* fout = NULL; - const void* buffer = NULL; - - GRIB_CHECK(((h = grib_handle_new_from_samples(NULL, "sh_ml_grib2")) == NULL), 0); - - GRIB_CHECK(grib_set_long(h, "pentagonalResolutionParameterJ", MTRONC), 0); - GRIB_CHECK(grib_set_long(h, "pentagonalResolutionParameterK", MTRONC), 0); - GRIB_CHECK(grib_set_long(h, "pentagonalResolutionParameterM", MTRONC), 0); - - GRIB_CHECK(grib_set_long(h, "bitsPerValue", 16), 0); - - GRIB_CHECK(grib_set_long(h, "subSetJ", STRONC), 0); - GRIB_CHECK(grib_set_long(h, "subSetK", STRONC), 0); - GRIB_CHECK(grib_set_long(h, "subSetM", STRONC), 0); - GRIB_CHECK(grib_set_long(h, "unpackedSubsetPrecision", 1), 0); - - printf("Encode values...\n"); - GRIB_CHECK(grib_set_double_array(h, "values", values, ILCHAM), 0); - - /* Write to a temporary GRIB file */ - printf("Save to GRIB %s...\n",TEMPFILE); - fout = fopen(TEMPFILE, "wb"); - GRIB_CHECK(grib_get_message(h, &buffer, &size), 0); - if (fwrite(buffer, 1, size, fout) != size) { - Assert(!"Failed to write data"); - } - fclose(fout); - - printf("Decode values and compare...\n"); - len = ILCHAM; - GRIB_CHECK(grib_get_double_array(h, "values", zval, &len), 0); - - /* Compare our values */ - for (i = 0; i < ILCHAM; ++i) { - const double diff = fabs(zval[i] - values[i]); - if (diff > 1e-5) { - fprintf(stderr, "Unpacked value different: i=%d values[i]=%g zval[i]=%g\n", i, values[i], zval[i]); - return 1; - } - } - - for (m = 0, k = 0; m < MTRONC + 1; m++) { - for (n = m; n < MTRONC + 1; k++, n++) { - /* Check sub-truncation was fully preserved in IEEE-32 */ - if ((m < STRONC + 1) && (n < STRONC + 1) && (((float)zval[2 * k] != (float)values[2 * k]) || ((float)zval[2 * k + 1] != (float)values[2 * k + 1]))) { - printf("Unpacked sub-truncation was not fully preserved; coefficients for wave number (m=%d,n=%d) have been modified\n", m, n); - return 1; - } - } - } - - GRIB_CHECK(grib_handle_delete(h), 0); - - /* Read in the saved GRIB file */ - printf("Load values from saved file and compare....\n"); - fin = fopen(TEMPFILE, "rb"); Assert(fin); - h = grib_handle_new_from_file(0, fin, &err); Assert(h); - GRIB_CHECK(grib_get_double_array(h, "values", zval, &len), 0); - for (i = 0; i < ILCHAM; ++i) { - const double diff = fabs(zval[i] - values[i]); - if (diff > 1e-5) { - fprintf(stderr, "Unpacked value different: i=%d values[i]=%g zval[i]=%g\n", i, values[i], zval[i]); - return 1; - } - } - GRIB_CHECK(grib_handle_delete(h), 0); - fclose(fin); - - printf("OK\n"); - - return 0; -} diff --git a/tests/grib_spectral.cc b/tests/grib_spectral.cc new file mode 100644 index 000000000..78db8da4d --- /dev/null +++ b/tests/grib_spectral.cc @@ -0,0 +1,124 @@ +/* + * (C) Copyright 2005- 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 "grib_api_internal.h" + +#include "grib_sh_values.h" // array 'values' defined here + +#define ILCHAM 992 +#define MTRONC 30 +#define STRONC 10 +#define TOLERANCE 1e-5 + +int main(int argc, char* argv[]) +{ + size_t len, size; + grib_handle* h = NULL; + double zval[ILCHAM]; + int i, m, n, k, err; + FILE* fin = NULL; + FILE* fout = NULL; + const void* buffer = NULL; + char* in_filename = NULL; + char* out_filename = NULL; + char packingType[50] = {0,}; + bool do_compare = true; + + Assert(argc == 3); + in_filename = argv[1]; + out_filename = argv[2]; + + printf("Opening file '%s'...\n", in_filename); + fin = fopen(in_filename, "rb"); + Assert(fin); + + h = grib_handle_new_from_file(0, fin, &err); + Assert(h); + Assert(!err); + + len = sizeof(packingType); + GRIB_CHECK(grib_get_string(h, "packingType", packingType, &len), 0); + Assert( STR_EQUAL(packingType, "spectral_complex") || STR_EQUAL(packingType, "spectral_simple") ); + + GRIB_CHECK(grib_set_long(h, "pentagonalResolutionParameterJ", MTRONC), 0); + GRIB_CHECK(grib_set_long(h, "pentagonalResolutionParameterK", MTRONC), 0); + GRIB_CHECK(grib_set_long(h, "pentagonalResolutionParameterM", MTRONC), 0); + + GRIB_CHECK(grib_set_long(h, "bitsPerValue", 16), 0); + + if (STR_EQUAL(packingType, "spectral_complex")) { + GRIB_CHECK(grib_set_long(h, "subSetJ", STRONC), 0); + GRIB_CHECK(grib_set_long(h, "subSetK", STRONC), 0); + GRIB_CHECK(grib_set_long(h, "subSetM", STRONC), 0); + GRIB_CHECK(grib_set_long(h, "unpackedSubsetPrecision", 1), 0); + } else { + do_compare = false; + } + + printf("Encode values...\n"); + GRIB_CHECK(grib_set_double_array(h, "values", values, ILCHAM), 0); + + // Write to a temporary GRIB file + printf("Save to file '%s'...\n", out_filename); + fout = fopen(out_filename, "wb"); + GRIB_CHECK(grib_get_message(h, &buffer, &size), 0); + if (fwrite(buffer, 1, size, fout) != size) { + Assert(!"Failed to write data"); + } + fclose(fout); + + if (do_compare) { + printf("Decode values and compare...\n"); + len = ILCHAM; + GRIB_CHECK(grib_get_double_array(h, "values", zval, &len), 0); + + // Compare our values + for (i = 0; i < ILCHAM; ++i) { + const double diff = fabs(zval[i] - values[i]); + if (diff > TOLERANCE) { + fprintf(stderr, "Unpacked value different: i=%d values[i]=%.10g zval[i]=%.10g (diff=%.10g)\n", i, values[i], zval[i], diff); + return 1; + } + } + + for (m = 0, k = 0; m < MTRONC + 1; m++) { + for (n = m; n < MTRONC + 1; k++, n++) { + // Check sub-truncation was fully preserved in IEEE-32 + if ((m < STRONC + 1) && (n < STRONC + 1) && (((float)zval[2 * k] != (float)values[2 * k]) || ((float)zval[2 * k + 1] != (float)values[2 * k + 1]))) { + printf("Unpacked sub-truncation was not fully preserved; coefficients for wave number (m=%d,n=%d) have been modified\n", m, n); + return 1; + } + } + } + } + GRIB_CHECK(grib_handle_delete(h), 0); + fclose(fin); + + // Read in the saved GRIB file + if (do_compare) { + printf("Load values from saved file and compare....\n"); + fin = fopen(out_filename, "rb"); Assert(fin); + h = grib_handle_new_from_file(0, fin, &err); Assert(h); + GRIB_CHECK(grib_get_double_array(h, "values", zval, &len), 0); + for (i = 0; i < ILCHAM; ++i) { + const double diff = fabs(zval[i] - values[i]); + if (diff > TOLERANCE) { + fprintf(stderr, "Unpacked value different: i=%d values[i]=%.10g zval[i]=%.10g (diff=%.10g)\n", i, values[i], zval[i], diff); + return 1; + } + } + GRIB_CHECK(grib_handle_delete(h), 0); + fclose(fin); + } + + printf("OK\n"); + + return 0; +} diff --git a/tests/grib_spectral.sh b/tests/grib_spectral.sh new file mode 100755 index 000000000..c4dbe1a3c --- /dev/null +++ b/tests/grib_spectral.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# (C) Copyright 2005- 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.ctest.sh + +label="grib_spectral_test" + +output=output.$label.grib +input_complex=$ECCODES_SAMPLES_PATH/sh_ml_grib2.tmpl + +$EXEC ${test_dir}/grib_spectral $input_complex $output + +rm -f $output + +# Now try spectral simple +input_simple=$label.simple.grib +${tools_dir}/grib_set -rs packingType=spectral_simple $input_complex $input_simple +$EXEC ${test_dir}/grib_spectral $input_simple $output + +rm -f $output $input_simple diff --git a/tests/grib_step.sh b/tests/grib_step.sh index 1bc7e208b..7a79a6e6b 100755 --- a/tests/grib_step.sh +++ b/tests/grib_step.sh @@ -116,6 +116,31 @@ grib_check_key_equals $temp productDefinitionTemplateNumber,typeOfStatisticalPro ${tools_dir}/grib_set -s stepType=mode,paramId=260320 $grib2_sample $temp grib_check_key_equals $temp productDefinitionTemplateNumber,typeOfStatisticalProcessing '8 101' +# ECC-1577: stepType when typeOfTimeIncrement=255 +# ----------------------------------------------- +${tools_dir}/grib_set -s stepType=accum,typeOfTimeIncrement=255 $grib2_sample $temp +grib_check_key_equals $temp stepType accum +${tools_dir}/grib_set -s stepType=accum $grib2_sample $temp +grib_check_key_equals $temp typeOfTimeIncrement 2 + +${tools_dir}/grib_set -s stepType=avg,typeOfTimeIncrement=255 $grib2_sample $temp +grib_check_key_equals $temp stepType avg +${tools_dir}/grib_set -s stepType=avg $grib2_sample $temp +grib_check_key_equals $temp typeOfTimeIncrement 3 + +# Decode/Encode stepRange as an int and double +${tools_dir}/grib_set -s stepType=accum,stepRange=23-28 $grib2_sample $temp +grib_check_key_equals $temp "stepRange:s" "23-28" +grib_check_key_equals $temp "stepRange:i" "28" +grib_check_key_equals $temp "stepRange:d" "28" + +${tools_dir}/grib_set -s stepRange:i=24 $grib2_sample $temp +grib_check_key_equals $temp "stepRange,startStep,endStep" "24 24 24" +# Should this be an error? currently this gets cast from double to int +${tools_dir}/grib_set -s stepRange:d=14.56 $grib2_sample $temp +grib_check_key_equals $temp "stepRange,startStep,endStep" "14 14 14" + + # Clean up rm -f $temp rm -f $grib2File.p8tmp ${grib2File}.tmp x.grib diff --git a/tests/keys b/tests/keys index e7861f71b..2177ad243 100644 --- a/tests/keys +++ b/tests/keys @@ -181,2257 +181,2312 @@ NB,175 NC,176 NC1,177 NC2,178 -NEAREST,179 -NG,180 -NH,181 -NINT_LOG10_RITZ,182 -NINT_RITZ_EXP,183 -NL,184 -NP,185 -NR,186 -NRj,187 -NT,188 -NUT,189 -NV,190 -Nassigned,191 -Nb,192 -Ncx,193 -Ncy,194 -Nf,195 -Ni,196 -Nj,197 -Nr,198 -NrInRadiusOfEarth,199 -NrInRadiusOfEarthScaled,200 -Number_Combination_Ensembles_1_none,201 -Nux,202 -Nuy,203 -Nx,204 -Ny,205 -Original_CodeTable_2_Version_Number,206 -Original_Parameter_Iden_CodeTable2,207 -Original_Parameter_Identifier,208 -P,209 -P1,210 -P2,211 -PLPresent,212 -PUnset,213 -PVPresent,214 -P_INST,215 -P_TACC,216 -P_TAVG,217 -Product_Identifier,218 -RENAME,219 -RVR1_1,220 -RVR2_1,221 -RVR3_1,222 -RVR4_1,223 -SOH,224 -SPD,225 -SecondLatitude,226 -SecondOfModelVersion,227 -Show_Combination_Ensem_E2_0_no_1_yes,228 -Show_Combination_Ensem_E3_0_no_1_yes,229 -Show_Combination_Ensem_E4_0_no_1_yes,230 -Sub-Experiment_Identifier,231 -TAF,232 -TAFstr,233 -TIDE,234 -TS,235 -TScalc,236 -TT,237 -TYPE_AN,238 -TYPE_CF,239 -TYPE_FC,240 -TYPE_FF,241 -TYPE_FX,242 -TYPE_OF,243 -TYPE_OR,244 -TYPE_PF,245 -Threshold_Or_Distribution_0_no_1_yes,246 -Threshold_Or_Distribution_Units,247 -Time_Range_One_E2,248 -Time_Range_One_E3,249 -Time_Range_One_E4,250 -Time_Range_Two_E2,251 -Time_Range_Two_E3,252 -Time_Range_Two_E4,253 -Total_Number_Members_Missing,254 -Total_Number_Members_Possible,255 -Total_Number_Members_Used,256 -Used_Model_LBC,257 -Used_Model_LBC_E2,258 -Used_Model_LBC_E3,259 -Used_Model_LBC_E4,260 -WMO,261 -WRAP,262 -WRAPstr,263 -X1,264 -X1InGridLengths,265 -X2,266 -X2InGridLengths,267 -XR,268 -XRInMetres,269 -Xo,270 -Xp,271 -XpInGridLengths,272 -Y1,273 -Y1InGridLengths,274 -Y2,275 -Y2InGridLengths,276 -YR,277 -YRInMetres,278 -YY,279 -YearOfModelVersion,280 -Yo,281 -Yp,282 -YpInGridLengths,283 -ZLBASE,284 -ZLMULT,285 -_T,286 -_TS,287 -_anoffset,288 -_endStep,289 -_leg_number,290 -_numberOfValues,291 -accumulationInterval,292 -accuracy,293 -accuracyMultipliedByFactor,294 -addEmptySection2,295 -addExtraLocalSection,296 -additionalFlagPresent,297 -addressOfFileFreeSpaceInfo,298 -aerosolType,299 -aerosolTypeName,300 -aerosolbinnumber,301 -aerosolpacking,302 -alternativeRowScanning,303 -altitudeOfTheCameraFromTheEarthsCentreMeasuredInUnitsOfTheEarthsRadius,304 -analysisOffsets,305 -angleDivisor,306 -angleMultiplier,307 -angleOfRotation,308 -angleOfRotationInDegrees,309 -angleOfRotationOfProjection,310 -angleSubdivisions,311 -anoffset,312 -anoffsetFirst,313 -anoffsetFrequency,314 -anoffsetLast,315 -applicationIdentifier,316 -assertion,317 -atmosphericChemicalOrPhysicalConstituentType,318 -attributeOfTile,319 -auxiliary,320 -average,321 -averaging1Flag,322 -averaging2Flag,323 -averagingPeriod,324 -avg,325 -azimuthalWidth,326 -backgroundGeneratingProcessIdentifier,327 -backgroundProcess,328 -band,329 -baseAddress,330 -baseDateEPS,331 -baseDateOfThisLeg,332 -baseTimeEPS,333 -baseTimeOfThisLeg,334 -basicAngleOfTheInitialProductionDomain,335 -beginDayTrend1,336 -beginDayTrend2,337 -beginDayTrend3,338 -beginDayTrend4,339 -beginHourTrend1,340 -beginHourTrend2,341 -beginHourTrend3,342 -beginHourTrend4,343 -beginMinuteTrend1,344 -beginMinuteTrend2,345 -beginMinuteTrend3,346 -beginMinuteTrend4,347 -beginMonthTrend1,348 -beginMonthTrend2,349 -beginMonthTrend3,350 -beginMonthTrend4,351 -beginYearTrend1,352 -beginYearTrend2,353 -beginYearTrend3,354 -beginYearTrend4,355 -biFourierCoefficients,356 -biFourierMakeTemplate,357 -biFourierPackingModeForAxes,358 -biFourierResolutionParameterM,359 -biFourierResolutionParameterN,360 -biFourierResolutionSubSetParameterM,361 -biFourierResolutionSubSetParameterN,362 -biFourierSubTruncationType,363 -biFourierTruncationType,364 -binaryScaleFactor,365 -bitMapIndicator,366 -bitmap,367 -bitmapPresent,368 -bitmapSectionPresent,369 -bitsPerValue,370 -bitsPerValueAndRepack,371 -boot_edition,372 -bottomLevel,373 -boustrophedonic,374 -boustrophedonicOrdering,375 -bufrDataEncoded,376 -bufrHeaderCentre,377 -bufrHeaderSubCentre,378 -bufrTemplate,379 -bufrdcExpandedDescriptors,380 -calendarIdPresent,381 -calendarIdentification,382 -calendarIdentificationTemplateNumber,383 -categories,384 -categoryType,385 -cavokOrVisibility,386 -ccccIdentifiers,387 -ccsdsBlockSize,388 -ccsdsCompressionOptionsMask,389 -ccsdsFlags,390 -ccsdsRsi,391 -ceilingAndVisibilityOK,392 -ceilingAndVisibilityOKTrend1,393 -ceilingAndVisibilityOKTrend2,394 -ceilingAndVisibilityOKTrend3,395 -ceilingAndVisibilityOKTrend4,396 -centralClusterDefinition,397 -centralLongitude,398 -centralLongitudeInDegrees,399 -centralLongitudeInMicrodegrees,400 -centre,401 -centreDescription,402 -centreForLocal,403 -centreForTable2,404 -centreLatitude,405 -centreLatitudeInDegrees,406 -centreLongitude,407 -centreLongitudeInDegrees,408 -centuryOfAnalysis,409 -centuryOfReference,410 -centuryOfReferenceTimeOfData,411 -cfName,412 -cfNameECMF,413 -cfNameLegacyECMF,414 -cfVarName,415 -cfVarNameECMF,416 -cfVarNameLegacyECMF,417 -changeDecimalPrecision,418 -changeIndicatorTrend1,419 -changeIndicatorTrend2,420 -changeIndicatorTrend3,421 -changeIndicatorTrend4,422 -changingPrecision,423 -channel,424 -channelNumber,425 -char,426 -charValues,427 -checkInternalVersion,428 -class,429 -classOfAnalysis,430 -climateDateFrom,431 -climateDateTo,432 -climatologicalRegime,433 -cloudsAbbreviation1,434 -cloudsAbbreviation1Trend1,435 -cloudsAbbreviation1Trend2,436 -cloudsAbbreviation1Trend3,437 -cloudsAbbreviation1Trend4,438 -cloudsAbbreviation2,439 -cloudsAbbreviation2Trend1,440 -cloudsAbbreviation2Trend2,441 -cloudsAbbreviation2Trend3,442 -cloudsAbbreviation2Trend4,443 -cloudsAbbreviation3,444 -cloudsAbbreviation3Trend1,445 -cloudsAbbreviation3Trend2,446 -cloudsAbbreviation3Trend3,447 -cloudsAbbreviation3Trend4,448 -cloudsAbbreviation4,449 -cloudsAbbreviation4Trend1,450 -cloudsAbbreviation4Trend2,451 -cloudsAbbreviation4Trend3,452 -cloudsAbbreviation4Trend4,453 -cloudsBase1,454 -cloudsBase1Trend1,455 -cloudsBase1Trend2,456 -cloudsBase1Trend3,457 -cloudsBase1Trend4,458 -cloudsBase2,459 -cloudsBase2Trend1,460 -cloudsBase2Trend2,461 -cloudsBase2Trend3,462 -cloudsBase2Trend4,463 -cloudsBase3,464 -cloudsBase3Trend1,465 -cloudsBase3Trend2,466 -cloudsBase3Trend3,467 -cloudsBase3Trend4,468 -cloudsBase4,469 -cloudsBase4Trend1,470 -cloudsBase4Trend2,471 -cloudsBase4Trend3,472 -cloudsBase4Trend4,473 -cloudsBaseCoded1,474 -cloudsBaseCoded1Trend1,475 -cloudsBaseCoded1Trend2,476 -cloudsBaseCoded1Trend3,477 -cloudsBaseCoded1Trend4,478 -cloudsBaseCoded2,479 -cloudsBaseCoded2Trend1,480 -cloudsBaseCoded2Trend2,481 -cloudsBaseCoded2Trend3,482 -cloudsBaseCoded2Trend4,483 -cloudsBaseCoded3,484 -cloudsBaseCoded3Trend1,485 -cloudsBaseCoded3Trend2,486 -cloudsBaseCoded3Trend3,487 -cloudsBaseCoded3Trend4,488 -cloudsBaseCoded4,489 -cloudsBaseCoded4Trend1,490 -cloudsBaseCoded4Trend2,491 -cloudsBaseCoded4Trend3,492 -cloudsBaseCoded4Trend4,493 -cloudsCode1,494 -cloudsCode1Trend1,495 -cloudsCode1Trend2,496 -cloudsCode1Trend3,497 -cloudsCode1Trend4,498 -cloudsCode2,499 -cloudsCode2Trend1,500 -cloudsCode2Trend2,501 -cloudsCode2Trend3,502 -cloudsCode2Trend4,503 -cloudsCode3,504 -cloudsCode3Trend1,505 -cloudsCode3Trend2,506 -cloudsCode3Trend3,507 -cloudsCode3Trend4,508 -cloudsCode4,509 -cloudsCode4Trend1,510 -cloudsCode4Trend2,511 -cloudsCode4Trend3,512 -cloudsCode4Trend4,513 -cloudsTitle1,514 -cloudsTitle1Trend1,515 -cloudsTitle1Trend2,516 -cloudsTitle1Trend3,517 -cloudsTitle1Trend4,518 -cloudsTitle2,519 -cloudsTitle2Trend1,520 -cloudsTitle2Trend2,521 -cloudsTitle2Trend3,522 -cloudsTitle2Trend4,523 -cloudsTitle3,524 -cloudsTitle3Trend1,525 -cloudsTitle3Trend2,526 -cloudsTitle3Trend3,527 -cloudsTitle3Trend4,528 -cloudsTitle4,529 -cloudsTitle4Trend1,530 -cloudsTitle4Trend2,531 -cloudsTitle4Trend3,532 -cloudsTitle4Trend4,533 -clusterIdentifier,534 -clusterMember1,535 -clusterMember10,536 -clusterMember2,537 -clusterMember3,538 -clusterMember4,539 -clusterMember5,540 -clusterMember6,541 -clusterMember7,542 -clusterMember8,543 -clusterMember9,544 -clusterNumber,545 -clusterSize,546 -clusteringDomain,547 -clusteringMethod,548 -clutterFilterIndicator,549 -cnmc_cmcc,550 -cnmc_isac,551 -codeFigure,552 -codeType,553 -codedNumberOfFirstOrderPackedValues,554 -codedNumberOfGroups,555 -codedValues,556 -coefsFirst,557 -coefsSecond,558 -commonBlock,559 -complexPacking,560 -componentIndex,561 -compressedData,562 -computeLaplacianOperator,563 -computeStatistics,564 -conceptDir,565 -conceptsDir1,566 -conceptsDir2,567 -conceptsLocalDirAll,568 -conceptsLocalDirECMF,569 -conceptsLocalMarsDirAll,570 -conceptsMasterDir,571 -conceptsMasterMarsDir,572 -consensus,573 -consensusCount,574 -const,575 -constantAntennaElevationAngle,576 -constantFieldHalfByte,577 -constituentType,578 -constituentTypeName,579 -controlForecastCluster,580 -coordAveraging0,581 -coordAveraging1,582 -coordAveraging2,583 -coordAveraging3,584 -coordAveragingTims,585 -coordinate1End,586 -coordinate1Flag,587 -coordinate1Start,588 -coordinate2End,589 -coordinate2Flag,590 -coordinate2Start,591 -coordinate3Flag,592 -coordinate3OfFirstGridPoint,593 -coordinate3OfLastGridPoint,594 -coordinate4Flag,595 -coordinate4OfFirstGridPoint,596 -coordinate4OfLastGridPoint,597 -coordinateFlag1,598 -coordinateFlag2,599 -coordinateIndexNumber,600 -coordinatesPresent,601 -core,602 -corr1Data,603 -corr2Data,604 -corr3Data,605 -corr4Data,606 -correction,607 -correction1,608 -correction1Part,609 -correction2,610 -correction2Part,611 -correction3,612 -correction3Part,613 -correction4,614 -correction4Part,615 -count,616 -countOfGroupLengths,617 -countOfICEFieldsUsed,618 -countTotal,619 -country,620 -crcrlf,621 -createNewData,622 -crraLocalVersion,623 -crraSection,624 -crraSuiteID,625 -daLoop,626 -data,627 -dataAccessors,628 -dataCategory,629 -dataDate,630 -dataFlag,631 -dataKeys,632 -dataLength,633 -dataOrigin,634 -dataRepresentation,635 -dataRepresentationTemplate,636 -dataRepresentationTemplateNumber,637 -dataRepresentationType,638 -dataSelection,639 -dataStream,640 -dataSubCategory,641 -dataTime,642 -dataType,643 -dataValues,644 -datasetForLocal,645 -date,646 -dateOfAnalysis,647 -dateOfForecast,648 -dateOfForecastRun,649 -dateOfForecastUsedInLocalTime,650 -dateOfIceFieldUsed,651 -dateOfModelVersion,652 -dateOfReference,653 -dateOfSSTFieldUsed,654 -dateSSTFieldUsed,655 -dateTime,656 -datumSize,657 -day,658 -dayOfAnalysis,659 -dayOfEndOfOverallTimeInterval,660 -dayOfForecast,661 -dayOfForecastUsedInLocalTime,662 -dayOfModelVersion,663 -dayOfReference,664 -dayOfTheYearDate,665 -decimalPrecision,666 -decimalScaleFactor,667 -defaultFaFieldName,668 -defaultFaLevelName,669 -defaultFaModelName,670 -defaultName,671 -defaultParameter,672 -defaultSequence,673 -defaultShortName,674 -defaultStepUnits,675 -defaultTypeOfLevel,676 -default_max_val,677 -default_min_val,678 -default_step_units,679 -definitionFilesVersion,680 -deleteCalendarId,681 -deleteExtraLocalSection,682 -deleteLocalDefinition,683 -deletePV,684 -derivedForecast,685 -dewPointTemperature,686 -diagnostic,687 -diagnosticNumber,688 -diffInDays,689 -diffInHours,690 -dimension,691 -dimensionNumber,692 -dimensionType,693 -direction,694 -directionNumber,695 -directionOfVariation,696 -directionScalingFactor,697 -dirty_statistics,698 -disableGrib1LocalSection,699 -discipline,700 -distanceFromTubeToEnsembleMean,701 -distinctLatitudes,702 -distinctLongitudes,703 -doExtractArea,704 -doExtractDateTime,705 -doExtractSubsets,706 -doSimpleThinning,707 -domain,708 -driverInformationBlockAddress,709 -dummy,710 -dummy1,711 -dummy2,712 -dummyc,713 -dx,714 -dy,715 -earthIsOblate,716 -earthMajorAxis,717 -earthMajorAxisInMetres,718 -earthMinorAxis,719 -earthMinorAxisInMetres,720 -eastLongitudeOfCluster,721 -eastLongitudeOfDomainOfTubing,722 -easternLongitudeOfClusterDomain,723 -easternLongitudeOfDomain,724 -ed,725 -edition,726 -editionNumber,727 -efas_model,728 -efiOrder,729 -eight,730 -elementsTable,731 -elevation,732 -eleven,733 -endDayTrend1,734 -endDayTrend2,735 -endDayTrend3,736 -endDayTrend4,737 -endDescriptors,738 -endGridDefinition,739 -endHourTrend1,740 -endHourTrend2,741 -endHourTrend3,742 -endHourTrend4,743 -endMark,744 -endMinuteTrend1,745 -endMinuteTrend2,746 -endMinuteTrend3,747 -endMinuteTrend4,748 -endMonthTrend1,749 -endMonthTrend2,750 -endMonthTrend3,751 -endMonthTrend4,752 -endOfFileAddress,753 -endOfHeadersMarker,754 -endOfInterval,755 -endOfMessage,756 -endOfProduct,757 -endOfRange,758 -endStep,759 -endStepInHours,760 -endTimeStep,761 -endYearTrend1,762 -endYearTrend2,763 -endYearTrend3,764 -endYearTrend4,765 -energyNorm,766 -enorm,767 -ensembleForecastNumbers,768 -ensembleForecastNumbersList,769 -ensembleSize,770 -ensembleStandardDeviation,771 -eps,772 -epsContinous,773 -epsPoint,774 -epsStatisticsContinous,775 -epsStatisticsPoint,776 -expandBy,777 -expandedAbbreviations,778 -expandedCodes,779 -expandedCrex_scales,780 -expandedCrex_units,781 -expandedCrex_widths,782 -expandedDescriptors,783 -expandedNames,784 -expandedOriginalCodes,785 -expandedOriginalReferences,786 -expandedOriginalScales,787 -expandedOriginalWidths,788 -expandedTypes,789 -expandedUnits,790 -experimentVersionNumber,791 -experimentVersionNumber1,792 -experimentVersionNumber2,793 -experimentVersionNumberOfAnalysis,794 -expoffset,795 -expver,796 -extendedFlag,797 -extraDim,798 -extraDimensionPresent,799 -extraLocalSectionNumber,800 -extraLocalSectionPresent,801 -extraValues,802 -extractAreaEastLongitude,803 -extractAreaLatitudeRank,804 -extractAreaLongitudeRank,805 -extractAreaNorthLatitude,806 -extractAreaSouthLatitude,807 -extractAreaWestLongitude,808 -extractDateTimeDayEnd,809 -extractDateTimeDayRank,810 -extractDateTimeDayStart,811 -extractDateTimeEnd,812 -extractDateTimeHourEnd,813 -extractDateTimeHourRank,814 -extractDateTimeHourStart,815 -extractDateTimeMinuteEnd,816 -extractDateTimeMinuteRank,817 -extractDateTimeMinuteStart,818 -extractDateTimeMonthEnd,819 -extractDateTimeMonthRank,820 -extractDateTimeMonthStart,821 -extractDateTimeSecondEnd,822 -extractDateTimeSecondRank,823 -extractDateTimeSecondStart,824 -extractDateTimeStart,825 -extractDateTimeYearEnd,826 -extractDateTimeYearRank,827 -extractDateTimeYearStart,828 -extractSubset,829 -extractSubsetIntervalEnd,830 -extractSubsetIntervalStart,831 -extractSubsetList,832 -extractedAreaNumberOfSubsets,833 -extractedDateTimeNumberOfSubsets,834 -extremeClockwiseWindDirection,835 -extremeCounterClockwiseWindDirection,836 -extremeValuesRVR1,837 -extremeValuesRVR2,838 -extremeValuesRVR3,839 -extremeValuesRVR4,840 -faFieldName,841 -faLevelName,842 -faModelName,843 -false,844 -falseEasting,845 -falseNorthing,846 -fcmonth,847 -fcperiod,848 -fgDate,849 -fgTime,850 -file,851 -fileConsistencyFlags,852 -fireTemplate,853 -firstDimension,854 -firstDimensionCoordinateValueDefinition,855 -firstDimensionPhysicalSignificance,856 -firstLatitude,857 -firstLatitudeInDegrees,858 -firstMonthUsedToBuildClimateMonth1,859 -firstMonthUsedToBuildClimateMonth2,860 -firstOrderValues,861 -firstSize,862 -flag,863 -flagForAnyFurtherInformation,864 -flagForIrregularGridCoordinateList,865 -flagForNormalOrStaggeredGrid,866 -flagShowingPostAuxiliaryArrayInUse,867 -flags,868 -floatVal,869 -floatValues,870 -forecastLeadTime,871 -forecastMonth,872 -forecastOrSingularVectorNumber,873 -forecastPeriod,874 -forecastPeriodFrom,875 -forecastPeriodTo,876 -forecastProbabilityNumber,877 -forecastSteps,878 -forecastTime,879 -forecastperiod,880 -formatVersionMajorNumber,881 -formatVersionMinorNumber,882 -freeFormData,883 -frequency,884 -frequencyNumber,885 -frequencyScalingFactor,886 -functionCode,887 -g,888 -g1conceptsLocalDirAll,889 -g1conceptsMasterDir,890 -g2grid,891 -gaussianGridName,892 -genVertHeightCoords,893 -generalExtended2ordr,894 -generatingProcessIdentificationNumber,895 -generatingProcessIdentifier,896 -generatingProcessTemplate,897 -generatingProcessTemplateNumber,898 -getNumberOfValues,899 -gg,900 -global,901 -globalDomain,902 -grib1divider,903 -grib2LocalSectionNumber,904 -grib2LocalSectionPresent,905 -grib2divider,906 -grib3divider,907 -gribDataQualityChecks,908 -gribMasterTablesVersionNumber,909 -gribTablesVersionNo,910 -grid,911 -gridCoordinate,912 -gridDefinition,913 -gridDefinitionDescription,914 -gridDefinitionSection,915 -gridDefinitionTemplateNumber,916 -gridDescriptionSectionPresent,917 -gridName,918 -gridPointPosition,919 -gridType,920 -groupInternalNodeK,921 -groupLeafNodeK,922 -groupLengths,923 -groupSplitting,924 -groupSplittingMethodUsed,925 -groupWidth,926 -groupWidths,927 -gts_CCCC,928 -gts_TTAAii,929 -gts_ddhh00,930 -gts_header,931 -halfByte,932 -hdate,933 -headersOnly,934 -heightLevelName,935 -heightOrPressureOfLevel,936 -heightPressureEtcOfLevels,937 -hideThis,938 -horizontalCoordinateDefinition,939 -horizontalCoordinateSupplement,940 -horizontalDimensionProcessed,941 -horizontalDomainTemplate,942 -horizontalDomainTemplateNumber,943 -hour,944 -hourOfAnalysis,945 -hourOfEndOfOverallTimeInterval,946 -hourOfForecast,947 -hourOfForecastUsedInLocalTime,948 -hourOfModelVersion,949 -hourOfReference,950 -hoursAfterDataCutoff,951 -hoursAfterReferenceTimeOfDataCutoff,952 -hundred,953 -iDirectionIncrement,954 -iDirectionIncrementGiven,955 -iDirectionIncrementGridLength,956 -iDirectionIncrementInDegrees,957 -iIncrement,958 -iScansNegatively,959 -iScansPositively,960 -ident,961 -identificationNumber,962 -identificationOfOriginatingGeneratingCentre,963 -identificationOfProject,964 -identifier,965 -ieeeFloats,966 -ifsParam,967 -ijDirectionIncrementGiven,968 -implementationDateOfModelCycle,969 -incrementOfLengths,970 -indexTemplate,971 -indexTemplateNumber,972 -indexedStorageInternalNodeK,973 -indexingDate,974 -indexingTime,975 -indexingTimeHH,976 -indexingTimeHHMM,977 -indexingTimeMM,978 -indicatorOfParameter,979 -indicatorOfTypeOfLevel,980 -indicatorOfUnitForForecastTime,981 -indicatorOfUnitForTimeIncrement,982 -indicatorOfUnitForTimeRange,983 -indicatorOfUnitOfTimeRange,984 -inputDataPresentIndicator,985 -inputDelayedDescriptorReplicationFactor,986 -inputExtendedDelayedDescriptorReplicationFactor,987 -inputOriginatingCentre,988 -inputOverriddenReferenceValues,989 -inputProcessIdentifier,990 -inputShortDelayedDescriptorReplicationFactor,991 -instrument,992 -instrumentIdentifier,993 -instrumentType,994 -integerPointValues,995 -integerScaleFactor,996 -integerScalingFactorAppliedToDirections,997 -integerScalingFactorAppliedToFrequencies,998 -integerValues,999 -internalVersion,1000 -internationalDataSubCategory,1001 -interpretationOfNumberOfPoints,1002 -intervalBetweenTimes,1003 -isAccumulation,1004 -isAuto,1005 -isCavok,1006 -isCavokTrend1,1007 -isCavokTrend2,1008 -isCavokTrend3,1009 -isCavokTrend4,1010 -isConstant,1011 -isCorrection,1012 -isEPS,1013 -isEps,1014 -isFillup,1015 -isHindcast,1016 -isOctahedral,1017 -isRotatedGrid,1018 -isSatellite,1019 -isSatelliteType,1020 -isSens,1021 -is_aerosol,1022 -is_aerosol_optical,1023 -is_chemical,1024 -is_chemical_distfn,1025 -is_chemical_srcsink,1026 -is_localtime,1027 -is_ocean2d_param,1028 -is_ocean3d_param,1029 -is_uerra,1030 -isectionNumber2,1031 -isectionNumber3,1032 -isectionNumber4,1033 -isotopeIdentificationNumber,1034 -iteration,1035 -iterationNumber,1036 -iteratorDisableUnrotate,1037 -jDirectionIncrement,1038 -jDirectionIncrementGiven,1039 -jDirectionIncrementGridLength,1040 -jDirectionIncrementInDegrees,1041 -jIncrement,1042 -jPointsAreConsecutive,1043 -jScansPositively,1044 -jdLocal,1045 -jdSelected,1046 -julianDay,1047 -julianForecastDay,1048 -keyData,1049 -keyMore,1050 -keySat,1051 -kindOfProduct,1052 -kurt,1053 -kurtosis,1054 -lBB,1055 -landtype,1056 -laplacianOperator,1057 -laplacianOperatorIsSet,1058 -laplacianScalingFactor,1059 -laplacianScalingFactorUnset,1060 -lastMonthUsedToBuildClimateMonth1,1061 -lastMonthUsedToBuildClimateMonth2,1062 -latLonValues,1063 -latitude,1064 -latitudeFirstInDegrees,1065 -latitudeLastInDegrees,1066 -latitudeLongitudeValues,1067 -latitudeOfCentralPointInClusterDomain,1068 -latitudeOfCentrePoint,1069 -latitudeOfCentrePointInDegrees,1070 -latitudeOfFirstGridPoint,1071 -latitudeOfFirstGridPointInDegrees,1072 -latitudeOfGridPoints,1073 -latitudeOfIcosahedronPole,1074 -latitudeOfLastGridPoint,1075 -latitudeOfLastGridPointInDegrees,1076 -latitudeOfNorthWestCornerOfArea,1077 -latitudeOfReferencePoint,1078 -latitudeOfReferencePointInDegrees,1079 -latitudeOfSouthEastCornerOfArea,1080 -latitudeOfSouthernPole,1081 -latitudeOfSouthernPoleInDegrees,1082 -latitudeOfStretchingPole,1083 -latitudeOfStretchingPoleInDegrees,1084 -latitudeOfSubSatellitePoint,1085 -latitudeOfSubSatellitePointInDegrees,1086 -latitudeOfTangencyPoint,1087 -latitudeOfThePoleOfStretching,1088 -latitudeOfThePolePoint,1089 -latitudeOfThePolePointInDegrees,1090 -latitudeOfTheSouthernPoleOfProjection,1091 -latitudeSexagesimal,1092 -latitudeWhereDxAndDyAreSpecified,1093 -latitudeWhereDxAndDyAreSpecifiedInDegrees,1094 -latitudes,1095 -latitudesList,1096 -latitudinalDirectionGridLength,1097 -lcwfvSuiteName,1098 -leadtime,1099 -legBaseDate,1100 -legBaseTime,1101 -legNumber,1102 -legacyGaussSubarea,1103 -lengthDescriptors,1104 -lengthIncrementForTheGroupLengths,1105 -lengthOf4DvarWindow,1106 -lengthOfHeaders,1107 -lengthOfIndexTemplate,1108 -lengthOfMessage,1109 -lengthOfOriginatorLocalTemplate,1110 -lengthOfProjectLocalTemplate,1111 -lengthOfTimeRange,1112 -lev,1113 -levTypeName,1114 -level,1115 -levelIndicator,1116 -levelType,1117 -levelist,1118 -levels,1119 -levtype,1120 -libraryVersion,1121 -listMembersMissing,1122 -listMembersMissing2,1123 -listMembersMissing3,1124 -listMembersMissing4,1125 -listMembersUsed,1126 -listMembersUsed2,1127 -listMembersUsed3,1128 -listMembersUsed4,1129 -listOfContributingSpectralBands,1130 -listOfDistributionFunctionParameter,1131 -listOfEnsembleForecastNumbers,1132 -listOfModelIdentifiers,1133 -listOfParametersUsedForClustering,1134 -listOfScaledFrequencies,1135 -local,1136 -localDate,1137 -localDateTime,1138 -localDay,1139 -localDecimalScaleFactor,1140 -localDefNumberOne,1141 -localDefNumberTwo,1142 -localDefinition,1143 -localDefinitionNumber,1144 -localDir,1145 -localExtensionPadding,1146 -localFlag,1147 -localFlagLatestVersion,1148 -localHour,1149 -localLatitude,1150 -localLatitude1,1151 -localLatitude2,1152 -localLongitude,1153 -localLongitude1,1154 -localLongitude2,1155 -localMinute,1156 -localMonth,1157 -localNumberOfObservations,1158 -localSecond,1159 -localSection,1160 -localSectionPresent,1161 -localTablesVersion,1162 -localTablesVersionNumber,1163 -localTime,1164 -localTimeForecastList,1165 -localTimeMethod,1166 -localUsePresent,1167 -localYear,1168 -local_padding,1169 -local_use,1170 -logTransform,1171 -longitude,1172 -longitudeFirstInDegrees,1173 -longitudeLastInDegrees,1174 -longitudeOfCentralPointInClusterDomain,1175 -longitudeOfCentrePoint,1176 -longitudeOfCentrePointInDegrees,1177 -longitudeOfFirstDiamondCenterLine,1178 -longitudeOfFirstDiamondCentreLine,1179 -longitudeOfFirstDiamondCentreLineInDegrees,1180 -longitudeOfFirstGridPoint,1181 -longitudeOfFirstGridPointInDegrees,1182 -longitudeOfGridPoints,1183 -longitudeOfIcosahedronPole,1184 -longitudeOfLastGridPoint,1185 -longitudeOfLastGridPointInDegrees,1186 -longitudeOfNorthWestCornerOfArea,1187 -longitudeOfReferencePoint,1188 -longitudeOfReferencePointInDegrees,1189 -longitudeOfSouthEastCornerOfArea,1190 -longitudeOfSouthernPole,1191 -longitudeOfSouthernPoleInDegrees,1192 -longitudeOfStretchingPole,1193 -longitudeOfStretchingPoleInDegrees,1194 -longitudeOfSubSatellitePoint,1195 -longitudeOfSubSatellitePointInDegrees,1196 -longitudeOfTangencyPoint,1197 -longitudeOfThePoleOfStretching,1198 -longitudeOfThePolePoint,1199 -longitudeOfThePolePointInDegrees,1200 -longitudeOfTheSouthernPoleOfProjection,1201 -longitudeSexagesimal,1202 -longitudes,1203 -longitudesList,1204 -longitudinalDirectionGridLength,1205 -lowerLimit,1206 -lowerRange,1207 -lowerThreshold,1208 -lowerThresholdValue,1209 -ls_labeling,1210 -lsdate_bug,1211 -lstime_bug,1212 -m,1213 -mAngleMultiplier,1214 -mBasicAngle,1215 -mars,1216 -marsClass,1217 -marsClass1,1218 -marsClass2,1219 -marsDir,1220 -marsDomain,1221 -marsEndStep,1222 -marsExperimentOffset,1223 -marsExpver,1224 -marsForecastMonth,1225 -marsGrid,1226 -marsIdent,1227 -marsKeywords,1228 -marsKeywords1,1229 -marsLamModel,1230 -marsLatitude,1231 -marsLevel,1232 -marsLevelist,1233 -marsLongitude,1234 -marsModel,1235 -marsParam,1236 -marsQuantile,1237 -marsRange,1238 -marsStartStep,1239 -marsStep,1240 -marsStream,1241 -marsStream1,1242 -marsStream2,1243 -marsType,1244 -marsType1,1245 -marsType2,1246 -mars_labeling,1247 -mask,1248 -masterDir,1249 -masterTableNumber,1250 -masterTablesVersionNumber,1251 -masterTablesVersionNumberLatest,1252 -matchAerosolBinNumber,1253 -matchAerosolPacking,1254 -matchLandType,1255 -matchSort,1256 -matchTimeRepres,1257 -matrixBitmapsPresent,1258 -matrixOfValues,1259 -max,1260 -maximum,1261 -md5Data,1262 -md5DataSection,1263 -md5GridSection,1264 -md5Headers,1265 -md5Product,1266 -md5Section1,1267 -md5Section10,1268 -md5Section2,1269 -md5Section3,1270 -md5Section4,1271 -md5Section5,1272 -md5Section6,1273 -md5Section7,1274 -md5Section8,1275 -md5Section9,1276 -md5Structure,1277 -md5TimeDomainSection,1278 -meanRVR1,1279 -meanRVR2,1280 -meanRVR3,1281 -meanRVR4,1282 -meanSize,1283 -meanValueRVR1,1284 -meanValueRVR2,1285 -meanValueRVR3,1286 -meanValueRVR4,1287 -meaningOfVerticalCoordinate,1288 -memberNumber,1289 -messageLength,1290 -metadata,1291 -method,1292 -methodNumber,1293 -million,1294 -min,1295 -minimum,1296 -minute,1297 -minuteOfAnalysis,1298 -minuteOfEndOfOverallTimeInterval,1299 -minuteOfForecast,1300 -minuteOfForecastUsedInLocalTime,1301 -minuteOfModelVersion,1302 -minuteOfReference,1303 -minutesAfterDataCutoff,1304 -minutesAfterReferenceTimeOfDataCutoff,1305 -missingDataFlag,1306 -missingValue,1307 -missingValueManagement,1308 -missingValueManagementUsed,1309 -missingValuesPresent,1310 -mixedCoordinateDefinition,1311 -mixedCoordinateFieldFlag,1312 -modeNumber,1313 -model,1314 -modelErrorType,1315 -modelIdentifier,1316 -modelName,1317 -modelVersionDate,1318 -modelVersionTime,1319 -molarMass,1320 -month,1321 -monthOfAnalysis,1322 -monthOfEndOfOverallTimeInterval,1323 -monthOfForecast,1324 -monthOfForecastUsedInLocalTime,1325 -monthOfModelVersion,1326 -monthOfReference,1327 -monthlyVerificationDate,1328 -monthlyVerificationMonth,1329 -monthlyVerificationTime,1330 -monthlyVerificationYear,1331 -multiplicationFactorForLatLong,1332 -mybits,1333 -n,1334 -n2,1335 -n3,1336 -na,1337 -name,1338 -nameECMF,1339 -nameLegacyECMF,1340 -nameOfFirstFixedSurface,1341 -nameOfSecondFixedSurface,1342 -names,1343 -nd,1344 -neitherPresent,1345 -newSubtype,1346 -nlev,1347 -nnn,1348 -normAtFinalTime,1349 -normAtInitialTime,1350 -normal,1351 -northLatitudeOfCluster,1352 -northLatitudeOfDomainOfTubing,1353 -northWestLatitudeOfLPOArea,1354 -northWestLatitudeOfVerficationArea,1355 -northWestLongitudeOfLPOArea,1356 -northWestLongitudeOfVerficationArea,1357 -northernLatitudeOfClusterDomain,1358 -northernLatitudeOfDomain,1359 -nosigPresent,1360 -notDecoded,1361 -nt,1362 -number,1363 -numberInHorizontalCoordinates,1364 -numberInMixedCoordinateDefinition,1365 -numberInTheAuxiliaryArray,1366 -numberInTheGridCoordinateList,1367 -numberIncludedInAverage,1368 -numberMissingFromAveragesOrAccumulations,1369 -numberOfAnalysis,1370 -numberOfBits,1371 -numberOfBitsContainingEachPackedValue,1372 -numberOfBitsForScaledGroupLengths,1373 -numberOfBitsUsedForTheGroupWidths,1374 -numberOfBitsUsedForTheScaledGroupLengths,1375 -numberOfBytesInLocalDefinition,1376 -numberOfBytesOfFreeFormatData,1377 -numberOfBytesPerInteger,1378 -numberOfCategories,1379 -numberOfCharacters,1380 -numberOfChars,1381 -numberOfClusterHighResolution,1382 -numberOfClusterLowResolution,1383 -numberOfClusters,1384 -numberOfCodedValues,1385 -numberOfCoefficientsOrValuesUsedToSpecifyFirstDimensionCoordinateFunction,1386 -numberOfCoefficientsOrValuesUsedToSpecifySecondDimensionCoordinateFunction,1387 -numberOfColumns,1388 -numberOfComponents,1389 -numberOfContributingSpectralBands,1390 -numberOfControlForecastTube,1391 -numberOfCoordinatesValues,1392 -numberOfDataBinsAlongRadials,1393 -numberOfDataMatrices,1394 -numberOfDataPoints,1395 -numberOfDataPointsExpected,1396 -numberOfDataValues,1397 -numberOfDaysInClimateSamplingWindow,1398 -numberOfDiamonds,1399 -numberOfDirections,1400 -numberOfDistinctSection3s,1401 -numberOfDistinctSection4s,1402 -numberOfDistinctSection5s,1403 -numberOfDistinctSection6s,1404 -numberOfDistinctSection7s,1405 -numberOfDistinctSection8s,1406 -numberOfDistinctSection9s,1407 -numberOfDistributionFunctionParameters,1408 -numberOfEffectiveValues,1409 -numberOfFloats,1410 -numberOfForcasts,1411 -numberOfForecastsInCluster,1412 -numberOfForecastsInEnsemble,1413 -numberOfForecastsInTheCluster,1414 -numberOfForecastsInTube,1415 -numberOfForecastsUsedInLocalTime,1416 -numberOfFrequencies,1417 -numberOfGridInReference,1418 -numberOfGridUsed,1419 -numberOfGroups,1420 -numberOfGroupsOfDataValues,1421 -numberOfHorizontalPoints,1422 -numberOfIntegers,1423 -numberOfInts,1424 -numberOfIterations,1425 -numberOfLocalDefinitions,1426 -numberOfLogicals,1427 -numberOfMembersInCluster,1428 -numberOfMembersInEnsemble,1429 -numberOfMissing,1430 -numberOfMissingInStatisticalProcess,1431 -numberOfMissingValues,1432 -numberOfModeOfDistribution,1433 -numberOfModels,1434 -numberOfOctectsForNumberOfPoints,1435 -numberOfOctetsExtraDescriptors,1436 -numberOfOperationalForecastTube,1437 -numberOfPackedValues,1438 -numberOfParallelsBetweenAPoleAndTheEquator,1439 -numberOfParametersUsedForClustering,1440 -numberOfPartitions,1441 -numberOfPoints,1442 -numberOfPointsAlongAMeridian,1443 -numberOfPointsAlongAParallel,1444 -numberOfPointsAlongFirstAxis,1445 -numberOfPointsAlongSecondAxis,1446 -numberOfPointsAlongTheXAxis,1447 -numberOfPointsAlongTheYAxis,1448 -numberOfPointsAlongXAxis,1449 -numberOfPointsAlongXAxisInCouplingArea,1450 -numberOfPointsAlongYAxis,1451 -numberOfPointsAlongYAxisInCouplingArea,1452 -numberOfPointsInDomain,1453 -numberOfPointsUsed,1454 -numberOfPressureLevelsUsedForClustering,1455 -numberOfRadarSitesUsed,1456 -numberOfRadials,1457 -numberOfReforecastYearsInModelClimate,1458 -numberOfRemaininChars,1459 -numberOfRepresentativeMember,1460 -numberOfReservedBytes,1461 -numberOfRows,1462 -numberOfSecondOrderPackedValues,1463 -numberOfSection,1464 -numberOfSingularVectorsComputed,1465 -numberOfSingularVectorsEvolved,1466 -numberOfStatisticallyProcessedFieldsForLocalTime,1467 -numberOfStepsUsedForClustering,1468 -numberOfSubsets,1469 -numberOfTensOfThousandsOfYearsOfOffset,1470 -numberOfTimeIncrementsOfForecastsUsedInLocalTime,1471 -numberOfTimeRange,1472 -numberOfTimeSteps,1473 -numberOfUnexpandedDescriptors,1474 -numberOfUnusedBitsAtEndOfSection3,1475 -numberOfUsedSpatialTiles,1476 -numberOfUsedTileAttributes,1477 -numberOfUsefulPointsAlongXAxis,1478 -numberOfUsefulPointsAlongYAxis,1479 -numberOfVGridUsed,1480 -numberOfValues,1481 -numberOfVerticalCoordinateValues,1482 -numberOfVerticalGridDescriptors,1483 -numberOfVerticalPoints,1484 -numberingOrderOfDiamonds,1485 -numericValues,1486 -observablePropertyTemplate,1487 -observablePropertyTemplateNumber,1488 -observationDiagnostic,1489 -observationGeneratingProcessIdentifier,1490 -observationType,1491 -observedData,1492 -obstype,1493 -oceanAtmosphereCoupling,1494 -oceanLevName,1495 -oceanStream,1496 -octetAtWichPackedDataBegins,1497 -offset,1498 -offsetAfterBitmap,1499 -offsetAfterCentreLocalSection,1500 -offsetAfterData,1501 -offsetAfterLocalSection,1502 -offsetAfterPadding,1503 -offsetBBitmap,1504 -offsetBSection5,1505 -offsetBSection6,1506 -offsetBSection9,1507 -offsetBeforeBitmap,1508 -offsetBeforeData,1509 -offsetBeforePL,1510 -offsetBeforePV,1511 -offsetDescriptors,1512 -offsetEndSection4,1513 -offsetFreeFormData,1514 -offsetFromOriginToInnerBound,1515 -offsetFromReferenceOfFirstTime,1516 -offsetICEFieldsUsed,1517 -offsetSection0,1518 -offsetSection1,1519 -offsetSection10,1520 -offsetSection11,1521 -offsetSection2,1522 -offsetSection3,1523 -offsetSection4,1524 -offsetSection5,1525 -offsetSection6,1526 -offsetSection7,1527 -offsetSection8,1528 -offsetSection9,1529 -offsetToEndOf4DvarWindow,1530 -offsetValuesBy,1531 -offsetdate,1532 -offsettime,1533 -oldSubtype,1534 -one,1535 -oneConstant,1536 -oneMillionConstant,1537 -oneMinuteMeanMaximumRVR1,1538 -oneMinuteMeanMaximumRVR2,1539 -oneMinuteMeanMaximumRVR3,1540 -oneMinuteMeanMaximumRVR4,1541 -oneMinuteMeanMinimumRVR1,1542 -oneMinuteMeanMinimumRVR2,1543 -oneMinuteMeanMinimumRVR3,1544 -oneMinuteMeanMinimumRVR4,1545 -oneThousand,1546 -oper,1547 -operStream,1548 -operatingMode,1549 -operationalForecastCluster,1550 -optimisationTime,1551 -optimizeScaleFactor,1552 -optionalData,1553 -opttime,1554 -orderOfSPD,1555 -orderOfSpatialDifferencing,1556 -orientationOfTheGrid,1557 -orientationOfTheGridInDegrees,1558 -origin,1559 -originOfPostProcessing,1560 -originalParameterNumber,1561 -originalParameterTableNumber,1562 -originalSubCentreIdentifier,1563 -originatingCentre,1564 -originatingCentreOfAnalysis,1565 -originatingClass,1566 -originatorLocalTemplate,1567 -originatorLocalTemplateNumber,1568 -overlayTemplate,1569 -overlayTemplateNumber,1570 -pack,1571 -packedValues,1572 -packingError,1573 -packingType,1574 -padding,1575 -padding_grid1_1,1576 -padding_grid1_2,1577 -padding_grid3_1,1578 -padding_grid4_1,1579 -padding_grid50_1,1580 -padding_grid5_1,1581 -padding_grid90_1,1582 -padding_loc10_1,1583 -padding_loc12_1,1584 -padding_loc13_1,1585 -padding_loc13_2,1586 -padding_loc13_3,1587 -padding_loc13_4,1588 -padding_loc13_5,1589 -padding_loc14_1,1590 -padding_loc14_2,1591 -padding_loc15_1,1592 -padding_loc16_1,1593 -padding_loc17_2,1594 -padding_loc18_1,1595 -padding_loc18_2,1596 -padding_loc190_1,1597 -padding_loc191_1,1598 -padding_loc191_2,1599 -padding_loc191_3,1600 -padding_loc192_1,1601 -padding_loc19_2,1602 -padding_loc20_1,1603 -padding_loc21_1,1604 -padding_loc23_1,1605 -padding_loc244_1,1606 -padding_loc244_2,1607 -padding_loc244_3,1608 -padding_loc245_1,1609 -padding_loc245_2,1610 -padding_loc26_1,1611 -padding_loc27_1,1612 -padding_loc27_2,1613 -padding_loc28_1,1614 -padding_loc29_1,1615 -padding_loc29_2,1616 -padding_loc29_3,1617 -padding_loc2_1,1618 -padding_loc2_2,1619 -padding_loc30_1,1620 -padding_loc30_2,1621 -padding_loc37_1,1622 -padding_loc37_2,1623 -padding_loc38_1,1624 -padding_loc3_1,1625 -padding_loc4_2,1626 -padding_loc50_1,1627 -padding_loc5_1,1628 -padding_loc6_1,1629 -padding_loc7_1,1630 -padding_loc9_1,1631 -padding_loc9_2,1632 -padding_local11_1,1633 -padding_local1_1,1634 -padding_local1_31,1635 -padding_local40_1,1636 -padding_local_35,1637 -padding_local_7_1,1638 -padding_sec1_loc,1639 -padding_sec2_1,1640 -padding_sec2_2,1641 -padding_sec2_3,1642 -padding_sec3_1,1643 -padding_sec4_1,1644 -paleontologicalOffset,1645 -param,1646 -paramId,1647 -paramIdECMF,1648 -paramIdLegacyECMF,1649 -param_value_max,1650 -param_value_min,1651 -parameter,1652 -parameterCategory,1653 -parameterCode,1654 -parameterDiscipline,1655 -parameterIndicator,1656 -parameterName,1657 -parameterNumber,1658 -parameterUnits,1659 -parameters,1660 -parametersVersion,1661 -partitionItems,1662 -partitionNumber,1663 -partitionTable,1664 -partitions,1665 -pastTendencyRVR1,1666 -pastTendencyRVR2,1667 -pastTendencyRVR3,1668 -pastTendencyRVR4,1669 -patch_precip_fp,1670 -pentagonalResolutionParameterJ,1671 -pentagonalResolutionParameterK,1672 -pentagonalResolutionParameterM,1673 -percentileValue,1674 -periodOfTime,1675 -periodOfTimeIntervals,1676 -perturbationNumber,1677 -perturbedType,1678 -phase,1679 -physicalFlag1,1680 -physicalFlag2,1681 -physicalMeaningOfVerticalCoordinate,1682 -pl,1683 -platform,1684 -plusOneinOrdersOfSPD,1685 -points,1686 -postAuxiliary,1687 -postAuxiliaryArrayPresent,1688 -postProcessing,1689 -powerOfTenUsedToScaleClimateWeight,1690 -preBitmapValues,1691 -preProcessingParameter,1692 -precision,1693 -precisionOfTheUnpackedSubset,1694 -predefined_grid,1695 -predefined_grid_values,1696 -preferLocalConcepts,1697 -present,1698 -presentTrend1,1699 -presentTrend2,1700 -presentTrend3,1701 -presentTrend4,1702 -presentWeather1Present,1703 -presentWeather1PresentTrend1,1704 -presentWeather1PresentTrend2,1705 -presentWeather1PresentTrend3,1706 -presentWeather1PresentTrend4,1707 -presentWeather2Present,1708 -presentWeather2PresentTrend1,1709 -presentWeather2PresentTrend2,1710 -presentWeather2PresentTrend3,1711 -presentWeather2PresentTrend4,1712 -presentWeather3Present,1713 -presentWeather3PresentTrend1,1714 -presentWeather3PresentTrend2,1715 -presentWeather3PresentTrend3,1716 -presentWeather3PresentTrend4,1717 -pressureLevel,1718 -pressureUnits,1719 -primaryBitmap,1720 -primaryMissingValue,1721 -primaryMissingValueSubstitute,1722 -probContinous,1723 -probPoint,1724 -probProductDefinition,1725 -probabilityType,1726 -probabilityTypeName,1727 -process,1728 -produceLargeConstantFields,1729 -product,1730 -productDefinition,1731 -productDefinitionTemplateNumber,1732 -productDefinitionTemplateNumberInternal,1733 -productIdentifier,1734 -productType,1735 -productionStatusOfProcessedData,1736 -projSourceString,1737 -projString,1738 -projTargetString,1739 -projectLocalTemplate,1740 -projectLocalTemplateNumber,1741 -projectionCenterFlag,1742 -projectionCentreFlag,1743 -pv,1744 -pvlLocation,1745 -qfe,1746 -qfePresent,1747 -qfeUnits,1748 -qnh,1749 -qnhAPresent,1750 -qnhPresent,1751 -qnhUnits,1752 -qualityControl,1753 -qualityControlIndicator,1754 -qualityValueAssociatedWithParameter,1755 -quantile,1756 -quantileValue,1757 -radialAngularSpacing,1758 -radials,1759 -radius,1760 -radiusInMetres,1761 -radiusOfCentralCluster,1762 -radiusOfClusterDomain,1763 -radiusOfTheEarth,1764 -range,1765 -rangeBinSpacing,1766 -rdbDateTime,1767 -rdbSubtype,1768 -rdbType,1769 -rdb_key,1770 -rdbtime,1771 -rdbtimeDate,1772 -rdbtimeDay,1773 -rdbtimeHour,1774 -rdbtimeMinute,1775 -rdbtimeMonth,1776 -rdbtimeSecond,1777 -rdbtimeTime,1778 -rdbtimeYear,1779 -realPart,1780 -realPartOf00,1781 -recDateTime,1782 -recentWeather,1783 -recentWeatherTry,1784 -rectime,1785 -rectimeDay,1786 -rectimeHour,1787 -rectimeMinute,1788 -rectimeSecond,1789 -reducedGrid,1790 -refdate,1791 -reference,1792 -referenceDate,1793 -referenceForGroupLengths,1794 -referenceForGroupWidths,1795 -referenceOfLengths,1796 -referenceOfWidths,1797 -referenceReflectivityForEchoTop,1798 -referenceSampleInterval,1799 -referenceStep,1800 -referenceValue,1801 -referenceValueError,1802 -reflectivityCalibrationConstant,1803 -remarkPresent,1804 -reportType,1805 -representationMode,1806 -representationType,1807 -representativeMember,1808 -reserved,1809 -reserved1,1810 -reserved2,1811 -reserved3,1812 -reservedNeedNotBePresent,1813 -reservedOctet,1814 -reservedSection2,1815 -reservedSection3,1816 -reservedSection4,1817 -resolutionAndComponentFlags,1818 -resolutionAndComponentFlags1,1819 -resolutionAndComponentFlags2,1820 -resolutionAndComponentFlags3,1821 -resolutionAndComponentFlags4,1822 -resolutionAndComponentFlags6,1823 -resolutionAndComponentFlags7,1824 -resolutionAndComponentFlags8,1825 -restricted,1826 -rootGroupObjectHeaderAddress,1827 -rootGroupSymbolTableEntry,1828 -rootTablesDir,1829 -roundedMarsLatitude,1830 -roundedMarsLevelist,1831 -roundedMarsLongitude,1832 -runwayBrakingActionState1,1833 -runwayBrakingActionState2,1834 -runwayBrakingActionState3,1835 -runwayBrakingActionState4,1836 -runwayDepositCodeState1,1837 -runwayDepositCodeState2,1838 -runwayDepositCodeState3,1839 -runwayDepositCodeState4,1840 -runwayDepositState1,1841 -runwayDepositState2,1842 -runwayDepositState3,1843 -runwayDepositState4,1844 -runwayDepthOfDepositCodeState1,1845 -runwayDepthOfDepositCodeState2,1846 -runwayDepthOfDepositCodeState3,1847 -runwayDepthOfDepositCodeState4,1848 -runwayDepthOfDepositState1,1849 -runwayDepthOfDepositState2,1850 -runwayDepthOfDepositState3,1851 -runwayDepthOfDepositState4,1852 -runwayDesignatorRVR1,1853 -runwayDesignatorRVR2,1854 -runwayDesignatorRVR3,1855 -runwayDesignatorRVR4,1856 -runwayDesignatorState1,1857 -runwayDesignatorState2,1858 -runwayDesignatorState3,1859 -runwayDesignatorState4,1860 -runwayExtentOfContaminationCodeState1,1861 -runwayExtentOfContaminationCodeState2,1862 -runwayExtentOfContaminationCodeState3,1863 -runwayExtentOfContaminationCodeState4,1864 -runwayExtentOfContaminationState1,1865 -runwayExtentOfContaminationState2,1866 -runwayExtentOfContaminationState3,1867 -runwayExtentOfContaminationState4,1868 -runwayFrictionCodeValueState1,1869 -runwayFrictionCodeValueState2,1870 -runwayFrictionCodeValueState3,1871 -runwayFrictionCodeValueState4,1872 -runwayFrictionCoefficientCodeState1,1873 -runwayFrictionCoefficientCodeState2,1874 -runwayFrictionCoefficientCodeState3,1875 -runwayFrictionCoefficientCodeState4,1876 -runwayFrictionCoefficientState1,1877 -runwayFrictionCoefficientState2,1878 -runwayFrictionCoefficientState3,1879 -runwayFrictionCoefficientState4,1880 -runwaySideCodeState1,1881 -runwaySideCodeState2,1882 -runwaySideCodeState3,1883 -runwaySideCodeState4,1884 -runwayState,1885 -sampleSizeOfModelClimate,1886 -satelliteID,1887 -satelliteIdentifier,1888 -satelliteNumber,1889 -satelliteSeries,1890 -scaleFactorAtReferencePoint,1891 -scaleFactorOfCentralWaveNumber,1892 -scaleFactorOfDistanceFromEnsembleMean,1893 -scaleFactorOfDistributionFunctionParameter,1894 -scaleFactorOfEarthMajorAxis,1895 -scaleFactorOfEarthMinorAxis,1896 -scaleFactorOfFirstFixedSurface,1897 -scaleFactorOfFirstSize,1898 -scaleFactorOfFirstWavelength,1899 -scaleFactorOfLengthOfSemiMajorAxis,1900 -scaleFactorOfLengthOfSemiMinorAxis,1901 -scaleFactorOfLowerLimit,1902 -scaleFactorOfMajorAxisOfOblateSpheroidEarth,1903 -scaleFactorOfMinorAxisOfOblateSpheroidEarth,1904 -scaleFactorOfPrimeMeridianOffset,1905 -scaleFactorOfRadiusOfSphericalEarth,1906 -scaleFactorOfSecondFixedSurface,1907 -scaleFactorOfSecondSize,1908 -scaleFactorOfSecondWavelength,1909 -scaleFactorOfStandardDeviation,1910 -scaleFactorOfStandardDeviationInTheCluster,1911 -scaleFactorOfUpperLimit,1912 -scaleValuesBy,1913 -scaledDirections,1914 -scaledFrequencies,1915 -scaledValueOfCentralWaveNumber,1916 -scaledValueOfDistanceFromEnsembleMean,1917 -scaledValueOfDistributionFunctionParameter,1918 -scaledValueOfEarthMajorAxis,1919 -scaledValueOfEarthMinorAxis,1920 -scaledValueOfFirstFixedSurface,1921 -scaledValueOfFirstSize,1922 -scaledValueOfFirstWavelength,1923 -scaledValueOfLengthOfSemiMajorAxis,1924 -scaledValueOfLengthOfSemiMinorAxis,1925 -scaledValueOfLowerLimit,1926 -scaledValueOfMajorAxisOfOblateSpheroidEarth,1927 -scaledValueOfMinorAxisOfOblateSpheroidEarth,1928 -scaledValueOfPrimeMeridianOffset,1929 -scaledValueOfRadiusOfSphericalEarth,1930 -scaledValueOfSecondFixedSurface,1931 -scaledValueOfSecondSize,1932 -scaledValueOfSecondWavelength,1933 -scaledValueOfStandardDeviation,1934 -scaledValueOfStandardDeviationInTheCluster,1935 -scaledValueOfUpperLimit,1936 -scalingFactorForFrequencies,1937 -scanPosition,1938 -scanningMode,1939 -scanningMode4,1940 -scanningMode5,1941 -scanningMode6,1942 -scanningMode7,1943 -scanningMode8,1944 -scanningModeForOneDiamond,1945 -sd,1946 -second,1947 -secondDimension,1948 -secondDimensionCoordinateValueDefinition,1949 -secondDimensionPhysicalSignificance,1950 -secondLatitude,1951 -secondLatitudeInDegrees,1952 -secondOfEndOfOverallTimeInterval,1953 -secondOfForecast,1954 -secondOfForecastUsedInLocalTime,1955 -secondOfModelVersion,1956 -secondOrderFlags,1957 -secondOrderOfDifferentWidth,1958 -secondOrderValuesDifferentWidths,1959 -secondSize,1960 -secondaryBitMap,1961 -secondaryBitmap,1962 -secondaryBitmapPresent,1963 -secondaryBitmaps,1964 -secondaryBitmapsCount,1965 -secondaryBitmapsSize,1966 -secondaryMissingValue,1967 -secondaryMissingValueSubstitute,1968 -secondsOfAnalysis,1969 -secondsOfReference,1970 -section,1971 -section0Length,1972 -section0Pointer,1973 -section1,1974 -section10Length,1975 -section10Pointer,1976 -section11Length,1977 -section11Pointer,1978 -section1Flags,1979 -section1Length,1980 -section1Padding,1981 -section1Pointer,1982 -section2Length,1983 -section2Padding,1984 -section2Pointer,1985 -section2Present,1986 -section2Used,1987 -section3Flags,1988 -section3Length,1989 -section3Padding,1990 -section3Pointer,1991 -section3UniqueIdentifier,1992 -section4,1993 -section4Length,1994 -section4Padding,1995 -section4Pointer,1996 -section4UniqueIdentifier,1997 -section5,1998 -section5Length,1999 -section5Pointer,2000 -section5UniqueIdentifier,2001 -section6,2002 -section6Length,2003 -section6Pointer,2004 -section6UniqueIdentifier,2005 -section7,2006 -section7Length,2007 -section7Pointer,2008 -section7UniqueIdentifier,2009 -section8,2010 -section8Length,2011 -section8Pointer,2012 -section8UniqueIdentifier,2013 -section9Length,2014 -section9Pointer,2015 -section9UniqueIdentifier,2016 -sectionLengthLimitForEnsembles,2017 -sectionLengthLimitForProbability,2018 -sectionNumber,2019 -sectionPosition,2020 -section_01,2021 -section_02,2022 -section_03,2023 -section_04,2024 -section_05,2025 -section_06,2026 -section_07,2027 -section_08,2028 -section_09,2029 -section_1,2030 -section_10,2031 -section_11,2032 -section_2,2033 -section_3,2034 -section_4,2035 -section_5,2036 -section_6,2037 -section_7,2038 -section_8,2039 -selectStepTemplateInstant,2040 -selectStepTemplateInterval,2041 -selectedDay,2042 -selectedFcIndex,2043 -selectedHour,2044 -selectedMinute,2045 -selectedMonth,2046 -selectedSecond,2047 -selectedYear,2048 -sensitiveAreaDomain,2049 -sequences,2050 -setBitsPerValue,2051 -setCalendarId,2052 -setDecimalPrecision,2053 -setLocalDefinition,2054 -setToMissingIfOutOfRange,2055 -sfc_levtype,2056 -shapeOfTheEarth,2057 -shapeOfVerificationArea,2058 -shortName,2059 -shortNameECMF,2060 -shortNameLegacyECMF,2061 -short_name,2062 -signature,2063 -significanceOfReferenceDateAndTime,2064 -significanceOfReferenceTime,2065 -simpleThinningMissingRadius,2066 -simpleThinningSkip,2067 -simpleThinningStart,2068 -siteElevation,2069 -siteId,2070 -siteLatitude,2071 -siteLongitude,2072 -sizeOfLength,2073 -sizeOfOffsets,2074 -sizeOfPostAuxiliaryArray,2075 -sizeOfPostAuxiliaryArrayPlusOne,2076 -skew,2077 -skewness,2078 -skipExtraKeyAttributes,2079 -sort,2080 -sourceOfGridDefinition,2081 -sourceSinkChemicalPhysicalProcess,2082 -southEastLatitudeOfLPOArea,2083 -southEastLatitudeOfVerficationArea,2084 -southEastLongitudeOfLPOArea,2085 -southEastLongitudeOfVerficationArea,2086 -southLatitudeOfCluster,2087 -southLatitudeOfDomainOfTubing,2088 -southPoleOnProjectionPlane,2089 -southernLatitudeOfClusterDomain,2090 -southernLatitudeOfDomain,2091 -sp1,2092 -sp2,2093 -sp3,2094 -spaceUnitFlag,2095 -spacingOfBinsAlongRadials,2096 -spare,2097 -spare1,2098 -spare2,2099 -spare3,2100 -spare4,2101 -spatialProcessing,2102 -spatialSmoothingOfProduct,2103 -spectralDataRepresentationMode,2104 -spectralDataRepresentationType,2105 -spectralMode,2106 -spectralType,2107 -sphericalHarmonics,2108 -standardDeviation,2109 -standardParallel,2110 -standardParallelInDegrees,2111 -standardParallelInMicrodegrees,2112 -startOfHeaders,2113 -startOfMessage,2114 -startOfRange,2115 -startStep,2116 -startStepInHours,2117 -startTimeStep,2118 -startingAzimuth,2119 -statisticalProcess,2120 -statisticalProcessesList,2121 -statistics,2122 -status,2123 -step,2124 -stepForClustering,2125 -stepHumanReadable,2126 -stepInHours,2127 -stepRange,2128 -stepRangeInHours,2129 -stepType,2130 -stepTypeForConversion,2131 -stepTypeInternal,2132 -stepUnits,2133 -stepZero,2134 -stream,2135 -streamOfAnalysis,2136 -stretchingFactor,2137 -stretchingFactorScaled,2138 -stringValues,2139 -subCentre,2140 -subDefinitions1,2141 -subDefinitions2,2142 -subLocalDefinition1,2143 -subLocalDefinition2,2144 -subLocalDefinitionLength1,2145 -subLocalDefinitionLength2,2146 -subLocalDefinitionNumber1,2147 -subLocalDefinitionNumber2,2148 -subSetJ,2149 -subSetK,2150 -subSetM,2151 -subcentreOfAnalysis,2152 -subdivisionsOfBasicAngle,2153 -suiteName,2154 -superblockExtensionAddress,2155 -swapScanningAlternativeRows,2156 -swapScanningLat,2157 -swapScanningLon,2158 -swapScanningX,2159 -swapScanningY,2160 -system,2161 -systemNumber,2162 -t,2163 -table2Version,2164 -tableCode,2165 -tableNumber,2166 -tableReference,2167 -tablesLocalDir,2168 -tablesMasterDir,2169 -tablesVersion,2170 -tablesVersionLatest,2171 -tablesVersionLatestOfficial,2172 -targetCompressionRatio,2173 -td,2174 -tempPressureUnits,2175 -temperature,2176 -temperatureAndDewpointPresent,2177 -templatesLocalDir,2178 -templatesMasterDir,2179 -theHindcastMarsStream,2180 -theMessage,2181 -thisExperimentVersionNumber,2182 -thisMarsClass,2183 -thisMarsStream,2184 -thisMarsType,2185 -thousand,2186 -three,2187 -threshold,2188 -thresholdIndicator,2189 -tiggeCentre,2190 -tiggeLAMName,2191 -tiggeLocalVersion,2192 -tiggeModel,2193 -tiggeSection,2194 -tiggeSuiteID,2195 -tigge_name,2196 -tigge_short_name,2197 -tileClassification,2198 -tileIndex,2199 -time,2200 -timeCoordinateDefinition,2201 -timeDomainTemplate,2202 -timeDomainTemplateNumber,2203 -timeIncrement,2204 -timeIncrementBetweenSuccessiveFields,2205 -timeOfAnalysis,2206 -timeOfForecast,2207 -timeOfForecastUsedInLocalTime,2208 -timeOfModelVersion,2209 -timeOfReference,2210 -timeRangeIndicator,2211 -timeRangeIndicatorFromStepRange,2212 -timeUnitFlag,2213 -timerepres,2214 -topLevel,2215 -total,2216 -totalAerosolBinsNumbers,2217 -totalInitialConditions,2218 -totalLength,2219 -totalNumber,2220 -totalNumberOfClusters,2221 -totalNumberOfDataValuesMissingInStatisticalProcess,2222 -totalNumberOfDirections,2223 -totalNumberOfForecastProbabilities,2224 -totalNumberOfFrequencies,2225 -totalNumberOfGridPoints,2226 -totalNumberOfIterations,2227 -totalNumberOfQuantiles,2228 -totalNumberOfRepetitions,2229 -totalNumberOfTileAttributePairs,2230 -totalNumberOfTubes,2231 -totalNumberOfValuesInUnpackedSubset,2232 -totalNumberOfdimensions,2233 -treatmentOfMissingData,2234 -true,2235 -trueLengthOfLastGroup,2236 -truncateDegrees,2237 -truncateLaplacian,2238 -tsectionNumber3,2239 -tsectionNumber4,2240 -tsectionNumber5,2241 -tubeDomain,2242 -tubeNumber,2243 -two,2244 -twoOrdersOfSPD,2245 -type,2246 -typeOfAnalysis,2247 -typeOfAuxiliaryInformation,2248 -typeOfCalendar,2249 -typeOfCompressionUsed,2250 -typeOfDistributionFunction,2251 -typeOfEnsembleForecast,2252 -typeOfEnsembleMember,2253 -typeOfFirstFixedSurface,2254 -typeOfGeneratingProcess,2255 -typeOfGrid,2256 -typeOfHorizontalLine,2257 -typeOfIntervalForFirstAndSecondSize,2258 -typeOfIntervalForFirstAndSecondWavelength,2259 -typeOfLevel,2260 -typeOfLevelECMF,2261 -typeOfOriginalFieldValues,2262 -typeOfPacking,2263 -typeOfPostProcessing,2264 -typeOfPreProcessing,2265 -typeOfProcessedData,2266 -typeOfSSTFieldUsed,2267 -typeOfSecondFixedSurface,2268 -typeOfSizeInterval,2269 -typeOfStatisticalPostProcessingOfEnsembleMembers,2270 -typeOfStatisticalProcessing,2271 -typeOfTimeIncrement,2272 -typeOfTimeIncrementBetweenSuccessiveFieldsUsedInTheStatisticalProcessing,2273 -typeOfWavelengthInterval,2274 -typicalCentury,2275 -typicalDate,2276 -typicalDateTime,2277 -typicalDay,2278 -typicalHour,2279 -typicalMinute,2280 -typicalMonth,2281 -typicalSecond,2282 -typicalTime,2283 -typicalYear,2284 -typicalYear2,2285 -typicalYearOfCentury,2286 -uco,2287 -ucs,2288 -unexpandedDescriptors,2289 -unexpandedDescriptorsEncoded,2290 -unitOfOffsetFromReferenceTime,2291 -unitOfTime,2292 -unitOfTimeIncrement,2293 -unitOfTimeRange,2294 -units,2295 -unitsBias,2296 -unitsConversionOffset,2297 -unitsConversionScaleFactor,2298 -unitsDecimalScaleFactor,2299 -unitsECMF,2300 -unitsFactor,2301 -unitsLegacyECMF,2302 -unitsOfFirstFixedSurface,2303 -unitsOfSecondFixedSurface,2304 -unknown,2305 -unpack,2306 -unpackedError,2307 -unpackedSubsetPrecision,2308 -unpackedValues,2309 -unsignedIntegers,2310 -unstructuredGrid,2311 -unstructuredGridSubtype,2312 -unstructuredGridType,2313 -unstructuredGridUUID,2314 -unusedBitsInBitmap,2315 -updateSequenceNumber,2316 -upperLimit,2317 -upperRange,2318 -upperThreshold,2319 -upperThresholdValue,2320 -userDateEnd,2321 -userDateStart,2322 -userDateTimeEnd,2323 -userDateTimeStart,2324 -userTimeEnd,2325 -userTimeStart,2326 -uuidOfHGrid,2327 -uuidOfVGrid,2328 -uvRelativeToGrid,2329 -validityDate,2330 -validityTime,2331 -values,2332 -variationOfVisibility,2333 -variationOfVisibilityDirection,2334 -variationOfVisibilityDirectionAngle,2335 -variationOfVisibilityDirectionTrend1,2336 -variationOfVisibilityDirectionTrend2,2337 -variationOfVisibilityDirectionTrend3,2338 -variationOfVisibilityDirectionTrend4,2339 -variationOfVisibilityTrend1,2340 -variationOfVisibilityTrend2,2341 -variationOfVisibilityTrend3,2342 -variationOfVisibilityTrend4,2343 -varno,2344 -verificationDate,2345 -verificationMonth,2346 -verificationYear,2347 -verifyingMonth,2348 -version,2349 -versionNumOfFilesFreeSpaceStorage,2350 -versionNumOfRootGroupSymbolTableEntry,2351 -versionNumOfSharedHeaderMessageFormat,2352 -versionNumberOfExperimentalSuite,2353 -versionNumberOfGribLocalTables,2354 -versionNumberOfSuperblock,2355 -versionOfModelClimate,2356 -verticalCoordinate,2357 -verticalCoordinateDefinition,2358 -verticalDomainTemplate,2359 -verticalDomainTemplateNumber,2360 -verticalVisibility,2361 -verticalVisibilityCoded,2362 -visibility,2363 -visibilityInKilometresTrend1,2364 -visibilityInKilometresTrend2,2365 -visibilityInKilometresTrend3,2366 -visibilityInKilometresTrend4,2367 -visibilityTrend1,2368 -visibilityTrend2,2369 -visibilityTrend3,2370 -visibilityTrend4,2371 -waveDomain,2372 -weightAppliedToClimateMonth1,2373 -westLongitudeOfCluster,2374 -westLongitudeOfDomainOfTubing,2375 -westernLongitudeOfClusterDomain,2376 -westernLongitudeOfDomain,2377 -widthOfFirstOrderValues,2378 -widthOfLengths,2379 -widthOfSPD,2380 -widthOfWidths,2381 -windDirection,2382 -windDirectionTrend1,2383 -windDirectionTrend2,2384 -windDirectionTrend3,2385 -windDirectionTrend4,2386 -windGust,2387 -windGustTrend1,2388 -windGustTrend2,2389 -windGustTrend3,2390 -windGustTrend4,2391 -windPresent,2392 -windSpeed,2393 -windSpeedTrend1,2394 -windSpeedTrend2,2395 -windSpeedTrend3,2396 -windSpeedTrend4,2397 -windUnits,2398 -windUnitsTrend1,2399 -windUnitsTrend2,2400 -windUnitsTrend3,2401 -windUnitsTrend4,2402 -windVariableDirection,2403 -windVariableDirectionTrend1,2404 -windVariableDirectionTrend2,2405 -windVariableDirectionTrend3,2406 -windVariableDirectionTrend4,2407 -wrongPadding,2408 -xCoordinateOfOriginOfSectorImage,2409 -xCoordinateOfSubSatellitePoint,2410 -xDirectionGridLength,2411 -xDirectionGridLengthInMetres,2412 -xDirectionGridLengthInMillimetres,2413 -xFirst,2414 -xLast,2415 -yCoordinateOfOriginOfSectorImage,2416 -yCoordinateOfSubSatellitePoint,2417 -yDirectionGridLength,2418 -yDirectionGridLengthInMetres,2419 -yDirectionGridLengthInMillimetres,2420 -yFirst,2421 -yLast,2422 -year,2423 -yearOfAnalysis,2424 -yearOfCentury,2425 -yearOfEndOfOverallTimeInterval,2426 -yearOfForecast,2427 -yearOfForecastUsedInLocalTime,2428 -yearOfModelVersion,2429 -yearOfReference,2430 -zero,2431 -zeros,2432 +NDSP,179 +NEAREST,180 +NFSP,181 +NG,182 +NH,183 +NINT_LOG10_RITZ,184 +NINT_RITZ_EXP,185 +NL,186 +NP,187 +NR,188 +NRj,189 +NT,190 +NUT,191 +NV,192 +Nassigned,193 +Nb,194 +Ncx,195 +Ncy,196 +Nf,197 +Ni,198 +Nj,199 +Nr,200 +NrInRadiusOfEarth,201 +NrInRadiusOfEarthScaled,202 +Number_Combination_Ensembles_1_none,203 +Nux,204 +Nuy,205 +Nx,206 +Ny,207 +Original_CodeTable_2_Version_Number,208 +Original_Parameter_Iden_CodeTable2,209 +Original_Parameter_Identifier,210 +P,211 +P1,212 +P2,213 +PLPresent,214 +PUnset,215 +PVPresent,216 +P_INST,217 +P_TACC,218 +P_TAVG,219 +Product_Identifier,220 +RENAME,221 +RVR1_1,222 +RVR2_1,223 +RVR3_1,224 +RVR4_1,225 +SOH,226 +SPD,227 +SecondLatitude,228 +SecondOfModelVersion,229 +Show_Combination_Ensem_E2_0_no_1_yes,230 +Show_Combination_Ensem_E3_0_no_1_yes,231 +Show_Combination_Ensem_E4_0_no_1_yes,232 +Sub-Experiment_Identifier,233 +TAF,234 +TAFstr,235 +TIDE,236 +TS,237 +TScalc,238 +TT,239 +TYPE_AN,240 +TYPE_CF,241 +TYPE_FC,242 +TYPE_FF,243 +TYPE_FX,244 +TYPE_OF,245 +TYPE_OR,246 +TYPE_PF,247 +Threshold_Or_Distribution_0_no_1_yes,248 +Threshold_Or_Distribution_Units,249 +Time_Range_One_E2,250 +Time_Range_One_E3,251 +Time_Range_One_E4,252 +Time_Range_Two_E2,253 +Time_Range_Two_E3,254 +Time_Range_Two_E4,255 +Total_Number_Members_Missing,256 +Total_Number_Members_Possible,257 +Total_Number_Members_Used,258 +Used_Model_LBC,259 +Used_Model_LBC_E2,260 +Used_Model_LBC_E3,261 +Used_Model_LBC_E4,262 +WMO,263 +WRAP,264 +WRAPstr,265 +X1,266 +X1InGridLengths,267 +X2,268 +X2InGridLengths,269 +XR,270 +XRInMetres,271 +Xo,272 +Xp,273 +XpInGridLengths,274 +Y1,275 +Y1InGridLengths,276 +Y2,277 +Y2InGridLengths,278 +YR,279 +YRInMetres,280 +YY,281 +YearOfModelVersion,282 +Yo,283 +Yp,284 +YpInGridLengths,285 +ZLBASE,286 +ZLMULT,287 +_T,288 +_TS,289 +_anoffset,290 +_endStep,291 +_leg_number,292 +_numberOfValues,293 +accumulationInterval,294 +accuracy,295 +accuracyMultipliedByFactor,296 +addEmptySection2,297 +addExtraLocalSection,298 +additionalFlagPresent,299 +additionalParameter,300 +addressOfFileFreeSpaceInfo,301 +aerosolType,302 +aerosolTypeName,303 +aerosolbinnumber,304 +aerosolpacking,305 +alternativeRowScanning,306 +altitudeOfTheCameraFromTheEarthsCentreMeasuredInUnitsOfTheEarthsRadius,307 +analysisOffsets,308 +angleDivisor,309 +angleMultiplier,310 +angleOfRotation,311 +angleOfRotationInDegrees,312 +angleOfRotationOfProjection,313 +angleSubdivisions,314 +anoffset,315 +anoffsetFirst,316 +anoffsetFrequency,317 +anoffsetLast,318 +applicationIdentifier,319 +assertion,320 +atmosphericChemicalOrPhysicalConstituentType,321 +attributeOfTile,322 +auxiliary,323 +average,324 +averaging1Flag,325 +averaging2Flag,326 +averagingPeriod,327 +avg,328 +azimuthalWidth,329 +backgroundGeneratingProcessIdentifier,330 +backgroundProcess,331 +band,332 +baseAddress,333 +baseDateEPS,334 +baseDateOfThisLeg,335 +baseTimeEPS,336 +baseTimeOfThisLeg,337 +basicAngleOfTheInitialProductionDomain,338 +beginDayTrend1,339 +beginDayTrend2,340 +beginDayTrend3,341 +beginDayTrend4,342 +beginHourTrend1,343 +beginHourTrend2,344 +beginHourTrend3,345 +beginHourTrend4,346 +beginMinuteTrend1,347 +beginMinuteTrend2,348 +beginMinuteTrend3,349 +beginMinuteTrend4,350 +beginMonthTrend1,351 +beginMonthTrend2,352 +beginMonthTrend3,353 +beginMonthTrend4,354 +beginYearTrend1,355 +beginYearTrend2,356 +beginYearTrend3,357 +beginYearTrend4,358 +biFourierCoefficients,359 +biFourierMakeTemplate,360 +biFourierPackingModeForAxes,361 +biFourierResolutionParameterM,362 +biFourierResolutionParameterN,363 +biFourierResolutionSubSetParameterM,364 +biFourierResolutionSubSetParameterN,365 +biFourierSubTruncationType,366 +biFourierTruncationType,367 +binaryScaleFactor,368 +bitMapIndicator,369 +bitmap,370 +bitmapPresent,371 +bitmapSectionPresent,372 +bitsPerValue,373 +bitsPerValueAndRepack,374 +boot_edition,375 +bottomLevel,376 +boustrophedonic,377 +boustrophedonicOrdering,378 +bufrDataEncoded,379 +bufrHeaderCentre,380 +bufrHeaderSubCentre,381 +bufrTemplate,382 +bufrdcExpandedDescriptors,383 +calendarIdPresent,384 +calendarIdentification,385 +calendarIdentificationTemplateNumber,386 +categories,387 +categoryType,388 +cavokOrVisibility,389 +ccccIdentifiers,390 +ccsdsBlockSize,391 +ccsdsCompressionOptionsMask,392 +ccsdsFlags,393 +ccsdsRsi,394 +ceilingAndVisibilityOK,395 +ceilingAndVisibilityOKTrend1,396 +ceilingAndVisibilityOKTrend2,397 +ceilingAndVisibilityOKTrend3,398 +ceilingAndVisibilityOKTrend4,399 +centralClusterDefinition,400 +centralLongitude,401 +centralLongitudeInDegrees,402 +centralLongitudeInMicrodegrees,403 +centre,404 +centreDescription,405 +centreForLocal,406 +centreForTable2,407 +centreLatitude,408 +centreLatitudeInDegrees,409 +centreLongitude,410 +centreLongitudeInDegrees,411 +centuryOfAnalysis,412 +centuryOfReference,413 +centuryOfReferenceTimeOfData,414 +cfName,415 +cfNameECMF,416 +cfNameLegacyECMF,417 +cfVarName,418 +cfVarNameECMF,419 +cfVarNameLegacyECMF,420 +changeDecimalPrecision,421 +changeIndicatorTrend1,422 +changeIndicatorTrend2,423 +changeIndicatorTrend3,424 +changeIndicatorTrend4,425 +changingPrecision,426 +channel,427 +channelNumber,428 +char,429 +charValues,430 +checkInternalVersion,431 +class,432 +classOfAnalysis,433 +climateDateFrom,434 +climateDateTo,435 +climatologicalRegime,436 +cloudsAbbreviation1,437 +cloudsAbbreviation1Trend1,438 +cloudsAbbreviation1Trend2,439 +cloudsAbbreviation1Trend3,440 +cloudsAbbreviation1Trend4,441 +cloudsAbbreviation2,442 +cloudsAbbreviation2Trend1,443 +cloudsAbbreviation2Trend2,444 +cloudsAbbreviation2Trend3,445 +cloudsAbbreviation2Trend4,446 +cloudsAbbreviation3,447 +cloudsAbbreviation3Trend1,448 +cloudsAbbreviation3Trend2,449 +cloudsAbbreviation3Trend3,450 +cloudsAbbreviation3Trend4,451 +cloudsAbbreviation4,452 +cloudsAbbreviation4Trend1,453 +cloudsAbbreviation4Trend2,454 +cloudsAbbreviation4Trend3,455 +cloudsAbbreviation4Trend4,456 +cloudsBase1,457 +cloudsBase1Trend1,458 +cloudsBase1Trend2,459 +cloudsBase1Trend3,460 +cloudsBase1Trend4,461 +cloudsBase2,462 +cloudsBase2Trend1,463 +cloudsBase2Trend2,464 +cloudsBase2Trend3,465 +cloudsBase2Trend4,466 +cloudsBase3,467 +cloudsBase3Trend1,468 +cloudsBase3Trend2,469 +cloudsBase3Trend3,470 +cloudsBase3Trend4,471 +cloudsBase4,472 +cloudsBase4Trend1,473 +cloudsBase4Trend2,474 +cloudsBase4Trend3,475 +cloudsBase4Trend4,476 +cloudsBaseCoded1,477 +cloudsBaseCoded1Trend1,478 +cloudsBaseCoded1Trend2,479 +cloudsBaseCoded1Trend3,480 +cloudsBaseCoded1Trend4,481 +cloudsBaseCoded2,482 +cloudsBaseCoded2Trend1,483 +cloudsBaseCoded2Trend2,484 +cloudsBaseCoded2Trend3,485 +cloudsBaseCoded2Trend4,486 +cloudsBaseCoded3,487 +cloudsBaseCoded3Trend1,488 +cloudsBaseCoded3Trend2,489 +cloudsBaseCoded3Trend3,490 +cloudsBaseCoded3Trend4,491 +cloudsBaseCoded4,492 +cloudsBaseCoded4Trend1,493 +cloudsBaseCoded4Trend2,494 +cloudsBaseCoded4Trend3,495 +cloudsBaseCoded4Trend4,496 +cloudsCode1,497 +cloudsCode1Trend1,498 +cloudsCode1Trend2,499 +cloudsCode1Trend3,500 +cloudsCode1Trend4,501 +cloudsCode2,502 +cloudsCode2Trend1,503 +cloudsCode2Trend2,504 +cloudsCode2Trend3,505 +cloudsCode2Trend4,506 +cloudsCode3,507 +cloudsCode3Trend1,508 +cloudsCode3Trend2,509 +cloudsCode3Trend3,510 +cloudsCode3Trend4,511 +cloudsCode4,512 +cloudsCode4Trend1,513 +cloudsCode4Trend2,514 +cloudsCode4Trend3,515 +cloudsCode4Trend4,516 +cloudsTitle1,517 +cloudsTitle1Trend1,518 +cloudsTitle1Trend2,519 +cloudsTitle1Trend3,520 +cloudsTitle1Trend4,521 +cloudsTitle2,522 +cloudsTitle2Trend1,523 +cloudsTitle2Trend2,524 +cloudsTitle2Trend3,525 +cloudsTitle2Trend4,526 +cloudsTitle3,527 +cloudsTitle3Trend1,528 +cloudsTitle3Trend2,529 +cloudsTitle3Trend3,530 +cloudsTitle3Trend4,531 +cloudsTitle4,532 +cloudsTitle4Trend1,533 +cloudsTitle4Trend2,534 +cloudsTitle4Trend3,535 +cloudsTitle4Trend4,536 +clusterIdentifier,537 +clusterMember1,538 +clusterMember10,539 +clusterMember2,540 +clusterMember3,541 +clusterMember4,542 +clusterMember5,543 +clusterMember6,544 +clusterMember7,545 +clusterMember8,546 +clusterMember9,547 +clusterNumber,548 +clusterSize,549 +clusteringDomain,550 +clusteringMethod,551 +clutterFilterIndicator,552 +cnmc_cmcc,553 +cnmc_isac,554 +codeFigure,555 +codeType,556 +codedNumberOfFirstOrderPackedValues,557 +codedNumberOfGroups,558 +codedValues,559 +coefsFirst,560 +coefsSecond,561 +commonBlock,562 +complexPacking,563 +componentIndex,564 +compressedData,565 +computeLaplacianOperator,566 +computeStatistics,567 +conceptDir,568 +conceptsDir1,569 +conceptsDir2,570 +conceptsLocalDirAll,571 +conceptsLocalDirECMF,572 +conceptsLocalMarsDirAll,573 +conceptsMasterDir,574 +conceptsMasterMarsDir,575 +consensus,576 +consensusCount,577 +const,578 +constantAntennaElevationAngle,579 +constantFieldHalfByte,580 +constituentType,581 +constituentTypeName,582 +controlForecastCluster,583 +coordAveraging0,584 +coordAveraging1,585 +coordAveraging2,586 +coordAveraging3,587 +coordAveragingTims,588 +coordinate1End,589 +coordinate1Flag,590 +coordinate1Start,591 +coordinate2End,592 +coordinate2Flag,593 +coordinate2Start,594 +coordinate3Flag,595 +coordinate3OfFirstGridPoint,596 +coordinate3OfLastGridPoint,597 +coordinate4Flag,598 +coordinate4OfFirstGridPoint,599 +coordinate4OfLastGridPoint,600 +coordinateFlag1,601 +coordinateFlag2,602 +coordinateIndexNumber,603 +coordinatesPresent,604 +core,605 +corr1Data,606 +corr2Data,607 +corr3Data,608 +corr4Data,609 +correction,610 +correction1,611 +correction1Part,612 +correction2,613 +correction2Part,614 +correction3,615 +correction3Part,616 +correction4,617 +correction4Part,618 +count,619 +countOfGroupLengths,620 +countOfICEFieldsUsed,621 +countTotal,622 +country,623 +crcrlf,624 +createNewData,625 +crraLocalVersion,626 +crraSection,627 +crraSuiteID,628 +daLoop,629 +data,630 +dataAccessors,631 +dataCategory,632 +dataDate,633 +dataFlag,634 +dataKeys,635 +dataLength,636 +dataOrigin,637 +dataRepresentation,638 +dataRepresentationTemplate,639 +dataRepresentationTemplateNumber,640 +dataRepresentationType,641 +dataSelection,642 +dataStream,643 +dataSubCategory,644 +dataTime,645 +dataType,646 +dataValues,647 +datasetForLocal,648 +date,649 +dateOfAnalysis,650 +dateOfForecast,651 +dateOfForecastRun,652 +dateOfForecastUsedInLocalTime,653 +dateOfIceFieldUsed,654 +dateOfModelVersion,655 +dateOfReference,656 +dateOfSSTFieldUsed,657 +dateSSTFieldUsed,658 +dateTime,659 +datumSize,660 +day,661 +dayOfAnalysis,662 +dayOfEndOfOverallTimeInterval,663 +dayOfForecast,664 +dayOfForecastUsedInLocalTime,665 +dayOfModelVersion,666 +dayOfReference,667 +dayOfStartOfReferencePeriod,668 +dayOfTheYearDate,669 +decimalPrecision,670 +decimalScaleFactor,671 +defaultFaFieldName,672 +defaultFaLevelName,673 +defaultFaModelName,674 +defaultName,675 +defaultParameter,676 +defaultSequence,677 +defaultShortName,678 +defaultStepUnits,679 +defaultTypeOfLevel,680 +default_max_val,681 +default_min_val,682 +default_step_units,683 +definitionFilesVersion,684 +deleteCalendarId,685 +deleteExtraLocalSection,686 +deleteLocalDefinition,687 +deletePV,688 +derivedForecast,689 +dewPointTemperature,690 +diagnostic,691 +diagnosticNumber,692 +diffInDays,693 +diffInHours,694 +dimension,695 +dimensionNumber,696 +dimensionType,697 +direction,698 +directionNumber,699 +directionOfVariation,700 +directionScalingFactor,701 +dirty_statistics,702 +disableGrib1LocalSection,703 +discipline,704 +distanceFromTubeToEnsembleMean,705 +distinctLatitudes,706 +distinctLongitudes,707 +doExtractArea,708 +doExtractDateTime,709 +doExtractSubsets,710 +doSimpleThinning,711 +domain,712 +driverInformationBlockAddress,713 +dummy,714 +dummy1,715 +dummy2,716 +dummyc,717 +dx,718 +dy,719 +earthIsOblate,720 +earthMajorAxis,721 +earthMajorAxisInMetres,722 +earthMinorAxis,723 +earthMinorAxisInMetres,724 +eastLongitudeOfCluster,725 +eastLongitudeOfDomainOfTubing,726 +easternLongitudeOfClusterDomain,727 +easternLongitudeOfDomain,728 +ed,729 +edition,730 +editionNumber,731 +efas_model,732 +efiOrder,733 +eight,734 +elementsTable,735 +elevation,736 +eleven,737 +endDayTrend1,738 +endDayTrend2,739 +endDayTrend3,740 +endDayTrend4,741 +endDescriptors,742 +endGridDefinition,743 +endHourTrend1,744 +endHourTrend2,745 +endHourTrend3,746 +endHourTrend4,747 +endMark,748 +endMinuteTrend1,749 +endMinuteTrend2,750 +endMinuteTrend3,751 +endMinuteTrend4,752 +endMonthTrend1,753 +endMonthTrend2,754 +endMonthTrend3,755 +endMonthTrend4,756 +endOfFileAddress,757 +endOfHeadersMarker,758 +endOfInterval,759 +endOfMessage,760 +endOfProduct,761 +endOfRange,762 +endStep,763 +endStepInHours,764 +endTimeStep,765 +endYearTrend1,766 +endYearTrend2,767 +endYearTrend3,768 +endYearTrend4,769 +energyNorm,770 +enorm,771 +ensembleForecastNumbers,772 +ensembleForecastNumbersList,773 +ensembleSize,774 +ensembleStandardDeviation,775 +eps,776 +epsContinous,777 +epsPoint,778 +epsStatisticsContinous,779 +epsStatisticsPoint,780 +expandBy,781 +expandedAbbreviations,782 +expandedCodes,783 +expandedCrex_scales,784 +expandedCrex_units,785 +expandedCrex_widths,786 +expandedDescriptors,787 +expandedNames,788 +expandedOriginalCodes,789 +expandedOriginalReferences,790 +expandedOriginalScales,791 +expandedOriginalWidths,792 +expandedTypes,793 +expandedUnits,794 +experimentVersionNumber,795 +experimentVersionNumber1,796 +experimentVersionNumber2,797 +experimentVersionNumberOfAnalysis,798 +expoffset,799 +expver,800 +extendedFlag,801 +extraDim,802 +extraDimensionPresent,803 +extraLocalSectionNumber,804 +extraLocalSectionPresent,805 +extraValues,806 +extractAreaEastLongitude,807 +extractAreaLatitudeRank,808 +extractAreaLongitudeRank,809 +extractAreaNorthLatitude,810 +extractAreaSouthLatitude,811 +extractAreaWestLongitude,812 +extractDateTimeDayEnd,813 +extractDateTimeDayRank,814 +extractDateTimeDayStart,815 +extractDateTimeEnd,816 +extractDateTimeHourEnd,817 +extractDateTimeHourRank,818 +extractDateTimeHourStart,819 +extractDateTimeMinuteEnd,820 +extractDateTimeMinuteRank,821 +extractDateTimeMinuteStart,822 +extractDateTimeMonthEnd,823 +extractDateTimeMonthRank,824 +extractDateTimeMonthStart,825 +extractDateTimeSecondEnd,826 +extractDateTimeSecondRank,827 +extractDateTimeSecondStart,828 +extractDateTimeStart,829 +extractDateTimeYearEnd,830 +extractDateTimeYearRank,831 +extractDateTimeYearStart,832 +extractSubset,833 +extractSubsetIntervalEnd,834 +extractSubsetIntervalStart,835 +extractSubsetList,836 +extractedAreaNumberOfSubsets,837 +extractedDateTimeNumberOfSubsets,838 +extremeClockwiseWindDirection,839 +extremeCounterClockwiseWindDirection,840 +extremeValuesRVR1,841 +extremeValuesRVR2,842 +extremeValuesRVR3,843 +extremeValuesRVR4,844 +faFieldName,845 +faLevelName,846 +faModelName,847 +false,848 +falseEasting,849 +falseNorthing,850 +fcmonth,851 +fcperiod,852 +fgDate,853 +fgTime,854 +file,855 +fileConsistencyFlags,856 +fireTemplate,857 +firstDimension,858 +firstDimensionCoordinateValueDefinition,859 +firstDimensionPhysicalSignificance,860 +firstLatitude,861 +firstLatitudeInDegrees,862 +firstMonthUsedToBuildClimateMonth1,863 +firstMonthUsedToBuildClimateMonth2,864 +firstOrderValues,865 +firstSize,866 +flag,867 +flagForAnyFurtherInformation,868 +flagForIrregularGridCoordinateList,869 +flagForNormalOrStaggeredGrid,870 +flagShowingPostAuxiliaryArrayInUse,871 +flags,872 +floatVal,873 +floatValues,874 +forecastLeadTime,875 +forecastMonth,876 +forecastOrSingularVectorNumber,877 +forecastPeriod,878 +forecastPeriodFrom,879 +forecastPeriodTo,880 +forecastProbabilityNumber,881 +forecastSteps,882 +forecastTime,883 +forecastperiod,884 +formatVersionMajorNumber,885 +formatVersionMinorNumber,886 +freeFormData,887 +frequency,888 +frequencyNumber,889 +frequencyScalingFactor,890 +functionCode,891 +g,892 +g1conceptsLocalDirAll,893 +g1conceptsMasterDir,894 +g2grid,895 +gaussianGridName,896 +genVertHeightCoords,897 +generalExtended2ordr,898 +generatingProcessIdentificationNumber,899 +generatingProcessIdentifier,900 +generatingProcessTemplate,901 +generatingProcessTemplateNumber,902 +getNumberOfValues,903 +gg,904 +global,905 +globalDomain,906 +grib1divider,907 +grib2LocalSectionNumber,908 +grib2LocalSectionPresent,909 +grib2divider,910 +grib3divider,911 +gribDataQualityChecks,912 +gribMasterTablesVersionNumber,913 +gribTablesVersionNo,914 +grid,915 +gridCoordinate,916 +gridDefinition,917 +gridDefinitionDescription,918 +gridDefinitionSection,919 +gridDefinitionTemplateNumber,920 +gridDescriptionSectionPresent,921 +gridName,922 +gridPointPosition,923 +gridType,924 +groupInternalNodeK,925 +groupLeafNodeK,926 +groupLengths,927 +groupSplitting,928 +groupSplittingMethodUsed,929 +groupWidth,930 +groupWidths,931 +gts_CCCC,932 +gts_TTAAii,933 +gts_ddhh00,934 +gts_header,935 +halfByte,936 +hdate,937 +headersOnly,938 +heightLevelName,939 +heightOrPressureOfLevel,940 +heightPressureEtcOfLevels,941 +hideThis,942 +horizontalCoordinateDefinition,943 +horizontalCoordinateSupplement,944 +horizontalDimensionProcessed,945 +horizontalDomainTemplate,946 +horizontalDomainTemplateNumber,947 +hour,948 +hourOfAnalysis,949 +hourOfEndOfOverallTimeInterval,950 +hourOfForecast,951 +hourOfForecastUsedInLocalTime,952 +hourOfModelVersion,953 +hourOfReference,954 +hourOfStartOfReferencePeriod,955 +hoursAfterDataCutoff,956 +hoursAfterReferenceTimeOfDataCutoff,957 +hundred,958 +iDirectionIncrement,959 +iDirectionIncrementGiven,960 +iDirectionIncrementGridLength,961 +iDirectionIncrementInDegrees,962 +iIncrement,963 +iScansNegatively,964 +iScansPositively,965 +ident,966 +identificationNumber,967 +identificationOfOriginatingGeneratingCentre,968 +identificationOfProject,969 +identifier,970 +ieeeFloats,971 +ifsParam,972 +ijDirectionIncrementGiven,973 +implementationDateOfModelCycle,974 +incrementOfLengths,975 +indexTemplate,976 +indexTemplateNumber,977 +indexedStorageInternalNodeK,978 +indexingDate,979 +indexingTime,980 +indexingTimeHH,981 +indexingTimeHHMM,982 +indexingTimeMM,983 +indicatorOfParameter,984 +indicatorOfTypeOfLevel,985 +indicatorOfUnitForForecastTime,986 +indicatorOfUnitForTimeIncrement,987 +indicatorOfUnitForTimeRange,988 +indicatorOfUnitForTimeRangeForReferencePeriod,989 +indicatorOfUnitOfTimeRange,990 +inputDataPresentIndicator,991 +inputDelayedDescriptorReplicationFactor,992 +inputExtendedDelayedDescriptorReplicationFactor,993 +inputOriginatingCentre,994 +inputOverriddenReferenceValues,995 +inputProcessIdentifier,996 +inputShortDelayedDescriptorReplicationFactor,997 +instrument,998 +instrumentIdentifier,999 +instrumentType,1000 +integerPointValues,1001 +integerScaleFactor,1002 +integerScalingFactorAppliedToDirections,1003 +integerScalingFactorAppliedToFrequencies,1004 +integerValues,1005 +internalVersion,1006 +internationalDataSubCategory,1007 +interpretationOfNumberOfPoints,1008 +intervalBetweenTimes,1009 +isAccumulation,1010 +isAuto,1011 +isCavok,1012 +isCavokTrend1,1013 +isCavokTrend2,1014 +isCavokTrend3,1015 +isCavokTrend4,1016 +isConstant,1017 +isCorrection,1018 +isEPS,1019 +isEps,1020 +isFillup,1021 +isHindcast,1022 +isOctahedral,1023 +isRotatedGrid,1024 +isSatellite,1025 +isSatelliteType,1026 +isSens,1027 +is_aerosol,1028 +is_aerosol_optical,1029 +is_chemical,1030 +is_chemical_distfn,1031 +is_chemical_srcsink,1032 +is_localtime,1033 +is_ocean2d_param,1034 +is_ocean3d_param,1035 +is_uerra,1036 +isectionNumber2,1037 +isectionNumber3,1038 +isectionNumber4,1039 +isotopeIdentificationNumber,1040 +iteration,1041 +iterationNumber,1042 +iteratorDisableUnrotate,1043 +jDirectionIncrement,1044 +jDirectionIncrementGiven,1045 +jDirectionIncrementGridLength,1046 +jDirectionIncrementInDegrees,1047 +jIncrement,1048 +jPointsAreConsecutive,1049 +jScansNegatively,1050 +jScansPositively,1051 +jdLocal,1052 +jdSelected,1053 +julianDay,1054 +julianForecastDay,1055 +keyData,1056 +keyMore,1057 +keySat,1058 +kindOfProduct,1059 +kurt,1060 +kurtosis,1061 +lBB,1062 +landtype,1063 +laplacianOperator,1064 +laplacianOperatorIsSet,1065 +laplacianScalingFactor,1066 +laplacianScalingFactorUnset,1067 +lastMonthUsedToBuildClimateMonth1,1068 +lastMonthUsedToBuildClimateMonth2,1069 +latLonValues,1070 +latitude,1071 +latitudeFirstInDegrees,1072 +latitudeLastInDegrees,1073 +latitudeLongitudeValues,1074 +latitudeOfCentralPointInClusterDomain,1075 +latitudeOfCentrePoint,1076 +latitudeOfCentrePointInDegrees,1077 +latitudeOfFirstGridPoint,1078 +latitudeOfFirstGridPointInDegrees,1079 +latitudeOfGridPoints,1080 +latitudeOfIcosahedronPole,1081 +latitudeOfLastGridPoint,1082 +latitudeOfLastGridPointInDegrees,1083 +latitudeOfNorthWestCornerOfArea,1084 +latitudeOfReferencePoint,1085 +latitudeOfReferencePointInDegrees,1086 +latitudeOfSouthEastCornerOfArea,1087 +latitudeOfSouthernPole,1088 +latitudeOfSouthernPoleInDegrees,1089 +latitudeOfStretchingPole,1090 +latitudeOfStretchingPoleInDegrees,1091 +latitudeOfSubSatellitePoint,1092 +latitudeOfSubSatellitePointInDegrees,1093 +latitudeOfTangencyPoint,1094 +latitudeOfThePoleOfStretching,1095 +latitudeOfThePolePoint,1096 +latitudeOfThePolePointInDegrees,1097 +latitudeOfTheSouthernPoleOfProjection,1098 +latitudeSexagesimal,1099 +latitudeWhereDxAndDyAreSpecified,1100 +latitudeWhereDxAndDyAreSpecifiedInDegrees,1101 +latitudes,1102 +latitudesList,1103 +latitudinalDirectionGridLength,1104 +lcwfvSuiteName,1105 +leadtime,1106 +legBaseDate,1107 +legBaseTime,1108 +legNumber,1109 +legacyGaussSubarea,1110 +lengthDescriptors,1111 +lengthIncrementForTheGroupLengths,1112 +lengthOf4DvarWindow,1113 +lengthOfHeaders,1114 +lengthOfIndexTemplate,1115 +lengthOfMessage,1116 +lengthOfOriginatorLocalTemplate,1117 +lengthOfProjectLocalTemplate,1118 +lengthOfTimeRange,1119 +lengthOfTimeRangeForReferencePeriod,1120 +lev,1121 +levTypeName,1122 +level,1123 +levelIndicator,1124 +levelType,1125 +levelValues,1126 +level_value_list,1127 +levelist,1128 +levels,1129 +levtype,1130 +libraryVersion,1131 +listMembersMissing,1132 +listMembersMissing2,1133 +listMembersMissing3,1134 +listMembersMissing4,1135 +listMembersUsed,1136 +listMembersUsed2,1137 +listMembersUsed3,1138 +listMembersUsed4,1139 +listOfContributingSpectralBands,1140 +listOfDistributionFunctionParameter,1141 +listOfEnsembleForecastNumbers,1142 +listOfModelIdentifiers,1143 +listOfParametersUsedForClustering,1144 +listOfScaledFrequencies,1145 +listOfWaveDirectionSequenceParameters,1146 +listOfWaveFrequencySequenceParameters,1147 +local,1148 +localDate,1149 +localDateTime,1150 +localDay,1151 +localDecimalScaleFactor,1152 +localDefNumberOne,1153 +localDefNumberTwo,1154 +localDefinition,1155 +localDefinitionNumber,1156 +localDir,1157 +localExtensionPadding,1158 +localFlag,1159 +localFlagLatestVersion,1160 +localHour,1161 +localLatitude,1162 +localLatitude1,1163 +localLatitude2,1164 +localLongitude,1165 +localLongitude1,1166 +localLongitude2,1167 +localMinute,1168 +localMonth,1169 +localNumberOfObservations,1170 +localSecond,1171 +localSection,1172 +localSectionPresent,1173 +localTablesVersion,1174 +localTablesVersionNumber,1175 +localTime,1176 +localTimeForecastList,1177 +localTimeMethod,1178 +localUsePresent,1179 +localYear,1180 +local_padding,1181 +local_use,1182 +logTransform,1183 +longitude,1184 +longitudeFirstInDegrees,1185 +longitudeLastInDegrees,1186 +longitudeOfCentralPointInClusterDomain,1187 +longitudeOfCentrePoint,1188 +longitudeOfCentrePointInDegrees,1189 +longitudeOfFirstDiamondCenterLine,1190 +longitudeOfFirstDiamondCentreLine,1191 +longitudeOfFirstDiamondCentreLineInDegrees,1192 +longitudeOfFirstGridPoint,1193 +longitudeOfFirstGridPointInDegrees,1194 +longitudeOfGridPoints,1195 +longitudeOfIcosahedronPole,1196 +longitudeOfLastGridPoint,1197 +longitudeOfLastGridPointInDegrees,1198 +longitudeOfNorthWestCornerOfArea,1199 +longitudeOfReferencePoint,1200 +longitudeOfReferencePointInDegrees,1201 +longitudeOfSouthEastCornerOfArea,1202 +longitudeOfSouthernPole,1203 +longitudeOfSouthernPoleInDegrees,1204 +longitudeOfStretchingPole,1205 +longitudeOfStretchingPoleInDegrees,1206 +longitudeOfSubSatellitePoint,1207 +longitudeOfSubSatellitePointInDegrees,1208 +longitudeOfTangencyPoint,1209 +longitudeOfThePoleOfStretching,1210 +longitudeOfThePolePoint,1211 +longitudeOfThePolePointInDegrees,1212 +longitudeOfTheSouthernPoleOfProjection,1213 +longitudeSexagesimal,1214 +longitudes,1215 +longitudesList,1216 +longitudinalDirectionGridLength,1217 +lowerLimit,1218 +lowerRange,1219 +lowerThreshold,1220 +lowerThresholdValue,1221 +ls_labeling,1222 +lsdate_bug,1223 +lstime_bug,1224 +m,1225 +mAngleMultiplier,1226 +mBasicAngle,1227 +mars,1228 +marsClass,1229 +marsClass1,1230 +marsClass2,1231 +marsDir,1232 +marsDomain,1233 +marsEndStep,1234 +marsExperimentOffset,1235 +marsExpver,1236 +marsForecastMonth,1237 +marsGrid,1238 +marsIdent,1239 +marsKeywords,1240 +marsKeywords1,1241 +marsLamModel,1242 +marsLatitude,1243 +marsLevel,1244 +marsLevelist,1245 +marsLongitude,1246 +marsModel,1247 +marsParam,1248 +marsQuantile,1249 +marsRange,1250 +marsStartStep,1251 +marsStep,1252 +marsStream,1253 +marsStream1,1254 +marsStream2,1255 +marsType,1256 +marsType1,1257 +marsType2,1258 +mars_labeling,1259 +mask,1260 +masterDir,1261 +masterTableNumber,1262 +masterTablesVersionNumber,1263 +masterTablesVersionNumberLatest,1264 +matchAerosolBinNumber,1265 +matchAerosolPacking,1266 +matchLandType,1267 +matchSort,1268 +matchTimeRepres,1269 +matrixBitmapsPresent,1270 +matrixOfValues,1271 +max,1272 +maxLevelValue,1273 +maximum,1274 +md5Data,1275 +md5DataSection,1276 +md5GridSection,1277 +md5Headers,1278 +md5Product,1279 +md5Section1,1280 +md5Section10,1281 +md5Section2,1282 +md5Section3,1283 +md5Section4,1284 +md5Section5,1285 +md5Section6,1286 +md5Section7,1287 +md5Section8,1288 +md5Section9,1289 +md5Structure,1290 +md5TimeDomainSection,1291 +meanRVR1,1292 +meanRVR2,1293 +meanRVR3,1294 +meanRVR4,1295 +meanSize,1296 +meanValueRVR1,1297 +meanValueRVR2,1298 +meanValueRVR3,1299 +meanValueRVR4,1300 +meaningOfVerticalCoordinate,1301 +memberNumber,1302 +messageLength,1303 +metadata,1304 +method,1305 +methodNumber,1306 +million,1307 +min,1308 +minimum,1309 +minute,1310 +minuteOfAnalysis,1311 +minuteOfEndOfOverallTimeInterval,1312 +minuteOfForecast,1313 +minuteOfForecastUsedInLocalTime,1314 +minuteOfModelVersion,1315 +minuteOfReference,1316 +minuteOfStartOfReferencePeriod,1317 +minutesAfterDataCutoff,1318 +minutesAfterReferenceTimeOfDataCutoff,1319 +missingDataFlag,1320 +missingValue,1321 +missingValueManagement,1322 +missingValueManagementUsed,1323 +missingValuesPresent,1324 +missing_values,1325 +mixedCoordinateDefinition,1326 +mixedCoordinateFieldFlag,1327 +modeNumber,1328 +model,1329 +modelErrorType,1330 +modelIdentifier,1331 +modelName,1332 +modelVersionDate,1333 +modelVersionTime,1334 +molarMass,1335 +month,1336 +monthOfAnalysis,1337 +monthOfEndOfOverallTimeInterval,1338 +monthOfForecast,1339 +monthOfForecastUsedInLocalTime,1340 +monthOfModelVersion,1341 +monthOfReference,1342 +monthOfStartOfReferencePeriod,1343 +monthlyVerificationDate,1344 +monthlyVerificationMonth,1345 +monthlyVerificationTime,1346 +monthlyVerificationYear,1347 +multiplicationFactorForLatLong,1348 +n,1349 +n2,1350 +n3,1351 +na,1352 +name,1353 +nameECMF,1354 +nameLegacyECMF,1355 +nameOfFirstFixedSurface,1356 +nameOfSecondFixedSurface,1357 +names,1358 +nd,1359 +neitherPresent,1360 +newSubtype,1361 +nlev,1362 +nnn,1363 +normAtFinalTime,1364 +normAtInitialTime,1365 +normal,1366 +northLatitudeOfCluster,1367 +northLatitudeOfDomainOfTubing,1368 +northWestLatitudeOfLPOArea,1369 +northWestLatitudeOfVerficationArea,1370 +northWestLongitudeOfLPOArea,1371 +northWestLongitudeOfVerficationArea,1372 +northernLatitudeOfClusterDomain,1373 +northernLatitudeOfDomain,1374 +nosigPresent,1375 +notDecoded,1376 +nref,1377 +nt,1378 +number,1379 +numberInHorizontalCoordinates,1380 +numberInMixedCoordinateDefinition,1381 +numberInTheAuxiliaryArray,1382 +numberInTheGridCoordinateList,1383 +numberIncludedInAverage,1384 +numberMissingFromAveragesOrAccumulations,1385 +numberOfAdditionalParametersForReferencePeriod,1386 +numberOfAnalysis,1387 +numberOfBits,1388 +numberOfBitsContainingEachPackedValue,1389 +numberOfBitsForScaledGroupLengths,1390 +numberOfBitsUsedForTheGroupWidths,1391 +numberOfBitsUsedForTheScaledGroupLengths,1392 +numberOfBytesInLocalDefinition,1393 +numberOfBytesOfFreeFormatData,1394 +numberOfBytesPerInteger,1395 +numberOfCategories,1396 +numberOfCharacters,1397 +numberOfChars,1398 +numberOfClusterHighResolution,1399 +numberOfClusterLowResolution,1400 +numberOfClusters,1401 +numberOfCodedValues,1402 +numberOfCoefficientsOrValuesUsedToSpecifyFirstDimensionCoordinateFunction,1403 +numberOfCoefficientsOrValuesUsedToSpecifySecondDimensionCoordinateFunction,1404 +numberOfColumns,1405 +numberOfComponents,1406 +numberOfContributingSpectralBands,1407 +numberOfControlForecastTube,1408 +numberOfCoordinatesValues,1409 +numberOfDataBinsAlongRadials,1410 +numberOfDataMatrices,1411 +numberOfDataPoints,1412 +numberOfDataPointsExpected,1413 +numberOfDataValues,1414 +numberOfDaysInClimateSamplingWindow,1415 +numberOfDiamonds,1416 +numberOfDirections,1417 +numberOfDistinctSection3s,1418 +numberOfDistinctSection4s,1419 +numberOfDistinctSection5s,1420 +numberOfDistinctSection6s,1421 +numberOfDistinctSection7s,1422 +numberOfDistinctSection8s,1423 +numberOfDistinctSection9s,1424 +numberOfDistributionFunctionParameters,1425 +numberOfEffectiveValues,1426 +numberOfFloats,1427 +numberOfForcasts,1428 +numberOfForecastsInCluster,1429 +numberOfForecastsInEnsemble,1430 +numberOfForecastsInTheCluster,1431 +numberOfForecastsInTube,1432 +numberOfForecastsUsedInLocalTime,1433 +numberOfFrequencies,1434 +numberOfGridInReference,1435 +numberOfGridUsed,1436 +numberOfGroups,1437 +numberOfGroupsOfDataValues,1438 +numberOfHorizontalPoints,1439 +numberOfIntegers,1440 +numberOfInts,1441 +numberOfIterations,1442 +numberOfLevelValues,1443 +numberOfLocalDefinitions,1444 +numberOfLogicals,1445 +numberOfMembersInCluster,1446 +numberOfMembersInEnsemble,1447 +numberOfMissing,1448 +numberOfMissingInStatisticalProcess,1449 +numberOfMissingValues,1450 +numberOfModeOfDistribution,1451 +numberOfModels,1452 +numberOfOctectsForNumberOfPoints,1453 +numberOfOctetsExtraDescriptors,1454 +numberOfOperationalForecastTube,1455 +numberOfPackedValues,1456 +numberOfParallelsBetweenAPoleAndTheEquator,1457 +numberOfParametersUsedForClustering,1458 +numberOfPartitions,1459 +numberOfPoints,1460 +numberOfPointsAlongAMeridian,1461 +numberOfPointsAlongAParallel,1462 +numberOfPointsAlongFirstAxis,1463 +numberOfPointsAlongSecondAxis,1464 +numberOfPointsAlongTheXAxis,1465 +numberOfPointsAlongTheYAxis,1466 +numberOfPointsAlongXAxis,1467 +numberOfPointsAlongXAxisInCouplingArea,1468 +numberOfPointsAlongYAxis,1469 +numberOfPointsAlongYAxisInCouplingArea,1470 +numberOfPointsInDomain,1471 +numberOfPointsUsed,1472 +numberOfPressureLevelsUsedForClustering,1473 +numberOfRadarSitesUsed,1474 +numberOfRadials,1475 +numberOfReferencePeriodTimeRanges,1476 +numberOfReforecastYearsInModelClimate,1477 +numberOfRemaininChars,1478 +numberOfRepresentativeMember,1479 +numberOfReservedBytes,1480 +numberOfRows,1481 +numberOfSecondOrderPackedValues,1482 +numberOfSection,1483 +numberOfSingularVectorsComputed,1484 +numberOfSingularVectorsEvolved,1485 +numberOfStatisticallyProcessedFieldsForLocalTime,1486 +numberOfStepsUsedForClustering,1487 +numberOfSubsets,1488 +numberOfTensOfThousandsOfYearsOfOffset,1489 +numberOfTimeIncrementsOfForecastsUsedInLocalTime,1490 +numberOfTimeRange,1491 +numberOfTimeSteps,1492 +numberOfUnexpandedDescriptors,1493 +numberOfUnusedBitsAtEndOfSection3,1494 +numberOfUsedSpatialTiles,1495 +numberOfUsedTileAttributes,1496 +numberOfUsefulPointsAlongXAxis,1497 +numberOfUsefulPointsAlongYAxis,1498 +numberOfVGridUsed,1499 +numberOfValues,1500 +numberOfVerticalCoordinateValues,1501 +numberOfVerticalGridDescriptors,1502 +numberOfVerticalPoints,1503 +numberOfWaveDirectionSequenceParameters,1504 +numberOfWaveDirections,1505 +numberOfWaveFrequencies,1506 +numberOfWaveFrequencySequenceParameters,1507 +numberingOrderOfDiamonds,1508 +numericValues,1509 +observablePropertyTemplate,1510 +observablePropertyTemplateNumber,1511 +observationDiagnostic,1512 +observationGeneratingProcessIdentifier,1513 +observationType,1514 +observedData,1515 +obstype,1516 +oceanAtmosphereCoupling,1517 +oceanLevName,1518 +oceanStream,1519 +octetAtWichPackedDataBegins,1520 +offset,1521 +offsetAfterBitmap,1522 +offsetAfterCentreLocalSection,1523 +offsetAfterData,1524 +offsetAfterLocalSection,1525 +offsetAfterPadding,1526 +offsetBBitmap,1527 +offsetBSection5,1528 +offsetBSection6,1529 +offsetBSection9,1530 +offsetBeforeBitmap,1531 +offsetBeforeData,1532 +offsetBeforePL,1533 +offsetBeforePV,1534 +offsetDescriptors,1535 +offsetEndSection4,1536 +offsetFreeFormData,1537 +offsetFromOriginToInnerBound,1538 +offsetFromReferenceOfFirstTime,1539 +offsetICEFieldsUsed,1540 +offsetSection0,1541 +offsetSection1,1542 +offsetSection10,1543 +offsetSection11,1544 +offsetSection2,1545 +offsetSection3,1546 +offsetSection4,1547 +offsetSection5,1548 +offsetSection6,1549 +offsetSection7,1550 +offsetSection8,1551 +offsetSection9,1552 +offsetToEndOf4DvarWindow,1553 +offsetValuesBy,1554 +offsetdate,1555 +offsettime,1556 +oldSubtype,1557 +one,1558 +oneConstant,1559 +oneMillionConstant,1560 +oneMinuteMeanMaximumRVR1,1561 +oneMinuteMeanMaximumRVR2,1562 +oneMinuteMeanMaximumRVR3,1563 +oneMinuteMeanMaximumRVR4,1564 +oneMinuteMeanMinimumRVR1,1565 +oneMinuteMeanMinimumRVR2,1566 +oneMinuteMeanMinimumRVR3,1567 +oneMinuteMeanMinimumRVR4,1568 +oneThousand,1569 +oper,1570 +operStream,1571 +operatingMode,1572 +operationalForecastCluster,1573 +optimisationTime,1574 +optimizeScaleFactor,1575 +optionalData,1576 +opttime,1577 +orderOfSPD,1578 +orderOfSpatialDifferencing,1579 +orientationOfTheGrid,1580 +orientationOfTheGridInDegrees,1581 +origin,1582 +originOfPostProcessing,1583 +originalParameterNumber,1584 +originalParameterTableNumber,1585 +originalSubCentreIdentifier,1586 +originatingCentre,1587 +originatingCentreOfAnalysis,1588 +originatingClass,1589 +originatorLocalTemplate,1590 +originatorLocalTemplateNumber,1591 +overlayTemplate,1592 +overlayTemplateNumber,1593 +pack,1594 +packedValues,1595 +packingError,1596 +packingType,1597 +padding,1598 +padding_grid1_1,1599 +padding_grid1_2,1600 +padding_grid3_1,1601 +padding_grid4_1,1602 +padding_grid50_1,1603 +padding_grid5_1,1604 +padding_grid90_1,1605 +padding_loc10_1,1606 +padding_loc12_1,1607 +padding_loc13_1,1608 +padding_loc13_2,1609 +padding_loc13_3,1610 +padding_loc13_4,1611 +padding_loc13_5,1612 +padding_loc14_1,1613 +padding_loc14_2,1614 +padding_loc15_1,1615 +padding_loc16_1,1616 +padding_loc17_2,1617 +padding_loc18_1,1618 +padding_loc18_2,1619 +padding_loc190_1,1620 +padding_loc191_1,1621 +padding_loc191_2,1622 +padding_loc191_3,1623 +padding_loc192_1,1624 +padding_loc19_2,1625 +padding_loc20_1,1626 +padding_loc21_1,1627 +padding_loc23_1,1628 +padding_loc244_1,1629 +padding_loc244_2,1630 +padding_loc244_3,1631 +padding_loc245_1,1632 +padding_loc245_2,1633 +padding_loc26_1,1634 +padding_loc27_1,1635 +padding_loc27_2,1636 +padding_loc28_1,1637 +padding_loc29_1,1638 +padding_loc29_2,1639 +padding_loc29_3,1640 +padding_loc2_1,1641 +padding_loc2_2,1642 +padding_loc30_1,1643 +padding_loc30_2,1644 +padding_loc37_1,1645 +padding_loc37_2,1646 +padding_loc38_1,1647 +padding_loc3_1,1648 +padding_loc4_2,1649 +padding_loc50_1,1650 +padding_loc5_1,1651 +padding_loc6_1,1652 +padding_loc7_1,1653 +padding_loc9_1,1654 +padding_loc9_2,1655 +padding_local11_1,1656 +padding_local1_1,1657 +padding_local1_31,1658 +padding_local40_1,1659 +padding_local_35,1660 +padding_local_7_1,1661 +padding_sec1_loc,1662 +padding_sec2_1,1663 +padding_sec2_2,1664 +padding_sec2_3,1665 +padding_sec3_1,1666 +padding_sec4_1,1667 +paleontologicalOffset,1668 +param,1669 +paramId,1670 +paramIdECMF,1671 +paramIdLegacyECMF,1672 +param_value_max,1673 +param_value_min,1674 +parameter,1675 +parameterCategory,1676 +parameterCode,1677 +parameterDiscipline,1678 +parameterIndicator,1679 +parameterName,1680 +parameterNumber,1681 +parameterUnits,1682 +parameters,1683 +parametersVersion,1684 +partitionItems,1685 +partitionNumber,1686 +partitionTable,1687 +partitions,1688 +pastTendencyRVR1,1689 +pastTendencyRVR2,1690 +pastTendencyRVR3,1691 +pastTendencyRVR4,1692 +patch_precip_fp,1693 +pentagonalResolutionParameterJ,1694 +pentagonalResolutionParameterK,1695 +pentagonalResolutionParameterM,1696 +percentileValue,1697 +periodOfTime,1698 +periodOfTimeIntervals,1699 +perturbationNumber,1700 +perturbedType,1701 +phase,1702 +physicalFlag1,1703 +physicalFlag2,1704 +physicalMeaningOfVerticalCoordinate,1705 +pl,1706 +platform,1707 +plusOneinOrdersOfSPD,1708 +points,1709 +postAuxiliary,1710 +postAuxiliaryArrayPresent,1711 +postProcessing,1712 +powerOfTenUsedToScaleClimateWeight,1713 +preBitmapValues,1714 +preProcessingParameter,1715 +precision,1716 +precisionOfTheUnpackedSubset,1717 +predefined_grid,1718 +predefined_grid_values,1719 +preferLocalConcepts,1720 +present,1721 +presentTrend1,1722 +presentTrend2,1723 +presentTrend3,1724 +presentTrend4,1725 +presentWeather1Present,1726 +presentWeather1PresentTrend1,1727 +presentWeather1PresentTrend2,1728 +presentWeather1PresentTrend3,1729 +presentWeather1PresentTrend4,1730 +presentWeather2Present,1731 +presentWeather2PresentTrend1,1732 +presentWeather2PresentTrend2,1733 +presentWeather2PresentTrend3,1734 +presentWeather2PresentTrend4,1735 +presentWeather3Present,1736 +presentWeather3PresentTrend1,1737 +presentWeather3PresentTrend2,1738 +presentWeather3PresentTrend3,1739 +presentWeather3PresentTrend4,1740 +pressureLevel,1741 +pressureUnits,1742 +primaryBitmap,1743 +primaryMissingValue,1744 +primaryMissingValueSubstitute,1745 +probContinous,1746 +probPoint,1747 +probProductDefinition,1748 +probabilityType,1749 +probabilityTypeName,1750 +process,1751 +produceLargeConstantFields,1752 +product,1753 +productDefinition,1754 +productDefinitionTemplateNumber,1755 +productDefinitionTemplateNumberInternal,1756 +productIdentifier,1757 +productType,1758 +productionStatusOfProcessedData,1759 +projSourceString,1760 +projString,1761 +projTargetString,1762 +projectLocalTemplate,1763 +projectLocalTemplateNumber,1764 +projectionCenterFlag,1765 +projectionCentreFlag,1766 +pv,1767 +pvlLocation,1768 +qfe,1769 +qfePresent,1770 +qfeUnits,1771 +qnh,1772 +qnhAPresent,1773 +qnhPresent,1774 +qnhUnits,1775 +qualityControl,1776 +qualityControlIndicator,1777 +qualityValueAssociatedWithParameter,1778 +quantile,1779 +quantileValue,1780 +radialAngularSpacing,1781 +radials,1782 +radius,1783 +radiusInMetres,1784 +radiusOfCentralCluster,1785 +radiusOfClusterDomain,1786 +radiusOfTheEarth,1787 +range,1788 +rangeBinSpacing,1789 +rdbDateTime,1790 +rdbSubtype,1791 +rdbType,1792 +rdb_key,1793 +rdbtime,1794 +rdbtimeDate,1795 +rdbtimeDay,1796 +rdbtimeHour,1797 +rdbtimeMinute,1798 +rdbtimeMonth,1799 +rdbtimeSecond,1800 +rdbtimeTime,1801 +rdbtimeYear,1802 +realPart,1803 +realPartOf00,1804 +recDateTime,1805 +recentWeather,1806 +recentWeatherTry,1807 +rectime,1808 +rectimeDay,1809 +rectimeHour,1810 +rectimeMinute,1811 +rectimeSecond,1812 +reducedGrid,1813 +refdate,1814 +reference,1815 +referenceDate,1816 +referenceForGroupLengths,1817 +referenceForGroupWidths,1818 +referenceOfLengths,1819 +referenceOfWidths,1820 +referencePeriodList,1821 +referenceReflectivityForEchoTop,1822 +referenceSampleInterval,1823 +referenceStep,1824 +referenceValue,1825 +referenceValueError,1826 +reflectivityCalibrationConstant,1827 +remarkPresent,1828 +reportType,1829 +representationMode,1830 +representationType,1831 +representativeMember,1832 +reserved,1833 +reserved1,1834 +reserved2,1835 +reserved3,1836 +reservedNeedNotBePresent,1837 +reservedOctet,1838 +reservedSection2,1839 +reservedSection3,1840 +reservedSection4,1841 +resolutionAndComponentFlags,1842 +resolutionAndComponentFlags1,1843 +resolutionAndComponentFlags2,1844 +resolutionAndComponentFlags3,1845 +resolutionAndComponentFlags4,1846 +resolutionAndComponentFlags6,1847 +resolutionAndComponentFlags7,1848 +resolutionAndComponentFlags8,1849 +restricted,1850 +rootGroupObjectHeaderAddress,1851 +rootGroupSymbolTableEntry,1852 +rootTablesDir,1853 +roundedMarsLatitude,1854 +roundedMarsLevelist,1855 +roundedMarsLongitude,1856 +runwayBrakingActionState1,1857 +runwayBrakingActionState2,1858 +runwayBrakingActionState3,1859 +runwayBrakingActionState4,1860 +runwayDepositCodeState1,1861 +runwayDepositCodeState2,1862 +runwayDepositCodeState3,1863 +runwayDepositCodeState4,1864 +runwayDepositState1,1865 +runwayDepositState2,1866 +runwayDepositState3,1867 +runwayDepositState4,1868 +runwayDepthOfDepositCodeState1,1869 +runwayDepthOfDepositCodeState2,1870 +runwayDepthOfDepositCodeState3,1871 +runwayDepthOfDepositCodeState4,1872 +runwayDepthOfDepositState1,1873 +runwayDepthOfDepositState2,1874 +runwayDepthOfDepositState3,1875 +runwayDepthOfDepositState4,1876 +runwayDesignatorRVR1,1877 +runwayDesignatorRVR2,1878 +runwayDesignatorRVR3,1879 +runwayDesignatorRVR4,1880 +runwayDesignatorState1,1881 +runwayDesignatorState2,1882 +runwayDesignatorState3,1883 +runwayDesignatorState4,1884 +runwayExtentOfContaminationCodeState1,1885 +runwayExtentOfContaminationCodeState2,1886 +runwayExtentOfContaminationCodeState3,1887 +runwayExtentOfContaminationCodeState4,1888 +runwayExtentOfContaminationState1,1889 +runwayExtentOfContaminationState2,1890 +runwayExtentOfContaminationState3,1891 +runwayExtentOfContaminationState4,1892 +runwayFrictionCodeValueState1,1893 +runwayFrictionCodeValueState2,1894 +runwayFrictionCodeValueState3,1895 +runwayFrictionCodeValueState4,1896 +runwayFrictionCoefficientCodeState1,1897 +runwayFrictionCoefficientCodeState2,1898 +runwayFrictionCoefficientCodeState3,1899 +runwayFrictionCoefficientCodeState4,1900 +runwayFrictionCoefficientState1,1901 +runwayFrictionCoefficientState2,1902 +runwayFrictionCoefficientState3,1903 +runwayFrictionCoefficientState4,1904 +runwaySideCodeState1,1905 +runwaySideCodeState2,1906 +runwaySideCodeState3,1907 +runwaySideCodeState4,1908 +runwayState,1909 +sampleSizeOfModelClimate,1910 +sampleSizeOfReferencePeriod,1911 +satelliteID,1912 +satelliteIdentifier,1913 +satelliteNumber,1914 +satelliteSeries,1915 +scaleFactorAtReferencePoint,1916 +scaleFactorOfAdditionalParameterForReferencePeriod,1917 +scaleFactorOfCentralWaveNumber,1918 +scaleFactorOfDistanceFromEnsembleMean,1919 +scaleFactorOfDistributionFunctionParameter,1920 +scaleFactorOfEarthMajorAxis,1921 +scaleFactorOfEarthMinorAxis,1922 +scaleFactorOfFirstFixedSurface,1923 +scaleFactorOfFirstSize,1924 +scaleFactorOfFirstWavelength,1925 +scaleFactorOfLengthOfSemiMajorAxis,1926 +scaleFactorOfLengthOfSemiMinorAxis,1927 +scaleFactorOfLowerLimit,1928 +scaleFactorOfLowerWavePeriodLimit,1929 +scaleFactorOfMajorAxisOfOblateSpheroidEarth,1930 +scaleFactorOfMinorAxisOfOblateSpheroidEarth,1931 +scaleFactorOfPrimeMeridianOffset,1932 +scaleFactorOfRadiusOfSphericalEarth,1933 +scaleFactorOfSecondFixedSurface,1934 +scaleFactorOfSecondSize,1935 +scaleFactorOfSecondWavelength,1936 +scaleFactorOfStandardDeviation,1937 +scaleFactorOfStandardDeviationInTheCluster,1938 +scaleFactorOfUpperLimit,1939 +scaleFactorOfUpperWavePeriodLimit,1940 +scaleFactorOfWaveDirectionSequenceParameter,1941 +scaleFactorOfWaveDirections,1942 +scaleFactorOfWaveFrequencies,1943 +scaleFactorOfWaveFrequencySequenceParameter,1944 +scaleValuesBy,1945 +scaledDirections,1946 +scaledFrequencies,1947 +scaledValueOfAdditionalParameterForReferencePeriod,1948 +scaledValueOfCentralWaveNumber,1949 +scaledValueOfDistanceFromEnsembleMean,1950 +scaledValueOfDistributionFunctionParameter,1951 +scaledValueOfEarthMajorAxis,1952 +scaledValueOfEarthMinorAxis,1953 +scaledValueOfFirstFixedSurface,1954 +scaledValueOfFirstSize,1955 +scaledValueOfFirstWavelength,1956 +scaledValueOfLengthOfSemiMajorAxis,1957 +scaledValueOfLengthOfSemiMinorAxis,1958 +scaledValueOfLowerLimit,1959 +scaledValueOfLowerWavePeriodLimit,1960 +scaledValueOfMajorAxisOfOblateSpheroidEarth,1961 +scaledValueOfMinorAxisOfOblateSpheroidEarth,1962 +scaledValueOfPrimeMeridianOffset,1963 +scaledValueOfRadiusOfSphericalEarth,1964 +scaledValueOfSecondFixedSurface,1965 +scaledValueOfSecondSize,1966 +scaledValueOfSecondWavelength,1967 +scaledValueOfStandardDeviation,1968 +scaledValueOfStandardDeviationInTheCluster,1969 +scaledValueOfUpperLimit,1970 +scaledValueOfUpperWavePeriodLimit,1971 +scaledValueOfWaveDirectionSequenceParameter,1972 +scaledValueOfWaveFrequencySequenceParameter,1973 +scaledValuesOfWaveDirections,1974 +scaledValuesOfWaveFrequencies,1975 +scalingFactorForFrequencies,1976 +scanPosition,1977 +scanningMode,1978 +scanningMode4,1979 +scanningMode5,1980 +scanningMode6,1981 +scanningMode7,1982 +scanningMode8,1983 +scanningModeForOneDiamond,1984 +sd,1985 +second,1986 +secondDimension,1987 +secondDimensionCoordinateValueDefinition,1988 +secondDimensionPhysicalSignificance,1989 +secondLatitude,1990 +secondLatitudeInDegrees,1991 +secondOfEndOfOverallTimeInterval,1992 +secondOfForecast,1993 +secondOfForecastUsedInLocalTime,1994 +secondOfModelVersion,1995 +secondOfStartOfReferencePeriod,1996 +secondOrderFlags,1997 +secondOrderOfDifferentWidth,1998 +secondOrderValuesDifferentWidths,1999 +secondSize,2000 +secondaryBitMap,2001 +secondaryBitmap,2002 +secondaryBitmapPresent,2003 +secondaryBitmaps,2004 +secondaryBitmapsCount,2005 +secondaryBitmapsSize,2006 +secondaryMissingValue,2007 +secondaryMissingValueSubstitute,2008 +secondsOfAnalysis,2009 +secondsOfReference,2010 +section,2011 +section0Length,2012 +section0Pointer,2013 +section1,2014 +section10Length,2015 +section10Pointer,2016 +section11Length,2017 +section11Pointer,2018 +section1Flags,2019 +section1Length,2020 +section1Padding,2021 +section1Pointer,2022 +section2Length,2023 +section2Padding,2024 +section2Pointer,2025 +section2Present,2026 +section2Used,2027 +section3Flags,2028 +section3Length,2029 +section3Padding,2030 +section3Pointer,2031 +section3UniqueIdentifier,2032 +section4,2033 +section4Length,2034 +section4Padding,2035 +section4Pointer,2036 +section4UniqueIdentifier,2037 +section5,2038 +section5Length,2039 +section5Pointer,2040 +section5UniqueIdentifier,2041 +section6,2042 +section6Length,2043 +section6Pointer,2044 +section6UniqueIdentifier,2045 +section7,2046 +section7Length,2047 +section7Pointer,2048 +section7UniqueIdentifier,2049 +section8,2050 +section8Length,2051 +section8Pointer,2052 +section8UniqueIdentifier,2053 +section9Length,2054 +section9Pointer,2055 +section9UniqueIdentifier,2056 +sectionLengthLimitForEnsembles,2057 +sectionLengthLimitForProbability,2058 +sectionNumber,2059 +sectionPosition,2060 +section_01,2061 +section_02,2062 +section_03,2063 +section_04,2064 +section_05,2065 +section_06,2066 +section_07,2067 +section_08,2068 +section_09,2069 +section_1,2070 +section_10,2071 +section_11,2072 +section_2,2073 +section_3,2074 +section_4,2075 +section_5,2076 +section_6,2077 +section_7,2078 +section_8,2079 +selectStepTemplateInstant,2080 +selectStepTemplateInterval,2081 +selectedDay,2082 +selectedFcIndex,2083 +selectedHour,2084 +selectedMinute,2085 +selectedMonth,2086 +selectedSecond,2087 +selectedYear,2088 +sensitiveAreaDomain,2089 +sequences,2090 +setBitsPerValue,2091 +setCalendarId,2092 +setDecimalPrecision,2093 +setLocalDefinition,2094 +setToMissingIfOutOfRange,2095 +sfc_levtype,2096 +shapeOfTheEarth,2097 +shapeOfVerificationArea,2098 +shortName,2099 +shortNameECMF,2100 +shortNameLegacyECMF,2101 +short_name,2102 +signature,2103 +significanceOfReferenceDateAndTime,2104 +significanceOfReferenceTime,2105 +simpleThinningMissingRadius,2106 +simpleThinningSkip,2107 +simpleThinningStart,2108 +siteElevation,2109 +siteId,2110 +siteLatitude,2111 +siteLongitude,2112 +sizeOfLength,2113 +sizeOfOffsets,2114 +sizeOfPostAuxiliaryArray,2115 +sizeOfPostAuxiliaryArrayPlusOne,2116 +skew,2117 +skewness,2118 +skipExtraKeyAttributes,2119 +sort,2120 +sourceOfGridDefinition,2121 +sourceSinkChemicalPhysicalProcess,2122 +southEastLatitudeOfLPOArea,2123 +southEastLatitudeOfVerficationArea,2124 +southEastLongitudeOfLPOArea,2125 +southEastLongitudeOfVerficationArea,2126 +southLatitudeOfCluster,2127 +southLatitudeOfDomainOfTubing,2128 +southPoleOnProjectionPlane,2129 +southernLatitudeOfClusterDomain,2130 +southernLatitudeOfDomain,2131 +sp1,2132 +sp2,2133 +sp3,2134 +spaceUnitFlag,2135 +spacingOfBinsAlongRadials,2136 +spare,2137 +spare1,2138 +spare2,2139 +spare3,2140 +spare4,2141 +spatialProcessing,2142 +spatialSmoothingOfProduct,2143 +spectralDataRepresentationMode,2144 +spectralDataRepresentationType,2145 +spectralMode,2146 +spectralType,2147 +sphericalHarmonics,2148 +standardDeviation,2149 +standardParallel,2150 +standardParallelInDegrees,2151 +standardParallelInMicrodegrees,2152 +startDateOfReferencePeriod,2153 +startOfHeaders,2154 +startOfMessage,2155 +startOfRange,2156 +startStep,2157 +startStepInHours,2158 +startTimeStep,2159 +startingAzimuth,2160 +statisticalProcess,2161 +statisticalProcessesList,2162 +statistics,2163 +status,2164 +step,2165 +stepForClustering,2166 +stepHumanReadable,2167 +stepInHours,2168 +stepRange,2169 +stepRangeInHours,2170 +stepType,2171 +stepTypeForConversion,2172 +stepTypeInternal,2173 +stepUnits,2174 +stepZero,2175 +stream,2176 +streamOfAnalysis,2177 +stretchingFactor,2178 +stretchingFactorScaled,2179 +stringValues,2180 +subCentre,2181 +subDefinitions1,2182 +subDefinitions2,2183 +subLocalDefinition1,2184 +subLocalDefinition2,2185 +subLocalDefinitionLength1,2186 +subLocalDefinitionLength2,2187 +subLocalDefinitionNumber1,2188 +subLocalDefinitionNumber2,2189 +subSetJ,2190 +subSetK,2191 +subSetM,2192 +subcentreOfAnalysis,2193 +subdivisionsOfBasicAngle,2194 +suiteName,2195 +superblockExtensionAddress,2196 +swapScanningAlternativeRows,2197 +swapScanningLat,2198 +swapScanningLon,2199 +swapScanningX,2200 +swapScanningY,2201 +system,2202 +systemNumber,2203 +t,2204 +table2Version,2205 +tableCode,2206 +tableNumber,2207 +tableReference,2208 +tablesLocalDir,2209 +tablesMasterDir,2210 +tablesVersion,2211 +tablesVersionLatest,2212 +tablesVersionLatestOfficial,2213 +targetCompressionRatio,2214 +td,2215 +tempPressureUnits,2216 +temperature,2217 +temperatureAndDewpointPresent,2218 +templatesLocalDir,2219 +templatesMasterDir,2220 +theHindcastMarsStream,2221 +theMessage,2222 +thisExperimentVersionNumber,2223 +thisMarsClass,2224 +thisMarsStream,2225 +thisMarsType,2226 +thousand,2227 +three,2228 +threshold,2229 +thresholdIndicator,2230 +tiggeCentre,2231 +tiggeLAMName,2232 +tiggeLocalVersion,2233 +tiggeModel,2234 +tiggeSection,2235 +tiggeSuiteID,2236 +tigge_name,2237 +tigge_short_name,2238 +tileClassification,2239 +tileIndex,2240 +time,2241 +timeCoordinateDefinition,2242 +timeDomainTemplate,2243 +timeDomainTemplateNumber,2244 +timeIncrement,2245 +timeIncrementBetweenSuccessiveFields,2246 +timeOfAnalysis,2247 +timeOfForecast,2248 +timeOfForecastUsedInLocalTime,2249 +timeOfModelVersion,2250 +timeOfReference,2251 +timeRangeIndicator,2252 +timeRangeIndicatorFromStepRange,2253 +timeUnitFlag,2254 +timerepres,2255 +topLevel,2256 +total,2257 +totalAerosolBinsNumbers,2258 +totalInitialConditions,2259 +totalLength,2260 +totalNumber,2261 +totalNumberOfClusters,2262 +totalNumberOfDataValuesMissingInStatisticalProcess,2263 +totalNumberOfDirections,2264 +totalNumberOfForecastProbabilities,2265 +totalNumberOfFrequencies,2266 +totalNumberOfGridPoints,2267 +totalNumberOfIterations,2268 +totalNumberOfQuantiles,2269 +totalNumberOfRepetitions,2270 +totalNumberOfTileAttributePairs,2271 +totalNumberOfTubes,2272 +totalNumberOfValuesInUnpackedSubset,2273 +totalNumberOfWaveDirections,2274 +totalNumberOfWaveFrequencies,2275 +totalNumberOfdimensions,2276 +treatmentOfMissingData,2277 +true,2278 +trueLengthOfLastGroup,2279 +truncateDegrees,2280 +truncateLaplacian,2281 +tsectionNumber3,2282 +tsectionNumber4,2283 +tsectionNumber5,2284 +tubeDomain,2285 +tubeNumber,2286 +two,2287 +twoOrdersOfSPD,2288 +type,2289 +typeOfAnalysis,2290 +typeOfAuxiliaryInformation,2291 +typeOfCalendar,2292 +typeOfCompressionUsed,2293 +typeOfDistributionFunction,2294 +typeOfEnsembleForecast,2295 +typeOfEnsembleMember,2296 +typeOfFirstFixedSurface,2297 +typeOfGeneratingProcess,2298 +typeOfGrid,2299 +typeOfHorizontalLine,2300 +typeOfIntervalForFirstAndSecondSize,2301 +typeOfIntervalForFirstAndSecondWavelength,2302 +typeOfLevel,2303 +typeOfLevelECMF,2304 +typeOfOriginalFieldValues,2305 +typeOfPacking,2306 +typeOfPostProcessing,2307 +typeOfPreProcessing,2308 +typeOfProcessedData,2309 +typeOfReferenceDataset,2310 +typeOfRelationToReferenceDataset,2311 +typeOfSSTFieldUsed,2312 +typeOfSecondFixedSurface,2313 +typeOfSizeInterval,2314 +typeOfStatisticalPostProcessingOfEnsembleMembers,2315 +typeOfStatisticalProcessing,2316 +typeOfStatisticalProcessingForTimeRangeForReferencePeriod,2317 +typeOfTimeIncrement,2318 +typeOfTimeIncrementBetweenSuccessiveFieldsUsedInTheStatisticalProcessing,2319 +typeOfWaveDirectionSequence,2320 +typeOfWaveFrequencySequence,2321 +typeOfWavePeriodInterval,2322 +typeOfWavelengthInterval,2323 +typicalCentury,2324 +typicalDate,2325 +typicalDateTime,2326 +typicalDay,2327 +typicalHour,2328 +typicalMinute,2329 +typicalMonth,2330 +typicalSecond,2331 +typicalTime,2332 +typicalYear,2333 +typicalYear2,2334 +typicalYearOfCentury,2335 +uco,2336 +ucs,2337 +uerraLocalVersion,2338 +uerraSection,2339 +unexpandedDescriptors,2340 +unexpandedDescriptorsEncoded,2341 +unitOfOffsetFromReferenceTime,2342 +unitOfTime,2343 +unitOfTimeIncrement,2344 +unitOfTimeRange,2345 +units,2346 +unitsBias,2347 +unitsConversionOffset,2348 +unitsConversionScaleFactor,2349 +unitsDecimalScaleFactor,2350 +unitsECMF,2351 +unitsFactor,2352 +unitsLegacyECMF,2353 +unitsOfFirstFixedSurface,2354 +unitsOfSecondFixedSurface,2355 +unknown,2356 +unpack,2357 +unpackedError,2358 +unpackedSubsetPrecision,2359 +unpackedValues,2360 +unsignedIntegers,2361 +unstructuredGrid,2362 +unstructuredGridSubtype,2363 +unstructuredGridType,2364 +unstructuredGridUUID,2365 +unusedBitsInBitmap,2366 +updateSequenceNumber,2367 +upperLimit,2368 +upperRange,2369 +upperThreshold,2370 +upperThresholdValue,2371 +userDateEnd,2372 +userDateStart,2373 +userDateTimeEnd,2374 +userDateTimeStart,2375 +userTimeEnd,2376 +userTimeStart,2377 +uuidOfHGrid,2378 +uuidOfVGrid,2379 +uvRelativeToGrid,2380 +validityDate,2381 +validityTime,2382 +values,2383 +variationOfVisibility,2384 +variationOfVisibilityDirection,2385 +variationOfVisibilityDirectionAngle,2386 +variationOfVisibilityDirectionTrend1,2387 +variationOfVisibilityDirectionTrend2,2388 +variationOfVisibilityDirectionTrend3,2389 +variationOfVisibilityDirectionTrend4,2390 +variationOfVisibilityTrend1,2391 +variationOfVisibilityTrend2,2392 +variationOfVisibilityTrend3,2393 +variationOfVisibilityTrend4,2394 +varno,2395 +verificationDate,2396 +verificationMonth,2397 +verificationYear,2398 +verifyingMonth,2399 +version,2400 +versionNumOfFilesFreeSpaceStorage,2401 +versionNumOfRootGroupSymbolTableEntry,2402 +versionNumOfSharedHeaderMessageFormat,2403 +versionNumberOfExperimentalSuite,2404 +versionNumberOfGribLocalTables,2405 +versionNumberOfSuperblock,2406 +versionOfModelClimate,2407 +verticalCoordinate,2408 +verticalCoordinateDefinition,2409 +verticalDomainTemplate,2410 +verticalDomainTemplateNumber,2411 +verticalVisibility,2412 +verticalVisibilityCoded,2413 +visibility,2414 +visibilityInKilometresTrend1,2415 +visibilityInKilometresTrend2,2416 +visibilityInKilometresTrend3,2417 +visibilityInKilometresTrend4,2418 +visibilityTrend1,2419 +visibilityTrend2,2420 +visibilityTrend3,2421 +visibilityTrend4,2422 +waveDirectionNumber,2423 +waveDomain,2424 +waveFrequencyNumber,2425 +waveLevType,2426 +weightAppliedToClimateMonth1,2427 +westLongitudeOfCluster,2428 +westLongitudeOfDomainOfTubing,2429 +westernLongitudeOfClusterDomain,2430 +westernLongitudeOfDomain,2431 +widthOfFirstOrderValues,2432 +widthOfLengths,2433 +widthOfSPD,2434 +widthOfWidths,2435 +windDirection,2436 +windDirectionTrend1,2437 +windDirectionTrend2,2438 +windDirectionTrend3,2439 +windDirectionTrend4,2440 +windGust,2441 +windGustTrend1,2442 +windGustTrend2,2443 +windGustTrend3,2444 +windGustTrend4,2445 +windPresent,2446 +windSpeed,2447 +windSpeedTrend1,2448 +windSpeedTrend2,2449 +windSpeedTrend3,2450 +windSpeedTrend4,2451 +windUnits,2452 +windUnitsTrend1,2453 +windUnitsTrend2,2454 +windUnitsTrend3,2455 +windUnitsTrend4,2456 +windVariableDirection,2457 +windVariableDirectionTrend1,2458 +windVariableDirectionTrend2,2459 +windVariableDirectionTrend3,2460 +windVariableDirectionTrend4,2461 +wrongPadding,2462 +xCoordinateOfOriginOfSectorImage,2463 +xCoordinateOfSubSatellitePoint,2464 +xDirectionGridLength,2465 +xDirectionGridLengthInMetres,2466 +xDirectionGridLengthInMillimetres,2467 +xFirst,2468 +xLast,2469 +yCoordinateOfOriginOfSectorImage,2470 +yCoordinateOfSubSatellitePoint,2471 +yDirectionGridLength,2472 +yDirectionGridLengthInMetres,2473 +yDirectionGridLengthInMillimetres,2474 +yFirst,2475 +yLast,2476 +year,2477 +yearOfAnalysis,2478 +yearOfCentury,2479 +yearOfEndOfOverallTimeInterval,2480 +yearOfForecast,2481 +yearOfForecastUsedInLocalTime,2482 +yearOfModelVersion,2483 +yearOfReference,2484 +yearOfStartOfReferencePeriod,2485 +zero,2486 +zeros,2487 diff --git a/tests/pseudo_budg.sh b/tests/pseudo_budg.sh index 033b51e07..4c50789d8 100755 --- a/tests/pseudo_budg.sh +++ b/tests/pseudo_budg.sh @@ -56,5 +56,8 @@ cat > $tempRef << EOF EOF diff $tempRef $tempOut +# Count +count=`${tools_dir}/grib_count ${data_dir}/budg` +[ $count -eq 1 ] rm -f $tempRef $tempOut $tempBud diff --git a/tests/pseudo_diag.sh b/tests/pseudo_diag.sh index 6b830be01..50208a45e 100755 --- a/tests/pseudo_diag.sh +++ b/tests/pseudo_diag.sh @@ -25,6 +25,10 @@ sample=$ECCODES_SAMPLES_PATH/diag.tmpl ${tools_dir}/grib_ls $sample > $REDIRECT ${tools_dir}/grib_dump $sample > $REDIRECT +count=`${tools_dir}/grib_count $sample` +[ $count -eq 1 ] + + echo "Check setting integer keys..." # ---------------------------------- echo 'set numberOfIntegers=3; set integerValues={55, 44, 66}; write;' | ${tools_dir}/grib_filter -o $tempOut - $sample diff --git a/tests/unit_tests.cc b/tests/unit_tests.cc index 25ab24e88..6ea0b2d15 100644 --- a/tests/unit_tests.cc +++ b/tests/unit_tests.cc @@ -439,13 +439,57 @@ static void test_dates() Assert( !is_date_valid(2000, 5, 9, 0, 1, 60) ); Assert( !is_date_valid(2023, 2, 29, 0,0,0) );//Feb +} + +void test_scale_factor_scaled_values() +{ + int err =0; + int64_t value, factor; + const int64_t scaled_value_max = 4294967295; // usually 4 octets + const int64_t scale_factor_max = 255; // usually 1 octet + printf("Testing: scaled values and scale factors...\n"); + + err = compute_scaled_value_and_scale_factor(0, scaled_value_max, scale_factor_max, &value, &factor); + Assert(!err); + Assert(value == 0); + Assert(factor == 0); + + err = compute_scaled_value_and_scale_factor(1, scaled_value_max, scale_factor_max, &value, &factor); + Assert(!err); + Assert(value == 1); + Assert(factor == 0); + + err = compute_scaled_value_and_scale_factor(1.5, scaled_value_max, scale_factor_max, &value, &factor); + Assert(!err); + Assert(value == 15); + Assert(factor == 1); + + err = compute_scaled_value_and_scale_factor(4.56, scaled_value_max, scale_factor_max, &value, &factor); + Assert(!err); + Assert(value == 456); + Assert(factor == 2); + + err = compute_scaled_value_and_scale_factor(-0.003, scaled_value_max, scale_factor_max, &value, &factor); + Assert(!err); + Assert(value == -3); + Assert(factor == 3); + + err = compute_scaled_value_and_scale_factor(145.889, scaled_value_max, scale_factor_max, &value, &factor); + Assert(!err); + Assert(value == 145889); + Assert(factor == 3); + err = compute_scaled_value_and_scale_factor(1111.00009, scaled_value_max, scale_factor_max, &value, &factor); + Assert(!err); + Assert(value == 111100009); + Assert(factor == 5); } int main(int argc, char** argv) { printf("Doing unit tests. ecCodes version = %ld\n", grib_get_api_version()); + test_scale_factor_scaled_values(); test_dates(); test_logging_proc(); test_grib_binary_search(); diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 45818a0e8..e9b3d4af9 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -91,15 +91,17 @@ ecbuild_add_executable( TARGET codes_bufr_filter LIBS ecc_tools ) -# grib1to2 script needs to be generated before installation if( ECCODES_INSTALL_EXTRA_TOOLS ) ecbuild_info("ECCODES_INSTALL_EXTRA_TOOLS enabled") + # grib1to2 script needs to be generated before installation configure_file( grib1to2.in grib1to2 ) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/grib1to2 DESTINATION ${INSTALL_BIN_DIR} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ ) +else() + ecbuild_info("ECCODES_INSTALL_EXTRA_TOOLS disabled") endif() ######################################## diff --git a/tools/bufr_compare.cc b/tools/bufr_compare.cc index fd332aa94..5f56254bd 100644 --- a/tools/bufr_compare.cc +++ b/tools/bufr_compare.cc @@ -652,7 +652,7 @@ static char* get_keyname_without_rank(const char* name) if (*p == '#') { strtol(++p, &pEnd, 10); if (*pEnd != '#') { - DebugAssert(!"Badly formed rank in key"); + DEBUG_ASSERT(!"Badly formed rank in key"); } else { /* Take everything after 2nd '#' */ @@ -1398,7 +1398,7 @@ static int compare_handles(grib_handle* handle1, grib_handle* handle2, grib_runt if (size1 == size2 && !(memcmp_ret = memcmp(msg1, msg2, size1))) { return 0; } -#if 0 +#if defined(BUFR_COMPARE_BYTES) else { int lcount=count,ii; if (options->current_infile) lcount=options->current_infile->filter_handle_count; diff --git a/tools/bufr_copy.cc b/tools/bufr_copy.cc index 7b91cab1a..af1bc712c 100644 --- a/tools/bufr_copy.cc +++ b/tools/bufr_copy.cc @@ -61,15 +61,6 @@ int grib_tool_before_getopt(grib_runtime_options* options) int grib_tool_init(grib_runtime_options* options) { -#if 0 - if (options->outfile && options->outfile->name) { - options->outfile->file = fopen(options->outfile->name,"w"); - if(!options->outfile->file) { - perror(options->outfile->name); - exit(1); - } - } -#endif /* ECC-657: If user supplied -p to print some keys, turn on verbose */ if (grib_options_on("p:")) { if (grib_options_get_option("p:")) { diff --git a/tools/bufr_ls.cc b/tools/bufr_ls.cc index 556d85407..f86319e22 100644 --- a/tools/bufr_ls.cc +++ b/tools/bufr_ls.cc @@ -66,7 +66,7 @@ int grib_tool_before_getopt(grib_runtime_options* options) */ int grib_tool_init(grib_runtime_options* options) { - DebugAssert(!options->latlon); + DEBUG_ASSERT(!options->latlon); return 0; } diff --git a/tools/bufr_set.cc b/tools/bufr_set.cc index 272e78592..38c41dd1b 100644 --- a/tools/bufr_set.cc +++ b/tools/bufr_set.cc @@ -76,15 +76,14 @@ int grib_tool_init(grib_runtime_options* options) exit(1); } -#if 0 - if (options->outfile && options->outfile->name) { - options->outfile->file = fopen(options->outfile->name,"w"); - if(!options->outfile->file) { - perror(options->outfile->name); - exit(1); - } - } -#endif + // if (options->outfile && options->outfile->name) { + // options->outfile->file = fopen(options->outfile->name,"w"); + // if(!options->outfile->file) { + // perror(options->outfile->name); + // exit(1); + // } + // } + return 0; } diff --git a/tools/codes_count.cc b/tools/codes_count.cc index bb2926b9a..c96ba374d 100644 --- a/tools/codes_count.cc +++ b/tools/codes_count.cc @@ -19,7 +19,8 @@ static void usage(const char* prog) exit(1); } -static int count_messages(FILE* in, int message_type, unsigned long* count) +// This version uses malloc and reads the whole contents of each message +static int count_messages_slow(FILE* in, int message_type, unsigned long* count) { void* mesg = NULL; size_t size = 0; @@ -29,9 +30,6 @@ static int count_messages(FILE* in, int message_type, unsigned long* count) wmo_read_proc wmo_read = NULL; grib_context* c = grib_context_get_default(); - if (!in) - return 1; - /* printf("message_type=%d\n", message_type); */ if (message_type == CODES_GRIB) wmo_read = wmo_read_grib_from_file_malloc; else if (message_type == CODES_BUFR) @@ -51,10 +49,10 @@ static int count_messages(FILE* in, int message_type, unsigned long* count) int done = 0; while (!done) { mesg = wmo_read(in, 0, &size, &offset, &err); - /*printf("Count so far=%ld, mesg=%x, err=%d (%s)\n", *count, mesg, err, grib_get_error_message(err));*/ + // printf("Count so far=%ld, mesg=%x, err=%d (%s)\n", *count, mesg, err, grib_get_error_message(err)); if (!mesg) { if (err == GRIB_END_OF_FILE || err == GRIB_PREMATURE_END_OF_FILE) { - done = 1; /* reached the end */ + done = 1; // reached the end } } if (mesg && !err) { @@ -72,6 +70,52 @@ static int count_messages(FILE* in, int message_type, unsigned long* count) return err; } +// This version does not store the message contents (no malloc). Much faster +static int count_messages_fast(FILE* in, int message_type, unsigned long* count) +{ + int err = GRIB_SUCCESS; + // Signature: FILE* f, size_t* msg_len, off_t* msg_offset + typedef int (*wmo_read_proc)(FILE* , size_t*, off_t*); + wmo_read_proc wmo_read = NULL; + size_t msg_len = 0; + off_t msg_offset = 0; + + if (message_type == CODES_GRIB) + wmo_read = wmo_read_grib_from_file_fast; + else if (message_type == CODES_BUFR) + wmo_read = wmo_read_bufr_from_file_fast; + else if (message_type == CODES_GTS) + wmo_read = wmo_read_gts_from_file_fast; + else + wmo_read = wmo_read_any_from_file_fast; + + if (fail_on_error) { + while ((err = wmo_read(in, &msg_len, &msg_offset)) == GRIB_SUCCESS) { + //printf("%zu %ld\n", msg_len,msg_offset); + (*count)++; + } + } + else { + int done = 0; + while (!done) { + err = wmo_read(in, &msg_len, &msg_offset); + if (err) { + if (err == GRIB_END_OF_FILE || err == GRIB_PREMATURE_END_OF_FILE) { + done = 1; // reached the end + } + } + else { + (*count)++; + } + } + } + + if (err == GRIB_END_OF_FILE) + err = GRIB_SUCCESS; + + return err; +} + int main(int argc, char* argv[]) { FILE* infh = NULL; @@ -79,7 +123,9 @@ int main(int argc, char* argv[]) int i, verbose = 0; int err = 0, files_processed = 0; unsigned long count_total = 0, count_curr = 0; - int message_type = 0; /* GRIB, BUFR etc */ + int message_type = 0; // GRIB, BUFR etc + typedef int (*count_proc)(FILE*, int, unsigned long*); + count_proc do_count = count_messages_fast; toolname = argv[0]; if (argc < 2) @@ -108,17 +154,20 @@ int main(int argc, char* argv[]) continue; } - if (strcmp(filename, "-") == 0) + if (strcmp(filename, "-") == 0) { infh = stdin; - else + do_count = count_messages_slow; // cannot do fseek on stdin + } else { infh = fopen(filename, "rb"); + } if (!infh) { perror(filename); exit(1); } - files_processed = 1; /* At least one file processed */ + + files_processed = 1; // At least one file processed count_curr = 0; - err = count_messages(infh, message_type, &count_curr); + err = do_count(infh, message_type, &count_curr); if (err && fail_on_error) { fprintf(stderr, "Invalid message(s) found in %s", filename); if (count_curr > 0) @@ -126,7 +175,7 @@ int main(int argc, char* argv[]) fprintf(stderr, "\n"); exit(err); #ifdef DONT_EXIT_ON_BAD_APPLE - /* If we did not want to fail but warn and continue */ + // If we did not want to fail but warn and continue fclose(infh); continue; #endif diff --git a/tools/codes_export_resource.cc b/tools/codes_export_resource.cc index 1511ae762..400373d83 100644 --- a/tools/codes_export_resource.cc +++ b/tools/codes_export_resource.cc @@ -20,6 +20,10 @@ typedef enum ResourceType static void usage(const char* prog) { printf("Usage: %s [-s | -d] resource_path out_file\n", prog); + printf(" -s Extract a resource from the samples directory\n"); + printf(" -d Extract a resource from the definitions directory\n"); + printf("\n"); + printf(" E.g., %s -s GRIB2.tmpl my.grib2\n", prog); exit(1); } diff --git a/tools/grib_check_gaussian_grid.cc b/tools/grib_check_gaussian_grid.cc index 9a3aea661..ce944fa28 100644 --- a/tools/grib_check_gaussian_grid.cc +++ b/tools/grib_check_gaussian_grid.cc @@ -126,7 +126,6 @@ static int process_file(const char* filename) GRIB_CHECK(grib_get_long(h, "angleSubdivisions", &angleSubdivisions), 0); Assert(angleSubdivisions > 0); angular_tolerance = 1.0/angleSubdivisions; - printf(" angular_tolerance=%g\n",angular_tolerance); if (N <= 0) { error(filename, msg_num, "N should be > 0\n", N); diff --git a/tools/grib_compare.cc b/tools/grib_compare.cc index 8fe18585d..7e9d5e2f0 100644 --- a/tools/grib_compare.cc +++ b/tools/grib_compare.cc @@ -662,7 +662,7 @@ static int compare_values(grib_runtime_options* options, grib_handle* h1, grib_h printf(" comparing %s", name); /* If key was blocklisted, then we should not have got here */ - DebugAssert(!blocklisted(name)); + DEBUG_ASSERT(!blocklisted(name)); if (type1 == GRIB_TYPE_UNDEFINED && (err = grib_get_native_type(h1, name, &type1)) != GRIB_SUCCESS) { printInfo(h1); @@ -1154,14 +1154,6 @@ static int compare_handles(grib_handle* h1, grib_handle* h2, grib_runtime_option } */ } -#if 0 - { - long of1,of2; /* Debugging: print offset of each handle */ - grib_get_long(h1, "offset", &of1); grib_get_long(h2, "offset", &of2); - printf("of1=%lu of2=%lu\n",of1,of2); - } -#endif - if (headerMode) { const void *msg1 = NULL, *msg2 = NULL; size_t size1 = 0, size2 = 0; diff --git a/tools/grib_copy.cc b/tools/grib_copy.cc index c80cdd62c..20823e2a5 100644 --- a/tools/grib_copy.cc +++ b/tools/grib_copy.cc @@ -65,15 +65,6 @@ int grib_tool_before_getopt(grib_runtime_options* options) int grib_tool_init(grib_runtime_options* options) { -#if 0 - if (options->outfile && options->outfile->name) { - options->outfile->file = fopen(options->outfile->name,"w"); - if(!options->outfile->file) { - perror(options->outfile->name); - exit(1); - } - } -#endif /* ECC-657: If user supplied -p to print some keys, turn on verbose */ if (grib_options_on("p:")) { if (grib_options_get_option("p:")) { diff --git a/tools/grib_options.cc b/tools/grib_options.cc index affc49efc..6f1af95fe 100644 --- a/tools/grib_options.cc +++ b/tools/grib_options.cc @@ -481,27 +481,25 @@ void usage_doxygen(void) exit(1); } -#if 0 -void usage_doxygen(void) { - int i=0; - printf("/*! \\page %s %s\n",tool_name,tool_name); - printf("\\section DESCRIPTION \n%s\n\n",tool_description); - printf("\\section USAGE \n%s \n%s\n\n",tool_name,tool_usage); - printf("\\section OPTIONS\n"); - printf("\n"); - for (i=0;i\n"); - printf("\n", - grib_options[i].id[0], - grib_options_get_args(grib_options[i].id)); - printf("\n"); - printf("", - grib_options_get_help(grib_options[i].id)); - printf("\n"); - } - } - printf("
-%c %s
%s
\n"); - exit(1); -} -#endif +// void usage_doxygen(void) { +// int i=0; +// printf("/*! \\page %s %s\n",tool_name,tool_name); +// printf("\\section DESCRIPTION \n%s\n\n",tool_description); +// printf("\\section USAGE \n%s \n%s\n\n",tool_name,tool_usage); +// printf("\\section OPTIONS\n"); +// printf("\n"); +// for (i=0;i\n"); +// printf("\n", +// grib_options[i].id[0], +// grib_options_get_args(grib_options[i].id)); +// printf("\n"); +// printf("", +// grib_options_get_help(grib_options[i].id)); +// printf("\n"); +// } +// } +// printf("
-%c %s
%s
\n"); +// exit(1); +// } diff --git a/tools/grib_set.cc b/tools/grib_set.cc index 1c4ace444..a8e562a21 100644 --- a/tools/grib_set.cc +++ b/tools/grib_set.cc @@ -80,15 +80,13 @@ int grib_tool_init(grib_runtime_options* options) exit(1); } -#if 0 - if (options->outfile && options->outfile->name) { - options->outfile->file = fopen(options->outfile->name,"w"); - if(!options->outfile->file) { - perror(options->outfile->name); - exit(1); - } - } -#endif +// if (options->outfile && options->outfile->name) { +// options->outfile->file = fopen(options->outfile->name,"w"); +// if(!options->outfile->file) { +// perror(options->outfile->name); +// exit(1); +// } +// } return 0; } diff --git a/tools/grib_to_netcdf.cc b/tools/grib_to_netcdf.cc index a9af32dbd..e223a4c79 100644 --- a/tools/grib_to_netcdf.cc +++ b/tools/grib_to_netcdf.cc @@ -12,7 +12,7 @@ #ifdef HAVE_NETCDF -#include +#include #include #include #include @@ -1744,15 +1744,12 @@ static hypercube* new_hypercube_from_mars_request(const request* r) struct stuff_1 s; -#if 0 - const request *lang = mars_language_from_request(r); - int count = 0; - - count = init_axis(lang); - grib_context_log(ctx,GRIB_LOG_DEBUG,"cube %s",r->kind); - /* print_all_requests(mars_language_from_request(r)); */ - grib_context_log(ctx,GRIB_LOG_INFO,"NUMBER(axis): %d, number axisnew: %d",NUMBER(axis),count); -#endif +// const request *lang = mars_language_from_request(r); +// int count = 0; +// count = init_axis(lang); +// grib_context_log(ctx,GRIB_LOG_DEBUG,"cube %s",r->kind); +// /* print_all_requests(mars_language_from_request(r)); */ +// grib_context_log(ctx,GRIB_LOG_INFO,"NUMBER(axis): %d, number axisnew: %d",NUMBER(axis),count); s.c = new_hypercube(r); s.r = clone_one_request(r); @@ -2248,7 +2245,7 @@ static int def_latlon(int ncid, fieldset* fs) field* g = get_field(fs, 0, expand_mem); - DebugAssert(check_grid(g) == GRIB_SUCCESS); + DEBUG_ASSERT(check_grid(g) == GRIB_SUCCESS); if ((e = get_num_latitudes_longitudes(g->handle, &nlats, &nlons)) != GRIB_SUCCESS) { grib_context_log(ctx, GRIB_LOG_ERROR, "ecCodes: cannot get lat/lon info: %s", grib_get_error_message(e)); @@ -2632,8 +2629,8 @@ static void scale(double* vals, long n, void* data, dataset_t* g) return; } */ - DebugAssert(vals); - DebugAssert(n > 0); + DEBUG_ASSERT(vals); + DEBUG_ASSERT(n > 0); if (!vals) return; switch (nctype) { @@ -2817,9 +2814,7 @@ static int put_data(hypercube* h, int ncid, const char* name, dataset_t* subset) return e; } -#if 0 - bool missing = (g->ksec4[0] < 0); /* If negative number of values, field is missing */ -#endif + // bool missing = (g->ksec4[0] < 0); /* If negative number of values, field is missing */ r = field_to_request(g); if (!missing) { @@ -3119,14 +3114,12 @@ static int define_netcdf_dimensions(hypercube* h, fieldset* fs, int ncid, datase check_err("nc_put_att_text", stat, __LINE__); } -#if 0 - if(subsets[i].att.other) - { - const char *txt = subsets[i].att.long_name; - stat = nc_put_att_text(ncid, var_id, "other",strlen(txt),txt); - check_err("nc_put_att_text", stat,__LINE__,__FILE__); - } -#endif + // if(subsets[i].att.other) + // { + // const char *txt = subsets[i].att.long_name; + // stat = nc_put_att_text(ncid, var_id, "other",strlen(txt),txt); + // check_err("nc_put_att_text", stat,__LINE__,__FILE__); + // } if (subsets[i].att.metadata) { parameter* p = subsets[i].att.metadata->params; @@ -3200,13 +3193,10 @@ static int define_netcdf_dimensions(hypercube* h, fieldset* fs, int ncid, datase stat = nc_put_att_text(ncid, NC_GLOBAL, "history", strlen(history), history); check_err("nc_put_att_text", stat, __LINE__); -#if 0 - stat = nc_put_att_text(ncid, NC_GLOBAL, "source",strlen(setup.source),setup.source); - check_err(stat,__LINE__,__FILE__); - - stat = nc_put_att_text(ncid, NC_GLOBAL, "institution",strlen(institution),institution); - check_err(stat,__LINE__,__FILE__); -#endif + //stat = nc_put_att_text(ncid, NC_GLOBAL, "source",strlen(setup.source),setup.source); + //check_err(stat,__LINE__,__FILE__); + //stat = nc_put_att_text(ncid, NC_GLOBAL, "institution",strlen(institution),institution); + //check_err(stat,__LINE__,__FILE__); if (setup.title) { stat = nc_put_att_text(ncid, NC_GLOBAL, "title", strlen(setup.title), setup.title); diff --git a/tools/gts_compare.cc b/tools/gts_compare.cc index e0237af03..0ae081661 100644 --- a/tools/gts_compare.cc +++ b/tools/gts_compare.cc @@ -900,28 +900,26 @@ static int compare_handles(grib_handle* h1, grib_handle* h2, grib_runtime_option if (size1 == size2 && !(memcmp_ret = memcmp(msg1, msg2, size1))) { return 0; } -#if 0 - else { - int lcount=count,ii; - if (options->current_infile) lcount=options->current_infile->filter_handle_count; - if (size1 != size2) { - printf("#%d different size: %d!=%d\n",lcount,(int)size1,(int)size2); - } - if (memcmp_ret) { - unsigned char *m1=(unsigned char*)msg1; - unsigned char *m2=(unsigned char*)msg2; - printf("=== list of different bytes for message %d\n",lcount); - for (ii=0;iicurrent_infile) lcount=options->current_infile->filter_handle_count; +// if (size1 != size2) { +// printf("#%d different size: %d!=%d\n",lcount,(int)size1,(int)size2); +// } +// if (memcmp_ret) { +// unsigned char *m1=(unsigned char*)msg1; +// unsigned char *m2=(unsigned char*)msg2; +// printf("=== list of different bytes for message %d\n",lcount); +// for (ii=0;iicompare_count; i++) { diff --git a/tools/gts_copy.cc b/tools/gts_copy.cc index eba1bc438..92dfe4530 100644 --- a/tools/gts_copy.cc +++ b/tools/gts_copy.cc @@ -57,15 +57,6 @@ int grib_tool_before_getopt(grib_runtime_options* options) int grib_tool_init(grib_runtime_options* options) { -#if 0 - if (options->outfile && options->outfile->name) { - options->outfile->file = fopen(options->outfile->name,"w"); - if(!options->outfile->file) { - perror(options->outfile->name); - exit(1); - } - } -#endif return 0; } @@ -107,11 +98,6 @@ void grib_tool_print_key_values(grib_runtime_options* options, grib_handle* h) int grib_tool_finalise_action(grib_runtime_options* options) { - /* - if (options->outfile->file) { - fclose(options->outfile->file); - } - */ return 0; } diff --git a/tools/metar_compare.cc b/tools/metar_compare.cc index eaf031092..097efd61c 100644 --- a/tools/metar_compare.cc +++ b/tools/metar_compare.cc @@ -20,7 +20,6 @@ grib_option grib_options[] = { { "S:", "start", "First field to be processed.\n", 0, 1, 0 }, { "E:", "end", "Last field to be processed.\n", 0, 1, 0 }, { "a", 0, "-c option modifier. The keys listed with the option -c will be added to the list of keys compared without -c.\n", 0, 1, 0 }, - { "H", 0, "Compare only message headers. Bit-by-bit compare on. Incompatible with -c option.\n", 0, 1, 0 }, { "R:", 0, 0, 0, 1, 0 }, { "A:", 0, 0, 0, 1, 0 }, { "P", 0, "Compare data values using the packing error as tolerance.\n", 0, 1, 0 }, @@ -85,7 +84,6 @@ static int lastPrint = 0; static int force = 0; static double maxAbsoluteError = 1e-19; static int onlyListed = 1; -static int headerMode = 0; static int morein1 = 0; static int morein2 = 0; static int listFromCommandLine; @@ -231,11 +229,6 @@ int grib_tool_init(grib_runtime_options* options) else onlyListed = 1; - if (grib_options_on("H")) - headerMode = 1; - else - headerMode = 0; - if (grib_options_on("H") && grib_options_on("c:")) { printf("Error: -H and -c options are incompatible. Choose one of the two please.\n"); exit(1); @@ -1033,8 +1026,8 @@ static int compare_handles(grib_handle* h1, grib_handle* h2, grib_runtime_option grib_keys_iterator* iter = NULL; const char* name = NULL; - /* mask only if no -c option or headerMode (-H)*/ - if (blocklist && (!listFromCommandLine || headerMode)) { + /* mask only if no -c option (-H)*/ + if (blocklist && !listFromCommandLine) { grib_string_list* nextb = blocklist; while (nextb) { grib_clear(h1, nextb->value); @@ -1043,45 +1036,6 @@ static int compare_handles(grib_handle* h1, grib_handle* h2, grib_runtime_option } } - if (headerMode) { - const void *msg1 = NULL, *msg2 = NULL; - size_t size1 = 0, size2 = 0; - grib_handle *h11, *h22; - GRIB_CHECK_NOLINE(grib_get_message_headers(h1, &msg1, &size1), 0); - GRIB_CHECK_NOLINE(grib_get_message_headers(h2, &msg2, &size2), 0); - if (size1 == size2 && !memcmp(msg1, msg2, size1)) - return 0; - - err = 0; - h11 = grib_handle_new_from_partial_message(h1->context, msg1, size1); - h22 = grib_handle_new_from_partial_message(h1->context, msg2, size2); - - iter = grib_keys_iterator_new(h11, - GRIB_KEYS_ITERATOR_SKIP_COMPUTED, NULL); - - if (!iter) { - printf("ERROR: unable to get iterator\n"); - exit(1); - } - - while (grib_keys_iterator_next(iter)) { - name = grib_keys_iterator_get_name(iter); - /*printf("----- comparing %s\n",name);*/ - - if (blocklisted(name)) - continue; - if (compare_values(options, h11, h22, name, GRIB_TYPE_UNDEFINED)) { - err++; - write_messages(h11, h22); - } - } - - grib_keys_iterator_delete(iter); - grib_handle_delete(h11); - grib_handle_delete(h22); - return err; - } - if (listFromCommandLine && onlyListed) { for (i = 0; i < options->compare_count; i++) { if (blocklisted((char*)options->compare[i].name)) @@ -1122,28 +1076,6 @@ static int compare_handles(grib_handle* h1, grib_handle* h2, grib_runtime_option if (size1 == size2 && !(memcmp_ret = memcmp(msg1, msg2, size1))) { return 0; } -#if 0 - else { - int lcount=count,ii; - if (options->current_infile) lcount=options->current_infile->filter_handle_count; - if (size1 != size2) { - printf("#%d different size: %d!=%d\n",lcount,(int)size1,(int)size2); - } - if (memcmp_ret) { - unsigned char *m1=(unsigned char*)msg1; - unsigned char *m2=(unsigned char*)msg2; - printf("=== list of different bytes for message %d\n",lcount); - for (ii=0;iicompare_count; i++) { diff --git a/tools/metar_copy.cc b/tools/metar_copy.cc index c9835eeb2..ce3ada95d 100644 --- a/tools/metar_copy.cc +++ b/tools/metar_copy.cc @@ -57,15 +57,6 @@ int grib_tool_before_getopt(grib_runtime_options* options) int grib_tool_init(grib_runtime_options* options) { -#if 0 - if (options->outfile && options->outfile->name) { - options->outfile->file = fopen(options->outfile->name,"w"); - if(!options->outfile->file) { - perror(options->outfile->name); - exit(1); - } - } -#endif return 0; } @@ -107,11 +98,6 @@ void grib_tool_print_key_values(grib_runtime_options* options, grib_handle* h) int grib_tool_finalise_action(grib_runtime_options* options) { - /* - if (options->outfile->file) { - fclose(options->outfile->file); - } - */ return 0; }