diff --git a/src/ecom/common/om_multio_utils_v3_mod.F90 b/src/ecom/common/om_multio_utils_v3_mod.F90 index b1b1d5bd..e8cc4682 100644 --- a/src/ecom/common/om_multio_utils_v3_mod.F90 +++ b/src/ecom/common/om_multio_utils_v3_mod.F90 @@ -284,7 +284,7 @@ SUBROUTINE MULTIO_WRITE_PARAMETRIZATION( MIO_HANDLE, MODEL_PARAMS ) ! Symbols imported from other modules within the project. USE :: OM_CORE_MOD, ONLY: JPIB_K USE :: OM_CORE_MOD, ONLY: JPIM_K - USE :: OM_API_MOD, ONLY: MODEL_PAR_T + USE :: OM_CORE_MOD, ONLY: MODEL_PAR_T ! Symbols imported from other libraries USE :: GRIB_API, ONLY: GRIB_SUCCESS @@ -329,24 +329,27 @@ SUBROUTINE MULTIO_WRITE_PARAMETRIZATION( MIO_HANDLE, MODEL_PARAMS ) ERR = MIOMD%SET('generatingProcessIdentifier', MODEL_PARAMS%SIM_%NCYCLE ) PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) - ERR = MIOMD%SET('iterationNumber', MODEL_PARAMS%SIM_%NJITER) - PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) ERR = MIOMD%SET('sensitiveAreaDomain', MODEL_PARAMS%SIM_%NJDOMAI) PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) - ERR = MIOMD%SET('diagnosticNumber', MODEL_PARAMS%SIM_%NJDIAG) - PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) ! TODO look at mars_preset_utils_mod.F90 to see how this is used for ccccIdentifiers and consensusCount ! ERR = MIOMD%SET('', MODEL_PARAMS%SIM_%NDWD) ! ERR = MIOMD%SET('', MODEL_PARAMS%SIM_%NMFR) ! ERR = MIOMD%SET('', MODEL_PARAMS%SIM_%NNCEP) ! ERR = MIOMD%SET('', MODEL_PARAMS%SIM_%NUKM) - ERR = MIOMD%SET('perturbationNumber', MODEL_PARAMS%SIM_%NENSFNB) - PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) + ! TODO set all the following fields only if numberOfForecastsInEnsemble is positive ??? ERR = MIOMD%SET('numberOfForecastsInEnsemble', MODEL_PARAMS%SIM_%NTOTENS) PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) + ERR = MIOMD%SET('perturbationNumber', MODEL_PARAMS%SIM_%NENSFNB) + PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) ERR = MIOMD%SET('systemNumber', MODEL_PARAMS%SIM_%NSYSTEM) PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) ERR = MIOMD%SET('methodNumber', MODEL_PARAMS%SIM_%NMETHOD) + PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) + ERR = MIOMD%SET('iterationNumber', MODEL_PARAMS%SIM_%NJITER) + PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) + ERR = MIOMD%SET('diagnosticNumber', MODEL_PARAMS%SIM_%NJDIAG) + PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) + PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) ERR = MIOMD%SET('referenceDate', MODEL_PARAMS%SIM_%NREFERENCE) PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) @@ -360,6 +363,13 @@ SUBROUTINE MULTIO_WRITE_PARAMETRIZATION( MIO_HANDLE, MODEL_PARAMS ) PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) ERR = MIOMD%SET('stream', MODEL_PARAMS%SIM_%NSTREAM) PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) + + ERR = MIOMD%SET('date', MODEL_PARAMS%SIM_%NINDAT) + PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) + ERR = MIOMD%SET('timeInSeconds', MODEL_PARAMS%SIM_%NSSSSS) + PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) + ERR = MIOMD%SET('timeIncrementInSeconds', MODEL_PARAMS%SIM_%TSTEP) + PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) ! TODO WRITE as array ERR = MIO_HANDLE%WRITE_PARAMETRIZATION('pv', MODEL_PARAMS%GEO_%ZVERT(1:2*(MODEL_PARAMS%GEO_%IFLEV+1))) @@ -439,7 +449,7 @@ SUBROUTINE MULTIO_WRITE_PARAMETRIZATION( MIO_HANDLE, MODEL_PARAMS ) LON_STRET_DEG = 180._JPRD_K/(2.0_JPRD_K*ASIN(1.0_JPRD_K))*REAL(YPI%RLOCEN,JPRD_K) IF( YPI%NSTTYP .GE. 2 ) THEN - ERR = MIOMD%SET('gridType','stretched_rotated_sh') + ERR = MIOMD%SET('sphericalHarmonicsType','stretched_rotated_sh') PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) ERR = MIOMD%SET('latitudeOfStretchingPoleInDegrees', LAT_STRET_DEG ) PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) @@ -448,13 +458,13 @@ SUBROUTINE MULTIO_WRITE_PARAMETRIZATION( MIO_HANDLE, MODEL_PARAMS ) ERR = MIOMD%SET('stretchingFactor',YPI%RSTRET) PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) ELSEIF( ABS(YPI%RSTRET-1.0_JPRD_K) .GE. 1.E-14_JPRD_K ) THEN - ERR = MIOMD%SET('gridType', 'stretched_sh' ) + ERR = MIOMD%SET('sphericalHarmonicsType', 'stretched_sh' ) PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) ERR = MIOMD%SET('stretchingFactor', YPI%RSTRET ) PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) ELSE - ERR = MIOMD%SET('gridType','sh') + ERR = MIOMD%SET('sphericalHarmonicsType','sh') PP_DEBUG_CRITICAL_COND_THROW( ERR.NE.MULTIO_SUCCESS, 1 ) ENDIF diff --git a/src/ecom/core/om_data_types_mod.F90 b/src/ecom/core/om_data_types_mod.F90 index b9fcb80d..059e2d3b 100644 --- a/src/ecom/core/om_data_types_mod.F90 +++ b/src/ecom/core/om_data_types_mod.F90 @@ -123,7 +123,7 @@ MODULE OM_DATA_TYPES_MOD ! yomrip0.F90 - time related quantities - ! NINDAT : run initial date in the form AAAAMMDD + ! NINDAT : run initial date in the form YYYYMMDD INTEGER(KIND=JPIB_K) :: NINDAT ! NSSSSS : initial time in seconds (e.g. for 12h, 43200) diff --git a/src/ecom/encoders/utils/preset/time_preset_utils_mod.F90 b/src/ecom/encoders/utils/preset/time_preset_utils_mod.F90 index 8758eda5..41d985a0 100644 --- a/src/ecom/encoders/utils/preset/time_preset_utils_mod.F90 +++ b/src/ecom/encoders/utils/preset/time_preset_utils_mod.F90 @@ -245,4 +245,4 @@ END SUBROUTINE TIME_PRESET_GRIBX_ATM END MODULE TIME_PRESET_UTILS_MOD #undef PP_SECTION_NAME #undef PP_SECTION_TYPE -#undef PP_FILE_NAME \ No newline at end of file +#undef PP_FILE_NAME