Merge branch 'feature/ECC-1270-marsLevtype' into feature/OceanInMars

This commit is contained in:
Sebastien Villaume 2021-09-06 15:35:02 +01:00
commit 5bbabcfaad
4 changed files with 52 additions and 8 deletions

View File

@ -0,0 +1,43 @@
# Concept marsLevtype
'sfc' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=8;}
'o2d' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=9;}
'sfc' = {typeOfFirstFixedSurface=7; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=8; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=17; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=18; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=20; scaleFactorOfFirstFixedSurface=-2; scaledValueOfFirstFixedSurface=29315; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=20; typeOfSecondFixedSurface=255;}
'pl' = {typeOfFirstFixedSurface=100; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=101; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=102; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=103; typeOfSecondFixedSurface=255;}
'ml' = {typeOfFirstFixedSurface=105; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=106; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=106;typeOfSecondFixedSurface=106;}
'pt' = {typeOfFirstFixedSurface=107; typeOfSecondFixedSurface=255;}
'pv' = {typeOfFirstFixedSurface=109; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=114; typeOfSecondFixedSurface=255;}
'hhl' = {typeOfFirstFixedSurface=118; typeOfSecondFixedSurface=255;}
'hpl' = {typeOfFirstFixedSurface=119; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=151; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=151; typeOfSecondFixedSurface=151;}
'sol' = {typeOfFirstFixedSurface=152; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=152; typeOfSecondFixedSurface=152;}
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=160; scaleFactorOfFirstFixedSurface=0; scaledValueOfFirstFixedSurface=0; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=160;}
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=9;}
'sfc' = {typeOfFirstFixedSurface=162; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=166; typeOfSecondFixedSurface=255;}
'o3d' = {typeOfFirstFixedSurface=168; typeOfSecondFixedSurface=255;}
'o3d' = {typeOfFirstFixedSurface=168; typeOfSecondFixedSurface=168;}
'o2d' = {typeOfFirstFixedSurface=169; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=170; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=171; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=175; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=176; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=176;}
'o2d' = {typeOfFirstFixedSurface=175; typeOfSecondFixedSurface=176;}
'sfc' = {typeOfFirstFixedSurface=177; typeOfSecondFixedSurface=255;}

View File

@ -74,7 +74,8 @@ if (extraDim) {
alias mars.levelist = level;
}
}
alias mars.levtype = typeOfFirstFixedSurface;
#alias mars.levtype = typeOfFirstFixedSurface;
concept mars.levtype (unknown,"marsLevtypeConcept.def",conceptsDir2,conceptsDir1):no_copy;
# GRIB-372: levelist alias does not pertain to surface parameters
if (levtype is "sfc") {
unalias mars.levelist;

View File

@ -94,8 +94,8 @@ diff $tempRef $tempOut
${tools_dir}/grib_index_build -N -k mars.levtype -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
grep -q "mars.levtype = { sfc, pl, pv, pt }"
${tools_dir}/grib_index_build -N -k mars.levtype:i -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
grep -q "mars.levtype = { 103, 1, 106, 100, 101, 8, 109, 107 }"
#${tools_dir}/grib_index_build -N -k mars.levtype:i -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
# grep -q "mars.levtype = { 103, 1, 106, 100, 101, 8, 109, 107 }"
echo "grib_compare with index files..."
# ------------------------------------

View File

@ -25,8 +25,8 @@ levtype=`${tools_dir}/grib_get -p levtype $outfile`
centre=`${tools_dir}/grib_get -p centre $outfile`
[ $centre = "cnmc" ]
levtype=`${tools_dir}/grib_get -p levtype:l $outfile`
[ $levtype -eq 100 ]
#levtype=`${tools_dir}/grib_get -p levtype:l $outfile`
#[ $levtype -eq 100 ]
centre=`${tools_dir}/grib_get -p centre:l $outfile`
[ $centre -eq 80 ]
@ -38,7 +38,7 @@ outfile=${data_dir}/set.grib2
rm -f $outfile
${tools_dir}/grib_set -v -p levtype:l,centre:s -s levtype:l=100,centre:s=cnmc $infile $outfile >$REDIRECT
${tools_dir}/grib_set -v -p levtype:l,centre:s -s levtype=pl,centre:s=cnmc $infile $outfile >$REDIRECT
levtype=`${tools_dir}/grib_get -p levtype $outfile`
[ $levtype = "pl" ]
@ -46,8 +46,8 @@ levtype=`${tools_dir}/grib_get -p levtype $outfile`
centre=`${tools_dir}/grib_get -p centre $outfile`
[ $centre = "cnmc" ]
levtype=`${tools_dir}/grib_get -p levtype:l $outfile`
[ $levtype -eq 100 ]
#levtype=`${tools_dir}/grib_get -p levtype:l $outfile`
#[ $levtype -eq 100 ]
centre=`${tools_dir}/grib_get -p centre:l $outfile`
[ $centre -eq 80 ]