Skip to content

Commit

Permalink
WIP: improvements as result of the comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
MircoValentiniECMWF committed Jan 8, 2025
1 parent 5790489 commit e780592
Show file tree
Hide file tree
Showing 50 changed files with 5,340 additions and 154 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -847,9 +847,17 @@ PP_THREAD_SAFE FUNCTION GRIB2_SECTION1_REFERENCE_TIME_DEFAULT_RUNTIME( THIS, &
PP_DEBUG_CRITICAL_COND_THROW( .NOT. ASSOCIATED(METADATA), ERRFLAG_METADATA )

! Set the time
IF ( MSG%TYPE .EQ. TYPE_FC_E .AND. MSG%STEP .GT. 0 ) THEN
!! IF ( MSG%TYPE .EQ. TYPE_FC_E .AND. MSG%STEP .GT. 0 ) THEN
!! PP_METADATA_SET( METADATA, ERRFLAG_METADATA, 'significanceOfReferenceTime', 1_JPIB_K )
!! ELSEIF ( (MSG%TYPE .EQ. TYPE_FC_E .AND. MSG%STEP .EQ. 0) .OR. MSG%TYPE .EQ. TYPE_AN_E ) THEN
!! PP_METADATA_SET( METADATA, ERRFLAG_METADATA, 'significanceOfReferenceTime', 0_JPIB_K )
!! ELSE
!! PP_DEBUG_CRITICAL_THROW( ERRFLAG_UNHANDLED_CASE )
!! ENDIF

IF ( MSG%TYPE .EQ. TYPE_FC_E ) THEN
PP_METADATA_SET( METADATA, ERRFLAG_METADATA, 'significanceOfReferenceTime', 1_JPIB_K )
ELSEIF ( (MSG%TYPE .EQ. TYPE_FC_E .AND. MSG%STEP .EQ. 0) .OR. MSG%TYPE .EQ. TYPE_AN_E ) THEN
ELSEIF ( MSG%TYPE .EQ. TYPE_AN_E ) THEN
PP_METADATA_SET( METADATA, ERRFLAG_METADATA, 'significanceOfReferenceTime', 0_JPIB_K )
ELSE
PP_DEBUG_CRITICAL_THROW( ERRFLAG_UNHANDLED_CASE )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ PP_THREAD_SAFE FUNCTION GRIB2_SECTION1_TABLES_DEFAULT_INIT_CFG( THIS, &
ELSE
! Default value of tables version is 33 (almost chosen randomly)
! MIVAL: 33 is the default value for the tables version
THIS%LOCAL_TABLES_VERSION_ = 33_JPIB_K
THIS%TABLES_VERSION_ = 33_JPIB_K
END IF

! Trace end of procedure (on success)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set( MULTIOM_ENCODER_GRIB2_SECTION4_LEVEL_MAIN_SOURCES
${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_custom_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_adiabaticcondensation_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_atmosphere_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_cloudbase_mod.F90
${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_cloudbase_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_cloudtop_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_convectivecondensation_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_cumulonimbusbase_mod.F90
Expand All @@ -32,7 +32,7 @@ set( MULTIOM_ENCODER_GRIB2_SECTION4_LEVEL_MAIN_SOURCES
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_depthbelowsealayer_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_depthbelowsea_mod.F90
${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_entireatmosphere_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_entirelake_mod.F90
${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_entirelake_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_entiremeltpond_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_entireocean_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_eta_mod.F90
Expand All @@ -41,7 +41,7 @@ set( MULTIOM_ENCODER_GRIB2_SECTION4_LEVEL_MAIN_SOURCES
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_generalvertical_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_heightabovegroundlayer_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_heightabovesealayer_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_heightabovesea_mod.F90
${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_heightabovesea_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_highcloudlayer_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_hybridheight_mod.F90
# ${MULTIOM_ENCODERS_GRIB2_SECTION4_LEVEL_DIR}/grib2_section4_hybridlayer_mod.F90
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ MODULE GRIB2_SECTION4_CLOUDBASE_MOD
!>
!> This procedure set in the grib header all the variables needed to configure a specific level
!>
PROCEDURE, PRIVATE, PASS, NON_OVERRIDABLE :: SET_LEVELS => G2S4_CLOUDBASE_SET_LEVELS
! PROCEDURE, PRIVATE, PASS, NON_OVERRIDABLE :: SET_LEVELS => G2S4_CLOUDBASE_SET_LEVELS

END TYPE

Expand Down Expand Up @@ -688,9 +688,12 @@ PP_THREAD_SAFE FUNCTION G2S4_CLOUDBASE_PRESET( THIS, &
PP_SET_ERR_SUCCESS( RET )

! According to the options decide where to set the levels (preset or runlevel)
IF ( OPT%CACHE_STRATEGY .EQ. OPT_CACHE_FULL_E ) THEN
PP_TRYCALL(ERRFLAG_SETLEVELS) THIS%SET_LEVELS( MSG, PAR, OPT, METADATA, HOOKS )
ENDIF
PP_METADATA_SET( METADATA, ERRFLAG_METADATA, 'typeOfFirstFixedSurface', 2_JPIB_K )
PP_METADATA_SET( METADATA, ERRFLAG_METADATA, 'typeOfSecondFixedSurface', 255_JPIB_K )
PP_METADATA_SET_MISSING( METADATA, ERRFLAG_METADATA, 'scaledValueOfFirstFixedSurface' )
PP_METADATA_SET_MISSING( METADATA, ERRFLAG_METADATA, 'scaledValueOfSecondFixedSurface' )
PP_METADATA_SET_MISSING( METADATA, ERRFLAG_METADATA, 'scaleFactorOfFirstFixedSurface' )
PP_METADATA_SET_MISSING( METADATA, ERRFLAG_METADATA, 'scaleFactorOfFirstFixedSurface' )

! Trace end of procedure (on success)
PP_METADATA_EXIT_PROCEDURE( METADATA, ERRFLAG_METADATA )
Expand Down Expand Up @@ -848,9 +851,12 @@ PP_THREAD_SAFE FUNCTION G2S4_CLOUDBASE_RT( THIS, &
PP_SET_ERR_SUCCESS( RET )

! According to the options decide where to set the levels (preset or runlevel)
IF ( OPT%CACHE_STRATEGY .NE. OPT_CACHE_FULL_E ) THEN
PP_TRYCALL(ERRFLAG_SETLEVELS) THIS%SET_LEVELS( MSG, PAR, OPT, METADATA, HOOKS )
ENDIF
PP_METADATA_SET( METADATA, ERRFLAG_METADATA, 'typeOfFirstFixedSurface', 2_JPIB_K )
PP_METADATA_SET( METADATA, ERRFLAG_METADATA, 'typeOfSecondFixedSurface', 255_JPIB_K )
PP_METADATA_SET_MISSING( METADATA, ERRFLAG_METADATA, 'scaledValueOfFirstFixedSurface' )
PP_METADATA_SET_MISSING( METADATA, ERRFLAG_METADATA, 'scaledValueOfSecondFixedSurface' )
PP_METADATA_SET_MISSING( METADATA, ERRFLAG_METADATA, 'scaleFactorOfFirstFixedSurface' )
PP_METADATA_SET_MISSING( METADATA, ERRFLAG_METADATA, 'scaleFactorOfFirstFixedSurface' )

! Trace end of procedure (on success)
PP_METADATA_EXIT_PROCEDURE( METADATA, ERRFLAG_METADATA )
Expand Down Expand Up @@ -1165,7 +1171,7 @@ END FUNCTION G2S4_CLOUDBASE_FREE
#undef PP_PROCEDURE_TYPE



#if 0
!>
!> @brief Presets GRIB2 Section 4 level configuration using the provided parameters and message data.
!>
Expand Down Expand Up @@ -1325,7 +1331,7 @@ PP_THREAD_SAFE FUNCTION G2S4_CLOUDBASE_SET_LEVELS( THIS, &
END FUNCTION G2S4_CLOUDBASE_SET_LEVELS
#undef PP_PROCEDURE_NAME
#undef PP_PROCEDURE_TYPE

#endif

END MODULE GRIB2_SECTION4_CLOUDBASE_MOD
#undef PP_SECTION_NAME
Expand Down
Loading

0 comments on commit e780592

Please sign in to comment.