Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
bufr.pm:dump_flag_tables.pl [2010-05-14 10:20:30] pals |
bufr.pm:dump_flag_tables.pl [2022-05-31 09:29:31] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | < | + | < |
| # | # | ||
| - | # Dump all flag tables in table file | + | # Dump all flag tables in table file. |
| + | # Flag tables not found is printed to STDERR. | ||
| # Author: P.Sannes, met.no 2010-05-12 | # Author: P.Sannes, met.no 2010-05-12 | ||
| Line 9: | Line 10: | ||
| my $table_path = '/ | my $table_path = '/ | ||
| - | my $table = 'B0000000000098013001'; | + | my $Btable |
| + | my $Ctable = ' | ||
| Geo:: | Geo:: | ||
| Line 15: | Line 17: | ||
| my $bufr = Geo:: | my $bufr = Geo:: | ||
| - | $bufr-> | + | $bufr-> |
| - | $bufr-> | + | $bufr-> |
| - | my $B_table = $bufr-> | + | |
| - | my $C_table = $bufr-> | + | |
| - | for my $i (1..50000) { | + | for my $i (1..48000) { |
| my $desc = sprintf " | my $desc = sprintf " | ||
| - | | + | my ($name, $unit) = ($bufr->element_descriptor($desc))[0,1]; |
| - | # Some code/flag tables in C*.TXT were found not to be defined in | + | next unless |
| - | # the corresponding B*.TXT | + | |
| - | next unless defined $B_table-> | + | if ($dump) { |
| - | | + | |
| - | next unless $unit =~ /^FLAG TABLE/; | + | print $dump; |
| - | print "$desc $name $unit\n"; | + | } elsif ($desc%1000 < 192) { |
| - | print $bufr-> | + | # Don't care about local tables missing |
| + | print STDERR " | ||
| + | } | ||
| } | } | ||
| </ | </ | ||