diff --git a/src/LIB/SURCOUCHE/src/mode_field.f90 b/src/LIB/SURCOUCHE/src/mode_field.f90 index c7c36018f5768767980ec97d24198aea3446cb8e..0994e6d1600ec45f2edbcd205291ce6ecdd13804 100644 --- a/src/LIB/SURCOUCHE/src/mode_field.f90 +++ b/src/LIB/SURCOUCHE/src/mode_field.f90 @@ -637,6 +637,95 @@ ALLOCATE(TFIELDLIST(IDX)%TFIELD_X0D(IMODEL)) IDX = IDX+1 ! IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST() +TFIELDLIST(IDX)%CMNHNAME = 'DTMOD' +TFIELDLIST(IDX)%CSTDNAME = '' +TFIELDLIST(IDX)%CLONGNAME = 'MesoNH: DTMOD' +TFIELDLIST(IDX)%CUNITS = 'seconds since YYYY-MM-DD HH:MM:SS.S' +TFIELDLIST(IDX)%CDIR = '--' +TFIELDLIST(IDX)%CCOMMENT = 'Time and date of model beginning' +TFIELDLIST(IDX)%NGRID = 0 +TFIELDLIST(IDX)%NTYPE = TYPEDATE +TFIELDLIST(IDX)%NDIMS = 0 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_T0D(IMODEL)) +IDX = IDX+1 +! +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST() +TFIELDLIST(IDX)%CMNHNAME = 'DTCUR' +TFIELDLIST(IDX)%CSTDNAME = 'time' +TFIELDLIST(IDX)%CLONGNAME = 'MesoNH: DTCUR' +TFIELDLIST(IDX)%CUNITS = 'seconds since YYYY-MM-DD HH:MM:SS.S' +TFIELDLIST(IDX)%CDIR = '--' +TFIELDLIST(IDX)%CCOMMENT = 'Current time and date' +TFIELDLIST(IDX)%NGRID = 0 +TFIELDLIST(IDX)%NTYPE = TYPEDATE +TFIELDLIST(IDX)%NDIMS = 0 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_T0D(IMODEL)) +IDX = IDX+1 +! +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST() +TFIELDLIST(IDX)%CMNHNAME = 'DTRAD_FULL' +TFIELDLIST(IDX)%CSTDNAME = '' +TFIELDLIST(IDX)%CLONGNAME = 'MesoNH: DTRAD_FULL' +TFIELDLIST(IDX)%CUNITS = 'seconds since YYYY-MM-DD HH:MM:SS.S' +TFIELDLIST(IDX)%CDIR = '--' +TFIELDLIST(IDX)%CCOMMENT = 'Time and date of last full radiation call' +TFIELDLIST(IDX)%NGRID = 0 +TFIELDLIST(IDX)%NTYPE = TYPEDATE +TFIELDLIST(IDX)%NDIMS = 0 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_T0D(IMODEL)) +IDX = IDX+1 +! +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST() +TFIELDLIST(IDX)%CMNHNAME = 'DTRAD_CLLY' +TFIELDLIST(IDX)%CSTDNAME = '' +TFIELDLIST(IDX)%CLONGNAME = 'MesoNH: DTRAD_CLLY' +TFIELDLIST(IDX)%CUNITS = 'seconds since YYYY-MM-DD HH:MM:SS.S' +TFIELDLIST(IDX)%CDIR = '--' +TFIELDLIST(IDX)%CCOMMENT = 'Time and date of last radiation call for only cloudy verticals' +TFIELDLIST(IDX)%NGRID = 0 +TFIELDLIST(IDX)%NTYPE = TYPEDATE +TFIELDLIST(IDX)%NDIMS = 0 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_T0D(IMODEL)) +IDX = IDX+1 +! +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST() +TFIELDLIST(IDX)%CMNHNAME = 'DTDCONV' +TFIELDLIST(IDX)%CSTDNAME = '' +TFIELDLIST(IDX)%CLONGNAME = 'MesoNH: DTDCONV' +TFIELDLIST(IDX)%CUNITS = 'seconds since YYYY-MM-DD HH:MM:SS.S' +TFIELDLIST(IDX)%CDIR = '--' +TFIELDLIST(IDX)%CCOMMENT = 'Time and date of the last deep convection call' +TFIELDLIST(IDX)%NGRID = 0 +TFIELDLIST(IDX)%NTYPE = TYPEDATE +TFIELDLIST(IDX)%NDIMS = 0 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_T0D(IMODEL)) +IDX = IDX+1 +! +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST() +TFIELDLIST(IDX)%CMNHNAME = 'DTEXP' +TFIELDLIST(IDX)%CSTDNAME = '' +TFIELDLIST(IDX)%CLONGNAME = 'MesoNH: DTEXP' +TFIELDLIST(IDX)%CUNITS = 'seconds since YYYY-MM-DD HH:MM:SS.S' +TFIELDLIST(IDX)%CDIR = '--' +TFIELDLIST(IDX)%CCOMMENT = 'Time and date of experiment beginning ' +TFIELDLIST(IDX)%NGRID = 0 +TFIELDLIST(IDX)%NTYPE = TYPEDATE +TFIELDLIST(IDX)%NDIMS = 0 +IDX = IDX+1 +! +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST() +TFIELDLIST(IDX)%CMNHNAME = 'DTSEG' +TFIELDLIST(IDX)%CSTDNAME = '' +TFIELDLIST(IDX)%CLONGNAME = 'MesoNH: DTSEG' +TFIELDLIST(IDX)%CUNITS = 'seconds since YYYY-MM-DD HH:MM:SS.S' +TFIELDLIST(IDX)%CDIR = '--' +TFIELDLIST(IDX)%CCOMMENT = 'Time and date of segment beginning ' +TFIELDLIST(IDX)%NGRID = 0 +TFIELDLIST(IDX)%NTYPE = TYPEDATE +TFIELDLIST(IDX)%NDIMS = 0 +IDX = IDX+1 +! +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST() TFIELDLIST(IDX)%CMNHNAME = 'UT' TFIELDLIST(IDX)%CSTDNAME = 'x_wind' TFIELDLIST(IDX)%CLONGNAME = 'MesoNH: UT' @@ -884,29 +973,60 @@ END SUBROUTINE FIND_FIELD_ID_FROM_MNHNAME SUBROUTINE INI_FIELD_SCALARS ! USE MODD_GRID_n +USE MODD_TIME_n ! INTEGER :: IID,IRESP ! CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS','called') ! IF (.NOT.ASSOCIATED(LSLEVE)) THEN - CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' LSLEVE not yet associated') + CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' LSLEVE was not associated') ALLOCATE(LSLEVE) CALL FIND_FIELD_ID_FROM_MNHNAME('SLEVE',IID,IRESP) TFIELDLIST(IID)%TFIELD_L0D(1)%DATA=>LSLEVE END IF IF (.NOT.ASSOCIATED(XLEN1)) THEN - CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' XLEN1 not yet associated') + CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' XLEN1 was not associated') ALLOCATE(XLEN1) CALL FIND_FIELD_ID_FROM_MNHNAME('LEN1',IID,IRESP) TFIELDLIST(IID)%TFIELD_X0D(1)%DATA=>XLEN1 END IF IF (.NOT.ASSOCIATED(XLEN2)) THEN - CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' XLEN2 not yet associated') + CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' XLEN2 was not associated') ALLOCATE(XLEN2) CALL FIND_FIELD_ID_FROM_MNHNAME('LEN2',IID,IRESP) TFIELDLIST(IID)%TFIELD_X0D(1)%DATA=>XLEN2 END IF +IF (.NOT.ASSOCIATED(TDTMOD)) THEN + CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' TDTMOD was not associated') + ALLOCATE(TDTMOD) + CALL FIND_FIELD_ID_FROM_MNHNAME('DTMOD',IID,IRESP) + TFIELDLIST(IID)%TFIELD_T0D(1)%DATA=>TDTMOD +END IF +IF (.NOT.ASSOCIATED(TDTCUR)) THEN + CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' TDTCUR was not associated') + ALLOCATE(TDTCUR) + CALL FIND_FIELD_ID_FROM_MNHNAME('DTCUR',IID,IRESP) + TFIELDLIST(IID)%TFIELD_T0D(1)%DATA=>TDTCUR +END IF +IF (.NOT.ASSOCIATED(TDTRAD_FULL)) THEN + CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' TDTRAD_FULL was not associated') + ALLOCATE(TDTRAD_FULL) + CALL FIND_FIELD_ID_FROM_MNHNAME('DTRAD_FULL',IID,IRESP) + TFIELDLIST(IID)%TFIELD_T0D(1)%DATA=>TDTRAD_FULL +END IF +IF (.NOT.ASSOCIATED(TDTRAD_CLONLY)) THEN + CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' TDTRAD_CLONLY was not associated') + ALLOCATE(TDTRAD_CLONLY) + CALL FIND_FIELD_ID_FROM_MNHNAME('DTRAD_CLLY',IID,IRESP) + TFIELDLIST(IID)%TFIELD_T0D(1)%DATA=>TDTRAD_CLONLY +END IF +IF (.NOT.ASSOCIATED(TDTDCONV)) THEN + CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' TDTDCONV was not associated') + ALLOCATE(TDTDCONV) + CALL FIND_FIELD_ID_FROM_MNHNAME('DTDCONV',IID,IRESP) + TFIELDLIST(IID)%TFIELD_T0D(1)%DATA=>TDTDCONV +END IF ! END SUBROUTINE INI_FIELD_SCALARS ! @@ -919,6 +1039,7 @@ USE MODD_REF USE MODD_FIELD_n USE MODD_GRID_n USE MODD_PRECIP_n +USE MODD_TIME_n ! INTEGER, INTENT(IN) :: KFROM, KTO ! @@ -957,31 +1078,19 @@ IF (KFROM == KTO) THEN END IF CALL FIND_FIELD_ID_FROM_MNHNAME('THVREFZ',IID,IRESP) TFIELDLIST(IID)%TFIELD_X1D(KFROM)%DATA=>XTHVREFZ - ! - IF (.NOT.ASSOCIATED(LSLEVE)) THEN - CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',' LSLEVE not yet associated') - ALLOCATE(LSLEVE) - END IF - CALL FIND_FIELD_ID_FROM_MNHNAME('SLEVE',IID,IRESP) - TFIELDLIST(IID)%TFIELD_L0D(KFROM)%DATA=>LSLEVE - ! - IF (.NOT.ASSOCIATED(XLEN1)) THEN - CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',' XLEN1 not yet associated') - ALLOCATE(XLEN1) - END IF - CALL FIND_FIELD_ID_FROM_MNHNAME('LEN1',IID,IRESP) - TFIELDLIST(IID)%TFIELD_X0D(KFROM)%DATA=>XLEN1 - ! - IF (.NOT.ASSOCIATED(XLEN2)) THEN - CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',' XLEN2 not yet associated') - ALLOCATE(XLEN2) - END IF - CALL FIND_FIELD_ID_FROM_MNHNAME('LEN2',IID,IRESP) - TFIELDLIST(IID)%TFIELD_X0D(KFROM)%DATA=>XLEN2 END IF ! +! +! +! ! Save current state for allocated arrays ! +! +! +! +! +! MODD_FIELD_n variables +! CALL FIND_FIELD_ID_FROM_MNHNAME('UT', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA=>XUT CALL FIND_FIELD_ID_FROM_MNHNAME('VT', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA=>XVT CALL FIND_FIELD_ID_FROM_MNHNAME('WT', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA=>XWT @@ -1015,12 +1124,26 @@ IF (.NOT.LCARTESIAN) THEN CALL FIND_FIELD_ID_FROM_MNHNAME('LON', IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA=>XLON END IF ! +! MODD_TIME_n variables +! +!***NONE*** +! +! MODD_PRECIP_n variables ! CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRR',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA=>XACPRR ! +! +! +! ! Current model is set to model KTO ! +! +! +! IF( KFROM/=KTO) THEN +! +! MODD_FIELD_n variables +! CALL FIND_FIELD_ID_FROM_MNHNAME('UT', IID,IRESP); XUT=> TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA CALL FIND_FIELD_ID_FROM_MNHNAME('VT', IID,IRESP); XVT=> TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA CALL FIND_FIELD_ID_FROM_MNHNAME('WT', IID,IRESP); XWT=> TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA @@ -1044,21 +1167,24 @@ CALL FIND_FIELD_ID_FROM_MNHNAME('DYHAT',IID,IRESP); XDYHAT=>TFIELDLIST(IID)%TFIE ! CALL FIND_FIELD_ID_FROM_MNHNAME('SLEVE',IID,IRESP) IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA)) THEN - CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',' TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA not yet associated') + CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',& + 'TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME) ALLOCATE(TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA) END IF LSLEVE=>TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA ! CALL FIND_FIELD_ID_FROM_MNHNAME('LEN1',IID,IRESP) IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA)) THEN - CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',' TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA not yet associated') + CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',& + 'TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME) ALLOCATE(TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA) END IF XLEN1=>TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA ! CALL FIND_FIELD_ID_FROM_MNHNAME('LEN2',IID,IRESP) IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA)) THEN - CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',' TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA not yet associated') + CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',& + 'TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME) ALLOCATE(TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA) END IF XLEN2=>TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA @@ -1075,6 +1201,49 @@ IF (.NOT.LCARTESIAN) THEN CALL FIND_FIELD_ID_FROM_MNHNAME('LON', IID,IRESP); XLON=> TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA END IF ! +! MODD_TIME_n variables +! +CALL FIND_FIELD_ID_FROM_MNHNAME('DTMOD',IID,IRESP) +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)) THEN + CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',& + 'TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME) + ALLOCATE(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA) +END IF +TDTMOD=>TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA +! +CALL FIND_FIELD_ID_FROM_MNHNAME('DTCUR',IID,IRESP) +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)) THEN + CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',& + 'TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME) + ALLOCATE(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA) +END IF +TDTCUR=>TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA +! +CALL FIND_FIELD_ID_FROM_MNHNAME('DTRAD_FULL',IID,IRESP) +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)) THEN + CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',& + 'TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME) + ALLOCATE(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA) +END IF +TDTRAD_FULL=>TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA +! +CALL FIND_FIELD_ID_FROM_MNHNAME('DTRAD_CLLY',IID,IRESP) +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)) THEN + CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',& + 'TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME) + ALLOCATE(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA) +END IF +TDTRAD_CLONLY=>TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA +! +CALL FIND_FIELD_ID_FROM_MNHNAME('DTDCONV',IID,IRESP) +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)) THEN + CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',& + 'TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME) + ALLOCATE(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA) +END IF +TDTDCONV=>TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA +! +! MODD_PRECIP_n variables ! CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRR',IID,IRESP); XACPRR=>TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA END IF diff --git a/src/MNH/goto_model_wrapper.f90 b/src/MNH/goto_model_wrapper.f90 index bdbd8e0eea93c32c177d270fc8411915373b0d5c..f9fc317c8103529869f6cda0c9aab9cb200b9a0e 100644 --- a/src/MNH/goto_model_wrapper.f90 +++ b/src/MNH/goto_model_wrapper.f90 @@ -48,7 +48,7 @@ USE MODD_FIELD_n USE MODD_PAST_FIELD_n USE MODD_GET_n USE MODD_GR_FIELD_n -USE MODD_GRID_n +!USE MODD_GRID_n !$20140403 !USE MODD_GRID_CONF_PROJ !$ @@ -84,7 +84,7 @@ USE MODD_FRC_n USE MODD_SECPGD_FIELD_n USE MODD_SERIES_n USE MODD_STATION_n -USE MODD_TIME_n +!USE MODD_TIME_n USE MODD_TURB_n ! USE MODD_SUB_CH_FIELD_VALUE_n @@ -147,6 +147,7 @@ CALL GR_FIELD_GOTO_MODEL(KFROM, KTO) !$20140403 add grid_conf_proj_goto_model !CALL GRID_CONF_PROJ_GOTO_MODEL(KFROM,KTO) !$ +!CALL GRID_GOTO_MODEL(KFROM, KTO) CALL HURR_FIELD_GOTO_MODEL(KFROM, KTO) !$20140403 add io_surf_mnh_goto_model!! CALL IO_SURF_MNH_GOTO_MODEL(KFROM, KTO) @@ -187,7 +188,7 @@ CALL SUB_PROFILER_GOTO_MODEL(KFROM, KTO) CALL SUB_STATION_GOTO_MODEL(KFROM, KTO) CALL SUB_PASPOL_GOTO_MODEL(KFROM, KTO) CALL SUB_ELEC_GOTO_MODEL(KFROM, KTO) -CALL TIME_GOTO_MODEL(KFROM, KTO) +!CALL TIME_GOTO_MODEL(KFROM, KTO) CALL TURB_GOTO_MODEL(KFROM, KTO) CALL TIMEZ_GOTO_MODEL(KFROM, KTO) CALL CH_PH_GOTO_MODEL(KFROM, KTO) diff --git a/src/MNH/init_ground_paramn.f90 b/src/MNH/init_ground_paramn.f90 index b562cb1020d2c20b048e99f1787fa3629523f334..13390f721b6b71bf7df3b4fc77a71ca3107441e1 100644 --- a/src/MNH/init_ground_paramn.f90 +++ b/src/MNH/init_ground_paramn.f90 @@ -75,14 +75,15 @@ END MODULE MODI_INIT_GROUND_PARAM_n ! USE MODE_ll USE MODE_IO_ll +USE MODE_FIELD ! USE MODD_REF_n, ONLY : XRHODREF -USE MODD_TIME_n, ONLY : TIME_MODEL ! To address TDTCUR of model number 1 (see code below) USE MODD_CH_M9_n, ONLY : CNAMES USE MODD_NSV USE MODD_DUST, ONLY : CDUSTNAMES USE MODD_SALT, ONLY : CSALTNAMES USE MODD_CH_AEROSOL, ONLY : CAERONAMES +USE MODD_TYPE_DATE ! USE MODD_PARAMETERS, ONLY : XUNDEF, JPVEXT ! @@ -130,6 +131,8 @@ INTEGER :: IJE ! Y array physical boundary INTEGER :: ILU ! total physical size INTEGER :: JLAYER! loop index INTEGER :: ISV +INTEGER :: IID,IRESP +TYPE (DATE_TIME), POINTER :: TZTCUR=>NULL() ! !------------------------------------------------------------------------------- ! @@ -170,15 +173,17 @@ DO JLAYER=NSV_AERBEG,NSV_AEREND END DO ! ISV = SIZE(HSV) -CALL INIT_SURF_ATM_n(YSURF_CUR,'MESONH',HINIT,.FALSE., & - ILU,ISV,SIZE(PSW_BANDS), & - HSV,ZCO2,ZRHODREF, & - ZZENITH,ZAZIM,PSW_BANDS,ZDIR_ALB,ZSCA_ALB, & - ZEMIS,ZTSRAD,ZTSURF, & - TIME_MODEL(1)%TDTCUR%TDATE%YEAR, TIME_MODEL(1)%TDTCUR%TDATE%MONTH,& - TIME_MODEL(1)%TDTCUR%TDATE%DAY, TIME_MODEL(1)%TDTCUR%TIME, & - ' ',' ', & - 'OK' ) +CALL FIND_FIELD_ID_FROM_MNHNAME('DTCUR',IID,IRESP) +TZTCUR=>TFIELDLIST(IID)%TFIELD_T0D(1)%DATA +CALL INIT_SURF_ATM_n(YSURF_CUR,'MESONH',HINIT,.FALSE., & + ILU,ISV,SIZE(PSW_BANDS), & + HSV,ZCO2,ZRHODREF, & + ZZENITH,ZAZIM,PSW_BANDS,ZDIR_ALB,ZSCA_ALB, & + ZEMIS,ZTSRAD,ZTSURF, & + TZTCUR%TDATE%YEAR, TZTCUR%TDATE%MONTH, & + TZTCUR%TDATE%DAY, TZTCUR%TIME, & + ' ',' ', & + 'OK' ) ! PDIR_ALB = XUNDEF PSCA_ALB = XUNDEF diff --git a/src/MNH/modd_spawn.f90 b/src/MNH/modd_spawn.f90 index 8af3b8458657413151bfe60b53e625799d2c6ff9..bd78da721de79a4f9f90dcdf6a4ede8aab32c957 100644 --- a/src/MNH/modd_spawn.f90 +++ b/src/MNH/modd_spawn.f90 @@ -42,6 +42,8 @@ !* 0. DECLARATIONS ! ------------ ! +USE MODD_TYPE_DATE +! IMPLICIT NONE ! INTEGER,SAVE :: NDXRATIO,NDYRATIO ! x and y-direction resolution RATIO between models 2 and 1 @@ -78,5 +80,6 @@ REAL,DIMENSION(:,:,:),SAVE,POINTER :: XTHT1 REAL,DIMENSION(:,:,:),SAVE,POINTER :: XUT1 REAL,DIMENSION(:,:,:),SAVE,POINTER :: XVT1 REAL,DIMENSION(:,:,:),SAVE,POINTER :: XWT1 +TYPE(DATE_TIME), SAVE,POINTER :: TDTCUR1 ! END MODULE MODD_SPAWN diff --git a/src/MNH/modd_timen.f90 b/src/MNH/modd_timen.f90 index 917d67752e36f277aa8cf1793bd46505d2b6c80d..a2d685036180f04ffbcb66822c8149d4d6a75424 100644 --- a/src/MNH/modd_timen.f90 +++ b/src/MNH/modd_timen.f90 @@ -47,41 +47,16 @@ USE MODD_TYPE_DATE USE MODD_PARAMETERS, ONLY: JPMODELMAX IMPLICIT NONE -TYPE TIME_t -! - TYPE (DATE_TIME) :: TDTMOD ! Time and Date of the model beginning - TYPE (DATE_TIME) :: TDTCUR ! Current Time and Date - TYPE (DATE_TIME) :: TDTRAD_FULL ! Time and Date of the last full - ! radiation call - TYPE (DATE_TIME) :: TDTRAD_CLONLY ! Time and Date of the last radiation - ! call for only the cloudy verticals - TYPE (DATE_TIME) :: TDTDCONV ! Time and Date of the last deep convection - ! call -! -END TYPE TIME_t - -TYPE(TIME_t), DIMENSION(JPMODELMAX), TARGET, SAVE :: TIME_MODEL - -TYPE (DATE_TIME), POINTER :: TDTMOD=>NULL() -TYPE (DATE_TIME), POINTER :: TDTCUR=>NULL() -TYPE (DATE_TIME), POINTER :: TDTRAD_FULL=>NULL() -TYPE (DATE_TIME), POINTER :: TDTRAD_CLONLY=>NULL() -TYPE (DATE_TIME), POINTER :: TDTDCONV=>NULL() +TYPE (DATE_TIME), POINTER :: TDTMOD=>NULL() ! Time and date of model beginning +TYPE (DATE_TIME), POINTER :: TDTCUR=>NULL() ! Current time and date +TYPE (DATE_TIME), POINTER :: TDTRAD_FULL=>NULL() ! Time and date of last full radiation call +TYPE (DATE_TIME), POINTER :: TDTRAD_CLONLY=>NULL() ! Time and date of last radiation call for only cloudy verticals +TYPE (DATE_TIME), POINTER :: TDTDCONV=>NULL() ! Time and date of the last deep convection call CONTAINS SUBROUTINE TIME_GOTO_MODEL(KFROM, KTO) INTEGER, INTENT(IN) :: KFROM, KTO -! -! Save current state for allocated arrays -! -! Current model is set to model KTO -TDTMOD=>TIME_MODEL(KTO)%TDTMOD -TDTCUR=>TIME_MODEL(KTO)%TDTCUR -TDTRAD_FULL=>TIME_MODEL(KTO)%TDTRAD_FULL -TDTRAD_CLONLY=>TIME_MODEL(KTO)%TDTRAD_CLONLY -TDTDCONV=>TIME_MODEL(KTO)%TDTDCONV - END SUBROUTINE TIME_GOTO_MODEL END MODULE MODD_TIME_n diff --git a/src/MNH/spawn_grid2.f90 b/src/MNH/spawn_grid2.f90 index 450d7dbf67d1de638aad61da2e165f99aa1569c6..02936c8626aa7a6c1f29a8b5367bd2346a16169b 100644 --- a/src/MNH/spawn_grid2.f90 +++ b/src/MNH/spawn_grid2.f90 @@ -160,7 +160,6 @@ USE MODD_CONF USE MODD_SPAWN ! USE MODD_GRID, ONLY: XLONORI,XLATORI -USE MODD_TIME_n, ONLY: TIME_MODEL USE MODD_LBC_n, ONLY: LBC_MODEL ! USE MODD_LUNIT_n @@ -513,11 +512,11 @@ CALL MPPDB_CHECK2D(PZSMT,"SPAWN_GRID2:PZSMT",PRECISION) !* 4. INITIALIZATION OF MODEL 2 DATE AND TIME: ! ---------------------------------------- ! -TPDTMOD = TIME_MODEL(1)%TDTCUR -TPDTCUR = TIME_MODEL(1)%TDTCUR +TPDTMOD = TDTCUR1 +TPDTCUR = TDTCUR1 ! YTITLE='OUTER MODEL : CURRENT DATE AND TIME ' -CALL SM_PRINT_TIME(TIME_MODEL(1)%TDTCUR, CLUOUT, YTITLE) +CALL SM_PRINT_TIME(TDTCUR1, CLUOUT, YTITLE) YTITLE='SPAWNED MODEL : DATE AND TIME BEGINNING' CALL SM_PRINT_TIME(TPDTMOD, CLUOUT, YTITLE) YTITLE='SPAWNED MODEL : CURRENT DATE AND TIME ' diff --git a/src/MNH/spawning.f90 b/src/MNH/spawning.f90 index 4a0dfa97375090633154d84c9521970ce781dc53..9731fd1c38a412c3546c2e84b6ff3658eb3a5d16 100644 --- a/src/MNH/spawning.f90 +++ b/src/MNH/spawning.f90 @@ -279,6 +279,7 @@ XTHT1 => XTHT XUT1 => XUT XVT1 => XVT XWT1 => XWT +TDTCUR1 => TDTCUR ! END SUBROUTINE SET_POINTERS_TO_MODEL1 ! diff --git a/src/MNH/write_lfin.f90 b/src/MNH/write_lfin.f90 index c6236e57e18dfdbd11df5a5199c21acb83cb1526..e591ba9774244f29c76a08d4c5a80aec9ff99abc 100644 --- a/src/MNH/write_lfin.f90 +++ b/src/MNH/write_lfin.f90 @@ -390,7 +390,7 @@ IF (.NOT.LCARTESIAN) THEN CALL SM_LATLON(XLATORI,XLONORI,ZXHATM,ZYHATM,ZLATOR,ZLONOR) DEALLOCATE(ZXHAT_ll,ZYHAT_ll) ! - !LONOR and LATOR not in TFIELDLIST bacause local variables + !LONOR and LATOR not in TFIELDLIST because local variables TZFIELD%CMNHNAME = 'LONOR' TZFIELD%CSTDNAME = '' TZFIELD%CLONGNAME = 'MesoNH: LONOR' @@ -438,22 +438,16 @@ IF (LSLEVE) THEN CALL IO_WRITE_FIELD(TPFILE,'LEN2',CLUOUT,IRESP,XLEN2) END IF ! -YDIR='--' -! -YRECFM='DTCUR' -CALL FMWRIT(YFMFILE,YRECFM,CLUOUT,YDIR,TDTCUR,IGRID,ILENCH,YCOMMENT,IRESP) -! -YRECFM='DTEXP' -CALL FMWRIT(YFMFILE,YRECFM,CLUOUT,YDIR,TDTEXP,IGRID,ILENCH,YCOMMENT,IRESP) -! -YRECFM='DTMOD' -CALL FMWRIT(YFMFILE,YRECFM,CLUOUT,YDIR,TDTMOD,IGRID,ILENCH,YCOMMENT,IRESP) ! -YRECFM='DTSEG' -CALL FMWRIT(YFMFILE,YRECFM,CLUOUT,YDIR,TDTSEG,IGRID,ILENCH,YCOMMENT,IRESP) +CALL IO_WRITE_FIELD(TPFILE,'DTMOD',CLUOUT,IRESP,TDTMOD) +CALL IO_WRITE_FIELD(TPFILE,'DTCUR',CLUOUT,IRESP,TDTCUR) +CALL IO_WRITE_FIELD(TPFILE,'DTEXP',CLUOUT,IRESP,TDTEXP) +CALL IO_WRITE_FIELD(TPFILE,'DTSEG',CLUOUT,IRESP,TDTSEG) ! !* 1.3 Configuration variables : ! +YDIR='--' +! YRECFM='L1D' YCOMMENT=' ' IGRID=0 @@ -1631,17 +1625,8 @@ END IF ! IF (CRAD /= 'NONE') THEN ! - YDIR='--' -! - YRECFM='DTRAD_FULL' - YCOMMENT='-' - ILENCH = LEN(YCOMMENT) - CALL FMWRIT(YFMFILE,YRECFM,CLUOUT,YDIR,TDTRAD_FULL,IGRID,ILENCH,YCOMMENT,IRESP) -! - YRECFM='DTRAD_CLLY' - YCOMMENT='-' - ILENCH = LEN(YCOMMENT) - CALL FMWRIT(YFMFILE,YRECFM,CLUOUT,YDIR,TDTRAD_CLONLY,IGRID,ILENCH,YCOMMENT,IRESP) + CALL IO_WRITE_FIELD(TPFILE,'DTRAD_FULL',CLUOUT,IRESP,TDTRAD_FULL) + CALL IO_WRITE_FIELD(TPFILE,'DTRAD_CLLY',CLUOUT,IRESP,TDTRAD_CLONLY) ! YDIR='XY' ! @@ -1736,11 +1721,7 @@ IF (CDCONV /= 'NONE' .OR. CSCONV == 'KAFR') THEN ! ! ! - YRECFM='DTDCONV' - YDIR='--' - YCOMMENT = '-' - ILENCH = LEN(YCOMMENT) - CALL FMWRIT(YFMFILE,YRECFM,CLUOUT,YDIR,TDTDCONV,IGRID,ILENCH,YCOMMENT,IRESP) + CALL IO_WRITE_FIELD(TPFILE,'DTDCONV',CLUOUT,IRESP,TDTDCONV) ! YDIR='XY' !