Skip to content

Commit

Permalink
Merge branch 'develop' into fix_decreasing_loading_performance
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoos-meteomatics authored Jun 10, 2021
2 parents 7bfb7af + c6ffb81 commit 3da8f7d
Show file tree
Hide file tree
Showing 22 changed files with 633 additions and 452 deletions.
26 changes: 22 additions & 4 deletions definitions/add_params_from_tsv.pl
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,21 @@
my $units_code = get_db_units_code($units);
my $is_chem = "";
my $is_aero = "";
my $is_srcsink = "";
if ($aero ne "") {
$is_aero = "1";
$is_chem = "";
$is_srcsink = "";
}
if ($constit ne "") {
$is_aero = "";
$is_chem = "1";
$is_srcsink = "";
}
if ($sourceSink ne "") {
$is_aero = "";
$is_chem = "";
$is_srcsink = "1";
}
my $centre = $localTV ne "" ? $centre_ecmwf : $centre_wmo;

Expand Down Expand Up @@ -202,7 +210,7 @@
if (! defined $scaledValueWL2 || $scaledValueWL2 ne "") {
$dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,61,$scaledValueWL2,0);
}
$dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,64,$sourceSink,0) if ($sourceSink ne "");
$dbh->do("insert into grib values (?,?,?,?,?,?)",undef, $paramId,$edition,$centre,64,$sourceSink,0) if ($is_srcsink ne "");

# format is only GRIB2 hence grib1 entry=0 and grib2=1
$dbh->do("insert into param_format(param_id,grib1,grib2) values (?,?,?)",undef,$paramId,0,1);
Expand Down Expand Up @@ -252,12 +260,22 @@ sub write_out_file {

print $outfile " aerosolType = $aero ;\n" if ($aero ne "");
print $outfile " constituentType = $constit ;\n" if ($constit ne "");
print $outfile " is_aerosol = 1 ;\n" if ($aero ne "");
print $outfile " is_chemical = 1 ;\n" if ($constit ne "");

if ($sourceSink eq "") {
print $outfile " is_aerosol = 1 ;\n" if ($aero ne "");
print $outfile " is_chemical = 1 ;\n" if ($constit ne "");
} else {
print $outfile " is_chemical_srcsink = 1 ;\n";
print $outfile " sourceSinkChemicalPhysicalProcess = $sourceSink ;\n";
}
print $outfile " typeOfGeneratingProcess = $typeGen ;\n" if ($typeGen ne "");
print $outfile " localTablesVersion = $localTV ;\n" if ($localTV ne "");

print $outfile " typeOfWavelengthInterval = $typeOfWLInt ;\n" if ($typeOfWLInt ne "");
print $outfile " scaleFactorOfFirstWavelength = $scaleFactorWL1 ;\n" if ($scaleFactorWL1 ne "");
print $outfile " scaledValueOfFirstWavelength = $scaledValueWL1 ;\n" if ($scaledValueWL1 ne "");
print $outfile " scaleFactorOfSecondWavelength = $scaleFactorWL2 ;\n" if ($scaleFactorWL2 ne "");
print $outfile " scaledValueOfSecondWavelength = $scaledValueWL2 ;\n" if ($scaledValueWL2 ne "");

print $outfile "}\n";
}

