SURFEX v8.1
General documentation of Surfex
modd_agrin.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  MODULE modd_agri_n
7 ! ##################
8 !
9 !!**** *MODD_AGRI_n - declaration of SEEDING date for summer crops
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 !!
15 !!** IMPLICIT ARGUMENTS
16 !! ------------------
17 !! None
18 !!
19 !! REFERENCE
20 !! ---------
21 !!
22 !! AUTHOR
23 !! ------
24 !! P. LE MOIGNE *Meteo France*
25 !!
26 !! MODIFICATIONS
27 !! -------------
28 !! Original 06/2006
29 !
30 !* 0. DECLARATIONS
31 ! ------------
32 !
33 !
34 USE yomhook ,ONLY : lhook, dr_hook
35 USE parkind1 ,ONLY : jprb
36 !
37 IMPLICIT NONE
38 !
39 !-------------------------------------------------------------------------------
40 TYPE agri_t
41 !
42 INTEGER, POINTER, DIMENSION (:) :: nirrinum
43  ! Stage for Irrigation (4 stages)
44 !
45 LOGICAL, POINTER,DIMENSION(:) :: lirrigate
46  ! True if irrigation performed
47 !
48 LOGICAL, POINTER,DIMENSION(:) :: lirriday
49  ! True if irrigation occurs during present day
50 !
51 REAL, POINTER, DIMENSION(:) :: xthresholdspt
52  ! Spatialized threshold
53 
54 END TYPE agri_t
55 !-------------------------------------------------------------------------------
56 !
58 !
59 TYPE(agri_t), DIMENSION(:), POINTER :: al=>null()
60 !
61 END TYPE agri_np_t
62 !
63 CONTAINS
64 !
65 !
66 SUBROUTINE agri_init(AG)
67 TYPE(agri_t), INTENT(INOUT) :: AG
68 REAL(KIND=JPRB) :: ZHOOK_HANDLE
69 IF (lhook) CALL dr_hook("MODD_AGRI_N:AGRI_INIT",0,zhook_handle)
70  NULLIFY(ag%NIRRINUM)
71  NULLIFY(ag%LIRRIGATE)
72  NULLIFY(ag%LIRRIDAY)
73  NULLIFY(ag%XTHRESHOLDSPT)
74 IF (lhook) CALL dr_hook("MODD_AGRI_N:AGRI_INIT",1,zhook_handle)
75 END SUBROUTINE agri_init
76 !
77 SUBROUTINE agri_np_init(YNAG,KPATCH)
78 TYPE(agri_np_t), INTENT(INOUT) :: YNAG
79 INTEGER, INTENT(IN) :: KPATCH
80 INTEGER :: JP
81 REAL(KIND=JPRB) :: ZHOOK_HANDLE
82 IF (lhook) CALL dr_hook("MODD_AGRI_N:AGRI_NP_INIT",0,zhook_handle)
83 !
84 IF (ASSOCIATED(ynag%AL)) THEN
85  DO jp = 1,kpatch
86  CALL agri_init(ynag%AL(jp))
87  ENDDO
88  DEALLOCATE(ynag%AL)
89 ELSE
90  ALLOCATE(ynag%AL(kpatch))
91  DO jp = 1,kpatch
92  CALL agri_init(ynag%AL(jp))
93  ENDDO
94 ENDIF
95 !
96 IF (lhook) CALL dr_hook("MODD_AGRI_N:AGRI_NP_INIT",1,zhook_handle)
97 END SUBROUTINE agri_np_init
98 !
99 !-------------------------------------------------------------------------------
100 !
101 END MODULE modd_agri_n
subroutine agri_np_init(YNAG, KPATCH)
Definition: modd_agrin.F90:78
subroutine agri_init(AG)
Definition: modd_agrin.F90:67
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15