SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
get_fracn.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 get_frac_n (U, &
7  hprogram,ki,psea,pwater,pnature,ptown)
8 ! ########################################
9 !
10 !!**** *GET_FRAC_n* - routine to get some surface fields
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 01/2004
36 !-------------------------------------------------------------------------------
37 !
38 !* 0. DECLARATIONS
39 ! ------------
40 !
41 !
42 USE modd_surf_atm_n, ONLY : surf_atm_t
43 !
44 USE modi_get_luout
45 !
46 !
47 !
48 USE yomhook ,ONLY : lhook, dr_hook
49 USE parkind1 ,ONLY : jprb
50 !
51 USE modi_abor1_sfx
52 !
53 IMPLICIT NONE
54 !
55 !* 0.1 Declarations of arguments
56 ! -------------------------
57 !
58 !
59 TYPE(surf_atm_t), INTENT(INOUT) :: u
60 !
61  CHARACTER(LEN=6), INTENT(IN) :: hprogram
62 INTEGER, INTENT(IN) :: ki ! number of points
63 REAL, DIMENSION(KI), INTENT(OUT) :: psea ! sea fraction
64 REAL, DIMENSION(KI), INTENT(OUT) :: pwater ! water fraction
65 REAL, DIMENSION(KI), INTENT(OUT) :: pnature ! nature fraction
66 REAL, DIMENSION(KI), INTENT(OUT) :: ptown ! town fraction
67 !
68 !
69 !* 0.2 Declarations of local variables
70 ! -------------------------------
71 !
72 INTEGER :: iluout
73 REAL(KIND=JPRB) :: zhook_handle
74 !
75 !-------------------------------------------------------------------------------
76 IF (lhook) CALL dr_hook('GET_FRAC_N',0,zhook_handle)
77  CALL get_luout(hprogram,iluout)
78 !-------------------------------------------------------------------------------
79 !
80 IF ( SIZE(psea) /= SIZE(u%XSEA) ) THEN
81  WRITE(iluout,*) 'try to get SEA field from atmospheric model, but size is not correct'
82  WRITE(iluout,*) 'size of field expected by the atmospheric model (PSEA) :', SIZE(psea)
83  WRITE(iluout,*) 'size of field inthe surface (XSEA) :', SIZE(u%XSEA)
84  CALL abor1_sfx('GET_FRACN: SEA SIZE NOT CORRECT')
85 ELSE
86  psea = u%XSEA
87  pnature = u%XNATURE
88  pwater = u%XWATER
89  ptown = u%XTOWN
90 END IF
91 IF (lhook) CALL dr_hook('GET_FRAC_N',1,zhook_handle)
92 !
93 !==============================================================================
94 !
95 END SUBROUTINE get_frac_n
subroutine abor1_sfx(YTEXT)
Definition: abor1_sfx.F90:6
subroutine get_frac_n(U, HPROGRAM, KI, PSEA, PWATER, PNATURE, PTOWN)
Definition: get_fracn.F90:6
subroutine get_luout(HPROGRAM, KLUOUT)
Definition: get_luout.F90:6