Merge branch 'develop' of github.com:ecmwf/eccodes into develop

This commit is contained in:
shahramn 2024-10-25 15:10:58 +01:00
commit bbc7dc17f1
9 changed files with 7982 additions and 7918 deletions

View File

@ -38,7 +38,8 @@ sub create_cfName {
attribute.id=grib.attribute_id and
centre.id=grib_encoding.centre_id and
units.id=param.units_id and
param.id=cf.grib1_ecmwf order by
param.id=cf.grib1_ecmwf and
grib_encoding.is_legacy=0 order by
edition,centre_id,param.o,param.id,grib_encoding.param_version,attribute.o;
EOF
@ -98,6 +99,83 @@ EOF
close(TAR);
}
sub create_cfName_legacy {
my $p; my %seen;
my ($key) = "cfName";
my $field = "cf.name";
my $query= <<"EOF";
select $field,force128,edition,
centre.abbreviation,param_id,attribute.name,attribute_value,param.name,param.shortName from
param,grib_encoding,grib,attribute,centre,units,cf where
param.hide_def=0 and
# param.retired=0 and
grib_encoding.id=grib.encoding_id and
param.id=grib_encoding.param_id and
attribute.id=grib.attribute_id and
centre.id=grib_encoding.centre_id and
units.id=param.units_id and
param.id=cf.grib1_ecmwf and
grib_encoding.is_legacy=1 order by
edition,centre_id,param.o,param.id,grib_encoding.param_version,attribute.o;
EOF
my $qh=$dbh->prepare($query);
$qh->execute();
# file containing the list of grib api parameters files we want to tar and
# distribute to users for them to download and update their list of parameter
# to the latest
#open(TAR,$tarfilesflag ? ">>" : ">","tarfiles.txt") or die "Count not open file tarfiles.txt: $!";
#$tarfilesflag=1;
while (my ($keyval,$force128,$edition,$centre,$paramId,$attribute,$value,$name,$shortName)=$qh->fetchrow_array )
{
if ($centre eq "wmo" ) { $conceptDir=""; }
else { $conceptDir="/localConcepts/$centre"; }
if ($filebase ne "$basedir/grib$edition$conceptDir") {
if ($filebase) {
print $out "}\n";
close $out;
}
$filebase="$basedir/grib$edition$conceptDir";
mkpath($filebase);
print TAR "grib$edition$conceptDir/$key.legacy.def\n";
#system("cp -f $filebase/$key.def $filebase/$key.def.orig");
open($out,"> $filebase/$key.legacy.def")
or die "unable to open $filebase/$key.legacy.def";
print $out "# Automatically generated by $0, do not edit\n";
$p=();
}
if ($p ne $paramId || exists($seen{$attribute}) ) {
if ($p) { print $out "\t}\n"; }
print $out "#$name\n" ;
print $out "\'".$keyval."\' = {\n" ;
$p=$paramId;
%seen=();
}
$seen{$attribute}=1;
print "($key=$keyval) $edition,$centre,$shortName,$paramId,$name,$attribute,$value\n";
# we need to allow strings in the attribute_value field
# for the moment we apply a patch here
if ($attribute =~ /stepType/ ) {
$value="\"accum\"";
}
if ($value eq '') {
$value="missing()";
}
print $out "\t $attribute = $value ;\n" ;
}
if ($filebase) {
print $out "}\n";
close $out;
}
close(TAR);
}
sub create_def {
my $p; my %seen;
my ($key) =@_;
@ -117,7 +195,8 @@ sub create_def {
param.id=grib_encoding.param_id and
attribute.id=grib.attribute_id and
centre.id=grib_encoding.centre_id and
units.id=param.units_id
units.id=param.units_id and
grib_encoding.is_legacy=0
order by edition,centre_id,param.o,param.id,grib_encoding.param_version,attribute.o;
EOF
@ -183,29 +262,27 @@ EOF
close(TAR);
}
# See ECC-1886
sub create_cfVarName {
sub create_def_legacy {
my $p; my %seen;
my ($key) =@_;
my $field=$key;
#if ($key =~ /paramId/) { $field="param.id"; }
#if ($key =~ /name/) { $field="param.name"; }
#if ($key =~ /units/) { $field="units.name"; }
if ($key =~ /cfVarName/) { $field="cfVarName"; }
if ($key =~ /paramId/) { $field="param.id"; }
if ($key =~ /name/) { $field="param.name"; }
if ($key =~ /units/) { $field="units.name"; }
my $query= <<"EOF";
select $field,force128,edition,
centre.abbreviation,param_id,attribute.name,attribute_value,param.name,param.shortName
from param,grib_encoding,grib,attribute,centre,units where
param.hide_def=0 and
param.retired=0 and
# param.retired=0 and
grib_encoding.id=grib.encoding_id and
param.id=grib_encoding.param_id and
attribute.id=grib.attribute_id and
centre.id=grib_encoding.centre_id and
units.id=param.units_id
and cfVarName IS NOT NULL
units.id=param.units_id and
grib_encoding.is_legacy=1
order by edition,centre_id,param.o,param.id,grib_encoding.param_version,attribute.o;
EOF
@ -237,10 +314,10 @@ EOF
#copy("$filebase/$key.def","$filebase/$key.def.bkp")
# or die ("unable to copy $filebase/$key.def");
print TAR "grib$edition$conceptDir/$key.def\n";
print TAR "grib$edition$conceptDir/$key.legacy.def\n";
#system("cp -f $filebase/$key.def $filebase/$key.def.orig");
open($out,"> $filebase/$key.def")
or die "unable to open $filebase/$key.def";
open($out,"> $filebase/$key.legacy.def")
or die "unable to open $filebase/$key.legacy.def";
print $out "# Automatically generated by $0, do not edit\n";
$p=();
}
@ -281,7 +358,8 @@ sub create_paramId_def {
grib_encoding.id=grib.encoding_id and
param.id=grib_encoding.param_id and
attribute.id=grib.attribute_id and
centre.id=grib_encoding.centre_id
centre.id=grib_encoding.centre_id and
grib_encoding.is_legacy=0
order by edition,centre_id,param.o,param.id,attribute.o";
my $qh=$dbh->prepare($query);
$qh->execute();
@ -355,13 +433,15 @@ sub create_def_old {
}
create_def("paramId");
create_def_legacy("paramId");
create_def("shortName");
create_def_legacy("shortName");
create_def("name");
create_def_legacy("name");
create_def("units");
# Note: The cfVarName.def files are smaller than the rest. We only store the
# minimum set necessary. See ECC-1886
create_cfVarName("cfVarName");
create_def_legacy("units");
create_cfName("cfName");
create_cfName_legacy("cfName");
# #create_paramId_def();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,60 @@
# Automatically generated by ./create_def.pl, do not edit
#Instantaneous eastward turbulent surface stress
'Instantaneous eastward turbulent surface stress' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 38 ;
typeOfFirstFixedSurface = 1 ;
}
#Instantaneous northward turbulent surface stress
'Instantaneous northward turbulent surface stress' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 37 ;
typeOfFirstFixedSurface = 1 ;
}
#Minimum dew point depression
'Minimum dew point depression' = {
discipline = 0 ;
parameterCategory = 0 ;
parameterNumber = 14 ;
}
#Maximum relative humidity
'Maximum relative humidity' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 27 ;
}
#Maximum absolute humidity
'Maximum absolute humidity' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 28 ;
}
#Maximum wind speed
'Maximum wind speed' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 21 ;
}
#Net long wave radiation flux (surface)
'Net long wave radiation flux (surface)' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 0 ;
}
#Net long wave radiation flux (top of atmosphere)
'Net long wave radiation flux (top of atmosphere)' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 1 ;
}
#Maximum snow albedo
'Maximum snow albedo' = {
discipline = 0 ;
parameterCategory = 19 ;
parameterNumber = 17 ;
}
#Volumetric soil moisture content
'Volumetric soil moisture content' = {
discipline = 2 ;
@ -52,20 +109,6 @@
parameterCategory = 3 ;
parameterNumber = 9 ;
}
#Instantaneous eastward turbulent surface stress
'Instantaneous eastward turbulent surface stress' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 38 ;
typeOfFirstFixedSurface = 1 ;
}
#Instantaneous northward turbulent surface stress
'Instantaneous northward turbulent surface stress' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 37 ;
typeOfFirstFixedSurface = 1 ;
}
#Evaporation in the last 6 hours
'Evaporation in the last 6 hours' = {
discipline = 0 ;
@ -174,18 +217,6 @@
typeOfSecondFixedSurface = 168 ;
typeOfStatisticalProcessing = 0 ;
}
#Maximum individual wave height
'Maximum individual wave height' = {
discipline = 10 ;
parameterCategory = 0 ;
parameterNumber = 24 ;
}
#Soil temperature
'Soil temperature' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 2 ;
}
#Maximum temperature
'Maximum temperature' = {
discipline = 0 ;
@ -198,53 +229,11 @@
parameterCategory = 0 ;
parameterNumber = 5 ;
}
#Minimum dew point depression
'Minimum dew point depression' = {
discipline = 0 ;
#Envelop-maximum individual wave height
'Envelop-maximum individual wave height' = {
discipline = 10 ;
parameterCategory = 0 ;
parameterNumber = 14 ;
}
#Maximum relative humidity
'Maximum relative humidity' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 27 ;
}
#Maximum absolute humidity
'Maximum absolute humidity' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 28 ;
}
#Maximum wind speed
'Maximum wind speed' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 21 ;
}
#Net long wave radiation flux (surface)
'Net long wave radiation flux (surface)' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 0 ;
}
#Net long wave radiation flux (top of atmosphere)
'Net long wave radiation flux (top of atmosphere)' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 1 ;
}
#Maximum snow albedo
'Maximum snow albedo' = {
discipline = 0 ;
parameterCategory = 19 ;
parameterNumber = 17 ;
}
#Soil temperature
'Soil temperature' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 2 ;
parameterNumber = 24 ;
}
#Soil moisture
'Soil moisture' = {
@ -252,3 +241,9 @@
parameterCategory = 0 ;
parameterNumber = 22 ;
}
#Soil temperature
'Soil temperature' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 2 ;
}

