SURFEX v8.1
General documentation of Surfex
hor_interpol_buffer.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 hor_interpol_buffer (DTCO, U, KLUOUT,PFIELDIN,PFIELDOUT)
7 ! #################################################################################
8 !
9 !!**** *HOR_INTERPOL_BUFFER * - Only extrapolation
10 !!
11 !! PURPOSE
12 !! -------
13 !
14 !!** METHOD
15 !! ------
16 !!
17 !! REFERENCE
18 !! ---------
19 !!
20 !!
21 !! AUTHOR
22 !! ------
23 !! S.Malardel
24 !!
25 !! MODIFICATIONS
26 !! -------------
27 !! Original 03/2005
28 !!------------------------------------------------------------------
29 !
30 !
31 !
32 !
33 !
35 USE modd_surf_atm_n, ONLY : surf_atm_t
36 !
37 USE modd_prep, ONLY : cmask
38 !
39 USE modd_grid_buffer, ONLY : nni
40 USE modd_surf_par, ONLY : xundef
41 !
43 !
44 !
45 USE yomhook ,ONLY : lhook, dr_hook
46 USE parkind1 ,ONLY : jprb
47 !
48 USE modi_get_surf_mask_n
49 !
50 IMPLICIT NONE
51 !
52 !* 0.1 declarations of arguments
53 !
54 !
55 TYPE(data_cover_t), INTENT(INOUT) :: DTCO
56 TYPE(surf_atm_t), INTENT(INOUT) :: U
57 !
58 INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing
59 REAL, DIMENSION(:,:), INTENT(IN) :: PFIELDIN ! field to interpolate horizontally
60 REAL, DIMENSION(:,:), INTENT(OUT) :: PFIELDOUT ! interpolated field
61 !
62 !* 0.2 declarations of local variables
63 !
64 INTEGER, DIMENSION(:), ALLOCATABLE :: IMASKOUT ! output mask
65 INTEGER :: INO ! output number of points
66 REAL(KIND=JPRB) :: ZHOOK_HANDLE
67 !
68 !------------------------------------------------------------------------------
69 !
70 !* 1. Initialisation of the output mask
71 !
72 IF (lhook) CALL dr_hook('HOR_INTERPOL_BUFFER',0,zhook_handle)
73 !
74 ino = SIZE(pfieldout,1)
75 ALLOCATE(imaskout(ino))
76  CALL get_surf_mask_n(dtco, u, cmask,ino,imaskout,nni,kluout)
77 !
78 !* 2. Mask the input field with the output mask
79 !!mask du tableau de taille FULL en fonction du type de surface
80  CALL pack_same_rank(imaskout,pfieldin,pfieldout)
81 !
82 !* 6. Deallocations
83 !
84 DEALLOCATE(imaskout)
85 !
86 IF (lhook) CALL dr_hook('HOR_INTERPOL_BUFFER',1,zhook_handle)
87 
88 !-------------------------------------------------------------------------------------
89 END SUBROUTINE hor_interpol_buffer
character(len=6) cmask
Definition: modd_prep.F90:41
real, parameter xundef
subroutine get_surf_mask_n(DTCO, U, HTYPE, KDIM, KMASK, KLU, KLUOUT)
integer, parameter jprb
Definition: parkind1.F90:32
subroutine hor_interpol_buffer(DTCO, U, KLUOUT, PFIELDIN, PFIELDOUT)
logical lhook
Definition: yomhook.F90:15