Expand Down
12 changes: 6 additions & 6 deletions definitions/grib1/localConcepts/ecmf/cfName.def
Original file line number Diff line number Diff line change
Expand Up @@ -739,12 +739,12 @@
table2Version = 217 ;
indicatorOfParameter = 18 ;
}
#Ammonia
#Ammonia mass mixing ratio
'mass_fraction_of_ammonia_in_air' = {
table2Version = 217 ;
indicatorOfParameter = 19 ;
}
#Nitrogen monoxide
#Nitrogen monoxide mass mixing ratio
'mass_fraction_of_nitrogen_monoxide_in_air' = {
table2Version = 217 ;
indicatorOfParameter = 27 ;
Expand Down Expand Up @@ -979,17 +979,17 @@
table2Version = 210 ;
indicatorOfParameter = 66 ;
}
#Nitrogen dioxide
#Nitrogen dioxide mass mixing ratio
'mass_fraction_of_nitrogen_dioxide_in_air' = {
table2Version = 210 ;
indicatorOfParameter = 121 ;
}
#Sulphur dioxide
#Sulphur dioxide mass mixing ratio
'mass_fraction_of_sulfur_dioxide_in_air' = {
table2Version = 210 ;
indicatorOfParameter = 122 ;
}
#Carbon monoxide
#Carbon monoxide mass mixing ratio
'mass_fraction_of_carbon_monoxide_in_air' = {
table2Version = 210 ;
indicatorOfParameter = 123 ;
Expand Down Expand Up @@ -1029,7 +1029,7 @@
table2Version = 210 ;
indicatorOfParameter = 183 ;
}
#GEMS Ozone
#Ozone mass mixing ratio (full chemistry scheme)
'mass_fraction_of_ozone_in_air' = {
table2Version = 210 ;
indicatorOfParameter = 203 ;
Expand Down
20 changes: 10 additions & 10 deletions definitions/grib1/localConcepts/ecmf/cfVarName.def
Original file line number Diff line number Diff line change
Expand Up @@ -8534,7 +8534,7 @@
table2Version = 217 ;
indicatorOfParameter = 18 ;
}
#Ammonia
#Ammonia mass mixing ratio
'nh3' = {
table2Version = 217 ;
indicatorOfParameter = 19 ;
Expand Down Expand Up @@ -8569,7 +8569,7 @@
table2Version = 217 ;
indicatorOfParameter = 26 ;
}
#Nitrogen monoxide
#Nitrogen monoxide mass mixing ratio
'no' = {
table2Version = 217 ;
indicatorOfParameter = 27 ;
Expand Down Expand Up @@ -16124,17 +16124,17 @@
table2Version = 210 ;
indicatorOfParameter = 100 ;
}
#Nitrogen dioxide
#Nitrogen dioxide mass mixing ratio
'no2' = {
table2Version = 210 ;
indicatorOfParameter = 121 ;
}
#Sulphur dioxide
#Sulphur dioxide mass mixing ratio
'so2' = {
table2Version = 210 ;
indicatorOfParameter = 122 ;
}
#Carbon monoxide
#Carbon monoxide mass mixing ratio
'co' = {
table2Version = 210 ;
indicatorOfParameter = 123 ;
Expand Down Expand Up @@ -16379,7 +16379,7 @@
table2Version = 210 ;
indicatorOfParameter = 185 ;
}
#GEMS Ozone
#Ozone mass mixing ratio (full chemistry scheme)
'go3' = {
table2Version = 210 ;
indicatorOfParameter = 203 ;
Expand Down Expand Up @@ -16824,17 +16824,17 @@
table2Version = 211 ;
indicatorOfParameter = 100 ;
}
#Nitrogen dioxide
#Nitrogen dioxide mass mixing ratio difference
'no2diff' = {
table2Version = 211 ;
indicatorOfParameter = 121 ;
}
#Sulphur dioxide
#Sulphur dioxide mass mixing ratio difference
'so2diff' = {
table2Version = 211 ;
indicatorOfParameter = 122 ;
}
#Carbon monoxide
#Carbon monoxide mass mixing ratio difference
'codiff' = {
table2Version = 211 ;
indicatorOfParameter = 123 ;
Expand Down Expand Up @@ -17079,7 +17079,7 @@
table2Version = 211 ;
indicatorOfParameter = 185 ;
}
#GEMS Ozone
#Ozone mass mixing ratio difference (full chemistry scheme)
'go3diff' = {
table2Version = 211 ;
indicatorOfParameter = 203 ;
Expand Down
40 changes: 20 additions & 20 deletions definitions/grib1/localConcepts/ecmf/name.def
Original file line number Diff line number Diff line change
Expand Up @@ -8534,8 +8534,8 @@
table2Version = 217 ;
indicatorOfParameter = 18 ;
}
#Ammonia
'Ammonia' = {
#Ammonia mass mixing ratio
'Ammonia mass mixing ratio' = {
table2Version = 217 ;
indicatorOfParameter = 19 ;
}
Expand Down Expand Up @@ -8569,8 +8569,8 @@
table2Version = 217 ;
indicatorOfParameter = 26 ;
}
#Nitrogen monoxide
'Nitrogen monoxide' = {
#Nitrogen monoxide mass mixing ratio
'Nitrogen monoxide mass mixing ratio' = {
table2Version = 217 ;
indicatorOfParameter = 27 ;
}
Expand Down Expand Up @@ -16124,18 +16124,18 @@
table2Version = 210 ;
indicatorOfParameter = 100 ;
}
#Nitrogen dioxide
'Nitrogen dioxide' = {
#Nitrogen dioxide mass mixing ratio
'Nitrogen dioxide mass mixing ratio' = {
table2Version = 210 ;
indicatorOfParameter = 121 ;
}
#Sulphur dioxide
'Sulphur dioxide' = {
#Sulphur dioxide mass mixing ratio
'Sulphur dioxide mass mixing ratio' = {
table2Version = 210 ;
indicatorOfParameter = 122 ;
}
#Carbon monoxide
'Carbon monoxide' = {
#Carbon monoxide mass mixing ratio
'Carbon monoxide mass mixing ratio' = {
table2Version = 210 ;
indicatorOfParameter = 123 ;
}
Expand Down Expand Up @@ -16379,8 +16379,8 @@
table2Version = 210 ;
indicatorOfParameter = 185 ;
}
#GEMS Ozone
'GEMS Ozone' = {
#Ozone mass mixing ratio (full chemistry scheme)
'Ozone mass mixing ratio (full chemistry scheme)' = {
table2Version = 210 ;
indicatorOfParameter = 203 ;
}
Expand Down Expand Up @@ -16824,18 +16824,18 @@
table2Version = 211 ;
indicatorOfParameter = 100 ;
}
#Nitrogen dioxide
'Nitrogen dioxide' = {
#Nitrogen dioxide mass mixing ratio difference
'Nitrogen dioxide mass mixing ratio difference' = {
table2Version = 211 ;
indicatorOfParameter = 121 ;
}
#Sulphur dioxide
'Sulphur dioxide' = {
#Sulphur dioxide mass mixing ratio difference
'Sulphur dioxide mass mixing ratio difference' = {
table2Version = 211 ;
indicatorOfParameter = 122 ;
}
#Carbon monoxide
'Carbon monoxide' = {
#Carbon monoxide mass mixing ratio difference
'Carbon monoxide mass mixing ratio difference' = {
table2Version = 211 ;
indicatorOfParameter = 123 ;
}
Expand Down Expand Up @@ -17079,8 +17079,8 @@
table2Version = 211 ;
indicatorOfParameter = 185 ;
}
#GEMS Ozone
'GEMS Ozone' = {
#Ozone mass mixing ratio difference (full chemistry scheme)
'Ozone mass mixing ratio difference (full chemistry scheme)' = {
table2Version = 211 ;
indicatorOfParameter = 203 ;
}
Expand Down
20 changes: 10 additions & 10 deletions definitions/grib1/localConcepts/ecmf/paramId.def
Original file line number Diff line number Diff line change
Expand Up @@ -8534,7 +8534,7 @@
table2Version = 217 ;
indicatorOfParameter = 18 ;
}
#Ammonia
#Ammonia mass mixing ratio
'217019' = {
table2Version = 217 ;
indicatorOfParameter = 19 ;
Expand Down Expand Up @@ -8569,7 +8569,7 @@
table2Version = 217 ;
indicatorOfParameter = 26 ;
}
#Nitrogen monoxide
#Nitrogen monoxide mass mixing ratio
'217027' = {
table2Version = 217 ;
indicatorOfParameter = 27 ;
Expand Down Expand Up @@ -16124,17 +16124,17 @@
table2Version = 210 ;
indicatorOfParameter = 100 ;
}
#Nitrogen dioxide
#Nitrogen dioxide mass mixing ratio
'210121' = {
table2Version = 210 ;
indicatorOfParameter = 121 ;
}
#Sulphur dioxide
#Sulphur dioxide mass mixing ratio
'210122' = {
table2Version = 210 ;
indicatorOfParameter = 122 ;
}
#Carbon monoxide
#Carbon monoxide mass mixing ratio
'210123' = {
table2Version = 210 ;
indicatorOfParameter = 123 ;
Expand Down Expand Up @@ -16379,7 +16379,7 @@
table2Version = 210 ;
indicatorOfParameter = 185 ;
}
#GEMS Ozone
#Ozone mass mixing ratio (full chemistry scheme)
'210203' = {
table2Version = 210 ;
indicatorOfParameter = 203 ;
Expand Down Expand Up @@ -16824,17 +16824,17 @@
table2Version = 211 ;
indicatorOfParameter = 100 ;
}
#Nitrogen dioxide
#Nitrogen dioxide mass mixing ratio difference
'211121' = {
table2Version = 211 ;
indicatorOfParameter = 121 ;
}
#Sulphur dioxide
#Sulphur dioxide mass mixing ratio difference
'211122' = {
table2Version = 211 ;
indicatorOfParameter = 122 ;
}
#Carbon monoxide
#Carbon monoxide mass mixing ratio difference
'211123' = {
table2Version = 211 ;
indicatorOfParameter = 123 ;
Expand Down Expand Up @@ -17079,7 +17079,7 @@
table2Version = 211 ;
indicatorOfParameter = 185 ;
}
#GEMS Ozone
#Ozone mass mixing ratio difference (full chemistry scheme)
'211203' = {
table2Version = 211 ;
indicatorOfParameter = 203 ;
Expand Down
Loading

0 comments on commit 3da8f7d

Please sign in to comment.