View File

@ -1,3 +1,60 @@
# Automatically generated by ./create_def.pl, do not edit
#Instantaneous eastward turbulent surface stress
'229' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 38 ;
typeOfFirstFixedSurface = 1 ;
}
#Instantaneous northward turbulent surface stress
'230' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 37 ;
typeOfFirstFixedSurface = 1 ;
}
#Minimum dew point depression
'260006' = {
discipline = 0 ;
parameterCategory = 0 ;
parameterNumber = 14 ;
}
#Maximum relative humidity
'260023' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 27 ;
}
#Maximum absolute humidity
'260024' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 28 ;
}
#Maximum wind speed
'260064' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 21 ;
}
#Net long wave radiation flux (surface)
'260095' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 0 ;
}
#Net long wave radiation flux (top of atmosphere)
'260096' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 1 ;
}
#Maximum snow albedo
'260161' = {
discipline = 0 ;
parameterCategory = 19 ;
parameterNumber = 17 ;
}
#Volumetric soil moisture content
'260185' = {
discipline = 2 ;
@ -52,20 +109,6 @@
parameterCategory = 3 ;
parameterNumber = 9 ;
}
#Instantaneous eastward turbulent surface stress
'229' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 38 ;
typeOfFirstFixedSurface = 1 ;
}
#Instantaneous northward turbulent surface stress
'230' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 37 ;
typeOfFirstFixedSurface = 1 ;
}
#Evaporation in the last 6 hours
'260265' = {
discipline = 0 ;
@ -174,18 +217,6 @@
typeOfSecondFixedSurface = 168 ;
typeOfStatisticalProcessing = 0 ;
}
#Maximum individual wave height
'140218' = {
discipline = 10 ;
parameterCategory = 0 ;
parameterNumber = 24 ;
}
#Soil temperature
'228139' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 2 ;
}
#Maximum temperature
'3015' = {
discipline = 0 ;
@ -198,53 +229,11 @@
parameterCategory = 0 ;
parameterNumber = 5 ;
}
#Minimum dew point depression
'260006' = {
discipline = 0 ;
#Envelop-maximum individual wave height
'140218' = {
discipline = 10 ;
parameterCategory = 0 ;
parameterNumber = 14 ;
}
#Maximum relative humidity
'260023' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 27 ;
}
#Maximum absolute humidity
'260024' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 28 ;
}
#Maximum wind speed
'260064' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 21 ;
}
#Net long wave radiation flux (surface)
'260095' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 0 ;
}
#Net long wave radiation flux (top of atmosphere)
'260096' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 1 ;
}
#Maximum snow albedo
'260161' = {
discipline = 0 ;
parameterCategory = 19 ;
parameterNumber = 17 ;
}
#Soil temperature
'228139' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 2 ;
parameterNumber = 24 ;
}
#Soil moisture
'228039' = {
@ -252,3 +241,9 @@
parameterCategory = 0 ;
parameterNumber = 22 ;
}
#Soil temperature
'228139' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 2 ;
}

