Skip to content

Commit

Permalink
Reverting grib_field_large_position
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvielamythepaut committed Nov 24, 2023
1 parent 5950f35 commit 8244a4d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 15 deletions.
7 changes: 0 additions & 7 deletions src/attributes/GribDecoderAttributes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ GribDecoderAttributes::GribDecoderAttributes():
expver_(ParameterManager::getBool("grib_text_experiment")),
units_(ParameterManager::getBool("grib_text_units")),
field_position_(ParameterManager::getInt("grib_field_position")),
large_field_position_(ParameterManager::getULong("grib_field_large_position")),
position_1_(ParameterManager::getInt("grib_wind_position_1")),
position_2_(ParameterManager::getInt("grib_wind_position_2")),
colour_position_(ParameterManager::getInt("grib_wind_position_colour")),
Expand Down Expand Up @@ -87,7 +86,6 @@ void GribDecoderAttributes::set(const std::map<string, string>& params)
setAttribute(prefix, "grib_text_experiment", expver_, params);
setAttribute(prefix, "grib_text_units", units_, params);
setAttribute(prefix, "grib_field_position", field_position_, params);
setAttribute(prefix, "grib_field_large_position", large_field_position_, params);
setAttribute(prefix, "grib_wind_position_1", position_1_, params);
setAttribute(prefix, "grib_wind_position_2", position_2_, params);
setAttribute(prefix, "grib_wind_position_colour", colour_position_, params);
Expand Down Expand Up @@ -120,7 +118,6 @@ void GribDecoderAttributes::copy(const GribDecoderAttributes& other)
expver_ = other.expver_;
units_ = other.units_;
field_position_ = other.field_position_;
large_field_position_ = other.large_field_position_;
position_1_ = other.position_1_;
position_2_ = other.position_2_;
colour_position_ = other.colour_position_;
Expand Down Expand Up @@ -193,7 +190,6 @@ void GribDecoderAttributes::print(ostream& out) const
out << " expver = " << expver_;
out << " units = " << units_;
out << " field_position = " << field_position_;
out << " large_field_position = " << large_field_position_;
out << " position_1 = " << position_1_;
out << " position_2 = " << position_2_;
out << " colour_position = " << colour_position_;
Expand Down Expand Up @@ -243,8 +239,6 @@ void GribDecoderAttributes::toxml(ostream& out) const
niceprint(out,units_);
out << ", \"grib_field_position\":";
niceprint(out,field_position_);
out << ", \"grib_field_large_position\":";
niceprint(out,large_field_position_);
out << ", \"grib_wind_position_1\":";
niceprint(out,position_1_);
out << ", \"grib_wind_position_2\":";
Expand Down Expand Up @@ -284,7 +278,6 @@ static MagicsParameter<int> grib_interpolation_method_missing_fill_count("grib_i
static MagicsParameter<string> grib_text_experiment("grib_text_experiment", "off");
static MagicsParameter<string> grib_text_units("grib_text_units", "off");
static MagicsParameter<int> grib_field_position("grib_field_position", 1);
static MagicsParameter<unsigned long long> grib_field_large_position("grib_field_large_position", 0);
static MagicsParameter<int> grib_wind_position_1("grib_wind_position_1", 1);
static MagicsParameter<int> grib_wind_position_2("grib_wind_position_2", -1);
static MagicsParameter<int> grib_wind_position_colour("grib_wind_position_colour", -1);
Expand Down
1 change: 0 additions & 1 deletion src/attributes/GribDecoderAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class GribDecoderAttributes
bool expver_;
bool units_;
int field_position_;
unsigned long long large_field_position_;
int position_1_;
int position_2_;
int colour_position_;
Expand Down
4 changes: 0 additions & 4 deletions src/attributes/GribDecoderWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ void GribDecoderWrapper::set(const MagRequest& request)
int field_position_value = request("GRIB_FIELD_POSITION");
gribdecoder_->field_position_ = field_position_value;
}
if (request.countValues("GRIB_FIELD_LARGE_POSITION") ) {
unsigned long long large_field_position_value = request("GRIB_FIELD_LARGE_POSITION");
gribdecoder_->large_field_position_ = large_field_position_value;
}
if (request.countValues("GRIB_WIND_POSITION_1") ) {
int position_1_value = request("GRIB_WIND_POSITION_1");
gribdecoder_->position_1_ = position_1_value;
Expand Down
3 changes: 2 additions & 1 deletion src/decoders/GribDecoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,8 @@ void GribDecoder::decode2D(const Transformation&) {

void GribDecoder::openField() {

current_position_ = (large_field_position_) ? large_field_position_ : field_position_;
// current_position_ = (large_field_position_) ? large_field_position_ : field_position_;
current_position_ = field_position_;
current_file_name_ = file_name_;

field_ = open(field_);
Expand Down
4 changes: 2 additions & 2 deletions src/params/GribDecoder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ does it submit to any jurisdiction.
name="grib_field_position">
<documentation>The position in the input file of a field other than a wind component</documentation>
</parameter>
<parameter member="large_field_position"
<!--parameter member="large_field_position"
to="unsigned long long"
default="0"
from="unsigned long long"
name="grib_field_large_position">
<documentation>used when the offset is too big</documentation>
</parameter>
</parameter-->
<parameter member="position_1"
to="int"
default="1"
Expand Down

0 comments on commit 8244a4d

Please sign in to comment.