SURFEX v8.1
General documentation of Surfex
hor_interpol_conf_proj.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_conf_proj(GCP,KLUOUT,PFIELDIN,PFIELDOUT)
7 ! #################################################################################
8 !!
9 !! PURPOSE
10 !! -------
11 !!
12 !! METHOD
13 !! ------
14 !!
15 !! EXTERNAL
16 !! --------
17 !!
18 !! IMPLICIT ARGUMENTS
19 !! ------------------
20 !!
21 !! REFERENCE
22 !! ---------
23 !!
24 !! AUTHOR
25 !! ------
26 !!
27 !! MODIFICATION
28 !! ------------
29 !!
30 !! 02/04/12 M. Tomasini Add an index in the second dimension of the ISBA
31 !! array variables for BILIN interpolation routine to
32 !! not bug in case 2D (this is not the more beautiful
33 !! method; the BILIN routine should better be adapted)
34 !! Search ! Ajout MT
35 !! 10/02/15 M.Moge using SIZE(PFIELDOUT,1) instead of SIZE(XLAT_OUT)
36 !-------------------------------------------------------------------------------
37 !
39 !
40 USE modd_surfex_mpi, ONLY : nrank,npio
41 USE modd_prep, ONLY : xx_out, xy_out, linterp
42 USE modd_surf_par, ONLY : xundef
43 !
44 USE modi_bilin_value
45 USE modi_bilin_extrap
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 TYPE(grid_conf_proj_t),INTENT(INOUT) :: GCP
55 !
56 INTEGER, INTENT(IN) :: KLUOUT ! logical unit of output listing
57 REAL, DIMENSION(:,:), INTENT(IN) :: PFIELDIN ! field to interpolate horizontally
58 REAL, DIMENSION(:,:), INTENT(OUT) :: PFIELDOUT ! interpolated field
59 !
60 !* 0.2 declarations of local variables
61 !
62 REAL(KIND=JPRB) :: ZHOOK_HANDLE
63 !
64 LOGICAL, DIMENSION(:), ALLOCATABLE :: GINTERP_DUPLIQUE ! .true. where physical value is needed ! Ajout MT
65 !-------------------------------------------------------------------------------------
66 !
67 IF (lhook) CALL dr_hook('HOR_INTERPOL_CONF_PROJ',0,zhook_handle)
68 !
69 !* 4. Interpolation with bilinear
70 !
71  CALL bilin_value(kluout,gcp%NX,gcp%NY,pfieldin,xcx,xcy,ncij(:,1),ncij(:,2),pfieldout)
72  CALL bilin_extrap(kluout,gcp%NX,gcp%NY,ncij,xx,xy,pfieldin,xx_out,xy_out,pfieldout,linterp)
73 !
74 IF (lhook) CALL dr_hook('HOR_INTERPOL_CONF_PROJ',1,zhook_handle)
75 !
76 !-------------------------------------------------------------------------------------
77 END SUBROUTINE hor_interpol_conf_proj
real, dimension(:,:), allocatable xcx
real, dimension(:), allocatable xy
real, dimension(:), allocatable xx
subroutine hor_interpol_conf_proj(GCP, KLUOUT, PFIELDIN, PFIELDOUT)
integer, dimension(:,:), allocatable ncij
real, dimension(:), allocatable xy_out
Definition: modd_prep.F90:51
real, parameter xundef
logical, dimension(:), allocatable linterp
Definition: modd_prep.F90:43
integer, parameter jprb
Definition: parkind1.F90:32
real, dimension(:,:), allocatable xcy
real, dimension(:), allocatable xx_out
Definition: modd_prep.F90:50
logical lhook
Definition: yomhook.F90:15
subroutine bilin_value(KLUOUT, KX, KY, PFIELD1, PCX, PCY, KCI, KCJ, PFIELD2)
Definition: bilin_value.F90:7
subroutine bilin_extrap(KLUOUT, KX, KY, KCIJ, PX1, PY1, PFIELD1, PX2, PY2, PFIELD2, OINTERP)
Definition: bilin_extrap.F90:7