View File

@ -1,3 +1,60 @@
# Automatically generated by ./create_def.pl, do not edit
#Instantaneous eastward turbulent surface stress
'iews' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 38 ;
typeOfFirstFixedSurface = 1 ;
}
#Instantaneous northward turbulent surface stress
'inss' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 37 ;
typeOfFirstFixedSurface = 1 ;
}
#Minimum dew point depression
'mindpd' = {
discipline = 0 ;
parameterCategory = 0 ;
parameterNumber = 14 ;
}
#Maximum relative humidity
'maxrh' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 27 ;
}
#Maximum absolute humidity
'maxah' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 28 ;
}
#Maximum wind speed
'maxgust' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 21 ;
}
#Net long wave radiation flux (surface)
'nlwrs' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 0 ;
}
#Net long wave radiation flux (top of atmosphere)
'nlwrt' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 1 ;
}
#Maximum snow albedo
'mxsalb' = {
discipline = 0 ;
parameterCategory = 19 ;
parameterNumber = 17 ;
}
#Volumetric soil moisture content
'soilw' = {
discipline = 2 ;
@ -52,20 +109,6 @@
parameterCategory = 3 ;
parameterNumber = 9 ;
}
#Instantaneous eastward turbulent surface stress
'iews' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 38 ;
typeOfFirstFixedSurface = 1 ;
}
#Instantaneous northward turbulent surface stress
'inss' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 37 ;
typeOfFirstFixedSurface = 1 ;
}
#Evaporation in the last 6 hours
'eva06' = {
discipline = 0 ;
@ -174,18 +217,6 @@
typeOfSecondFixedSurface = 168 ;
typeOfStatisticalProcessing = 0 ;
}
#Maximum individual wave height
'hmax' = {
discipline = 10 ;
parameterCategory = 0 ;
parameterNumber = 24 ;
}
#Soil temperature
'st' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 2 ;
}
#Maximum temperature
'tmax' = {
discipline = 0 ;
@ -198,53 +229,11 @@
parameterCategory = 0 ;
parameterNumber = 5 ;
}
#Minimum dew point depression
'mindpd' = {
discipline = 0 ;
#Envelop-maximum individual wave height
'hmax' = {
discipline = 10 ;
parameterCategory = 0 ;
parameterNumber = 14 ;
}
#Maximum relative humidity
'maxrh' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 27 ;
}
#Maximum absolute humidity
'maxah' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 28 ;
}
#Maximum wind speed
'maxgust' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 21 ;
}
#Net long wave radiation flux (surface)
'nlwrs' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 0 ;
}
#Net long wave radiation flux (top of atmosphere)
'nlwrt' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 1 ;
}
#Maximum snow albedo
'mxsalb' = {
discipline = 0 ;
parameterCategory = 19 ;
parameterNumber = 17 ;
}
#Soil temperature
'st' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 2 ;
parameterNumber = 24 ;
}
#Soil moisture
'sm' = {
@ -252,3 +241,9 @@
parameterCategory = 0 ;
parameterNumber = 22 ;
}
#Soil temperature
'st' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 2 ;
}

