SURFEX v8.1
General documentation of Surfex
writesurf_pgd_teb_irrign.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 writesurf_pgd_teb_irrig_n (HSELECT, TIR, HPROGRAM)
7 ! ################################################
8 !
9 !!**** *WRITESURF_PGD_TEB_IRRIG_n* - writes TEB irrigation physiographic fields
10 !!
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 05/2013
36 !-------------------------------------------------------------------------------
37 !
38 !* 0. DECLARATIONS
39 ! ------------
40 !
41 !
42 USE modd_teb_irrig_n, ONLY : teb_irrig_t
43 !
45 !
46 !
47 USE yomhook ,ONLY : lhook, dr_hook
48 USE parkind1 ,ONLY : jprb
49 !
50 IMPLICIT NONE
51 !
52 !* 0.1 Declarations of arguments
53 ! -------------------------
54 !
55  CHARACTER(LEN=*), DIMENSION(:), INTENT(IN) :: HSELECT
56 !
57 TYPE(teb_irrig_t), INTENT(INOUT) :: TIR
58 !
59  CHARACTER(LEN=6), INTENT(IN) :: HPROGRAM ! program calling
60 !
61 !* 0.2 Declarations of local variables
62 ! -------------------------------
63 !
64 INTEGER :: IRESP ! IRESP : return-code if a problem appears
65  CHARACTER(LEN=12) :: YRECFM ! Name of the article to be read
66  CHARACTER(LEN=100):: YCOMMENT ! Comment string
67 INTEGER :: JLAYER ! loop index
68 INTEGER :: JTIME ! loop index
69 REAL, DIMENSION(:), ALLOCATABLE :: ZWORK
70 REAL(KIND=JPRB) :: ZHOOK_HANDLE
71 !
72 !-------------------------------------------------------------------------------
73 !
74 IF (lhook) CALL dr_hook('WRITESURF_PGD_TEB_IRRIG_n',0,zhook_handle)
75 !
76 ! Flag for irrigation of gardens
77 yrecfm='L_PAR_GD_IRR'
78 ycomment='FLAG FOR SPECIFIED GARDEN IRRIGATION PARAMETERS'
79  CALL write_surf(hselect, &
80  hprogram,yrecfm,tir%LPAR_GD_IRRIG,iresp,hcomment=ycomment)
81 !
82 ! Parameters describing irrigation
83 IF (tir%LPAR_GD_IRRIG) THEN
84 !
85  yrecfm='D_GD_SM_IRR'
86  ycomment='Start Month for Gardens Irrigation'
87  CALL write_surf(hselect, &
88  hprogram,yrecfm,tir%XGD_START_MONTH(:),iresp,hcomment=ycomment)
89 !
90  yrecfm='D_GD_EM_IRR'
91  ycomment='End Month for Gardens Irrigation'
92  CALL write_surf(hselect, &
93  hprogram,yrecfm,tir%XGD_END_MONTH (:),iresp,hcomment=ycomment)
94 !
95  yrecfm='D_GD_SH_IRR'
96  ycomment='Start Hour for Gardens Irrigation'
97  CALL write_surf(hselect, &
98  hprogram,yrecfm,tir%XGD_START_HOUR (:),iresp,hcomment=ycomment)
99 !
100  yrecfm='D_GD_EH_IRR'
101  ycomment='End Hour for Gardens Irrigation'
102  CALL write_surf(hselect, &
103  hprogram,yrecfm,tir%XGD_END_HOUR (:),iresp,hcomment=ycomment)
104 !
105  yrecfm='D_GD_IRRIG'
106  ycomment='24h mean Irrigation rate for Gardens Irrigation'
107  CALL write_surf(hselect, &
108  hprogram,yrecfm,tir%XGD_24H_IRRIG (:),iresp,hcomment=ycomment)
109 !
110 ENDIF
111 !
112 ! Flag for irrigation of greenroofs
113 yrecfm='L_PAR_GR_IRR'
114 ycomment='FLAG FOR SPECIFIED GREENROOFS IRRIGATION PARAMETERS'
115  CALL write_surf(hselect, &
116  hprogram,yrecfm,tir%LPAR_GR_IRRIG,iresp,hcomment=ycomment)
117 !
118 ! Parameters describing irrigation
119 IF (tir%LPAR_GR_IRRIG) THEN
120 !
121  yrecfm='D_GR_SM_IRR'
122  ycomment='Start Month for Greenroofs Irrigation'
123  CALL write_surf(hselect, &
124  hprogram,yrecfm,tir%XGR_START_MONTH(:),iresp,hcomment=ycomment)
125 !
126  yrecfm='D_GR_EM_IRR'
127  ycomment='End Month for Greenroofs Irrigation'
128  CALL write_surf(hselect, &
129  hprogram,yrecfm,tir%XGR_END_MONTH (:),iresp,hcomment=ycomment)
130 !
131  yrecfm='D_GR_SH_IRR'
132  ycomment='Start Hour for Greenroofs Irrigation'
133  CALL write_surf(hselect, &
134  hprogram,yrecfm,tir%XGR_START_HOUR (:),iresp,hcomment=ycomment)
135 !
136  yrecfm='D_GR_EH_IRR'
137  ycomment='End Hour for Greenroofs Irrigation'
138  CALL write_surf(hselect, &
139  hprogram,yrecfm,tir%XGR_END_HOUR (:),iresp,hcomment=ycomment)
140 !
141  yrecfm='D_GR_IRRIG'
142  ycomment='24h mean Irrigation rate for Greenroofs Irrigation'
143  CALL write_surf(hselect, &
144  hprogram,yrecfm,tir%XGR_24H_IRRIG (:),iresp,hcomment=ycomment)
145 !
146 ENDIF
147 !
148 ! Flag for watering of greenroofs
149 yrecfm='L_PAR_RD_IRR'
150 ycomment='FLAG FOR SPECIFIED ROAD IRRIGATION PARAMETERS'
151  CALL write_surf(hselect, &
152  hprogram,yrecfm,tir%LPAR_RD_IRRIG,iresp,hcomment=ycomment)
153 !
154 ! Parameters describing watering
155 IF (tir%LPAR_RD_IRRIG) THEN
156 !
157  yrecfm='D_RD_SM_IRR'
158  ycomment='Start Month for Roads Irrigation'
159  CALL write_surf(hselect, &
160  hprogram,yrecfm,tir%XRD_START_MONTH(:),iresp,hcomment=ycomment)
161 !
162  yrecfm='D_RD_EM_IRR'
163  ycomment='End Month for Roads Irrigation'
164  CALL write_surf(hselect, &
165  hprogram,yrecfm,tir%XRD_END_MONTH (:),iresp,hcomment=ycomment)
166 !
167  yrecfm='D_RD_SH_IRR'
168  ycomment='Start Hour for Roads Irrigation'
169  CALL write_surf(hselect, &
170  hprogram,yrecfm,tir%XRD_START_HOUR (:),iresp,hcomment=ycomment)
171 !
172  yrecfm='D_RD_EH_IRR'
173  ycomment='End Hour for Roads Irrigation'
174  CALL write_surf(hselect, &
175  hprogram,yrecfm,tir%XRD_END_HOUR (:),iresp,hcomment=ycomment)
176 !
177  yrecfm='D_RD_IRRIG'
178  ycomment='24h mean Irrigation rate for Roads Irrigation'
179  CALL write_surf(hselect, &
180  hprogram,yrecfm,tir%XRD_24H_IRRIG (:),iresp,hcomment=ycomment)
181 !
182 ENDIF
183 !
184 IF (lhook) CALL dr_hook('WRITESURF_PGD_TEB_IRRIG_n',1,zhook_handle)
185 !
186 !-------------------------------------------------------------------------------
187 !
188 END SUBROUTINE writesurf_pgd_teb_irrig_n
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15
subroutine writesurf_pgd_teb_irrig_n(HSELECT, TIR, HPROGRAM)