From ad0e7e5bb64264521355501844a43ae45466bac7 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 2 Feb 2021 16:22:00 +0000 Subject: [PATCH] Scripts: fix the Code Table unit parentheses --- definitions/create_grib2_codetables.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/definitions/create_grib2_codetables.pl b/definitions/create_grib2_codetables.pl index 61b590a0b..04845c1ed 100644 --- a/definitions/create_grib2_codetables.pl +++ b/definitions/create_grib2_codetables.pl @@ -69,11 +69,13 @@ sub WriteFile { print MYFILE "# $title\n"; } my $unit_text = ($unit eq "" ? "" : "($unit)"); + $unit_text =~ s/\(\(Code /(Code /; + $unit_text =~ s/\)\)/)/; if ($codeFlag =~ /\-/) { print MYFILE "# $codeFlag $meaning $unit_text\n"; } else { - my $codeFlag1 = $codeFlag; - my $codeFlag2 = $codeFlag; + my $codeFlag1 = $codeFlag; # A number + my $codeFlag2 = $codeFlag; # A number or string abbreviation if ($filename eq "1.4.table") { # Special case. Do not just put 2nd code, translate it to shortName for 'mars type' $codeFlag2 = TranslateCodes_Table_1_4($codeFlag);