Skip to content
Snippets Groups Projects
Commit e496ef7f authored by RODIER Quentin's avatar RODIER Quentin
Browse files

Revert "Robert Schoetter : writing per vegtype"

This contribution was not finalized (Gaetan Noual's thesis), it will be commited by Patrick Lemoigne once ready through SURFEX offline repo
This reverts commit a73037f2.
parent a069aef3
No related branches found
No related tags found
No related merge requests found
...@@ -42,20 +42,10 @@ ...@@ -42,20 +42,10 @@
USE MODD_PREP_ISBA, ONLY : CFILE_ISBA, CTYPE, CFILEPGD_ISBA, CTYPEPGD, & USE MODD_PREP_ISBA, ONLY : CFILE_ISBA, CTYPE, CFILEPGD_ISBA, CTYPEPGD, &
CFILE_HUG, CTYPE_HUG, & CFILE_HUG, CTYPE_HUG, &
CFILE_HUG_SURF, CFILE_HUG_ROOT, CFILE_HUG_DEEP, & CFILE_HUG_SURF, CFILE_HUG_ROOT, CFILE_HUG_DEEP, &
CFILE_HUG_1, CFILE_HUG_2, CFILE_HUG_3, &
CFILE_HUG_4, CFILE_HUG_5, CFILE_HUG_6, &
CFILE_HUG_7, CFILE_HUG_8, CFILE_HUG_9, &
CFILE_HUG_10, CFILE_HUG_11, CFILE_HUG_12, &
CFILE_HUG_13, CFILE_HUG_14, &
XHUG_SURF, XHUG_ROOT, XHUG_DEEP, & XHUG_SURF, XHUG_ROOT, XHUG_DEEP, &
XHUGI_SURF, XHUGI_ROOT, XHUGI_DEEP, & XHUGI_SURF, XHUGI_ROOT, XHUGI_DEEP, &
CFILE_TG, CTYPE_TG, & CFILE_TG, CTYPE_TG, &
CFILE_TG_SURF, CFILE_TG_ROOT, CFILE_TG_DEEP, & CFILE_TG_SURF, CFILE_TG_ROOT, CFILE_TG_DEEP, &
CFILE_TG_1, CFILE_TG_2, CFILE_TG_3, &
CFILE_TG_4, CFILE_TG_5, CFILE_TG_6, &
CFILE_TG_7, CFILE_TG_8, CFILE_TG_9, &
CFILE_TG_10, CFILE_TG_11, CFILE_TG_12, &
CFILE_TG_13, CFILE_TG_14, &
XTG_SURF, XTG_ROOT, XTG_DEEP, & XTG_SURF, XTG_ROOT, XTG_DEEP, &
XWR_DEF, LEXTRAP_TG, LEXTRAP_WG, LEXTRAP_WGI, & XWR_DEF, LEXTRAP_TG, LEXTRAP_WG, LEXTRAP_WGI, &
LEXTRAP_SN, & LEXTRAP_SN, &
...@@ -103,35 +93,6 @@ CFILE_TG_SURF = ' ' ...@@ -103,35 +93,6 @@ CFILE_TG_SURF = ' '
CFILE_TG_ROOT = ' ' CFILE_TG_ROOT = ' '
CFILE_TG_DEEP = ' ' CFILE_TG_DEEP = ' '
! !
CFILE_HUG_1 = ' '
CFILE_HUG_2 = ' '
CFILE_HUG_3 = ' '
CFILE_HUG_4 = ' '
CFILE_HUG_5 = ' '
CFILE_HUG_6 = ' '
CFILE_HUG_7 = ' '
CFILE_HUG_8 = ' '
CFILE_HUG_9 = ' '
CFILE_HUG_10 = ' '
CFILE_HUG_11 = ' '
CFILE_HUG_12 = ' '
CFILE_HUG_13 = ' '
CFILE_HUG_14 = ' '
CFILE_TG_1 = ' '
CFILE_TG_2 = ' '
CFILE_TG_3 = ' '
CFILE_TG_4 = ' '
CFILE_TG_5 = ' '
CFILE_TG_6 = ' '
CFILE_TG_7 = ' '
CFILE_TG_8 = ' '
CFILE_TG_9 = ' '
CFILE_TG_10 = ' '
CFILE_TG_11 = ' '
CFILE_TG_12 = ' '
CFILE_TG_13 = ' '
CFILE_TG_14 = ' '
!
XHUG_SURF = XUNDEF XHUG_SURF = XUNDEF
XHUG_ROOT = XUNDEF XHUG_ROOT = XUNDEF
XHUG_DEEP = XUNDEF XHUG_DEEP = XUNDEF
......
...@@ -38,8 +38,6 @@ IMPLICIT NONE ...@@ -38,8 +38,6 @@ IMPLICIT NONE
SAVE SAVE
!-------------------------------------------------------------------------- !--------------------------------------------------------------------------
! !
INTEGER, PARAMETER :: NVEGTYPE_MAX = 20
CHARACTER(LEN=28) :: CFILE_ISBA ! input file name CHARACTER(LEN=28) :: CFILE_ISBA ! input file name
CHARACTER(LEN=6) :: CTYPE ! input file type CHARACTER(LEN=6) :: CTYPE ! input file type
CHARACTER(LEN=28) :: CFILEPGD_ISBA ! input file name CHARACTER(LEN=28) :: CFILEPGD_ISBA ! input file name
...@@ -58,34 +56,6 @@ SAVE ...@@ -58,34 +56,6 @@ SAVE
CHARACTER(LEN=28) :: CFILE_TG_SURF ! input file name for TG_SURF CHARACTER(LEN=28) :: CFILE_TG_SURF ! input file name for TG_SURF
CHARACTER(LEN=28) :: CFILE_TG_ROOT ! input file name for TG_ROOT CHARACTER(LEN=28) :: CFILE_TG_ROOT ! input file name for TG_ROOT
CHARACTER(LEN=28) :: CFILE_TG_DEEP ! input file name for TG_DEEP CHARACTER(LEN=28) :: CFILE_TG_DEEP ! input file name for TG_DEEP
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_1 ! input file name for HUG_1
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_2 ! input file name for HUG_2
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_3 ! input file name for HUG_3
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_4 ! input file name for HUG_4
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_5 ! input file name for HUG_5
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_6 ! input file name for HUG_6
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_7 ! input file name for HUG_7
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_8 ! input file name for HUG_8
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_9 ! input file name for HUG_9
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_10 ! input file name for HUG_10
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_11 ! input file name for HUG_11
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_12 ! input file name for HUG_12
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_13 ! input file name for HUG_13
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_HUG_14 ! input file name for HUG_14
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_1 ! input file name for TG_1
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_2 ! input file name for TG_2
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_3 ! input file name for TG_3
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_4 ! input file name for TG_4
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_5 ! input file name for TG_5
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_6 ! input file name for TG_6
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_7 ! input file name for TG_7
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_8 ! input file name for TG_8
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_9 ! input file name for TG_9
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_10 ! input file name for TG_10
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_11 ! input file name for TG_11
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_12 ! input file name for TG_12
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_13 ! input file name for TG_13
CHARACTER(LEN=28), DIMENSION(NVEGTYPE_MAX) :: CFILE_TG_14 ! input file name for TG_14
! !
REAL :: XHUG_SURF ! surface relative soil humidity REAL :: XHUG_SURF ! surface relative soil humidity
REAL :: XHUG_ROOT ! root layer relative soil humidity REAL :: XHUG_ROOT ! root layer relative soil humidity
...@@ -115,6 +85,7 @@ REAL, DIMENSION(NGRID_LEVEL) :: XGRID_SOIL = & ...@@ -115,6 +85,7 @@ REAL, DIMENSION(NGRID_LEVEL) :: XGRID_SOIL = &
! !
LOGICAL :: LSNOW_IDEAL LOGICAL :: LSNOW_IDEAL
! !
REAL, DIMENSION(:), POINTER :: XWSNOW ! Snow reservoir REAL, DIMENSION(:), POINTER :: XWSNOW ! Snow reservoir
REAL, DIMENSION(:), POINTER :: XRSNOW ! snow density REAL, DIMENSION(:), POINTER :: XRSNOW ! snow density
REAL, DIMENSION(:), POINTER :: XTSNOW ! snow temperature REAL, DIMENSION(:), POINTER :: XTSNOW ! snow temperature
......
...@@ -35,20 +35,10 @@ ...@@ -35,20 +35,10 @@
USE MODD_PREP_ISBA, ONLY : CFILE_ISBA, CTYPE, CFILEPGD_ISBA, CTYPEPGD, & USE MODD_PREP_ISBA, ONLY : CFILE_ISBA, CTYPE, CFILEPGD_ISBA, CTYPEPGD, &
CFILE_HUG, CTYPE_HUG, & CFILE_HUG, CTYPE_HUG, &
CFILE_HUG_SURF, CFILE_HUG_ROOT, CFILE_HUG_DEEP, & CFILE_HUG_SURF, CFILE_HUG_ROOT, CFILE_HUG_DEEP, &
CFILE_HUG_1, CFILE_HUG_2, CFILE_HUG_3, &
CFILE_HUG_4, CFILE_HUG_5, CFILE_HUG_6, &
CFILE_HUG_7, CFILE_HUG_8, CFILE_HUG_9, &
CFILE_HUG_10, CFILE_HUG_11, CFILE_HUG_12, &
CFILE_HUG_13, CFILE_HUG_14, &
XHUG_SURF, XHUG_ROOT, XHUG_DEEP, & XHUG_SURF, XHUG_ROOT, XHUG_DEEP, &
XHUGI_SURF, XHUGI_ROOT, XHUGI_DEEP, & XHUGI_SURF, XHUGI_ROOT, XHUGI_DEEP, &
CFILE_TG, CTYPE_TG, & CFILE_TG, CTYPE_TG, &
CFILE_TG_SURF, CFILE_TG_ROOT, CFILE_TG_DEEP, & CFILE_TG_SURF, CFILE_TG_ROOT, CFILE_TG_DEEP, &
CFILE_TG_1, CFILE_TG_2, CFILE_TG_3, &
CFILE_TG_4, CFILE_TG_5, CFILE_TG_6, &
CFILE_TG_7, CFILE_TG_8, CFILE_TG_9, &
CFILE_TG_10, CFILE_TG_11, CFILE_TG_12, &
CFILE_TG_13, CFILE_TG_14, &
XTG_SURF, XTG_ROOT, XTG_DEEP,LEXTRAP_TG,LEXTRAP_WG,& XTG_SURF, XTG_ROOT, XTG_DEEP,LEXTRAP_TG,LEXTRAP_WG,&
LEXTRAP_WGI,LEXTRAP_SN LEXTRAP_WGI,LEXTRAP_SN
...@@ -63,20 +53,10 @@ LOGICAL :: LISBA_CANOPY !flag to use air layers inside the canopy ...@@ -63,20 +53,10 @@ LOGICAL :: LISBA_CANOPY !flag to use air layers inside the canopy
NAMELIST/NAM_PREP_ISBA/CFILE_ISBA, CTYPE, CFILEPGD_ISBA, CTYPEPGD, & NAMELIST/NAM_PREP_ISBA/CFILE_ISBA, CTYPE, CFILEPGD_ISBA, CTYPEPGD, &
CFILE_HUG, CTYPE_HUG, & CFILE_HUG, CTYPE_HUG, &
CFILE_HUG_SURF, CFILE_HUG_ROOT, CFILE_HUG_DEEP, & CFILE_HUG_SURF, CFILE_HUG_ROOT, CFILE_HUG_DEEP, &
CFILE_HUG_1, CFILE_HUG_2, CFILE_HUG_3, &
CFILE_HUG_4, CFILE_HUG_5, CFILE_HUG_6, &
CFILE_HUG_7, CFILE_HUG_8, CFILE_HUG_9, &
CFILE_HUG_10, CFILE_HUG_11, CFILE_HUG_12, &
CFILE_HUG_13, CFILE_HUG_14, &
XHUG_SURF, XHUG_ROOT, XHUG_DEEP, & XHUG_SURF, XHUG_ROOT, XHUG_DEEP, &
XHUGI_SURF, XHUGI_ROOT, XHUGI_DEEP, & XHUGI_SURF, XHUGI_ROOT, XHUGI_DEEP, &
CFILE_TG, CTYPE_TG, & CFILE_TG, CTYPE_TG, &
CFILE_TG_SURF, CFILE_TG_ROOT, CFILE_TG_DEEP, & CFILE_TG_SURF, CFILE_TG_ROOT, CFILE_TG_DEEP, &
CFILE_TG_1, CFILE_TG_2, CFILE_TG_3, &
CFILE_TG_4, CFILE_TG_5, CFILE_TG_6, &
CFILE_TG_7, CFILE_TG_8, CFILE_TG_9, &
CFILE_TG_10, CFILE_TG_11, CFILE_TG_12, &
CFILE_TG_13, CFILE_TG_14, &
XTG_SURF, XTG_ROOT, XTG_DEEP, & XTG_SURF, XTG_ROOT, XTG_DEEP, &
NYEAR, NMONTH, NDAY, XTIME, LISBA_CANOPY,LEXTRAP_TG,& NYEAR, NMONTH, NDAY, XTIME, LISBA_CANOPY,LEXTRAP_TG,&
LEXTRAP_WG,LEXTRAP_WGI,LEXTRAP_SN LEXTRAP_WG,LEXTRAP_WGI,LEXTRAP_SN
......
...@@ -295,7 +295,7 @@ IF (YDCTL%LPART1) THEN ...@@ -295,7 +295,7 @@ IF (YDCTL%LPART1) THEN
IF (GUNIF) THEN IF (GUNIF) THEN
CALL PREP_ISBA_UNIF(ILUOUT,HSURF,ZFIELDIN) CALL PREP_ISBA_UNIF(ILUOUT,HSURF,ZFIELDIN)
ELSE IF (YFILETYPE=='ASCLLV') THEN ELSE IF (YFILETYPE=='ASCLLV') THEN
CALL PREP_ISBA_ASCLLV(DTCO, UG, U, USS, S, IO, HPROGRAM,HSURF,ILUOUT,ZFIELDIN) CALL PREP_ISBA_ASCLLV(DTCO, UG, U, USS, HPROGRAM,HSURF,ILUOUT,ZFIELDIN)
ELSE IF (YFILETYPE=='GRIB ') THEN ELSE IF (YFILETYPE=='GRIB ') THEN
CALL PREP_GRIB_GRID(YFILE,ILUOUT,CINMODEL,CINGRID_TYPE,CINTERP_TYPE,TZTIME_GRIB) CALL PREP_GRIB_GRID(YFILE,ILUOUT,CINMODEL,CINGRID_TYPE,CINTERP_TYPE,TZTIME_GRIB)
IF (NRANK==NPIO) CALL PREP_ISBA_GRIB(HPROGRAM,HSURF,YFILE,ILUOUT,ZFIELDIN) IF (NRANK==NPIO) CALL PREP_ISBA_GRIB(HPROGRAM,HSURF,YFILE,ILUOUT,ZFIELDIN)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
!SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!SFX_LIC for details. version 1. !SFX_LIC for details. version 1.
! ######### ! #########
SUBROUTINE PREP_ISBA_ASCLLV (DTCO, UG, U, USS, S, IO, HPROGRAM,HSURF,KLUOUT,PFIELD) SUBROUTINE PREP_ISBA_ASCLLV (DTCO, UG, U, USS, HPROGRAM,HSURF,KLUOUT,PFIELD)
! ################################################################################# ! #################################################################################
! !
!!**** *PREP_ISBA_ASCLLV* - prepares ISBA field from prescribed values !!**** *PREP_ISBA_ASCLLV* - prepares ISBA field from prescribed values
...@@ -33,12 +33,10 @@ SUBROUTINE PREP_ISBA_ASCLLV (DTCO, UG, U, USS, S, IO, HPROGRAM,HSURF,KLUOUT,PFIE ...@@ -33,12 +33,10 @@ SUBROUTINE PREP_ISBA_ASCLLV (DTCO, UG, U, USS, S, IO, HPROGRAM,HSURF,KLUOUT,PFIE
USE MODD_SURFEX_MPI, ONLY : NPROC, NINDEX, NNUM, NCOMM, NPIO, NRANK USE MODD_SURFEX_MPI, ONLY : NPROC, NINDEX, NNUM, NCOMM, NPIO, NRANK
! !
USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t
USE MODD_DATA_ISBA_n, ONLY : DATA_ISBA_t
USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t
USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t
USE MODD_SSO_n, ONLY : SSO_t USE MODD_SSO_n, ONLY : SSO_t
USE MODD_ISBA_OPTIONS_n, ONLY :ISBA_OPTIONS_t !
USE MODD_ISBA_n, ONLY : ISBA_S_t
USE MODD_PREP, ONLY : CINTERP_TYPE USE MODD_PREP, ONLY : CINTERP_TYPE
USE MODD_PGD_GRID, ONLY : NL,LLATLONMASK,CGRID,XGRID_PAR,NGRID_PAR USE MODD_PGD_GRID, ONLY : NL,LLATLONMASK,CGRID,XGRID_PAR,NGRID_PAR
USE MODD_PGDWORK, ONLY : CATYPE USE MODD_PGDWORK, ONLY : CATYPE
...@@ -47,25 +45,10 @@ USE MODD_SURF_PAR, ONLY : XUNDEF ...@@ -47,25 +45,10 @@ USE MODD_SURF_PAR, ONLY : XUNDEF
USE MODD_PREP_ISBA, ONLY : CTYPE_HUG , CTYPE_TG , & USE MODD_PREP_ISBA, ONLY : CTYPE_HUG , CTYPE_TG , &
CFILE_HUG_SURF, CFILE_TG_SURF, & CFILE_HUG_SURF, CFILE_TG_SURF, &
CFILE_HUG_ROOT, CFILE_TG_ROOT, & CFILE_HUG_ROOT, CFILE_TG_ROOT, &
CFILE_HUG_DEEP, CFILE_TG_DEEP, & CFILE_HUG_DEEP, CFILE_TG_DEEP
CFILE_HUG_1,CFILE_TG_1 , &
CFILE_HUG_2,CFILE_TG_2 , &
CFILE_HUG_3,CFILE_TG_3 , &
CFILE_HUG_4,CFILE_TG_4 , &
CFILE_HUG_5,CFILE_TG_5 , &
CFILE_HUG_6,CFILE_TG_6 , &
CFILE_HUG_7,CFILE_TG_7 , &
CFILE_HUG_8,CFILE_TG_8 , &
CFILE_HUG_9,CFILE_TG_9 , &
CFILE_HUG_10,CFILE_TG_10 , &
CFILE_HUG_11,CFILE_TG_11 , &
CFILE_HUG_12,CFILE_TG_12 , &
CFILE_HUG_13,CFILE_TG_13 , &
CFILE_HUG_14,CFILE_TG_14
USE MODI_PGD_FIELD USE MODI_PGD_FIELD
USE MODI_GET_LATLONMASK_n USE MODI_GET_LATLONMASK_n
USE MODI_ABOR1_SFX USE MODI_ABOR1_SFX
USE MODI_VEGTYPE_TO_PATCH
! !
! !
USE YOMHOOK ,ONLY : LHOOK, DR_HOOK USE YOMHOOK ,ONLY : LHOOK, DR_HOOK
...@@ -86,8 +69,6 @@ TYPE(DATA_COVER_t), INTENT(INOUT) :: DTCO ...@@ -86,8 +69,6 @@ TYPE(DATA_COVER_t), INTENT(INOUT) :: DTCO
TYPE(SURF_ATM_GRID_t), INTENT(INOUT) :: UG TYPE(SURF_ATM_GRID_t), INTENT(INOUT) :: UG
TYPE(SURF_ATM_t), INTENT(INOUT) :: U TYPE(SURF_ATM_t), INTENT(INOUT) :: U
TYPE(SSO_t), INTENT(INOUT) :: USS TYPE(SSO_t), INTENT(INOUT) :: USS
TYPE(ISBA_S_t), INTENT(INOUT) :: S
TYPE(ISBA_OPTIONS_t) :: IO
! !
CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling surf. schemes
CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field CHARACTER(LEN=7), INTENT(IN) :: HSURF ! type of field
...@@ -97,23 +78,15 @@ REAL, POINTER, DIMENSION(:,:,:) :: PFIELD ! field to interpolate horizontally ...@@ -97,23 +78,15 @@ REAL, POINTER, DIMENSION(:,:,:) :: PFIELD ! field to interpolate horizontally
!* 0.2 declarations of local variables !* 0.2 declarations of local variables
! !
INTEGER :: JV ! loop counter INTEGER :: JV ! loop counter
INTEGER :: JT ! loop counter for patch
INTEGER :: JLAYER INTEGER :: JLAYER
INTEGER :: JPATCH ! patch number corresponding to a kind of vegtype
INTEGER :: IL INTEGER :: IL
! !
INTEGER, DIMENSION(0:NPROC-1) :: INB INTEGER, DIMENSION(0:NPROC-1) :: INB
INTEGER :: INFOMPI, JJ INTEGER :: INFOMPI, JJ
! !
REAL, ALLOCATABLE, DIMENSION(:,:) :: ZFIELD REAL, ALLOCATABLE, DIMENSION(:,:) :: ZFIELD
REAL, ALLOCATABLE, DIMENSION(:,:,:) :: ZFIELD2
REAL(KIND=JPRB) :: ZHOOK_HANDLE REAL(KIND=JPRB) :: ZHOOK_HANDLE
! !
!
!* 0.3 declarations of namelist
INTEGER, PARAMETER :: NVEGTYPE_MAX = 20
!------------------------------------------------------------------------------------- !-------------------------------------------------------------------------------------
! !
IF (LHOOK) CALL DR_HOOK('PREP_ISBA_ASCLLV',0,ZHOOK_HANDLE) IF (LHOOK) CALL DR_HOOK('PREP_ISBA_ASCLLV',0,ZHOOK_HANDLE)
...@@ -160,7 +133,6 @@ CATYPE = 'ARI' ...@@ -160,7 +133,6 @@ CATYPE = 'ARI'
! !
CALL GET_TYPE_DIM_n(DTCO, U, 'NATURE',IL) CALL GET_TYPE_DIM_n(DTCO, U, 'NATURE',IL)
! !
ALLOCATE(ZFIELD2(IL,14,19))
ALLOCATE(ZFIELD(IL,3)) ALLOCATE(ZFIELD(IL,3))
! !
!* 3. get grid informations known over full grid !* 3. get grid informations known over full grid
...@@ -168,168 +140,55 @@ ALLOCATE(ZFIELD(IL,3)) ...@@ -168,168 +140,55 @@ ALLOCATE(ZFIELD(IL,3))
CALL GET_LATLONMASK_n(UG, LLATLONMASK,CGRID,XGRID_PAR,NGRID_PAR) CALL GET_LATLONMASK_n(UG, LLATLONMASK,CGRID,XGRID_PAR,NGRID_PAR)
! !
! !
SELECT CASE(HSURF)
! !
! !
!* 4A. Profile of soil relative humidity !* 4. Profile of soil relative humidity
! !
CASE('WG ')
IF(IO%CISBA=='DIF') THEN CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'HUG_SURF: relative humidity','NAT',CFILE_HUG_SURF, &
SELECT CASE(HSURF)
CASE('WG ')
DO JT = 1 ,19
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER1: relative humidity','NAT',CFILE_HUG_1(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,1,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER2: relative humidity','NAT',CFILE_HUG_2(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,2,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER3: relative humidity','NAT',CFILE_HUG_3(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,3,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER4: relative humidity','NAT',CFILE_HUG_4(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,4,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER5: relative humidity','NAT',CFILE_HUG_5(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,5,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER6: relative humidity','NAT',CFILE_HUG_6(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,6,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER7: relative humidity','NAT',CFILE_HUG_7(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,7,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER8: relative humidity','NAT',CFILE_HUG_8(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,8,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER9: relative humidity','NAT',CFILE_HUG_9(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,9,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER10: relative humidity','NAT',CFILE_HUG_10(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,10,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER11: relative humidity','NAT',CFILE_HUG_11(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,11,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER12: relative humidity','NAT',CFILE_HUG_12(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,12,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER13: relative humidity','NAT',CFILE_HUG_13(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,13,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER14: relative humidity','NAT',CFILE_HUG_14(JT), &
CTYPE_HUG,XUNDEF,ZFIELD2(:,14,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
END DO
ALLOCATE(PFIELD(IL,14,NVEGTYPE))
! DO JV=1,NVEGTYPE
! JPATCH=VEGTYPE_TO_PATCH(JV, IO%NPATCH)
PFIELD(:,:,:) = ZFIELD2(:,:,:)
! END DO
!* 5A. Profile of temperatures
CASE('TG ')
DO JT = 1, 19
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER1: temperature','NAT',CFILE_TG_1(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,1,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER2: temperature','NAT',CFILE_TG_2(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,2,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER3: temperature','NAT',CFILE_TG_3(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,3,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER4: temperature','NAT',CFILE_TG_4(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,4,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER5: temperature','NAT',CFILE_TG_5(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,5,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER6: temperature','NAT',CFILE_TG_6(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,6,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER7: temperature','NAT',CFILE_TG_7(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,7,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER8: temperature','NAT',CFILE_TG_8(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,8,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER9: temperature','NAT',CFILE_TG_9(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,9,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER10: temperature','NAT',CFILE_TG_10(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,10,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER11: temperature','NAT',CFILE_TG_11(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,11,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER12: temperature','NAT',CFILE_TG_12(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,12,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER13: temperature','NAT',CFILE_TG_13(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,13,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'LAYER14: temperature','NAT',CFILE_TG_14(JT), &
CTYPE_TG,XUNDEF,ZFIELD2(:,14,JT),PVEGTYPE=S%XVEGTYPE(:,JT))
END DO
ALLOCATE(PFIELD(IL,14,NVEGTYPE))
! DO JV=1,NVEGTYPE
! JPATCH=VEGTYPE_TO_PATCH(JV, IO%NPATCH)
PFIELD(:,:,:) = ZFIELD2(:,:,:)
! END DO
CASE DEFAULT
CALL ABOR1_SFX('PREP_ISBA_ASCLLV: '//TRIM(HSURF)//" initialization not implemented !")
END SELECT
ELSE
!* 4B. Profile of soil relative humidity
SELECT CASE(HSURF)
CASE('WG ')
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'HUG_SURF: relative humidity','NAT',CFILE_HUG_SURF, &
CTYPE_HUG,XUNDEF,ZFIELD(:,1)) CTYPE_HUG,XUNDEF,ZFIELD(:,1))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'HUG_ROOT: relative humidity','NAT',CFILE_HUG_ROOT, & CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'HUG_ROOT: relative humidity','NAT',CFILE_HUG_ROOT, &
CTYPE_HUG,XUNDEF,ZFIELD(:,2)) CTYPE_HUG,XUNDEF,ZFIELD(:,2))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'HUG_DEEP: relative humidity','NAT',CFILE_HUG_DEEP, & CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'HUG_DEEP: relative humidity','NAT',CFILE_HUG_DEEP, &
CTYPE_HUG,XUNDEF,ZFIELD(:,3)) CTYPE_HUG,XUNDEF,ZFIELD(:,3))
ALLOCATE(PFIELD(IL,3,NVEGTYPE)) ALLOCATE(PFIELD(IL,3,NVEGTYPE))
DO JV=1,NVEGTYPE DO JV=1,NVEGTYPE
PFIELD(:,1,JV) = ZFIELD(:,1) PFIELD(:,1,JV) = ZFIELD(:,1)
PFIELD(:,2,JV) = ZFIELD(:,2) PFIELD(:,2,JV) = ZFIELD(:,2)
PFIELD(:,3,JV) = ZFIELD(:,3) PFIELD(:,3,JV) = ZFIELD(:,3)
END DO END DO
!* 5B. Profile of temperatures !* 5. Profile of temperatures
CASE('TG ') CASE('TG ')
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'TG_SURF: temperature','NAT',CFILE_TG_SURF, & CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'TG_SURF: temperature','NAT',CFILE_TG_SURF, &
CTYPE_TG,XUNDEF,ZFIELD(:,1)) CTYPE_TG,XUNDEF,ZFIELD(:,1))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'TG_ROOT: temperature','NAT',CFILE_TG_ROOT, & CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'TG_ROOT: temperature','NAT',CFILE_TG_ROOT, &
CTYPE_TG,XUNDEF,ZFIELD(:,2)) CTYPE_TG,XUNDEF,ZFIELD(:,2))
CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'TG_DEEP: temperature','NAT',CFILE_TG_DEEP, & CALL PGD_FIELD(DTCO, UG, U, USS, HPROGRAM,'TG_DEEP: temperature','NAT',CFILE_TG_DEEP, &
CTYPE_TG,XUNDEF,ZFIELD(:,3)) CTYPE_TG,XUNDEF,ZFIELD(:,3))
ALLOCATE(PFIELD(IL,3,NVEGTYPE)) ALLOCATE(PFIELD(IL,3,NVEGTYPE))
DO JV=1,NVEGTYPE DO JV=1,NVEGTYPE
PFIELD(:,1,JV) = ZFIELD(:,1) PFIELD(:,1,JV) = ZFIELD(:,1)
PFIELD(:,2,JV) = ZFIELD(:,2) PFIELD(:,2,JV) = ZFIELD(:,2)
PFIELD(:,3,JV) = ZFIELD(:,3) PFIELD(:,3,JV) = ZFIELD(:,3)
END DO END DO
! !
CASE DEFAULT CASE DEFAULT
CALL ABOR1_SFX('PREP_ISBA_ASCLLV: '//TRIM(HSURF)//" initialization not implemented !") CALL ABOR1_SFX('PREP_ISBA_ASCLLV: '//TRIM(HSURF)//" initialization not implemented !")
! !
END SELECT END SELECT
ENDIF
! !
!* 6. Interpolation method !* 6. Interpolation method
! -------------------- ! --------------------
! !
CINTERP_TYPE='NONE ' CINTERP_TYPE='NONE '
DEALLOCATE(ZFIELD) DEALLOCATE(ZFIELD)
DEALLOCATE(ZFIELD2)
! !
DEALLOCATE(NNUM) DEALLOCATE(NNUM)
IF (NRANK/=NPIO) THEN IF (NRANK/=NPIO) THEN
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment