SURFEX v8.1
General documentation of Surfex
modd_sfx_gridn.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 ! ##################
7 ! ##################
8 !
9 !!**** *MODD_ISBA - declaration of grid for ISBA scheme
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 !!
15 !!** IMPLICIT ARGUMENTS
16 !! ------------------
17 !! None
18 !!
19 !! REFERENCE
20 !! ---------
21 !!
22 !! AUTHOR
23 !! ------
24 !! V. Masson *Meteo France*
25 !!
26 !! MODIFICATIONS
27 !! -------------
28 !! Original 01/2004
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 TYPE grid_t
40 !-------------------------------------------------------------------------------
41 !
42 ! Grid definition
43 !
44  INTEGER :: ndim ! number of points
45  CHARACTER(LEN=10) :: cgrid ! grid type
46 ! ! "NONE " : no grid computations
47 ! ! "CONF PROJ " : conformal projection
48 ! ! "SURF ATM " : nature points of surf. atm. grid
49 !
50  INTEGER :: ngrid_par ! size of XGRID_PAR
51  REAL, POINTER, DIMENSION(:) :: xgrid_par ! lits of parameters used to define the grid
52 ! ! (depends on value of CGRID)
53 !
54 !-------------------------------------------------------------------------------
55 !
56 ! General surface parameters:
57 !
58  REAL, POINTER, DIMENSION(:) :: xlat ! latitude (degrees +North) (-)
59  REAL, POINTER, DIMENSION(:) :: xlon ! longitude (degrees +East) (-)
60  REAL, POINTER, DIMENSION(:) :: xmesh_size ! mesh size (m2)
61 !-------------------------------------------------------------------------------
62 !
63 END TYPE grid_t
64 !
66 !
67 TYPE(grid_t), DIMENSION(:), POINTER :: al=>null()
68 !
69 END TYPE grid_np_t
70 !
71 CONTAINS
72 !
73 SUBROUTINE grid_init(G)
74 TYPE(grid_t), INTENT(INOUT) :: G
75 REAL(KIND=JPRB) :: ZHOOK_HANDLE
76 IF (lhook) CALL dr_hook("MODD_SFX_GRID_N:IGRID_INIT",0,zhook_handle)
77  NULLIFY(g%XGRID_PAR)
78  NULLIFY(g%XLAT)
79  NULLIFY(g%XLON)
80  NULLIFY(g%XMESH_SIZE)
81 g%NDIM=0
82 g%CGRID=' '
83 IF (lhook) CALL dr_hook("MODD_SFX_GRID_N:GRID_INIT",1,zhook_handle)
84 END SUBROUTINE grid_init
85 !
86 SUBROUTINE grid_np_init(GP,KPATCH)
87 TYPE(grid_np_t), INTENT(INOUT) :: GP
88 INTEGER, INTENT(IN) :: KPATCH
89 INTEGER :: JP
90 REAL(KIND=JPRB) :: ZHOOK_HANDLE
91 IF (lhook) CALL dr_hook("MODD_SFX_GRID_N:GRID_NP_INIT",0,zhook_handle)
92 
93 IF (ASSOCIATED(gp%AL)) THEN
94  DO jp=1,kpatch
95  CALL grid_init(gp%AL(jp))
96  ENDDO
97  DEALLOCATE(gp%AL)
98 ELSE
99  ALLOCATE(gp%AL(kpatch))
100  DO jp=1,kpatch
101  CALL grid_init(gp%AL(jp))
102  ENDDO
103 ENDIF
104 !
105 IF (lhook) CALL dr_hook("MODD_SFX_GRID_N:GRID_NP_INIT",1,zhook_handle)
106 END SUBROUTINE grid_np_init
107 !
108 END MODULE modd_sfx_grid_n
integer, parameter jprb
Definition: parkind1.F90:32
logical lhook
Definition: yomhook.F90:15
subroutine grid_np_init(GP, KPATCH)
subroutine grid_init(G)