SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
co2_teb_greenroof_initn.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6  SUBROUTINE co2_teb_greenroof_init_n (I, TGRP, TVG, &
7  pco2)
8 ! #####################
9 !
10 !!**** *CO2_TEB_GREENROOF_INIT_n* - routine to initialize ISBA-AGS variables
11 !!
12 !! PURPOSE
13 !! -------
14 !!
15 !!** METHOD
16 !! ------
17 !!
18 !! EXTERNAL
19 !! --------
20 !!
21 !!
22 !! IMPLICIT ARGUMENTS
23 !! ------------------
24 !!
25 !! REFERENCE
26 !! ---------
27 !!
28 !!
29 !! AUTHOR
30 !! ------
31 !! V. Masson *Meteo France*
32 !!
33 !! MODIFICATIONS
34 !! -------------
35 !! Original 02/2003
36 !! J.C. Calvet 01/2004 Externalization
37 !! P Le Moigne 11/2004 cotwoinit changed into cotwoinit_n
38 !! P Le Moigne 09/2005 AGS modifs of L. Jarlan
39 !! S Lafont 09/2008 Add initialisation of POI and ABC (needed for TORI)
40 !! A.L. Gibelin 04/2009 : TAU_WOOD for NCB option
41 !! A.L. Gibelin 04/2009 : Add carbon spinup
42 !! A.L. Gibelin 07/2009 : Suppress RDK and transform GPP as a diagnostic
43 !! A.L. Gibelin 07/2009 : Suppress PPST and PPSTF as outputs
44 !!
45 !-------------------------------------------------------------------------------
46 !
47 !* 0. DECLARATIONS
48 ! ------------
49 !
50 !
51 !
52 USE modd_isba_n, ONLY : isba_t
55 !
56 USE modd_surf_par, ONLY : xundef
57 USE modd_data_cover_par, ONLY : nvegtype
58 !
59 USE modi_cotwoinit_n
60 !
61 !
62 USE yomhook ,ONLY : lhook, dr_hook
63 USE parkind1 ,ONLY : jprb
64 !
65 IMPLICIT NONE
66 !
67 !* 0.1 Declarations of arguments
68 ! -------------------------
69 !
70 !
71 TYPE(isba_t), INTENT(INOUT) :: i
72 TYPE(teb_greenroof_pgd_t), INTENT(INOUT) :: tgrp
73 TYPE(teb_veg_options_t), INTENT(INOUT) :: tvg
74 !
75 REAL, DIMENSION(:), INTENT(IN) :: pco2 ! air CO2 concentration (kg/kg)
76 !
77 !
78 !
79 !* 0.2 Declarations of local variables
80 ! -------------------------------
81 !
82 REAL, DIMENSION(SIZE(TGRP%XVEGTYPE,1)) :: ztau_wood
83 INTEGER :: ilu ! size of arrays
84 INTEGER :: jp ! loop on tiles
85 !
86 REAL(KIND=JPRB) :: zhook_handle
87 !-------------------------------------------------------------------------------
88 !
89 IF (lhook) CALL dr_hook('CO2_TEB_GREENROOF_INIT_N',0,zhook_handle)
90 ilu = SIZE(tgrp%XVEGTYPE,1)
91 !
92 ALLOCATE(tgrp%XANMAX (ilu))
93 ALLOCATE(tgrp%XFZERO (ilu))
94 ALLOCATE(tgrp%XEPSO (ilu))
95 ALLOCATE(tgrp%XGAMM (ilu))
96 ALLOCATE(tgrp%XQDGAMM (ilu))
97 ALLOCATE(tgrp%XQDGMES (ilu))
98 ALLOCATE(tgrp%XT1GMES (ilu))
99 ALLOCATE(tgrp%XT2GMES (ilu))
100 ALLOCATE(tgrp%XAMAX (ilu))
101 ALLOCATE(tgrp%XQDAMAX (ilu))
102 ALLOCATE(tgrp%XT1AMAX (ilu))
103 ALLOCATE(tgrp%XT2AMAX (ilu))
104 ALLOCATE(tgrp%XAH (ilu))
105 ALLOCATE(tgrp%XBH (ilu))
106 !
107  CALL cotwoinit_n(i, &
108  tvg%CPHOTO, tgrp%XVEGTYPE,tgrp%XGMES,pco2,tgrp%XGC,&
109  tgrp%XDMAX,tgrp%XABC,tgrp%XPOI,tgrp%XANMAX, tgrp%XFZERO, &
110  tgrp%XEPSO,tgrp%XGAMM,tgrp%XQDGAMM,tgrp%XQDGMES,tgrp%XT1GMES, &
111  tgrp%XT2GMES,tgrp%XAMAX,tgrp%XQDAMAX,tgrp%XT1AMAX, &
112  tgrp%XT2AMAX,tgrp%XAH,tgrp%XBH,ztau_wood )
113 !
114 !-------------------------------------------------------------------------------
115 IF (lhook) CALL dr_hook('CO2_TEB_GREENROOF_INIT_N',1,zhook_handle)
116 !-------------------------------------------------------------------------------
117 !
118 END SUBROUTINE co2_teb_greenroof_init_n
subroutine cotwoinit_n(I, HPHOTO, PVEGTYPE, PGMES, PCO2, PGC, PDMAX, PABC, PPOI, PANMAX, PFZERO, PEPSO, PGAMM, PQDGAMM, PQDGMES, PT1GMES, PT2GMES, PAMAX, PQDAMAX, PT1AMAX, PT2AMAX, PAH, PBH, PTAU_WOOD)
Definition: cotwoinitn.F90:6
subroutine co2_teb_greenroof_init_n(I, TGRP, TVG, PCO2)