mirror of https://github.com/ecmwf/eccodes.git
Merge branch 'develop' of ssh://software.ecmwf.int:7999/eccodes/eccodes into develop
This commit is contained in:
commit
bbc7b653e5
|
@ -139,6 +139,7 @@ examples/F90/eccodes_f_bufr_subset
|
|||
examples/F90/eccodes_f_bufr_clone
|
||||
examples/F90/eccodes_f_bufr_read_header
|
||||
examples/F90/eccodes_f_bufr_read_scatterometer
|
||||
examples/F90/eccodes_f_bufr_read_tropical_cyclone
|
||||
examples/F90/eccodes_f_grib_clone
|
||||
examples/F90/eccodes_f_copy_message
|
||||
examples/F90/eccodes_f_copy_namespace
|
||||
|
@ -300,3 +301,4 @@ data/bufr/set_unexpandedDescriptors.filter
|
|||
|
||||
*.sublime-workspace
|
||||
*.old
|
||||
|
||||
|
|
|
@ -106,8 +106,16 @@ set( HAVE_LIBOPENJPEG 0 )
|
|||
|
||||
if( ENABLE_JPG )
|
||||
|
||||
ecbuild_add_extra_search_paths( jasper ) # help standard cmake macro with ecmwf paths
|
||||
# Note: This is a deprecated feature but we need it to find Jasper at ECMWF.
|
||||
# ecbuild_add_extra_search_paths modifies CMAKE_PREFIX_PATH
|
||||
# which can affect future package discovery if not undone by the caller.
|
||||
# The current CMAKE_PREFIX_PATH is backed up as _CMAKE_PREFIX_PATH
|
||||
#
|
||||
set(ECBUILD_NO_DEPRECATIONS ON) # Suppress deprecation message
|
||||
ecbuild_add_extra_search_paths( jasper )
|
||||
find_package( Jasper )
|
||||
set(CMAKE_PREFIX_PATH ${_CMAKE_PREFIX_PATH}) # Restore CMAKE_PREFIX_PATH
|
||||
set(ECBUILD_NO_DEPRECATIONS OFF) # Remove suppression
|
||||
|
||||
find_package( OpenJPEG )
|
||||
|
||||
|
|
|
@ -9455,120 +9455,135 @@
|
|||
indicatorOfParameter = 44 ;
|
||||
}
|
||||
#Mean eastward gravity wave surface stress
|
||||
'p235045' = {
|
||||
'megwss' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 45 ;
|
||||
}
|
||||
#Mean northward gravity wave surface stress
|
||||
'p235046' = {
|
||||
'mngwss' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 46 ;
|
||||
}
|
||||
#Mean gravity wave dissipation
|
||||
'p235047' = {
|
||||
'mgwd' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 47 ;
|
||||
}
|
||||
#Mean runoff rate
|
||||
'p235048' = {
|
||||
'mror' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 48 ;
|
||||
}
|
||||
#Mean top net short-wave radiation flux, clear sky
|
||||
'p235049' = {
|
||||
'mtnswrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 49 ;
|
||||
}
|
||||
#Mean top net long-wave radiation flux, clear sky
|
||||
'p235050' = {
|
||||
'mtnlwrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 50 ;
|
||||
}
|
||||
#Mean surface net short-wave radiation flux, clear sky
|
||||
'p235051' = {
|
||||
'msnswrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 51 ;
|
||||
}
|
||||
#Mean surface net long-wave radiation flux, clear sky
|
||||
'p235052' = {
|
||||
'msnlwrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 52 ;
|
||||
}
|
||||
#Mean top downward short-wave radiation flux
|
||||
'p235053' = {
|
||||
'mtdwswrf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 53 ;
|
||||
}
|
||||
#Mean vertically integrated moisture divergence
|
||||
'p235054' = {
|
||||
'mvimd' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 54 ;
|
||||
}
|
||||
#Mean total precipitation rate
|
||||
'p235055' = {
|
||||
'mtpr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 55 ;
|
||||
}
|
||||
#Mean convective snowfall rate
|
||||
'p235056' = {
|
||||
'mcsr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 56 ;
|
||||
}
|
||||
#Mean large-scale snowfall rate
|
||||
'p235057' = {
|
||||
'mlssr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 57 ;
|
||||
}
|
||||
#Mean surface direct short-wave radiation flux
|
||||
'p235058' = {
|
||||
'msdrswrf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 58 ;
|
||||
}
|
||||
#Mean surface direct short-wave radiation flux, clear sky
|
||||
'p235059' = {
|
||||
'msdrswrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 59 ;
|
||||
}
|
||||
#Mean surface diffuse short-wave radiation flux
|
||||
'p235060' = {
|
||||
'msdfswrf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 60 ;
|
||||
}
|
||||
#Mean surface diffuse short-wave radiation flux, clear sky
|
||||
'p235061' = {
|
||||
'msdfswrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 61 ;
|
||||
}
|
||||
#Mean carbon dioxide net ecosystem exchange flux
|
||||
'p235062' = {
|
||||
'mcdneef' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 62 ;
|
||||
}
|
||||
#Mean carbon dioxide gross primary production flux
|
||||
'p235063' = {
|
||||
'mcdgppf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 63 ;
|
||||
}
|
||||
#Mean carbon dioxide ecosystem respiration flux
|
||||
'p235064' = {
|
||||
'mcderf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 64 ;
|
||||
}
|
||||
#Mean rain rate
|
||||
'p235065' = {
|
||||
'mrr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 65 ;
|
||||
}
|
||||
#Mean convective rain rate
|
||||
'p235066' = {
|
||||
'mcrr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 66 ;
|
||||
}
|
||||
#Mean large-scale rain rate
|
||||
'p235067' = {
|
||||
'mlsrr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 67 ;
|
||||
}
|
||||
#Mean surface downward short-wave radiation flux, clear sky
|
||||
'msdwswrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 68 ;
|
||||
}
|
||||
#Mean surface downward long-wave radiation flux, clear sky
|
||||
'msdwlwrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 69 ;
|
||||
}
|
||||
#Mean potential evaporation rate
|
||||
'mper' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 70 ;
|
||||
}
|
||||
#Ceiling
|
||||
'ceil' = {
|
||||
table2Version = 228 ;
|
||||
|
|
|
@ -9569,6 +9569,21 @@
|
|||
table2Version = 235 ;
|
||||
indicatorOfParameter = 67 ;
|
||||
}
|
||||
#Mean surface downward short-wave radiation flux, clear sky
|
||||
'Mean surface downward short-wave radiation flux, clear sky' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 68 ;
|
||||
}
|
||||
#Mean surface downward long-wave radiation flux, clear sky
|
||||
'Mean surface downward long-wave radiation flux, clear sky' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 69 ;
|
||||
}
|
||||
#Mean potential evaporation rate
|
||||
'Mean potential evaporation rate' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 70 ;
|
||||
}
|
||||
#Ceiling
|
||||
'Ceiling' = {
|
||||
table2Version = 228 ;
|
||||
|
|
|
@ -9569,6 +9569,21 @@
|
|||
table2Version = 235 ;
|
||||
indicatorOfParameter = 67 ;
|
||||
}
|
||||
#Mean surface downward short-wave radiation flux, clear sky
|
||||
'235068' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 68 ;
|
||||
}
|
||||
#Mean surface downward long-wave radiation flux, clear sky
|
||||
'235069' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 69 ;
|
||||
}
|
||||
#Mean potential evaporation rate
|
||||
'235070' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 70 ;
|
||||
}
|
||||
#Ceiling
|
||||
'260109' = {
|
||||
table2Version = 228 ;
|
||||
|
|
|
@ -9330,245 +9330,260 @@
|
|||
indicatorOfParameter = 251 ;
|
||||
}
|
||||
#Mean surface runoff rate
|
||||
'~' = {
|
||||
'msror' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 20 ;
|
||||
}
|
||||
#Mean sub-surface runoff rate
|
||||
'~' = {
|
||||
'mssror' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 21 ;
|
||||
}
|
||||
#Mean surface photosynthetically active radiation flux, clear sky
|
||||
'~' = {
|
||||
'msparfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 22 ;
|
||||
}
|
||||
#Mean snow evaporation rate
|
||||
'~' = {
|
||||
'mser' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 23 ;
|
||||
}
|
||||
#Mean snowmelt rate
|
||||
'~' = {
|
||||
'msmr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 24 ;
|
||||
}
|
||||
#Mean magnitude of turbulent surface stress
|
||||
'~' = {
|
||||
'mmtss' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 25 ;
|
||||
}
|
||||
#Mean large-scale precipitation fraction
|
||||
'~' = {
|
||||
'mlspf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 26 ;
|
||||
}
|
||||
#Mean surface downward UV radiation flux
|
||||
'~' = {
|
||||
'msdwuvrf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 27 ;
|
||||
}
|
||||
#Mean surface photosynthetically active radiation flux
|
||||
'~' = {
|
||||
'msparf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 28 ;
|
||||
}
|
||||
#Mean large-scale precipitation rate
|
||||
'~' = {
|
||||
'mlspr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 29 ;
|
||||
}
|
||||
#Mean convective precipitation rate
|
||||
'~' = {
|
||||
'mcpr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 30 ;
|
||||
}
|
||||
#Mean snowfall rate
|
||||
'~' = {
|
||||
'msr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 31 ;
|
||||
}
|
||||
#Mean boundary layer dissipation
|
||||
'~' = {
|
||||
'mbld' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 32 ;
|
||||
}
|
||||
#Mean surface sensible heat flux
|
||||
'~' = {
|
||||
'msshf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 33 ;
|
||||
}
|
||||
#Mean surface latent heat flux
|
||||
'~' = {
|
||||
'mslhf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 34 ;
|
||||
}
|
||||
#Mean surface downward short-wave radiation flux
|
||||
'~' = {
|
||||
'msdwswrf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 35 ;
|
||||
}
|
||||
#Mean surface downward long-wave radiation flux
|
||||
'~' = {
|
||||
'msdwlwrf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 36 ;
|
||||
}
|
||||
#Mean surface net short-wave radiation flux
|
||||
'~' = {
|
||||
'msnswrf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 37 ;
|
||||
}
|
||||
#Mean surface net long-wave radiation flux
|
||||
'~' = {
|
||||
'msnlwrf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 38 ;
|
||||
}
|
||||
#Mean top net short-wave radiation flux
|
||||
'~' = {
|
||||
'mtnswrf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 39 ;
|
||||
}
|
||||
#Mean top net long-wave radiation flux
|
||||
'~' = {
|
||||
'mtnlwrf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 40 ;
|
||||
}
|
||||
#Mean eastward turbulent surface stress
|
||||
'~' = {
|
||||
'metss' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 41 ;
|
||||
}
|
||||
#Mean northward turbulent surface stress
|
||||
'~' = {
|
||||
'mntss' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 42 ;
|
||||
}
|
||||
#Mean evaporation rate
|
||||
'~' = {
|
||||
'mer' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 43 ;
|
||||
}
|
||||
#Sunshine duration fraction
|
||||
'~' = {
|
||||
'sdf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 44 ;
|
||||
}
|
||||
#Mean eastward gravity wave surface stress
|
||||
'~' = {
|
||||
'megwss' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 45 ;
|
||||
}
|
||||
#Mean northward gravity wave surface stress
|
||||
'~' = {
|
||||
'mngwss' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 46 ;
|
||||
}
|
||||
#Mean gravity wave dissipation
|
||||
'~' = {
|
||||
'mgwd' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 47 ;
|
||||
}
|
||||
#Mean runoff rate
|
||||
'~' = {
|
||||
'mror' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 48 ;
|
||||
}
|
||||
#Mean top net short-wave radiation flux, clear sky
|
||||
'~' = {
|
||||
'mtnswrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 49 ;
|
||||
}
|
||||
#Mean top net long-wave radiation flux, clear sky
|
||||
'~' = {
|
||||
'mtnlwrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 50 ;
|
||||
}
|
||||
#Mean surface net short-wave radiation flux, clear sky
|
||||
'~' = {
|
||||
'msnswrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 51 ;
|
||||
}
|
||||
#Mean surface net long-wave radiation flux, clear sky
|
||||
'~' = {
|
||||
'msnlwrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 52 ;
|
||||
}
|
||||
#Mean top downward short-wave radiation flux
|
||||
'~' = {
|
||||
'mtdwswrf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 53 ;
|
||||
}
|
||||
#Mean vertically integrated moisture divergence
|
||||
'~' = {
|
||||
'mvimd' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 54 ;
|
||||
}
|
||||
#Mean total precipitation rate
|
||||
'~' = {
|
||||
'mtpr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 55 ;
|
||||
}
|
||||
#Mean convective snowfall rate
|
||||
'~' = {
|
||||
'mcsr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 56 ;
|
||||
}
|
||||
#Mean large-scale snowfall rate
|
||||
'~' = {
|
||||
'mlssr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 57 ;
|
||||
}
|
||||
#Mean surface direct short-wave radiation flux
|
||||
'~' = {
|
||||
'msdrswrf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 58 ;
|
||||
}
|
||||
#Mean surface direct short-wave radiation flux, clear sky
|
||||
'~' = {
|
||||
'msdrswrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 59 ;
|
||||
}
|
||||
#Mean surface diffuse short-wave radiation flux
|
||||
'~' = {
|
||||
'msdfswrf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 60 ;
|
||||
}
|
||||
#Mean surface diffuse short-wave radiation flux, clear sky
|
||||
'~' = {
|
||||
'msdfswrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 61 ;
|
||||
}
|
||||
#Mean carbon dioxide net ecosystem exchange flux
|
||||
'~' = {
|
||||
'mcdneef' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 62 ;
|
||||
}
|
||||
#Mean carbon dioxide gross primary production flux
|
||||
'~' = {
|
||||
'mcdgppf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 63 ;
|
||||
}
|
||||
#Mean carbon dioxide ecosystem respiration flux
|
||||
'~' = {
|
||||
'mcderf' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 64 ;
|
||||
}
|
||||
#Mean rain rate
|
||||
'~' = {
|
||||
'mrr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 65 ;
|
||||
}
|
||||
#Mean convective rain rate
|
||||
'~' = {
|
||||
'mcrr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 66 ;
|
||||
}
|
||||
#Mean large-scale rain rate
|
||||
'~' = {
|
||||
'mlsrr' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 67 ;
|
||||
}
|
||||
#Mean surface downward short-wave radiation flux, clear sky
|
||||
'msdwswrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 68 ;
|
||||
}
|
||||
#Mean surface downward long-wave radiation flux, clear sky
|
||||
'msdwlwrfcs' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 69 ;
|
||||
}
|
||||
#Mean potential evaporation rate
|
||||
'mper' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 70 ;
|
||||
}
|
||||
#Ceiling
|
||||
'ceil' = {
|
||||
table2Version = 228 ;
|
||||
|
|
|
@ -9569,6 +9569,21 @@
|
|||
table2Version = 235 ;
|
||||
indicatorOfParameter = 67 ;
|
||||
}
|
||||
#Mean surface downward short-wave radiation flux, clear sky
|
||||
'W m**-2' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 68 ;
|
||||
}
|
||||
#Mean surface downward long-wave radiation flux, clear sky
|
||||
'W m**-2' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 69 ;
|
||||
}
|
||||
#Mean potential evaporation rate
|
||||
'kg m**-2 s**-1' = {
|
||||
table2Version = 235 ;
|
||||
indicatorOfParameter = 70 ;
|
||||
}
|
||||
#Ceiling
|
||||
'm' = {
|
||||
table2Version = 228 ;
|
||||
|
|
|
@ -21,10 +21,9 @@ foreach my $p ( metdb::grib_parameters->find(
|
|||
my $file = "2.$centre.$table.table";
|
||||
if($file ne $last)
|
||||
{
|
||||
#system("p4 edit $file");
|
||||
open(OUT,">$file") or die "$file: $!";
|
||||
print OUT "# This file was automatically generated by $0\n";
|
||||
#system("p4 add $file");
|
||||
|
||||
$last = $file;
|
||||
}
|
||||
|
||||
|
|
|
@ -209,84 +209,84 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 33 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized short-wave radiation
|
||||
#Mean temperature tendency due to short-wave radiation
|
||||
'mttsr' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 22 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized long-wave radiation
|
||||
#Mean temperature tendency due to long-wave radiation
|
||||
'mtttr' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 23 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized short-wave radiation, clear sky
|
||||
#Mean temperature tendency due to short-wave radiation, clear sky
|
||||
'mttsrc' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 24 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized long-wave radiation, clear sky
|
||||
#Mean temperature tendency due to long-wave radiation, clear sky
|
||||
'mtttrc' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 25 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrizations
|
||||
#Mean temperature tendency due to parametrisations
|
||||
'mttpm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 26 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean specific humidity tendency due to parametrizations
|
||||
#Mean specific humidity tendency due to parametrisations
|
||||
'mqtpm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 1 ;
|
||||
parameterNumber = 108 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean eastward wind tendency due to parametrizations
|
||||
#Mean eastward wind tendency due to parametrisations
|
||||
'mutpm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 2 ;
|
||||
parameterNumber = 39 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean northward wind tendency due to parametrizations
|
||||
#Mean northward wind tendency due to parametrisations
|
||||
'mvtpm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 2 ;
|
||||
parameterNumber = 40 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean updraught mass flux due to parametrized convection
|
||||
#Mean updraught mass flux
|
||||
'mumf' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 27 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean downdraught mass flux due to parametrized convection
|
||||
#Mean downdraught mass flux
|
||||
'mdmf' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 28 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean updraught detrainment rate due to parametrized convection
|
||||
#Mean updraught detrainment rate
|
||||
'mudr' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 29 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean downdraught detrainment rate due to parametrized convection
|
||||
#Mean downdraught detrainment rate
|
||||
'mddr' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
|
@ -2621,7 +2621,7 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 22 ;
|
||||
}
|
||||
#Soil Moisture for TIGGE
|
||||
#Soil Moisture
|
||||
'sm' = {
|
||||
discipline = 2 ;
|
||||
parameterCategory = 0 ;
|
||||
|
@ -2640,7 +2640,7 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 2 ;
|
||||
}
|
||||
#Soil temperature for TIGGE
|
||||
#Soil Temperature
|
||||
'st' = {
|
||||
discipline = 2 ;
|
||||
parameterCategory = 0 ;
|
||||
|
|
|
@ -209,85 +209,85 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 33 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized short-wave radiation
|
||||
'Mean temperature tendency due to parametrized short-wave radiation' = {
|
||||
#Mean temperature tendency due to short-wave radiation
|
||||
'Mean temperature tendency due to short-wave radiation' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 22 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized long-wave radiation
|
||||
'Mean temperature tendency due to parametrized long-wave radiation' = {
|
||||
#Mean temperature tendency due to long-wave radiation
|
||||
'Mean temperature tendency due to long-wave radiation' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 23 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized short-wave radiation, clear sky
|
||||
'Mean temperature tendency due to parametrized short-wave radiation, clear sky' = {
|
||||
#Mean temperature tendency due to short-wave radiation, clear sky
|
||||
'Mean temperature tendency due to short-wave radiation, clear sky' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 24 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized long-wave radiation, clear sky
|
||||
'Mean temperature tendency due to parametrized long-wave radiation, clear sky' = {
|
||||
#Mean temperature tendency due to long-wave radiation, clear sky
|
||||
'Mean temperature tendency due to long-wave radiation, clear sky' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 25 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrizations
|
||||
'Mean temperature tendency due to parametrizations' = {
|
||||
#Mean temperature tendency due to parametrisations
|
||||
'Mean temperature tendency due to parametrisations' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 26 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean specific humidity tendency due to parametrizations
|
||||
'Mean specific humidity tendency due to parametrizations' = {
|
||||
#Mean specific humidity tendency due to parametrisations
|
||||
'Mean specific humidity tendency due to parametrisations' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 1 ;
|
||||
parameterNumber = 108 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean eastward wind tendency due to parametrizations
|
||||
'Mean eastward wind tendency due to parametrizations' = {
|
||||
#Mean eastward wind tendency due to parametrisations
|
||||
'Mean eastward wind tendency due to parametrisations' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 2 ;
|
||||
parameterNumber = 39 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean northward wind tendency due to parametrizations
|
||||
'Mean northward wind tendency due to parametrizations' = {
|
||||
#Mean northward wind tendency due to parametrisations
|
||||
'Mean northward wind tendency due to parametrisations' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 2 ;
|
||||
parameterNumber = 40 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean updraught mass flux due to parametrized convection
|
||||
'Mean updraught mass flux due to parametrized convection' = {
|
||||
#Mean updraught mass flux
|
||||
'Mean updraught mass flux' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 27 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean downdraught mass flux due to parametrized convection
|
||||
'Mean downdraught mass flux due to parametrized convection' = {
|
||||
#Mean downdraught mass flux
|
||||
'Mean downdraught mass flux' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 28 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean updraught detrainment rate due to parametrized convection
|
||||
'Mean updraught detrainment rate due to parametrized convection' = {
|
||||
#Mean updraught detrainment rate
|
||||
'Mean updraught detrainment rate' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 29 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean downdraught detrainment rate due to parametrized convection
|
||||
'Mean downdraught detrainment rate due to parametrized convection' = {
|
||||
#Mean downdraught detrainment rate
|
||||
'Mean downdraught detrainment rate' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 30 ;
|
||||
|
@ -2621,7 +2621,7 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 22 ;
|
||||
}
|
||||
#Soil Moisture for TIGGE
|
||||
#Soil Moisture
|
||||
'Soil Moisture' = {
|
||||
discipline = 2 ;
|
||||
parameterCategory = 0 ;
|
||||
|
@ -2640,7 +2640,7 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 2 ;
|
||||
}
|
||||
#Soil temperature for TIGGE
|
||||
#Soil Temperature
|
||||
'Soil Temperature' = {
|
||||
discipline = 2 ;
|
||||
parameterCategory = 0 ;
|
||||
|
|
|
@ -209,84 +209,84 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 33 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized short-wave radiation
|
||||
#Mean temperature tendency due to short-wave radiation
|
||||
'235001' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 22 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized long-wave radiation
|
||||
#Mean temperature tendency due to long-wave radiation
|
||||
'235002' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 23 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized short-wave radiation, clear sky
|
||||
#Mean temperature tendency due to short-wave radiation, clear sky
|
||||
'235003' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 24 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized long-wave radiation, clear sky
|
||||
#Mean temperature tendency due to long-wave radiation, clear sky
|
||||
'235004' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 25 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrizations
|
||||
#Mean temperature tendency due to parametrisations
|
||||
'235005' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 26 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean specific humidity tendency due to parametrizations
|
||||
#Mean specific humidity tendency due to parametrisations
|
||||
'235006' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 1 ;
|
||||
parameterNumber = 108 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean eastward wind tendency due to parametrizations
|
||||
#Mean eastward wind tendency due to parametrisations
|
||||
'235007' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 2 ;
|
||||
parameterNumber = 39 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean northward wind tendency due to parametrizations
|
||||
#Mean northward wind tendency due to parametrisations
|
||||
'235008' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 2 ;
|
||||
parameterNumber = 40 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean updraught mass flux due to parametrized convection
|
||||
#Mean updraught mass flux
|
||||
'235009' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 27 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean downdraught mass flux due to parametrized convection
|
||||
#Mean downdraught mass flux
|
||||
'235010' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 28 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean updraught detrainment rate due to parametrized convection
|
||||
#Mean updraught detrainment rate
|
||||
'235011' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 29 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean downdraught detrainment rate due to parametrized convection
|
||||
#Mean downdraught detrainment rate
|
||||
'235012' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
|
@ -2621,7 +2621,7 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 22 ;
|
||||
}
|
||||
#Soil Moisture for TIGGE
|
||||
#Soil Moisture
|
||||
'228039' = {
|
||||
discipline = 2 ;
|
||||
parameterCategory = 0 ;
|
||||
|
@ -2640,7 +2640,7 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 2 ;
|
||||
}
|
||||
#Soil temperature for TIGGE
|
||||
#Soil Temperature
|
||||
'228139' = {
|
||||
discipline = 2 ;
|
||||
parameterCategory = 0 ;
|
||||
|
|
|
@ -209,84 +209,84 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 33 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized short-wave radiation
|
||||
#Mean temperature tendency due to short-wave radiation
|
||||
'mttsr' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 22 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized long-wave radiation
|
||||
#Mean temperature tendency due to long-wave radiation
|
||||
'mtttr' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 23 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized short-wave radiation, clear sky
|
||||
#Mean temperature tendency due to short-wave radiation, clear sky
|
||||
'mttsrc' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 24 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized long-wave radiation, clear sky
|
||||
#Mean temperature tendency due to long-wave radiation, clear sky
|
||||
'mtttrc' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 25 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrizations
|
||||
#Mean temperature tendency due to parametrisations
|
||||
'mttpm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 26 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean specific humidity tendency due to parametrizations
|
||||
#Mean specific humidity tendency due to parametrisations
|
||||
'mqtpm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 1 ;
|
||||
parameterNumber = 108 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean eastward wind tendency due to parametrizations
|
||||
#Mean eastward wind tendency due to parametrisations
|
||||
'mutpm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 2 ;
|
||||
parameterNumber = 39 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean northward wind tendency due to parametrizations
|
||||
#Mean northward wind tendency due to parametrisations
|
||||
'mvtpm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 2 ;
|
||||
parameterNumber = 40 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean updraught mass flux due to parametrized convection
|
||||
#Mean updraught mass flux
|
||||
'mumf' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 27 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean downdraught mass flux due to parametrized convection
|
||||
#Mean downdraught mass flux
|
||||
'mdmf' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 28 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean updraught detrainment rate due to parametrized convection
|
||||
#Mean updraught detrainment rate
|
||||
'mudr' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 29 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean downdraught detrainment rate due to parametrized convection
|
||||
#Mean downdraught detrainment rate
|
||||
'mddr' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
|
@ -2621,7 +2621,7 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 22 ;
|
||||
}
|
||||
#Soil Moisture for TIGGE
|
||||
#Soil Moisture
|
||||
'sm' = {
|
||||
discipline = 2 ;
|
||||
parameterCategory = 0 ;
|
||||
|
@ -2640,7 +2640,7 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 2 ;
|
||||
}
|
||||
#Soil temperature for TIGGE
|
||||
#Soil Temperature
|
||||
'st' = {
|
||||
discipline = 2 ;
|
||||
parameterCategory = 0 ;
|
||||
|
|
|
@ -209,84 +209,84 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 33 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized short-wave radiation
|
||||
#Mean temperature tendency due to short-wave radiation
|
||||
'K s**-1' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 22 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized long-wave radiation
|
||||
#Mean temperature tendency due to long-wave radiation
|
||||
'K s**-1' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 23 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized short-wave radiation, clear sky
|
||||
#Mean temperature tendency due to short-wave radiation, clear sky
|
||||
'K s**-1' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 24 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrized long-wave radiation, clear sky
|
||||
#Mean temperature tendency due to long-wave radiation, clear sky
|
||||
'K s**-1' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 25 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean temperature tendency due to parametrizations
|
||||
#Mean temperature tendency due to parametrisations
|
||||
'K s**-1' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 0 ;
|
||||
parameterNumber = 26 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean specific humidity tendency due to parametrizations
|
||||
#Mean specific humidity tendency due to parametrisations
|
||||
'kg kg**-1 s**-1' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 1 ;
|
||||
parameterNumber = 108 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean eastward wind tendency due to parametrizations
|
||||
#Mean eastward wind tendency due to parametrisations
|
||||
'm s**-2' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 2 ;
|
||||
parameterNumber = 39 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean northward wind tendency due to parametrizations
|
||||
#Mean northward wind tendency due to parametrisations
|
||||
'm s**-2' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 2 ;
|
||||
parameterNumber = 40 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean updraught mass flux due to parametrized convection
|
||||
#Mean updraught mass flux
|
||||
'kg m**-2 s**-1' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 27 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean downdraught mass flux due to parametrized convection
|
||||
#Mean downdraught mass flux
|
||||
'kg m**-2 s**-1' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 28 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean updraught detrainment rate due to parametrized convection
|
||||
#Mean updraught detrainment rate
|
||||
'kg m**-3 s**-1' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 29 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Mean downdraught detrainment rate due to parametrized convection
|
||||
#Mean downdraught detrainment rate
|
||||
'kg m**-3 s**-1' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
|
@ -2621,7 +2621,7 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 22 ;
|
||||
}
|
||||
#Soil Moisture for TIGGE
|
||||
#Soil Moisture
|
||||
'kg m**-3' = {
|
||||
discipline = 2 ;
|
||||
parameterCategory = 0 ;
|
||||
|
@ -2640,7 +2640,7 @@
|
|||
parameterCategory = 0 ;
|
||||
parameterNumber = 2 ;
|
||||
}
|
||||
#Soil temperature for TIGGE
|
||||
#Soil Temperature
|
||||
'K' = {
|
||||
discipline = 2 ;
|
||||
parameterCategory = 0 ;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
27 s2 Sub-seasonal to seasonal prediction project (S2S)
|
||||
28 j5 Japanese 55 year Reanalysis (JRA55)
|
||||
29 ur UERRA
|
||||
30 et CERA-SAT: ERA-CLIM2 coupled reanalysis of the satellite era
|
||||
99 te Test
|
||||
100 at Austria
|
||||
101 be Belgium
|
||||
|
|
|
@ -49,6 +49,7 @@ list( APPEND tests
|
|||
bufr_keys_iterator
|
||||
bufr_read_header
|
||||
bufr_read_scatterometer
|
||||
#bufr_read_tropical_cyclone
|
||||
bufr_read_synop
|
||||
bufr_read_temp
|
||||
bufr_set_keys
|
||||
|
|
|
@ -13,7 +13,7 @@ rm $OUTPUT || true
|
|||
# We are expecting the command to fail so must turn off "set -e"
|
||||
INPUT=${data_dir}/bad.grib
|
||||
set +e
|
||||
$PYTHON $examples_src/binary_message.py $INPUT $OUTPUT
|
||||
$PYTHON $examples_src/binary_message.py $INPUT $OUTPUT 2>/dev/null
|
||||
status=$?
|
||||
set -e
|
||||
# Check command did indeed fail
|
||||
|
|
|
@ -0,0 +1,278 @@
|
|||
# Copyright 2005-2015 ECMWF.
|
||||
#
|
||||
# This software is licensed under the terms of the Apache Licence Version 2.0
|
||||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
#
|
||||
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
||||
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||
#
|
||||
# Python implementation: bufr_read_tropical_cyclone
|
||||
#
|
||||
# Description: how to read data of the ECMWF EPS tropical cyclone tracks encoded in BUFR format.
|
||||
#
|
||||
# Please note that scatterometer data can be encoded in various ways in BUFR. Therefore the code
|
||||
# below might not work directly for other types of messages than the one used in the
|
||||
# example. It is advised to use bufr_dump first to understand the structure of these messages.
|
||||
#
|
||||
|
||||
|
||||
import traceback
|
||||
import sys
|
||||
import collections
|
||||
#import numpy
|
||||
|
||||
from eccodes import *
|
||||
|
||||
INPUT = '../../data/bufr/tropical_cyclone.bufr'
|
||||
VERBOSE = 1 # verbose error reporting
|
||||
|
||||
|
||||
data=collections.defaultdict(dict)
|
||||
def example():
|
||||
|
||||
# open bufr file
|
||||
f = open(INPUT)
|
||||
|
||||
cnt = 1
|
||||
|
||||
# loop for the messages in the file
|
||||
while 1:
|
||||
# get handle for message
|
||||
gid = codes_bufr_new_from_file(f)
|
||||
if gid is None:
|
||||
break
|
||||
|
||||
print '**************** MESSAGE: ',cnt,' *****************'
|
||||
|
||||
# we need to instruct ecCodes to expand all the descriptors
|
||||
# i.e. unpack the data values
|
||||
codes_set(gid, 'unpack', 1)
|
||||
|
||||
# The BUFR file contains a single message with number of subsets in a compressed form.
|
||||
# It means each subset has exactly the same structure.
|
||||
# One subset contains values of latitude, longitude, pressure, wind at 10m
|
||||
# for one particular ensemble member over forecast period from 0h to 240h by 6h step.
|
||||
# To print values of latitude, longitude, pressure, wind at 10m for particular ensemble member from all the subsets
|
||||
# we will simply access the key by condition (see below)
|
||||
#
|
||||
# The key latitude will give back the array of all the values corresponding
|
||||
# to all the instances of the key in the tree.
|
||||
# The key #2#latitude will return only the values of the second instance in the tree.
|
||||
|
||||
|
||||
numObs=codes_get(gid,"numberOfSubsets")
|
||||
year = codes_get(gid, "year")
|
||||
month = codes_get(gid, "month")
|
||||
day = codes_get(gid, "day")
|
||||
hour = codes_get(gid, "hour")
|
||||
minute= codes_get(gid, "minute")
|
||||
|
||||
#print 'Date and time: %d%s %d%s %d%s %d%s %d' % (day,'.',month,'.',year,' ',hour,':',minute)
|
||||
print 'Date and time: ', day,'.',month,'.',year,' ',hour,':',minute
|
||||
|
||||
|
||||
stormIdentifier = codes_get(gid,"stormIdentifier")
|
||||
print 'Storm identifier: ', stormIdentifier
|
||||
|
||||
|
||||
#How many different timePeriod in the data structure?
|
||||
rankPeriod=0
|
||||
while True:
|
||||
rankPeriod=rankPeriod+1
|
||||
try:
|
||||
codes_get_array(gid,"#%d#timePeriod" %rankPeriod)
|
||||
#period=next(timeStep[i] for i in range (len(timeStep))if timeStep[i] != CODES_MISSING_DOUBLE )
|
||||
except CodesInternalError, err:
|
||||
#print err.msg
|
||||
#del(period)
|
||||
break
|
||||
#the numberOfPeriods includes the analysis (period=0)
|
||||
|
||||
# Get ensembleMemberNumber
|
||||
memberNumber = codes_get_array(gid, "ensembleMemberNumber")
|
||||
memberNumberLen=len(memberNumber)
|
||||
|
||||
|
||||
# Observed Storm Centre
|
||||
significance = codes_get(gid,'#1#meteorologicalAttributeSignificance')
|
||||
latitudeCentre = codes_get(gid,'#1#latitude')
|
||||
longitudeCentre = codes_get(gid,'#1#longitude')
|
||||
|
||||
if (significance!=1):
|
||||
print 'ERROR: unexpected #1#meteorologicalAttributeSignificance'
|
||||
return 1
|
||||
|
||||
if (latitudeCentre==CODES_MISSING_DOUBLE) and (longitudeCentre==CODES_MISSING_DOUBLE):
|
||||
print 'Observed storm centre position missing'
|
||||
else:
|
||||
print 'Observed storm centre: latitude=',latitudeCentre,' longitude=',longitudeCentre
|
||||
|
||||
# Location of storm in perturbed analysis
|
||||
significance = codes_get(gid,'#2#meteorologicalAttributeSignificance')
|
||||
latitudeAnalysis = codes_get_array(gid,'#2#latitude')
|
||||
longitudeAnalysis = codes_get_array(gid,'#2#longitude')
|
||||
pressureAnalysis = codes_get_array(gid,'#1#pressureReducedToMeanSeaLevel')
|
||||
|
||||
if (significance!=4):
|
||||
print 'ERROR: unexpected #2#meteorologicalAttributeSignificance'
|
||||
return 1
|
||||
|
||||
latitude=[[0 for x in range(rankPeriod)] for x in range(len(memberNumber))]
|
||||
longitude=[[0 for x in range(rankPeriod)] for x in range(len(memberNumber))]
|
||||
pressure=[[0 for x in range(rankPeriod)] for x in range(len(memberNumber))]
|
||||
|
||||
|
||||
if (len(latitudeAnalysis)==len(memberNumber)):
|
||||
for i in range(len(memberNumber)):
|
||||
latitude[i][0]=latitudeAnalysis[i]
|
||||
longitude[i][0]=longitudeAnalysis[i]
|
||||
pressure[i][0]=pressureAnalysis[i]
|
||||
|
||||
else:
|
||||
for i in range(len(memberNumber)):
|
||||
latitude[i][0]=latitudeAnalysis[0]
|
||||
longitude[i][0]=longitudeAnalysis[0]
|
||||
pressure[i][0]=pressureAnalysis[i]
|
||||
|
||||
# Location of Maximum Wind
|
||||
significance=codes_get(gid,'#3#meteorologicalAttributeSignificance')
|
||||
latitudeMaxWind0=codes_get_array(gid,'#3#latitude')
|
||||
longitudeMaxWind0= codes_get_array(gid,'#3#longitude')
|
||||
|
||||
if (significance!=3):
|
||||
print 'ERROR: unexpected #3#meteorologicalAttributeSignificance=', significance
|
||||
return 1
|
||||
|
||||
latitudeWind=[[0 for x in range(rankPeriod)] for x in range(len(memberNumber))]
|
||||
longitudeWind=[[0 for x in range(rankPeriod)] for x in range(len(memberNumber))]
|
||||
wind=[[0 for x in range(rankPeriod)] for x in range(len(memberNumber))]
|
||||
|
||||
windMaxWind0= codes_get_array(gid,'#1#windSpeedAt10M')
|
||||
|
||||
if (len(latitudeMaxWind0)==len(memberNumber)):
|
||||
for i in range(len(memberNumber)):
|
||||
latitudeWind[i][0]=latitudeMaxWind0[i]
|
||||
longitudeWind[i][0]=longitudeMaxWind0[i]
|
||||
wind[i][0]=windMaxWind0[i]
|
||||
|
||||
else:
|
||||
for i in range(len(memberNumber)):
|
||||
latitudeWind[i][0]=latitudeMaxWind0[0]
|
||||
longitudeWind[i][0]=longitudeMaxWind0[0]
|
||||
wind[i][0]=windMaxWind0[i]
|
||||
|
||||
rankSignificance=3
|
||||
rankPosition=3
|
||||
rankPressure=1
|
||||
rankWind=1
|
||||
|
||||
timePeriod=[0 for x in range(rankPeriod)]
|
||||
for i in range(1,rankPeriod):
|
||||
#for i in range(rankPeriod):
|
||||
rank1 = i * 2 + 2
|
||||
rank3 = i * 2 + 3
|
||||
|
||||
#rank1 = (i+1) * 2 + 2
|
||||
#rank3 = (i+1)* 2 + 3
|
||||
|
||||
ivalues= codes_get_array(gid,"#%d#timePeriod" %(i))
|
||||
|
||||
if (len(ivalues)==1):
|
||||
timePeriod[i]=ivalues[0]
|
||||
else:
|
||||
for j in range(len (ivalues)):
|
||||
if (ivalues[j]!=CODES_MISSING_LONG):
|
||||
timePeriod[i]=ivalues[j]
|
||||
break
|
||||
|
||||
values = codes_get_array(gid, "#%d#meteorologicalAttributeSignificance" % rank1)
|
||||
if (len(values)==1):
|
||||
significance=values[0]
|
||||
else:
|
||||
for j in range(len (values)):
|
||||
if (values[j]!=CODES_MISSING_LONG):
|
||||
significance=values[j]
|
||||
break
|
||||
|
||||
if(significance==1):
|
||||
lat = codes_get_array(gid, "#%d#latitude" % rank1)
|
||||
lon = codes_get_array(gid, "#%d#longitude" % rank1)
|
||||
press = codes_get_array(gid, "#%d#pressureReducedToMeanSeaLevel" % (i + 1))
|
||||
else:
|
||||
print 'ERROR: unexpected meteorologicalAttributeSignificance=',significance
|
||||
|
||||
|
||||
values = codes_get_array(gid, "#%d#meteorologicalAttributeSignificance" % rank3)
|
||||
if (len(values)==1):
|
||||
significanceWind=values[0]
|
||||
else:
|
||||
for j in range(len (values)):
|
||||
if (values[j]!=CODES_MISSING_LONG):
|
||||
significanceWind=values[j]
|
||||
break
|
||||
|
||||
if(significanceWind==3):
|
||||
lat3 = codes_get_array(gid, "#%d#latitude" % rank3)
|
||||
lon3 = codes_get_array(gid, "#%d#longitude" % rank3)
|
||||
wind3 = codes_get_array(gid, "#%d#windSpeedAt10M" % (i + 1))
|
||||
else:
|
||||
print 'ERROR: unexpected meteorologicalAttributeSignificance=',significanceWind
|
||||
|
||||
#for k in range(1,len(memberNumber)):
|
||||
for k in range(len(memberNumber)):
|
||||
data[k][i]=[lat[k],lon[k],press[k],lat3[k],lon3[k],wind3[k]]
|
||||
|
||||
if(cnt==2):
|
||||
print 'majaaa', i,timePeriod[s]
|
||||
|
||||
# ---- Print the values --------------------------------
|
||||
|
||||
for m in sorted( data.keys()):
|
||||
print "== Member %d"%(m+1)
|
||||
print "step latitude longitude pressure latitude longitude wind"
|
||||
#print " {:<3d}{:2.2f}{:2.2f}{}{} {} ".format(timePeriod[0],latitude[m][0],longitude[m][0],pressure[m][0],latitudeWind[m][0],longitudeWind[i][0],wind[i][0])
|
||||
if latitude[m][0]!=CODES_MISSING_DOUBLE:
|
||||
print timePeriod[0],latitude[m][0],longitude[m][0],pressure[m][0],
|
||||
#print " {:>3d}{}{:>6.1f}{}{:>6.1f}{}{:>8.1f}{}{:>6.1f}{}{:>6.1f}{}{:>6.1f}".format(\
|
||||
# timePeriod[0],' ',latitude[m][0],' ',longitude[m][0],' ',pressure[m][0],' ',latitudeWind[m][0],' ',longitudeWind[m][0],' ',wind[m][0])
|
||||
|
||||
for s in sorted( data[m].keys()):
|
||||
if data[m][s][0]!=CODES_MISSING_DOUBLE:
|
||||
print 'maja',s
|
||||
#print " {:>3d}{}{:>6.1f}{}{:>6.1f}{}{:>8.1f}{}{:>6.1f}{}{:>6.1f}{}{:>6.1f}".format(\
|
||||
# timePeriod[s],' ',data[m][s][0],' ',data[m][s][1],' ',data[m][s][2],' ',data[m][s][3],' ',data[m][s][4],' ',data[m][s][5])
|
||||
#print "%d %.6g %.6g"%(timePeriod[s],data[m][s][0],data[m][s][1])
|
||||
|
||||
|
||||
|
||||
codes_release(gid)
|
||||
|
||||
cnt += 1
|
||||
print 'majaaaaaaaaaaa',cnt
|
||||
|
||||
#del(timePeriod)
|
||||
#del(latitude)
|
||||
#del(longitude)
|
||||
#del(pressure)
|
||||
#del(latitudeWind)
|
||||
#del(longitudeWind)
|
||||
#del(wind)
|
||||
#del(data)
|
||||
|
||||
# close the file
|
||||
f.close()
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
example()
|
||||
except CodesInternalError, err:
|
||||
if VERBOSE:
|
||||
traceback.print_exc(file=sys.stderr)
|
||||
else:
|
||||
print >>sys.stderr, err.msg
|
||||
|
||||
return 1
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
# Copyright 2005-2015 ECMWF.
|
||||
#
|
||||
# This software is licensed under the terms of the Apache Licence Version 2.0
|
||||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
#
|
||||
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
||||
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||
#
|
||||
|
||||
. ./include.sh
|
||||
|
||||
|
||||
#Define a common label for all the tmp files
|
||||
label="bufr_read_tropical_cyclone_p"
|
||||
|
||||
#Define tmp file
|
||||
#fTmp=${label}.tmp.txt
|
||||
#ref=${label}.tmp.ref
|
||||
#rm -f $fTmp | true
|
||||
|
||||
#We check "asca_1391.bufr". The path is
|
||||
#hardcoded in the example
|
||||
|
||||
REDIRECT=/dev/null
|
||||
|
||||
echo $PYTHON $examples_src
|
||||
#Write the key values into a file
|
||||
#$PYTHON $examples_src/bufr_read_tropical_cyclone.py >$fTmp
|
||||
$PYTHON $examples_src/bufr_read_tropical_cyclone.py
|
||||
|
||||
#TODO: check the results
|
||||
|
||||
#cat > $ref <<EOF
|
||||
#EOF
|
||||
#
|
||||
#diff -w $ref $fTmp
|
||||
#Clean up
|
||||
#rm -f $ref $fTmp | true
|
|
@ -28,7 +28,7 @@ $PYTHON $examples_src/bufr_set_keys.py 2> $REDIRECT > $REDIRECT
|
|||
|
||||
#Compare modified to the original
|
||||
set +e
|
||||
${tools_dir}/bufr_compare $f $fBufrTmp
|
||||
${tools_dir}/bufr_compare $f $fBufrTmp 1>$REDIRECT 2> $REDIRECT
|
||||
|
||||
#Check if modified is different
|
||||
if [ $? -eq 0 ]; then
|
||||
|
|
|
@ -1,140 +0,0 @@
|
|||
# Copyright 2005-2015 ECMWF.
|
||||
#
|
||||
# This software is licensed under the terms of the Apache Licence Version 2.0
|
||||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
#
|
||||
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
||||
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||
#
|
||||
# Python implementation: bufr_read_tropical_cyclone
|
||||
#
|
||||
# Description: how to read data of the ECMWF EPS tropical cyclone tracks encoded in BUFR format.
|
||||
#
|
||||
# Please note that scatterometer data can be encoded in various ways in BUFR. Therefore the code
|
||||
# below might not work directly for other types of messages than the one used in the
|
||||
# example. It is advised to use bufr_dump first to understand the structure of these messages.
|
||||
#
|
||||
|
||||
|
||||
import traceback
|
||||
import sys
|
||||
|
||||
from eccodes import *
|
||||
|
||||
INPUT = '../../data/bufr/tropical_cyclone.bufr'
|
||||
VERBOSE = 1 # verbose error reporting
|
||||
|
||||
|
||||
def example():
|
||||
|
||||
# open bufr file
|
||||
f = open(INPUT)
|
||||
|
||||
cnt = 0
|
||||
|
||||
# loop for the messages in the file
|
||||
while 1:
|
||||
# get handle for message
|
||||
gid = codes_bufr_new_from_file(f)
|
||||
if gid is None:
|
||||
break
|
||||
|
||||
print "message: %s" % cnt
|
||||
|
||||
# we need to instruct ecCodes to expand all the descriptors
|
||||
# i.e. unpack the data values
|
||||
codes_set(gid, 'unpack', 1)
|
||||
|
||||
# The BUFR file contains a single message with number of subsets in a compressed form.
|
||||
# It means each subset has exactly the same structure.
|
||||
# One subset contains values of latitude, longitude, pressure, wind at 10m
|
||||
# for one particular ensemble member over forecast period from 0h to 240h by 6h step.
|
||||
# To print values of latitude, longitude, pressure, wind at 10m for particular ensemble member from all the subsets
|
||||
# we will simply access the key by condition (see below)
|
||||
#
|
||||
# The key latitude will give back the array of all the values corresponding
|
||||
# to all the instances of the key in the tree.
|
||||
# The key #2#latitude will return only the values of the second instance in the tree.
|
||||
|
||||
# Get the total number of subsets.
|
||||
numObs = codes_get(gid, "numberOfSubsets")
|
||||
|
||||
# print ' Number of values: %ld' % (numObs)
|
||||
|
||||
year = codes_get(gid, "year")
|
||||
month = codes_get(gid, "month")
|
||||
day = codes_get(gid, "day")
|
||||
|
||||
# Get ensembleMemberNumber
|
||||
ensembleMemberNumber = codes_get_array(gid, "ensembleMemberNumber")
|
||||
|
||||
# Get the time step
|
||||
nTimeSteps = len(codes_get_array(gid, "timePeriod"))
|
||||
ts_list = codes_get_array(gid, "timePeriod")
|
||||
for rank in xrange(nTimeSteps):
|
||||
rank1 = (rank + 1) * 2 + 2
|
||||
rank3 = (rank + 1) * 2 + 3
|
||||
|
||||
# print "time step %d"%ts_list[rank]
|
||||
|
||||
# Get the time step
|
||||
timeStep = codes_get_array(gid, "#%d#timePeriod" % (rank + 1))
|
||||
|
||||
# Get Meteorological Attribute Significance
|
||||
metAttSignificance = codes_get_array(gid, "#%d#meteorologicalAttributeSignificance" % rank1)
|
||||
|
||||
# Get latitude (for all the subsets)
|
||||
lat = codes_get_array(gid, "#%d#latitude" % rank1)
|
||||
|
||||
# Get longitude (for all the subsets)
|
||||
lon = codes_get_array(gid, "#%d#longitude" % rank1)
|
||||
|
||||
# Get pressureReducedToMeanSeaLevel(for all the subsets)
|
||||
press = codes_get_array(gid, "#%d#pressureReducedToMeanSeaLevel" % (rank + 2))
|
||||
|
||||
# Get Meteorological Attribute Significance
|
||||
metAttSignificance3 = codes_get_array(gid, "#5#meteorologicalAttributeSignificance")
|
||||
|
||||
# Get latitude (for all the subsets)
|
||||
lat3 = codes_get_array(gid, "#%d#latitude" % rank3)
|
||||
|
||||
# Get longitude (for all the subsets)
|
||||
lon3 = codes_get_array(gid, "#%d#longitude" % rank3)
|
||||
|
||||
# Get windSpeedAt10M(for all the subsets)
|
||||
wind3 = codes_get_array(gid, "#%d#windSpeedAt10M" % (rank + 2))
|
||||
|
||||
# Check that all arrays are same size
|
||||
if len(lat) != numObs or len(lon) != numObs or len(press) != numObs:
|
||||
print 'inconsistent array dimension'
|
||||
return 1
|
||||
|
||||
print 'Date %d %d %d Time step %d' % (day, month, year, ts_list[rank])
|
||||
print " metAttSignificance %d %s metAttSignificance %d" % (metAttSignificance, " ", metAttSignificance3)
|
||||
print "ens lat lon press lat lon wind10m"
|
||||
for i in xrange(numObs):
|
||||
if lat[i] != CODES_MISSING_DOUBLE:
|
||||
print "%s %.6g %s %.6g %.6g %.6g %s %.6g %.6g %.6g" % ("", ensembleMemberNumber[i], " ", lat[i], lon[i], press[i], " ", lat3[i], lon3[i], wind3[i])
|
||||
|
||||
cnt += 1
|
||||
|
||||
# delete handle
|
||||
codes_release(gid)
|
||||
|
||||
# close the file
|
||||
f.close()
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
example()
|
||||
except CodesInternalError, err:
|
||||
if VERBOSE:
|
||||
traceback.print_exc(file=sys.stderr)
|
||||
else:
|
||||
print >>sys.stderr, err.msg
|
||||
|
||||
return 1
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
File diff suppressed because it is too large
Load Diff
|
@ -254,7 +254,22 @@ static int unpack_double(grib_accessor* a, double* val, size_t *len)
|
|||
|
||||
static int unpack_double_element(grib_accessor* a, size_t idx,double* val)
|
||||
{
|
||||
return GRIB_NOT_IMPLEMENTED;
|
||||
size_t size;
|
||||
double* values;
|
||||
int err = 0;
|
||||
|
||||
/* GRIB-564: The index idx relates to codedValues NOT values! */
|
||||
|
||||
err=grib_get_size(a->parent->h,"codedValues",&size);
|
||||
if (err) return err;
|
||||
if (idx > size) return GRIB_INVALID_NEAREST;
|
||||
|
||||
values=(double*)grib_context_malloc_clear(a->parent->h->context,size*sizeof(double));
|
||||
err=grib_get_double_array(a->parent->h,"codedValues",values,&size);
|
||||
if (err) return err;
|
||||
*val=values[idx];
|
||||
grib_context_free(a->parent->h->context,values);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int pack_double(grib_accessor* a, const double* val, size_t *len)
|
||||
|
|
|
@ -12,264 +12,262 @@
|
|||
|
||||
static int copy_values(grib_handle* h,grib_accessor* ga)
|
||||
{
|
||||
int i,j,k;
|
||||
/* printf("copy_values stack is %ld\n",(long)h->values_stack);*/
|
||||
for(j = 0; j < h->values_stack; j++)
|
||||
{
|
||||
for(i = 0; i < h->values_count[j]; i++)
|
||||
{
|
||||
for(k = 0; (k < MAX_ACCESSOR_NAMES) && (ga->all_names[k] != NULL); k++)
|
||||
{
|
||||
/*printf("copy_values: %s %s\n",h->values[j][i].name,ga->all_names[k]);*/
|
||||
if(strcmp(h->values[j][i].name,ga->all_names[k]) == 0)
|
||||
{
|
||||
size_t len = 1;
|
||||
/*printf("SET VALUES %s\n",h->values[j][i].name);*/
|
||||
switch(h->values[j][i].type)
|
||||
{
|
||||
case GRIB_TYPE_LONG:
|
||||
return grib_pack_long(ga,&h->values[j][i].long_value,&len);
|
||||
break;
|
||||
int i,j,k;
|
||||
/* printf("copy_values stack is %ld\n",(long)h->values_stack);*/
|
||||
for(j = 0; j < h->values_stack; j++)
|
||||
{
|
||||
for(i = 0; i < h->values_count[j]; i++)
|
||||
{
|
||||
for(k = 0; (k < MAX_ACCESSOR_NAMES) && (ga->all_names[k] != NULL); k++)
|
||||
{
|
||||
/*printf("copy_values: %s %s\n",h->values[j][i].name,ga->all_names[k]);*/
|
||||
if(strcmp(h->values[j][i].name,ga->all_names[k]) == 0)
|
||||
{
|
||||
size_t len = 1;
|
||||
/*printf("SET VALUES %s\n",h->values[j][i].name);*/
|
||||
switch(h->values[j][i].type)
|
||||
{
|
||||
case GRIB_TYPE_LONG:
|
||||
return grib_pack_long(ga,&h->values[j][i].long_value,&len);
|
||||
break;
|
||||
|
||||
case GRIB_TYPE_DOUBLE:
|
||||
return grib_pack_double(ga,&h->values[j][i].double_value,&len);
|
||||
break;
|
||||
case GRIB_TYPE_DOUBLE:
|
||||
return grib_pack_double(ga,&h->values[j][i].double_value,&len);
|
||||
break;
|
||||
|
||||
case GRIB_TYPE_STRING:
|
||||
len = strlen(h->values[j][i].string_value);
|
||||
return grib_pack_string(ga,h->values[j][i].string_value,&len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
case GRIB_TYPE_STRING:
|
||||
len = strlen(h->values[j][i].string_value);
|
||||
return grib_pack_string(ga,h->values[j][i].string_value,&len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return GRIB_NOT_FOUND;
|
||||
return GRIB_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
int grib_lookup_long_from_handle(grib_context* gc,grib_loader* loader,const char* name,long* value)
|
||||
{
|
||||
grib_handle* h = (grib_handle*)loader->data;
|
||||
grib_accessor *b = grib_find_accessor(h,name);
|
||||
size_t len = 1;
|
||||
if(b) return grib_unpack_long(b,value,&len);
|
||||
grib_handle* h = (grib_handle*)loader->data;
|
||||
grib_accessor *b = grib_find_accessor(h,name);
|
||||
size_t len = 1;
|
||||
if(b) return grib_unpack_long(b,value,&len);
|
||||
|
||||
/* TODO: fix me. For now, we don't fail on a lookup. */
|
||||
/* TODO: fix me. For now, we don't fail on a lookup. */
|
||||
#if 1
|
||||
*value = -1;
|
||||
return GRIB_SUCCESS;
|
||||
*value = -1;
|
||||
return GRIB_SUCCESS;
|
||||
#else
|
||||
return GRIB_NOT_FOUND;
|
||||
return GRIB_NOT_FOUND;
|
||||
#endif
|
||||
}
|
||||
|
||||
int grib_init_accessor_from_handle(grib_loader* loader,grib_accessor* ga,grib_arguments* default_value)
|
||||
{
|
||||
grib_handle* h = (grib_handle*)loader->data;
|
||||
int ret = GRIB_SUCCESS;
|
||||
size_t len = 0;
|
||||
char* sval = NULL;
|
||||
unsigned char* uval = NULL;
|
||||
long* lval = NULL;
|
||||
double* dval = NULL;
|
||||
static int first = 1;
|
||||
static const char* missing = 0;
|
||||
const char* name = NULL;
|
||||
int k = 0;
|
||||
grib_handle *g;
|
||||
int e, pack_missing = 0;
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "XXXXX Copying %s", ga->name);
|
||||
grib_handle* h = (grib_handle*)loader->data;
|
||||
int ret = GRIB_SUCCESS;
|
||||
size_t len = 0;
|
||||
char* sval = NULL;
|
||||
unsigned char* uval = NULL;
|
||||
long* lval = NULL;
|
||||
double* dval = NULL;
|
||||
static int first = 1;
|
||||
static const char* missing = 0;
|
||||
const char* name = NULL;
|
||||
int k = 0;
|
||||
grib_handle *g;
|
||||
int e, pack_missing = 0;
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "XXXXX Copying %s", ga->name);
|
||||
|
||||
if(default_value)
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying: setting %s to default value",
|
||||
ga->name);
|
||||
grib_pack_expression(ga,grib_arguments_get_expression(h,default_value,0));
|
||||
}
|
||||
if(default_value)
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying: setting %s to default value",
|
||||
ga->name);
|
||||
grib_pack_expression(ga,grib_arguments_get_expression(h,default_value,0));
|
||||
}
|
||||
|
||||
if( (ga->flags & GRIB_ACCESSOR_FLAG_NO_COPY) ||
|
||||
((ga->flags & GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC) &&
|
||||
loader->changing_edition ) ||
|
||||
(ga->flags & GRIB_ACCESSOR_FLAG_FUNCTION) ||
|
||||
( (ga->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) &&
|
||||
!(ga->flags & GRIB_ACCESSOR_FLAG_COPY_OK) ) )
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying %s ignored", ga->name);
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
if( (ga->flags & GRIB_ACCESSOR_FLAG_NO_COPY) ||
|
||||
((ga->flags & GRIB_ACCESSOR_FLAG_EDITION_SPECIFIC) &&
|
||||
loader->changing_edition ) ||
|
||||
(ga->flags & GRIB_ACCESSOR_FLAG_FUNCTION) ||
|
||||
( (ga->flags & GRIB_ACCESSOR_FLAG_READ_ONLY) &&
|
||||
!(ga->flags & GRIB_ACCESSOR_FLAG_COPY_OK) ) )
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying %s ignored", ga->name);
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(h->values)
|
||||
if(copy_values(h,ga) == GRIB_SUCCESS)
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying: setting %s to multi-set-value", ga->name);
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
if(h->values)
|
||||
if(copy_values(h,ga) == GRIB_SUCCESS)
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying: setting %s to multi-set-value", ga->name);
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
if(h->loader)
|
||||
h->loader->init_accessor(h->loader,ga,default_value);
|
||||
if(h->loader)
|
||||
h->loader->init_accessor(h->loader,ga,default_value);
|
||||
#else
|
||||
/* COMEBACK here
|
||||
/* COMEBACK here
|
||||
this is needed if we reparse during reparse....
|
||||
*/
|
||||
*/
|
||||
|
||||
g = h;
|
||||
while(g)
|
||||
{
|
||||
if(g->values) {
|
||||
if(copy_values(g,ga) == GRIB_SUCCESS) {
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying: setting %s to multi-set-value", ga->name);
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
}
|
||||
g = g->main;
|
||||
}
|
||||
g = h;
|
||||
while(g)
|
||||
{
|
||||
if(g->values) {
|
||||
if(copy_values(g,ga) == GRIB_SUCCESS) {
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying: setting %s to multi-set-value", ga->name);
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
}
|
||||
g = g->main;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check if the same name exists in the original message ... */
|
||||
k = 0;
|
||||
while( (k < MAX_ACCESSOR_NAMES) &&
|
||||
((name = ga->all_names[k]) != NULL) &&
|
||||
((ret = grib_get_size(h,name,&len)) != GRIB_SUCCESS)) k++;
|
||||
/* Check if the same name exists in the original message ... */
|
||||
k = 0;
|
||||
while( (k < MAX_ACCESSOR_NAMES) &&
|
||||
((name = ga->all_names[k]) != NULL) &&
|
||||
((ret = grib_get_size(h,name,&len)) != GRIB_SUCCESS)) k++;
|
||||
|
||||
if(ret != GRIB_SUCCESS)
|
||||
{
|
||||
name = ga->name;
|
||||
if(ret != GRIB_SUCCESS)
|
||||
{
|
||||
name = ga->name;
|
||||
|
||||
if(first)
|
||||
{
|
||||
missing = getenv("ECCODES_PRINT_MISSING");
|
||||
first = 0;
|
||||
}
|
||||
if(first)
|
||||
{
|
||||
missing = getenv("ECCODES_PRINT_MISSING");
|
||||
first = 0;
|
||||
}
|
||||
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying [%s] failed: %s",
|
||||
name,grib_get_error_message(ret));
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying [%s] failed: %s",
|
||||
name,grib_get_error_message(ret));
|
||||
|
||||
if(missing)
|
||||
{
|
||||
fprintf(stdout,"REPARSE: no value for %s",name);
|
||||
if(default_value)
|
||||
fprintf(stdout," (default value)");
|
||||
fprintf(stdout,"\n");
|
||||
}
|
||||
if(missing)
|
||||
{
|
||||
fprintf(stdout,"REPARSE: no value for %s",name);
|
||||
if(default_value)
|
||||
fprintf(stdout," (default value)");
|
||||
fprintf(stdout,"\n");
|
||||
}
|
||||
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
/* we copy also virtual keys*/
|
||||
if(len == 0) {
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying %s failed, length is 0", name);
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
/* we copy also virtual keys*/
|
||||
if(len == 0) {
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying %s failed, length is 0", name);
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
if((ga->flags & GRIB_ACCESSOR_FLAG_CAN_BE_MISSING) && grib_is_missing(h,name,&e) && e == GRIB_SUCCESS && len == 1)
|
||||
{
|
||||
grib_pack_missing(ga);
|
||||
pack_missing = 1;
|
||||
}
|
||||
if((ga->flags & GRIB_ACCESSOR_FLAG_CAN_BE_MISSING) && grib_is_missing(h,name,&e) && e == GRIB_SUCCESS && len == 1)
|
||||
{
|
||||
grib_pack_missing(ga);
|
||||
pack_missing = 1;
|
||||
}
|
||||
|
||||
switch(grib_accessor_get_native_type(ga))
|
||||
{
|
||||
case GRIB_TYPE_STRING:
|
||||
switch(grib_accessor_get_native_type(ga))
|
||||
{
|
||||
case GRIB_TYPE_STRING:
|
||||
|
||||
/* len = len > 1024 ? len : 1024; */
|
||||
_grib_get_string_length(ga,&len);
|
||||
sval = (char*)grib_context_malloc(h->context,len);
|
||||
ret = grib_get_string_internal(h,name,sval,&len);
|
||||
if(ret == GRIB_SUCCESS)
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying string %s to %s", sval, name);
|
||||
ret = grib_pack_string(ga,sval,&len);
|
||||
}
|
||||
grib_context_free(h->context,sval);
|
||||
/* len = len > 1024 ? len : 1024; */
|
||||
_grib_get_string_length(ga,&len);
|
||||
sval = (char*)grib_context_malloc(h->context,len);
|
||||
ret = grib_get_string_internal(h,name,sval,&len);
|
||||
if(ret == GRIB_SUCCESS)
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying string %s to %s", sval, name);
|
||||
ret = grib_pack_string(ga,sval,&len);
|
||||
}
|
||||
grib_context_free(h->context,sval);
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case GRIB_TYPE_LONG:
|
||||
lval = (long*)grib_context_malloc(h->context,len*sizeof(long));
|
||||
ret = grib_get_long_array_internal(h,name,lval,&len);
|
||||
if(ret == GRIB_SUCCESS)
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying %d long(s) %d to %s", len, lval[0], name);
|
||||
if(ga->same)
|
||||
{
|
||||
ret = grib_set_long_array(grib_handle_of_accessor(ga),ga->name,lval,len);
|
||||
case GRIB_TYPE_LONG:
|
||||
lval = (long*)grib_context_malloc(h->context,len*sizeof(long));
|
||||
ret = grib_get_long_array_internal(h,name,lval,&len);
|
||||
if(ret == GRIB_SUCCESS)
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying %d long(s) %d to %s", len, lval[0], name);
|
||||
if(ga->same)
|
||||
{
|
||||
ret = grib_set_long_array(grib_handle_of_accessor(ga),ga->name,lval,len);
|
||||
|
||||
/* Allow for lists to be resized */
|
||||
if((ret == GRIB_WRONG_ARRAY_SIZE || ret == GRIB_ARRAY_TOO_SMALL) && loader->list_is_resized)
|
||||
ret = GRIB_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* See GRIB-492. This is NOT an ideal solution! */
|
||||
if (*lval == GRIB_MISSING_LONG || pack_missing)
|
||||
{
|
||||
; /* No checks needed */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If we have just one key of type long which has one octet, then do not exceed maximum value */
|
||||
const long num_octets = ga->length;
|
||||
if (len == 1 && num_octets == 1 && *lval > 255)
|
||||
{
|
||||
*lval = 0; /* Reset to a reasonable value */
|
||||
}
|
||||
}
|
||||
ret = grib_pack_long(ga,lval,&len);
|
||||
}
|
||||
}
|
||||
/* Allow for lists to be resized */
|
||||
if((ret == GRIB_WRONG_ARRAY_SIZE || ret == GRIB_ARRAY_TOO_SMALL) && loader->list_is_resized)
|
||||
ret = GRIB_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* See GRIB-492. This is NOT an ideal solution! */
|
||||
if (*lval == GRIB_MISSING_LONG || pack_missing)
|
||||
{
|
||||
; /* No checks needed */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If we have just one key of type long which has one octet, then do not exceed maximum value */
|
||||
const long num_octets = ga->length;
|
||||
if (len == 1 && num_octets == 1 && *lval > 255)
|
||||
{
|
||||
*lval = 0; /* Reset to a reasonable value */
|
||||
}
|
||||
}
|
||||
ret = grib_pack_long(ga,lval,&len);
|
||||
}
|
||||
}
|
||||
|
||||
grib_context_free(h->context,lval);
|
||||
grib_context_free(h->context,lval);
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case GRIB_TYPE_DOUBLE:
|
||||
dval = (double*)grib_context_malloc(h->context,len*sizeof(double));
|
||||
ret = grib_get_double_array_internal(h,name,dval,&len);
|
||||
if(ret == GRIB_SUCCESS)
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying %d double(s) %g to %s", len, dval[0], name);
|
||||
if(ga->same)
|
||||
{
|
||||
ret = grib_set_double_array(grib_handle_of_accessor(ga),ga->name,dval,len);
|
||||
case GRIB_TYPE_DOUBLE:
|
||||
dval = (double*)grib_context_malloc(h->context,len*sizeof(double));
|
||||
ret = grib_get_double_array(h,name,dval,&len); /* GRIB-898 */
|
||||
if(ret == GRIB_SUCCESS)
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying %d double(s) %g to %s", len, dval[0], name);
|
||||
if(ga->same)
|
||||
{
|
||||
ret = grib_set_double_array(grib_handle_of_accessor(ga),ga->name,dval,len);
|
||||
|
||||
/* Allow for lists to be resized */
|
||||
if((ret == GRIB_WRONG_ARRAY_SIZE || ret == GRIB_ARRAY_TOO_SMALL) && loader->list_is_resized)
|
||||
ret = GRIB_SUCCESS;
|
||||
}
|
||||
else ret = grib_pack_double(ga,dval,&len);
|
||||
}
|
||||
/* Allow for lists to be resized */
|
||||
if((ret == GRIB_WRONG_ARRAY_SIZE || ret == GRIB_ARRAY_TOO_SMALL) && loader->list_is_resized)
|
||||
ret = GRIB_SUCCESS;
|
||||
}
|
||||
else ret = grib_pack_double(ga,dval,&len);
|
||||
}
|
||||
|
||||
grib_context_free(h->context,dval);
|
||||
break;
|
||||
grib_context_free(h->context,dval);
|
||||
break;
|
||||
|
||||
case GRIB_TYPE_BYTES:
|
||||
case GRIB_TYPE_BYTES:
|
||||
|
||||
uval = (unsigned char*)grib_context_malloc(h->context,len*sizeof(char));
|
||||
ret = grib_get_bytes_internal(h,name,uval,&len);
|
||||
if(ret == GRIB_SUCCESS)
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying %d byte(s) to %s", len, name);
|
||||
ret = grib_pack_bytes(ga,uval,&len);
|
||||
}
|
||||
uval = (unsigned char*)grib_context_malloc(h->context,len*sizeof(char));
|
||||
ret = grib_get_bytes_internal(h,name,uval,&len);
|
||||
if(ret == GRIB_SUCCESS)
|
||||
{
|
||||
grib_context_log(h->context,GRIB_LOG_DEBUG, "Copying %d byte(s) to %s", len, name);
|
||||
ret = grib_pack_bytes(ga,uval,&len);
|
||||
}
|
||||
|
||||
grib_context_free(h->context,uval);
|
||||
grib_context_free(h->context,uval);
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case GRIB_TYPE_LABEL:
|
||||
break;
|
||||
case GRIB_TYPE_LABEL:
|
||||
break;
|
||||
|
||||
default:
|
||||
grib_context_log(h->context,GRIB_LOG_ERROR, "Copying %s, cannot establish type %d [%s]"
|
||||
, name,grib_accessor_get_native_type(ga),ga->creator->cclass->name);
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
default:
|
||||
grib_context_log(h->context,GRIB_LOG_ERROR, "Copying %s, cannot establish type %d [%s]"
|
||||
, name,grib_accessor_get_native_type(ga),ga->creator->cclass->name);
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ int grib_set_long_internal(grib_handle* h, const char* name, long val) {
|
|||
|
||||
a = grib_find_accessor(h, name);
|
||||
|
||||
if (h->context->debug==-1)
|
||||
if (h->context->debug)
|
||||
printf("ECCODES DEBUG grib_set_long_internal %s=%ld\n",name,(long)val);
|
||||
|
||||
if(a){
|
||||
|
@ -86,7 +86,7 @@ int grib_set_long(grib_handle* h, const char* name, long val) {
|
|||
|
||||
a = grib_find_accessor(h, name);
|
||||
|
||||
if (h->context->debug==-1)
|
||||
if (h->context->debug)
|
||||
printf("ECCODES DEBUG grib_set_long %s=%ld\n",name,(long)val);
|
||||
|
||||
if(a){
|
||||
|
@ -109,7 +109,7 @@ int grib_set_double_internal(grib_handle* h, const char* name, double val) {
|
|||
|
||||
a = grib_find_accessor(h, name);
|
||||
|
||||
if (h->context->debug==-1)
|
||||
if (h->context->debug)
|
||||
printf("ECCODES DEBUG grib_set_double_internal %s=%g\n",name,val);
|
||||
|
||||
if(a){
|
||||
|
@ -299,7 +299,7 @@ int grib_set_double(grib_handle* h, const char* name, double val) {
|
|||
|
||||
a = grib_find_accessor(h, name);
|
||||
|
||||
if (h->context->debug==-1)
|
||||
if (h->context->debug)
|
||||
printf("ECCODES DEBUG grib_set_double %s=%g\n",name,val);
|
||||
|
||||
if(a){
|
||||
|
@ -324,7 +324,7 @@ int grib_set_string_internal(grib_handle* h, const char* name,
|
|||
|
||||
a = grib_find_accessor(h, name);
|
||||
|
||||
if (h->context->debug==-1)
|
||||
if (h->context->debug)
|
||||
printf("ECCODES DEBUG grib_set_string_internal %s=%s\n",name,val);
|
||||
|
||||
if(a){
|
||||
|
@ -347,27 +347,33 @@ int grib_set_string(grib_handle* h, const char* name, const char* val, size_t *l
|
|||
int ret=0;
|
||||
grib_accessor* a;
|
||||
|
||||
#if 1
|
||||
/* Second order doesn't have a proper representation for constant fields
|
||||
the best is not to do the change of packing type if bitsPerValue=0
|
||||
/* Second order doesn't have a proper representation for constant fields.
|
||||
So best not to do the change of packing type
|
||||
*/
|
||||
if (!grib_inline_strcmp(name,"packingType") && !grib_inline_strcmp(val,"grid_second_order")) {
|
||||
long bitsPerValue=0;
|
||||
size_t numCodedVals = 0;
|
||||
grib_get_long(h,"bitsPerValue",&bitsPerValue);
|
||||
if (bitsPerValue==0) return 0;
|
||||
if (bitsPerValue==0) {
|
||||
if (h->context->debug) {
|
||||
printf("ECCODES DEBUG grib_set_string packingType: Constant field cannot be encoded in second order. Packing not changed\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* GRIB-883: check if there are enough coded values */
|
||||
ret = grib_get_size(h, "codedValues", &numCodedVals);
|
||||
if (ret == GRIB_SUCCESS && numCodedVals < 3) {
|
||||
if (h->context->debug) {
|
||||
printf("ECCODES DEBUG grib_set_string packingType: not enough coded values for second order. Packing not changed\n");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
a = grib_find_accessor(h, name);
|
||||
|
||||
if (h->context->debug==-1)
|
||||
if (h->context->debug)
|
||||
printf("ECCODES DEBUG grib_set_string %s=%s\n",name,val);
|
||||
|
||||
if(a)
|
||||
|
@ -625,7 +631,7 @@ int grib_set_double_array_internal(grib_handle* h, const char* name, const doubl
|
|||
{
|
||||
int ret=0;
|
||||
|
||||
if (h->context->debug==-1)
|
||||
if (h->context->debug)
|
||||
printf("ECCODES DEBUG grib_set_double_array_internal key=%s %ld values\n",name, (long)length);
|
||||
|
||||
if (length==0) {
|
||||
|
@ -638,7 +644,7 @@ int grib_set_double_array_internal(grib_handle* h, const char* name, const doubl
|
|||
if (ret!=GRIB_SUCCESS)
|
||||
grib_context_log(h->context,GRIB_LOG_ERROR,"unable to set double array %s (%s)",
|
||||
name,grib_get_error_message(ret));
|
||||
/*if (h->context->debug==-1) printf("ECCODES DEBUG grib_set_double_array_internal key=%s --DONE\n",name);*/
|
||||
/*if (h->context->debug) printf("ECCODES DEBUG grib_set_double_array_internal key=%s --DONE\n",name);*/
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -647,7 +653,7 @@ static int __grib_set_double_array(grib_handle* h, const char* name, const doubl
|
|||
double v=val[0];
|
||||
int constant,i;
|
||||
|
||||
if (h->context->debug==-1)
|
||||
if (h->context->debug)
|
||||
printf("ECCODES DEBUG grib_set_double_array key=%s %ld values\n",name,(long)length);
|
||||
|
||||
if (length==0) {
|
||||
|
@ -688,10 +694,17 @@ static int __grib_set_double_array(grib_handle* h, const char* name, const doubl
|
|||
!strcmp(packingType,"grid_second_order_SPD2") ||
|
||||
!strcmp(packingType,"grid_second_order_SPD3")
|
||||
) {
|
||||
int ret = 0;
|
||||
slen=11; /*length of 'grid_simple' */
|
||||
if (h->context->debug == -1)
|
||||
printf("ECCODES DEBUG grib_set_double_array forcing grid_simple\n");
|
||||
grib_set_string(h,"packingType","grid_simple",&slen);
|
||||
if (h->context->debug) {
|
||||
printf("ECCODES DEBUG __grib_set_double_array: Cannot use second order packing for constant fields. Using simple packing\n");
|
||||
}
|
||||
ret = grib_set_string(h,"packingType","grid_simple",&slen);
|
||||
if (ret != GRIB_SUCCESS) {
|
||||
if (h->context->debug) {
|
||||
printf("ECCODES DEBUG __grib_set_double_array: could not switch to simple packing!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -999,7 +1012,6 @@ int grib_get_native_type(grib_handle* h, const char* name,int* type)
|
|||
}
|
||||
|
||||
return GRIB_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
const char* grib_get_accessor_class_name(grib_handle* h, const char* name)
|
||||
|
@ -1010,9 +1022,8 @@ const char* grib_get_accessor_class_name(grib_handle* h, const char* name)
|
|||
|
||||
int _grib_get_double_array_internal(grib_handle* h,grib_accessor* a,double* val, size_t buffer_len,size_t *decoded_length)
|
||||
{
|
||||
int err;
|
||||
if(a) {
|
||||
err = _grib_get_double_array_internal(h,a->same,val,buffer_len,decoded_length);
|
||||
int err = _grib_get_double_array_internal(h,a->same,val,buffer_len,decoded_length);
|
||||
|
||||
if ( err == GRIB_SUCCESS )
|
||||
{
|
||||
|
@ -1041,7 +1052,6 @@ int grib_get_double_array_internal(grib_handle* h, const char* name, double* val
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int grib_get_double_array(grib_handle* h, const char* name, double* val, size_t *length)
|
||||
{
|
||||
size_t len = *length;
|
||||
|
@ -1067,7 +1077,6 @@ int grib_get_double_array(grib_handle* h, const char* name, double* val, size_t
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
int _grib_get_string_length(grib_accessor* a, size_t* size)
|
||||
{
|
||||
size_t s=0;
|
||||
|
|
|
@ -801,4 +801,4 @@ EOF
|
|||
diff ${f}.ref ${f}.log
|
||||
|
||||
rm -f ${f}.ref ${f}.log
|
||||
|
||||
rm -f $fLog $fRules
|
||||
|
|
|
@ -96,6 +96,9 @@ res=`${tools_dir}grib_get -l 33,88.5 $sec_ord_bmp`
|
|||
res=`${tools_dir}/grib_get -l 28.5,90 $sec_ord_bmp`
|
||||
[ "$res" = "3.51552 9999 5.26552 9999 " ]
|
||||
|
||||
# GRIB-203 nearest on M-F second order boustrophedonic
|
||||
res=`${tools_dir}grib_get -w count=1 -l 0,0 lfpw.grib1`
|
||||
[ "$res" = "20560.7 20563.4 20554.7 20559.5 " ]
|
||||
|
||||
rm -f $sec_ord_bmp
|
||||
rm -f test.filter
|
||||
|
|
Loading…
Reference in New Issue