mirror of https://github.com/ecmwf/eccodes.git
39 lines
1.4 KiB
Modula-2
39 lines
1.4 KiB
Modula-2
# (C) Copyright 2005- ECMWF.
|
|
|
|
# Section 3 - Time Domain Section
|
|
|
|
position offsetSection3;
|
|
section_length[4] section3Length ;
|
|
meta section3Pointer section_pointer(offsetSection3,section3Length,3);
|
|
unsigned[1] numberOfSection = 3 :read_only;
|
|
|
|
unsigned[2] section3UniqueIdentifier; # SUI
|
|
|
|
codetable[1] significanceOfReferenceDateAndTime ('3.0.table',masterDir,localDir) = 1 : dump;
|
|
|
|
# The type of calendar used applies to the entire section including the Time Domain Template
|
|
codetable[1] typeOfCalendar ('3.1.table',masterDir,localDir) = 255 : dump,no_copy,edition_specific;
|
|
|
|
# Year, month, day etc form the Reference date and time
|
|
# Note: year is SIGNED integer (according to Reg. 92.1.5) to represent large negative dates (BC).
|
|
# This was a requirement for the climate.
|
|
signed[4] year ;
|
|
unsigned[1] month ;
|
|
unsigned[1] day ;
|
|
unsigned[1] hour ;
|
|
unsigned[1] minute ;
|
|
unsigned[1] second ;
|
|
|
|
meta dataDate g2date(year,month,day) : dump;
|
|
alias mars.date = dataDate;
|
|
alias ls.date = dataDate;
|
|
meta julianDay julian_day(dataDate,hour,minute,second) : edition_specific;
|
|
meta dataTime time(hour,minute,second) : dump;
|
|
alias mars.time = dataTime;
|
|
|
|
codetable[2] timeDomainTemplateNumber ('3.2.table',masterDir,localDir) =0 : dump,edition_specific;
|
|
template timeDomainTemplate "grib3/template.3.[timeDomainTemplateNumber:l].def";
|
|
|
|
meta md5Section3 md5(offsetSection3,section3Length);
|
|
alias md5TimeDomainSection = md5Section3;
|