MARS namespace for BUFR: Add keys to match bufr2request

This commit is contained in:
Shahram Najm 2020-06-16 19:15:03 +01:00
parent 1fee7698a7
commit f05490439b
3 changed files with 11 additions and 9 deletions

View File

@ -18,11 +18,15 @@ 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;
@ -83,5 +87,7 @@ alias ls.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;

View File

@ -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;
}
}

View File

@ -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