diff --git a/definitions/bufr/section.1.1.def b/definitions/bufr/section.1.1.def index 5225792c7..578cd29aa 100644 --- a/definitions/bufr/section.1.1.def +++ b/definitions/bufr/section.1.1.def @@ -7,7 +7,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # -codetable[2] originatingCentrer 'grib1/0.table' : dump; +codetable[2] bufrHeaderOriginatingCentre 'grib1/0.table' : dump; unsigned[1] updateSequenceNumber; flags[1] section1Flags 'bufr/section1_flags.table' = 128 : hidden ; # = section 2 present diff --git a/definitions/bufr/section.1.2.def b/definitions/bufr/section.1.2.def index ed8acc00f..ad7c077cd 100644 --- a/definitions/bufr/section.1.2.def +++ b/definitions/bufr/section.1.2.def @@ -13,7 +13,7 @@ section_length[3] section1Length ; unsigned[1] masterTableNumber; -codetable[2] centre 'grib1/0.table' : dump; +codetable[2] bufrHeaderCentre 'grib1/0.table' : dump; unsigned[1] updateSequenceNumber; diff --git a/definitions/bufr/section.1.3.def b/definitions/bufr/section.1.3.def index 7d0e4cc82..841fee494 100644 --- a/definitions/bufr/section.1.3.def +++ b/definitions/bufr/section.1.3.def @@ -13,8 +13,8 @@ section_length[3] section1Length ; unsigned[1] masterTableNumber; -codetable[1] subCentre 'grib1/0.table' : dump; -unsigned[1] centre : dump; +codetable[1] bufrHeaderSubCentre 'grib1/0.table' : dump; +unsigned[1] bufrHeaderCentre : dump; unsigned[1] updateSequenceNumber; diff --git a/definitions/bufr/section.1.4.def b/definitions/bufr/section.1.4.def index 14daaec4c..4a5e6cd84 100644 --- a/definitions/bufr/section.1.4.def +++ b/definitions/bufr/section.1.4.def @@ -13,9 +13,9 @@ section_length[3] section1Length ; unsigned[1] masterTableNumber; -codetable[2] centre 'grib1/0.table' : dump; -unsigned[2] subCentre : dump; -alias ls.centre=centre; +codetable[2] bufrHeaderCentre 'grib1/0.table' : dump; +unsigned[2] bufrHeaderSubCentre : dump; +alias ls.centre=bufrHeaderCentre; unsigned[1] updateSequenceNumber; diff --git a/definitions/bufr/section.2.def b/definitions/bufr/section.2.def index ce1ad306b..7e0416d3d 100644 --- a/definitions/bufr/section.2.def +++ b/definitions/bufr/section.2.def @@ -9,7 +9,7 @@ section_length[3] section2Length ; unsigned[1] reserved = 0; -if(centre == 98) { +if(bufrHeaderCentre == 98) { if (section2Length==52) { template rdb_key "bufr/rdb_key.def"; } diff --git a/definitions/bufr/section.3.def b/definitions/bufr/section.3.def index d152e2ecf..c119db667 100644 --- a/definitions/bufr/section.3.def +++ b/definitions/bufr/section.3.def @@ -9,7 +9,7 @@ constant defaultSequence=0; constant tablesMasterDir="bufr/tables/[masterTableNumber]/wmo/[masterTablesVersionNumber]" : hidden; -constant tablesLocalDir="bufr/tables/[masterTableNumber]/local/[localTablesVersionNumber]/[centre:l]/[subCentre]" : hidden; +constant tablesLocalDir="bufr/tables/[masterTableNumber]/local/[localTablesVersionNumber]/[bufrHeaderCentre:l]/[bufrHeaderSubCentre]" : hidden; constant rootTablesDir="bufr/tables" : hidden; transient tableNumber=0; @@ -25,7 +25,7 @@ unsigned[1] reserved = 0; unsigned[2] numberOfSubsets : dump; alias ls.numberOfSubsets=numberOfSubsets; -if (section2Present && centre==98 && section2Length==52) { +if (section2Present && bufrHeaderCentre==98 && section2Length==52) { concept isSatelliteType(zero) { 1 = {rdbType = 2; } diff --git a/examples/C/bufr_clone.c b/examples/C/bufr_clone.c index 49203f04f..1cc90da55 100644 --- a/examples/C/bufr_clone.c +++ b/examples/C/bufr_clone.c @@ -75,9 +75,9 @@ int main(int argc, char *argv[]) } /* This is the place where you may wish to modify the clone - E.g. we change the centre */ + E.g. we change the bufrHeaderCentre */ - CODES_CHECK(codes_set_long(clone_handle, "centre", 222),0); + CODES_CHECK(codes_set_long(clone_handle, "bufrHeaderCentre", 222),0); /* get the coded message in a buffer */ CODES_CHECK(codes_get_message(clone_handle,&buffer,&size),0); diff --git a/examples/C/bufr_print_header.c b/examples/C/bufr_print_header.c index 7c4241c82..5f54957f3 100644 --- a/examples/C/bufr_print_header.c +++ b/examples/C/bufr_print_header.c @@ -64,11 +64,11 @@ int main(int argc,char* argv[]) CODES_CHECK(codes_get_long(h,"typicalDate",&longVal),0); printf(" typicalDate: %ld\n",longVal); - CODES_CHECK(codes_get_long(h,"centre",&longVal),0); - printf(" centre: %ld\n",longVal); + CODES_CHECK(codes_get_long(h,"bufrHeaderCentre",&longVal),0); + printf(" bufrHeaderCentre: %ld\n",longVal); - CODES_CHECK(codes_get_long(h,"subCentre",&longVal),0); - printf(" subCentre: %ld\n",longVal); + CODES_CHECK(codes_get_long(h,"bufrHeaderSubCentre",&longVal),0); + printf(" bufrHeaderSubCentre: %ld\n",longVal); CODES_CHECK(codes_get_long(h,"masterTablesVersionNumber",&longVal),0); printf(" masterTablesVersionNumber: %ld\n",longVal); diff --git a/examples/C/bufr_print_header.sh b/examples/C/bufr_print_header.sh index 869ed246d..c34fbaf28 100755 --- a/examples/C/bufr_print_header.sh +++ b/examples/C/bufr_print_header.sh @@ -28,7 +28,7 @@ fRef=${f}.header.ref REDIRECT=/dev/null #Write the values into a file and compare with reference -${examples_dir}/bufr_print_header $f 2> $REDIRECT > $fTmp +${examples_dir}/bufr_print_header $f 2> $REDIRECT > $fTmp #We compare output to the reference by ignoring the whitespaces diff -w $fRef $fTmp >$REDIRECT 2> $REDIRECT diff --git a/examples/C/bufr_set_keys.c b/examples/C/bufr_set_keys.c index 11214f255..e42414448 100644 --- a/examples/C/bufr_set_keys.c +++ b/examples/C/bufr_set_keys.c @@ -69,20 +69,17 @@ int main(int argc,char* argv[]) /*CODES_CHECK(codes_set_long(h,"unpack",1),0);*/ /* This is the place where you may wish to modify the message*/ - /*E.g. we change the centre and 2m temperature */ + /*E.g. we change the centre */ - /* set centre */ + /* set bufrHeaderCentre */ longVal=222; - CODES_CHECK(codes_set_long(h, "centre", longVal),0); - printf(" set centre to: %ld\n",longVal); + CODES_CHECK(codes_set_long(h, "bufrHeaderCentre", longVal),0); + printf(" set bufrHeaderCentre to: %ld\n",longVal); - /* check centre */ - CODES_CHECK(codes_get_long(h,"centre",&longVal),0); - printf(" centre's new value is: %ld\n",longVal); + /* check bufrHeaderCentre */ + CODES_CHECK(codes_get_long(h,"bufrHeaderCentre",&longVal),0); + printf(" bufrHeaderCentre's new value is: %ld\n",longVal); - /*doubleVal=240.+i*2.; - CODES_CHECK(codes_set_double(h,"airTemperatureAt2M",doubleVal),0); - printf(" set airTemperatureAt2M to: %f\n",doubleVal);*/ /* get the modified message in a buffer */ CODES_CHECK(codes_get_message(h,&buffer,&size),0); diff --git a/examples/F90/bufr_clone.f90 b/examples/F90/bufr_clone.f90 index 0666714e3..a3c574e61 100644 --- a/examples/F90/bufr_clone.f90 +++ b/examples/F90/bufr_clone.f90 @@ -43,8 +43,8 @@ program bufr_clone call codes_clone(ibufr_in, ibufr_out) ! This is the place where you may wish to modify the clone - ! E.g. we change the centre - call codes_set(ibufr_out,'centre',222) + ! E.g. we change the bufrHeaderCentre + call codes_set(ibufr_out,'bufrHeaderCentre',222) ! write cloned messages to a file call codes_write(ibufr_out,outfile) diff --git a/examples/F90/bufr_print_header.f90 b/examples/F90/bufr_print_header.f90 index 4a6edf7a3..325c73917 100644 --- a/examples/F90/bufr_print_header.f90 +++ b/examples/F90/bufr_print_header.f90 @@ -45,11 +45,11 @@ integer(kind=4) :: numberofsubsets call codes_get(ibufr,'typicalDate',typicalDate); write(*,*) ' typicalDate:',typicalDate - call codes_get(ibufr,'centre',centre); - write(*,*) ' centre:',centre + call codes_get(ibufr,'bufrHeaderCentre',centre); + write(*,*) ' bufrHeaderCentre:',centre - call codes_get(ibufr,'subCentre',subcentre) - write(*,*) ' subCentre:',subcentre + call codes_get(ibufr,'bufrHeaderSubCentre',subcentre) + write(*,*) ' bufrHeaderSubCentre:',subcentre call codes_get(ibufr,'masterTablesVersionNumber',masterversion) write(*,*) ' masterTablesVersionNumber:',masterversion diff --git a/examples/F90/bufr_set_keys.f90 b/examples/F90/bufr_set_keys.f90 index 3d0405422..8b4ace530 100644 --- a/examples/F90/bufr_set_keys.f90 +++ b/examples/F90/bufr_set_keys.f90 @@ -36,17 +36,17 @@ program bufr_set_keys write(*,*) 'message: ',count ! This is the place where you may wish to modify the message - ! E.g. we change the centre and 2m temperature + ! E.g. we change the centre ! set centre centre=222 - call codes_set(ibufr,'centre',222) - write(*,*) ' set centre to:',centre + call codes_set(ibufr,'bufrHeaderCentre',222) + write(*,*) ' set bufrHeaderCentre to:',centre ! check centre's new value centreNew=0 - call codes_get(ibufr,'centre',centreNew) - write(*,*) ' centre''s new value:',centreNew + call codes_get(ibufr,'bufrHeaderCentre',centreNew) + write(*,*) ' bufrHeaderCentre''s new value:',centreNew ! write modified message to a file call codes_write(ibufr,outfile) diff --git a/examples/python/bufr_clone.py b/examples/python/bufr_clone.py index 6a4c785e4..0c901c250 100644 --- a/examples/python/bufr_clone.py +++ b/examples/python/bufr_clone.py @@ -44,7 +44,7 @@ def example(): clone_id = codes_clone(gid) # this is the place where you may wish to modify the clone - codes_set(clone_id,'centre',centre) + codes_set(clone_id,'bufrHeaderCentre',centre) # write the cloned message to a file codes_write(clone_id,fout) diff --git a/examples/python/bufr_print_header.py b/examples/python/bufr_print_header.py index fdf56e816..44b4177fc 100644 --- a/examples/python/bufr_print_header.py +++ b/examples/python/bufr_print_header.py @@ -32,8 +32,8 @@ def example(): 'dataCategory', 'dataSubCategory', 'typicalDate', - 'centre', - 'subCentre', + 'bufrHeaderCentre', + 'bufrHeaderSubCentre', 'masterTablesVersionNumber', 'localTablesVersionNumber', 'numberOfSubsets', diff --git a/examples/python/bufr_set_keys.py b/examples/python/bufr_set_keys.py index 52e53a901..3c48bd8ee 100644 --- a/examples/python/bufr_set_keys.py +++ b/examples/python/bufr_set_keys.py @@ -46,18 +46,18 @@ def example(): #codes_set(gid,'unpack',1); # This is the place where you may wish to modify the message - # E.g. we change the centre and 2m temperature + # E.g. we change the centre # set centre val=222 - print ' set centre to: %d' % val + print ' set bufrHeaderCentre to: %d' % val - key='centre' + key='bufrHeaderCentre' if not codes_is_defined(gid,key): raise Exception("Key: " + key + " was not defined") codes_set(gid,key,val) - #check centre's value + #check bufrHeaderCentre's value print ' %s''s new value is: %d' % (key,codes_get(gid,key)) # write modified message to output diff --git a/tests/bufr_filter.sh b/tests/bufr_filter.sh index 629780421..1ebfffc55 100755 --- a/tests/bufr_filter.sh +++ b/tests/bufr_filter.sh @@ -41,7 +41,7 @@ fRules=${label}.filter echo "Test: dump header" >> $fLog cat > $fRules <> $fLog echo "file: $f" >> $fLog -${tools_dir}/bufr_filter $fRules $f 2>> $fLog 1>> $fLog +${tools_dir}/bufr_filter $fRules $f #2>> $fLog 1>> $fLog ${tools_dir}/bufr_filter $fRules $f 2>> ${f}.log 1>> ${f}.log cat > ${f}.ref <>$fLog 1>>$fLog #Here 1024 is out of range for centre (it is 8-bit only) cat > $fRules <> $fLog echo "file: $f" >> $fLog result=`${tools_dir}/bufr_filter $fRules $f` -#[ "$result" = "centre=098, height= 3" ] +[ "$result" = "centre=098, height= 3" ] #---------------------------------------------------- diff --git a/tests/bufr_get.sh b/tests/bufr_get.sh index 67aeeb873..133f07e74 100755 --- a/tests/bufr_get.sh +++ b/tests/bufr_get.sh @@ -42,7 +42,7 @@ REDIRECT=/dev/null echo "Test: -p switch" >> $fLog echo "file: $f" >> $fLog -${tools_dir}/bufr_get -p totalLength,centre,subCentre,masterTableNumber,masterTablesVersionNumber,localTablesVersionNumber,numberOfSubsets,numberOfObservations $f > $fTmp +${tools_dir}/bufr_get -p totalLength,bufrHeaderCentre,bufrHeaderSubCentre,masterTableNumber,masterTablesVersionNumber,localTablesVersionNumber,numberOfSubsets,numberOfObservations $f > $fTmp #Write the values into a file and compare with ref cat $fTmp | awk '{split($0,a," "); for (i=1; i<=8; i++) print a[i]}' > $res_get diff --git a/tests/bufr_ls.sh b/tests/bufr_ls.sh index 6e8bfe5a0..3bb8ea32e 100755 --- a/tests/bufr_ls.sh +++ b/tests/bufr_ls.sh @@ -43,7 +43,7 @@ ref_ls=$f".ls.ref" res_ls=$f".ls.test" REDIRECT=/dev/null -${tools_dir}/bufr_ls -p totalLength,centre,subCentre,masterTableNumber,masterTablesVersionNumber,localTablesVersionNumber,numberOfSubsets,numberOfObservations $f 2> $REDIRECT > $fTmp +${tools_dir}/bufr_ls -p totalLength,bufrHeaderCentre,bufrHeaderSubCentre,masterTableNumber,masterTablesVersionNumber,localTablesVersionNumber,numberOfSubsets,numberOfObservations $f 2> $REDIRECT > $fTmp #Write the values into a file and compare with ref awk NR==3 $fTmp | awk '{split($0,a," "); for (i=1; i<=8; i++) print a[i]}' > $res_ls diff --git a/tests/bufr_set.sh b/tests/bufr_set.sh index 55fe4c205..eed22e8af 100755 --- a/tests/bufr_set.sh +++ b/tests/bufr_set.sh @@ -35,9 +35,9 @@ rm -f $fBufrTmp | true f="syno_1.bufr" echo "Test: setting header for single message file" >> $fLog echo "file: $f" >> $fLog -${tools_dir}/bufr_set -v -p centre,centre:l -s centre=222 $f $fBufrTmp >> $fLog +${tools_dir}/bufr_set -v -p bufrHeaderCentre,bufrHeaderCentre:l -s bufrHeaderCentre=222 $f $fBufrTmp >> $fLog -centre=`${tools_dir}/bufr_get -p centre $fBufrTmp` +centre=`${tools_dir}/bufr_get -p bufrHeaderCentre $fBufrTmp` [ $centre = "222" ] #---------------------------------------------------- @@ -49,10 +49,10 @@ rm -f $fBufrTmp | true f="syno_multi.bufr" echo "Test: setting header for multi-message file" >> $fLog echo "file: $f" >> $fLog -${tools_dir}/bufr_set -v -p centre,centre:l -s centre=222 $f $fBufrTmp >> $fLog +${tools_dir}/bufr_set -v -p bufrHeaderCentre,bufrHeaderCentre:l -s bufrHeaderCentre=222 $f $fBufrTmp >> $fLog for i in 1 2 3 ;do - centre=`${tools_dir}/bufr_get -w count=$i -p centre $fBufrTmp` + centre=`${tools_dir}/bufr_get -w count=$i -p bufrHeaderCentre $fBufrTmp` [ $centre = "222" ] done @@ -127,7 +127,7 @@ set +e f="syno_1.bufr" echo "Test: nonexistent keys" >> $fLog echo "file: $f" >> $fLog -${tools_dir}/bufr_set -s centre=1024 $f $fBufrTmp 2>> $fLog 1>> $fLog +${tools_dir}/bufr_set -s bufrHeaderCentre=1024 $f $fBufrTmp 2>> $fLog 1>> $fLog if [ $? -eq 0 ]; then echo "bufr_set should have failed if key not found" >&2 exit 1 @@ -135,7 +135,7 @@ fi set -e # Now repeat with -f option (do not exit on error) -${tools_dir}/bufr_set -f -s centre=1024 -f $f $fBufrTmp 2>>$fLog 1>>$fLog +${tools_dir}/bufr_set -f -s bufrHeaderCentre=1024 -f $f $fBufrTmp 2>>$fLog 1>>$fLog #----------------------------------------------------------- # Test: key values out of range