View File

@ -1,3 +1,60 @@
# Automatically generated by ./create_def.pl, do not edit
#Instantaneous eastward turbulent surface stress
'N m**-2' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 38 ;
typeOfFirstFixedSurface = 1 ;
}
#Instantaneous northward turbulent surface stress
'N m**-2' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 37 ;
typeOfFirstFixedSurface = 1 ;
}
#Minimum dew point depression
'K' = {
discipline = 0 ;
parameterCategory = 0 ;
parameterNumber = 14 ;
}
#Maximum relative humidity
'%' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 27 ;
}
#Maximum absolute humidity
'kg m**-3' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 28 ;
}
#Maximum wind speed
'm s**-1' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 21 ;
}
#Net long wave radiation flux (surface)
'W m**-2' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 0 ;
}
#Net long wave radiation flux (top of atmosphere)
'W m**-2' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 1 ;
}
#Maximum snow albedo
'%' = {
discipline = 0 ;
parameterCategory = 19 ;
parameterNumber = 17 ;
}
#Volumetric soil moisture content
'Proportion' = {
discipline = 2 ;
@ -52,20 +109,6 @@
parameterCategory = 3 ;
parameterNumber = 9 ;
}
#Instantaneous eastward turbulent surface stress
'N m**-2' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 38 ;
typeOfFirstFixedSurface = 1 ;
}
#Instantaneous northward turbulent surface stress
'N m**-2' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 37 ;
typeOfFirstFixedSurface = 1 ;
}
#Evaporation in the last 6 hours
'kg m**-2' = {
discipline = 0 ;
@ -174,18 +217,6 @@
typeOfSecondFixedSurface = 168 ;
typeOfStatisticalProcessing = 0 ;
}
#Maximum individual wave height
'm' = {
discipline = 10 ;
parameterCategory = 0 ;
parameterNumber = 24 ;
}
#Soil temperature
'K' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 2 ;
}
#Maximum temperature
'K' = {
discipline = 0 ;
@ -198,53 +229,11 @@
parameterCategory = 0 ;
parameterNumber = 5 ;
}
#Minimum dew point depression
'K' = {
discipline = 0 ;
#Envelop-maximum individual wave height
'm' = {
discipline = 10 ;
parameterCategory = 0 ;
parameterNumber = 14 ;
}
#Maximum relative humidity
'%' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 27 ;
}
#Maximum absolute humidity
'kg m**-3' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 28 ;
}
#Maximum wind speed
'm s**-1' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 21 ;
}
#Net long wave radiation flux (surface)
'W m**-2' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 0 ;
}
#Net long wave radiation flux (top of atmosphere)
'W m**-2' = {
discipline = 0 ;
parameterCategory = 5 ;
parameterNumber = 1 ;
}
#Maximum snow albedo
'%' = {
discipline = 0 ;
parameterCategory = 19 ;
parameterNumber = 17 ;
}
#Soil temperature
'K' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 2 ;
parameterNumber = 24 ;
}
#Soil moisture
'kg m**-3' = {
@ -252,3 +241,9 @@
parameterCategory = 0 ;
parameterNumber = 22 ;
}
#Soil temperature
'K' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 2 ;
}