mirror of https://github.com/ecmwf/eccodes.git
ECC-1122: BUFR: Fix the keys for the mars namespace
This commit is contained in:
commit
d6b20f62dc
|
@ -11,18 +11,22 @@ meta localMinute bits(keyData,27,6) : dump,long_type,no_copy;
|
|||
meta localSecond bits(keyData,33,6) : dump,long_type,no_copy;
|
||||
meta spare bits(keyData,39,1) : no_copy; # 40 bits = 5 bytes
|
||||
|
||||
alias mars.localYear=localYear;
|
||||
alias mars.localMonth=localMonth;
|
||||
alias mars.localDay=localDay;
|
||||
alias mars.localHour=localHour;
|
||||
alias mars.localMinute=localMinute;
|
||||
alias mars.localSecond=localSecond;
|
||||
alias rdb.localYear=localYear;
|
||||
alias rdb.localMonth=localMonth;
|
||||
alias rdb.localDay=localDay;
|
||||
alias rdb.localHour=localHour;
|
||||
alias rdb.localMinute=localMinute;
|
||||
alias rdb.localSecond=localSecond;
|
||||
|
||||
meta localDate sprintf("%.4d%.2d%.2d",localYear,localMonth,localDay) : no_copy,read_only;
|
||||
meta localTime sprintf("%.2d%.2d",localHour,localMinute) : no_copy,read_only;
|
||||
meta localDateTime julian_date(localYear,localMonth,localDay,localHour,localMinute,localSecond) : no_copy;
|
||||
alias mars.date = localDate;
|
||||
alias mars.time = localTime;
|
||||
|
||||
# isSatellite and other stuff moved to section 3
|
||||
ascii[8] keyMore : hidden;
|
||||
byte[9] keySat : hidden;
|
||||
ascii[8] keyMore : hidden;
|
||||
byte[9] keySat : hidden;
|
||||
|
||||
# 16 bytes
|
||||
unsigned[2] messageLength;
|
||||
|
@ -80,9 +84,10 @@ if (oldSubtype < 255 ) {
|
|||
alias ls.rdbType=rdbType;
|
||||
alias ls.rdbSubtype=rdbSubtype;
|
||||
|
||||
alias mars.rdbType=rdbType;
|
||||
alias mars.rdbSubtype=rdbSubtype;
|
||||
alias rdb.rdbType=rdbType;
|
||||
alias rdb.rdbSubtype=rdbSubtype;
|
||||
|
||||
alias mars.obstype = rdbSubtype;
|
||||
|
||||
#Data assimilation loop for purpose of Continous DA
|
||||
unsigned[1] daLoop;
|
||||
|
||||
|
|
|
@ -75,19 +75,15 @@ if (section2Present && bufrHeaderCentre==98 && section2Length==52) {
|
|||
oldSubtype==31) {
|
||||
meta ls.localNumberOfObservations bits(keySat,0,16) : dump,long_type,no_copy;
|
||||
meta ls.satelliteID bits(keySat,16,16) : dump,long_type,no_copy;
|
||||
alias mars.satelliteID=satelliteID;
|
||||
} else {
|
||||
meta ls.localNumberOfObservations bits(keySat,0,8) : dump,long_type,no_copy;
|
||||
meta ls.satelliteID bits(keySat,8,16) : dump,long_type,no_copy;
|
||||
alias mars.satelliteID=satelliteID;
|
||||
}
|
||||
} else {
|
||||
meta ls.localLatitude bits(keyData,72,25,-9000000,100000) : dump,no_copy;
|
||||
meta ls.localLongitude bits(keyData,40,26,-18000000,100000) : dump,no_copy;
|
||||
meta mars.ident sprintf("%s", keyMore) : string_type, no_copy;
|
||||
alias ls.ident=keyMore : dump,string_type,no_copy;
|
||||
|
||||
alias mars.localLatitude=localLatitude;
|
||||
alias mars.localLongitude=localLongitude;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,9 +68,9 @@ result=`${tools_dir}/bufr_get -s unpack=1 -p satelliteIdentifier wavb_134.bufr`
|
|||
# ECC-315: BUFR keys in the MARS namespace
|
||||
#-------------------------------------------
|
||||
result=`${tools_dir}/bufr_get -m aaen_55.bufr`
|
||||
[ "$result" = "2 55 2012 11 2 0 0 8 209" ]
|
||||
[ "$result" = "55 20121102 0000" ]
|
||||
result=`${tools_dir}/bufr_get -m syno_1.bufr`
|
||||
[ "$result" = "1 1 2012 10 30 0 0 0 7.45 151.83" ]
|
||||
[ "$result" = "1 20121030 0000 91334 " ]
|
||||
|
||||
#-------------------------------------------
|
||||
# Local ECMWF section: 'ident' key
|
||||
|
|
Loading…
Reference in New Issue