eccodes/definitions/bufr/rdb_key.def

99 lines
3.7 KiB
Modula-2
Raw Normal View History

unsigned[1] rdbType : dump;
2017-05-19 12:53:30 +00:00
unsigned[1] oldSubtype: dump;
2013-03-25 12:04:10 +00:00
byte[13] keyData : hidden;
2013-03-25 12:04:10 +00:00
meta localYear bits(keyData,0,12) : dump,long_type,no_copy;
meta localMonth bits(keyData,12,4) : dump,long_type,no_copy;
meta localDay bits(keyData,16,6) : dump,long_type,no_copy;
meta localHour bits(keyData,22,5) : dump,long_type,no_copy;
meta localMinute bits(keyData,27,6) : dump,long_type,no_copy;
meta localSecond bits(keyData,33,6) : dump,long_type,no_copy;
2017-05-19 12:53:30 +00:00
meta spare bits(keyData,39,1) : no_copy; # 40 bits = 5 bytes
2013-03-25 12:04:10 +00:00
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;
2013-03-25 12:04:10 +00:00
# isSatellite and other stuff moved to section 3
ascii[8] keyMore : hidden;
byte[9] keySat : hidden;
2013-03-25 12:04:10 +00:00
# 16 bytes
unsigned[2] messageLength;
alias rdb.messageLength=messageLength;
byte[3] rdbtime;
2016-02-03 16:31:23 +00:00
meta rdbtimeDay bits(rdbtime,0,6) : dump,long_type,no_copy;
meta rdbtimeHour bits(rdbtime,6,5) : dump,long_type,no_copy;
meta rdbtimeMinute bits(rdbtime,11,6) : dump,long_type,no_copy;
meta rdbtimeSecond bits(rdbtime,17,6) : dump,long_type,no_copy;
2013-03-25 12:04:10 +00:00
2017-05-23 10:28:37 +00:00
meta rdbtimeYear rdbtime_guess_date(typicalYear,typicalMonth,typicalDay,rdbtimeDay,1);
meta rdbtimeMonth rdbtime_guess_date(typicalYear,typicalMonth,typicalDay,rdbtimeDay,2);
meta ls.rdbtimeDate sprintf("%.4d%.2d%.2d",rdbtimeYear,rdbtimeMonth,rdbtimeDay) : no_copy,read_only;
meta ls.rdbtimeTime sprintf("%.2d%.2d%.2d",rdbtimeHour,rdbtimeMinute,rdbtimeSecond) :dump,no_copy,read_only;
meta rdbDateTime julian_date(rdbtimeYear,rdbtimeMonth,rdbtimeDay,rdbtimeHour,rdbtimeMinute,rdbtimeSecond) : no_copy;
2017-05-23 10:28:37 +00:00
2013-03-25 12:04:10 +00:00
byte[3] rectime;
meta rectimeDay bits(rectime,0,6) : dump,long_type,no_copy;
meta rectimeHour bits(rectime,6,5) : dump,long_type,no_copy;
2016-02-03 16:31:23 +00:00
meta rectimeMinute bits(rectime,11,6) : dump,long_type,no_copy;
meta rectimeSecond bits(rectime,17,6) : dump,long_type,no_copy;
2020-07-22 22:03:18 +00:00
meta restricted bits(rectime,23,1) : dump,long_type,no_copy; # ECC-1136
2013-03-25 12:04:10 +00:00
meta recDateTime julian_date(rdbtimeYear,rdbtimeMonth,rectimeDay,rectimeHour,rectimeMinute,rectimeSecond) : no_copy;
2013-03-25 12:04:10 +00:00
byte[1] corr1Data;
2016-02-03 16:31:23 +00:00
meta correction1 bits(corr1Data,0,6) : dump,long_type,no_copy;
meta correction1Part bits(corr1Data,6,1) : dump,long_type,no_copy;
meta spare1 bits(corr1Data,7,1) : long_type,no_copy;
2013-03-25 12:04:10 +00:00
byte[1] corr2Data;
2016-02-03 16:31:23 +00:00
meta correction2 bits(corr2Data,0,6) : dump,long_type,no_copy;
meta correction2Part bits(corr2Data,6,1) : dump,long_type,no_copy;
meta spare2 bits(corr2Data,7,1) : long_type,no_copy;
2013-03-25 12:04:10 +00:00
byte[1] corr3Data;
2016-02-03 16:31:23 +00:00
meta correction3 bits(corr3Data,0,6) : dump,long_type,no_copy;
meta correction3Part bits(corr3Data,6,1) : dump,long_type,no_copy;
meta spare3 bits(corr3Data,7,1) : long_type,no_copy;
2013-03-25 12:04:10 +00:00
byte[1] corr4Data;
2016-02-03 16:31:23 +00:00
meta correction4 bits(corr4Data,0,6) : dump,long_type,no_copy;
meta correction4Part bits(corr4Data,6,1) : dump,long_type,no_copy;
meta spare4 bits(corr4Data,7,1) : long_type,no_copy;
2013-03-25 12:04:10 +00:00
unsigned[1] qualityControl : dump,long_type;
alias qualityControl=qualityControl;
2017-05-19 12:53:30 +00:00
unsigned[2] newSubtype = 0 : dump;
if (oldSubtype < 255 ) {
alias rdbSubtype=oldSubtype;
} else {
alias rdbSubtype=newSubtype;
}
alias ls.rdbType=rdbType;
alias ls.rdbSubtype=rdbSubtype;
alias rdb.rdbType=rdbType;
alias rdb.rdbSubtype=rdbSubtype;
alias mars.obstype = rdbSubtype;
2018-02-27 15:48:50 +00:00
#Data assimilation loop for purpose of Continous DA
unsigned[1] daLoop;