Newer
Older
!MNH_LIC Copyright 1996-2019 CNRS, Meteo-France and Universite Paul Sabatier
!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
!MNH_LIC for details. version 1.
!-----------------------------------------------------------------
! Modifications:
! P. Wautelet 03/05/2019: modi_bikhardt -> mode_bikhardt
!-----------------------------------------------------------------
!###################
module mode_bikhardt
implicit none
private
public :: Bikhardt
interface Bikhardt
module procedure Bikhardt2d, Bikhardt3d, Bikhardt4d
end interface
contains
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
! #########################################################################
SUBROUTINE BIKHARDT4D (PBMX1,PBMX2,PBMX3,PBMX4,PBMY1,PBMY2,PBMY3,PBMY4, &
PBFX1,PBFX2,PBFX3,PBFX4,PBFY1,PBFY2,PBFY3,PBFY4, &
KXOR,KYOR,KXEND,KYEND,KDXRATIO,KDYRATIO,KGRID, &
HLBCX,HLBCY,PFIELD1,PFIELD2)
! #########################################################################
!
!!**** *BIKHARDT4D * - interpolates a 4D field with Bikhardt method
!!
!! PURPOSE
!! -------
!!
! This routine interpolates a field from outer model (PFIELD1) to
! inner model (PFIELD2), using Bikhardt interpolation.
!!
!!** METHOD
!! ------
!!
!! The outer model field is extrapolated in each horizontal dimension
!! in order to allow all cases of KXOR,KYOR,KXEND and KYEND
!!
!! EXTERNAL
!! --------
!!
!!
!! IMPLICIT ARGUMENTS
!! ------------------
!!
!! Module MODD_PARAMETERS : contains parameters
!!
!! REFERENCE
!! ---------
!!
!! Book1 of the documentation
!! Routine BIKHARDT3D (Book2 of the documentation)
!!
!!
!! AUTHOR
!! ------
!!
!! V. Masson * METEO-FRANCE *
!!
!! MODIFICATIONS
!! -------------
!!
!! Original 10/06/96
!! J.P. Lafore 22/10/96 interpolation coefficients added to the arguments
!! list to avoid duplication.
!! V. Masson and F. Gheusi (10/10/97) bug in cyclic case
!! J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1
!! J.Escobar : 18/12/2015 : set valide default values in corner in // for NHALO <>1
!-------------------------------------------------------------------------------
!
!* 0. DECLARATIONS
! ------------
!
USE MODD_PARAMETERS ! Declarative modules

WAUTELET Philippe
committed
use mode_tools_ll, only: GET_INDICE_ll
!
IMPLICIT NONE
!
!* 0.1 Declarations of dummy arguments :
!
! interpolation coefficients
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
REAL, DIMENSION(:), INTENT(IN) :: PBMX1,PBMX2,PBMX3,PBMX4 ! Mass points in X-direc.
REAL, DIMENSION(:), INTENT(IN) :: PBMY1,PBMY2,PBMY3,PBMY4 ! Mass points in Y-direc.
REAL, DIMENSION(:), INTENT(IN) :: PBFX1,PBFX2,PBFX3,PBFX4 ! Flux points in X-direc.
REAL, DIMENSION(:), INTENT(IN) :: PBFY1,PBFY2,PBFY3,PBFY4 ! Flux points in Y-direc.
!
INTEGER, INTENT(IN) :: KXOR,KXEND ! horizontal position (i,j) of the ORigin and END
INTEGER, INTENT(IN) :: KYOR,KYEND ! of the inner model domain, relative to outer model
INTEGER, INTENT(IN) :: KDXRATIO ! x and y-direction Resolution ratio
INTEGER, INTENT(IN) :: KDYRATIO ! between inner model and outer model
INTEGER, INTENT(IN) :: KGRID ! code of grid point
CHARACTER (LEN=4), DIMENSION (2), INTENT(IN) :: HLBCX ! type of lateral
CHARACTER (LEN=4), DIMENSION (2), INTENT(IN) :: HLBCY ! boundary conditions
REAL, DIMENSION(:,:,:,:), INTENT(IN) :: PFIELD1 ! field of outer model
REAL, DIMENSION(:,:,:,:), INTENT(OUT):: PFIELD2 ! field of inner model
!
!* 0.2 Declarations of local variables for print on FM file
!
REAL, DIMENSION(0:SIZE(PFIELD1,1)+2, &
0:SIZE(PFIELD1,2)+2, &
SIZE(PFIELD1,3) , &
SIZE(PFIELD1,4) ) :: ZFIELD1 ! field of outer model
!
! interpolation coefficients
REAL :: ZBMX1,ZBMX2,ZBMX3,ZBMX4 ! at Mass points in X-direc.
REAL :: ZBMY1,ZBMY2,ZBMY3,ZBMY4 ! at Mass points in Y-direc.
REAL :: ZBFX1,ZBFX2,ZBFX3,ZBFX4 ! at Flux points in X-direc.
REAL :: ZBFY1,ZBFY2,ZBFY3,ZBFY4 ! at Flux points in Y-direc.
!
INTEGER :: IIU ! Upper dimension in x direction (inner model)
INTEGER :: IJU ! Upper dimension in y direction (inner model)
INTEGER :: IIB, IIE
INTEGER :: IJB, IJE
INTEGER :: IIU1 ! Upper dimension in x direction (outer model)
INTEGER :: IJU1 ! Upper dimension in y direction (outer model)
INTEGER :: IIS,IJS ! indices I and J in x and y dir. for scalars
INTEGER :: IIF,IJF ! indices I and J in x and y dir. for flux points
INTEGER :: JI, JEPSX ! Loop index in x direction
INTEGER :: JJ, JEPSY ! Loop index in y direction
!-------------------------------------------------------------------------------
!
!* 1. PROLOGUE:
! ---------
!
!* 1.1 computes dimensions of arrays and other indices
!
IIU = SIZE(PFIELD2,1)
IJU = SIZE(PFIELD2,2)
IIU1= SIZE(PFIELD1,1)
IJU1= SIZE(PFIELD1,2)
CALL GET_INDICE_ll (IIB,IJB,IIE,IJE)
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
!
!* 1.2 extrapolates field of outer model
!
ZFIELD1(:,:,:,:) = 0.
ZFIELD1(1:IIU1,1:IJU1,:,:)=PFIELD1(:,:,:,:)
!
ZFIELD1( 0 , : ,:,:) = 2.*ZFIELD1( 1 , : ,:,:) - ZFIELD1( 2 , : ,:,:)
ZFIELD1(IIU1+1, : ,:,:) = 2.*ZFIELD1(IIU1, : ,:,:) - ZFIELD1(IIU1-1, : ,:,:)
ZFIELD1(IIU1+2, : ,:,:) = 3.*ZFIELD1(IIU1, : ,:,:) - 2.*ZFIELD1(IIU1-1, : ,:,:)
!
ZFIELD1( : , 0 ,:,:) = 2.*ZFIELD1( : , 1 ,:,:) - ZFIELD1( : , 2 ,:,:)
ZFIELD1( : ,IJU1+1,:,:) = 2.*ZFIELD1( : ,IJU1,:,:) - ZFIELD1( : ,IJU1-1,:,:)
ZFIELD1( : ,IJU1+2,:,:) = 3.*ZFIELD1( : ,IJU1,:,:) - 2.*ZFIELD1( : ,IJU1-1,:,:)
!
IF ( HLBCX(1) == 'CYCL' ) THEN
ZFIELD1( 0 ,:,:,:) = ZFIELD1(IIU1-2*JPHEXT ,:,:,:)
ZFIELD1(IIU1+1,:,:,:) = ZFIELD1( 1 +2*JPHEXT ,:,:,:)
IF (SIZE(PFIELD1,1) == 3 ) THEN
ZFIELD1(IIU1+2,:,:,:) = ZFIELD1( 1 ,:,:,:)
ELSE
ZFIELD1(IIU1+2,:,:,:) = ZFIELD1( 1 +2*JPHEXT+1,:,:,:)
END IF
END IF
!
IF ( HLBCY(1) == 'CYCL' ) THEN
ZFIELD1(:, 0 ,:,:) = ZFIELD1(:,IJU1-2*JPHEXT ,:,:)
ZFIELD1(:,IJU1+1,:,:) = ZFIELD1(:, 1 +2*JPHEXT ,:,:)
IF (SIZE(PFIELD1,2) == 3 ) THEN
ZFIELD1(:,IJU1+2,:,:) = ZFIELD1(:, 1 ,:,:)
ELSE
ZFIELD1(:,IJU1+2,:,:) = ZFIELD1(:, 1 +2*JPHEXT+1,:,:)
END IF
END IF
!-------------------------------------------------------------------------------
!
PFIELD2 = ZFIELD1(1,1,1,1) ! some valide values for missing ones
!
SELECT CASE (KGRID)
!
!* 2.1 Mass points
!
CASE (1,4)
!
DO JEPSX = 1,KDXRATIO
ZBMX1 = PBMX1(JEPSX)
ZBMX2 = PBMX2(JEPSX)
ZBMX3 = PBMX3(JEPSX)
ZBMX4 = PBMX4(JEPSX)
DO JEPSY = 1,KDYRATIO
ZBMY1 = PBMY1(JEPSY)
ZBMY2 = PBMY2(JEPSY)
ZBMY3 = PBMY3(JEPSY)
ZBMY4 = PBMY4(JEPSY)
DO JI = KXOR,KXEND
IIS = IIB+JEPSX-1+KDXRATIO/2+(JI-KXOR-JPHEXT)*KDXRATIO
IJS = IJB+JEPSY-1+KDYRATIO/2+(JJ-KYOR-JPHEXT)*KDYRATIO
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
!
IF (1 <= IIS .AND. IIS <= IIU .AND. 1 <= IJS .AND. IJS <= IJU) THEN
!
PFIELD2 (IIS,IJS,:,:) = ZBMY1* &
( ZBMX1*ZFIELD1(JI-1,JJ-1,:,:)+ZBMX2*ZFIELD1(JI ,JJ-1,:,:) &
+ZBMX3*ZFIELD1(JI+1,JJ-1,:,:)+ZBMX4*ZFIELD1(JI+2,JJ-1,:,:)) &
+ZBMY2* &
( ZBMX1*ZFIELD1(JI-1,JJ ,:,:)+ZBMX2*ZFIELD1(JI ,JJ ,:,:) &
+ZBMX3*ZFIELD1(JI+1,JJ ,:,:)+ZBMX4*ZFIELD1(JI+2,JJ ,:,:)) &
+ZBMY3* &
( ZBMX1*ZFIELD1(JI-1,JJ+1,:,:)+ZBMX2*ZFIELD1(JI ,JJ+1,:,:) &
+ZBMX3*ZFIELD1(JI+1,JJ+1,:,:)+ZBMX4*ZFIELD1(JI+2,JJ+1,:,:)) &
+ZBMY4* &
( ZBMX1*ZFIELD1(JI-1,JJ+2,:,:)+ZBMX2*ZFIELD1(JI ,JJ+2,:,:) &
+ZBMX3*ZFIELD1(JI+1,JJ+2,:,:)+ZBMX4*ZFIELD1(JI+2,JJ+2,:,:))
END IF
END DO
END DO
END DO
END DO
!
!* 2.2 U points
!
CASE (2,6)
!
DO JEPSX = 1,KDXRATIO
ZBFX1 = PBFX1(JEPSX)
ZBFX2 = PBFX2(JEPSX)
ZBFX3 = PBFX3(JEPSX)
ZBFX4 = PBFX4(JEPSX)
DO JEPSY = 1,KDYRATIO
ZBMY1 = PBMY1(JEPSY)
ZBMY2 = PBMY2(JEPSY)
ZBMY3 = PBMY3(JEPSY)
ZBMY4 = PBMY4(JEPSY)
DO JI = KXOR,KXEND
IIF = IIB+JEPSX-1 +(JI-KXOR-JPHEXT)*KDXRATIO
IJS = IJB+JEPSY-1+KDYRATIO/2+(JJ-KYOR-JPHEXT)*KDYRATIO
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
IF (1 <= IIF .AND. IIF <= IIU .AND. 1 <= IJS .AND. IJS <= IJU) THEN
!
PFIELD2 (IIF,IJS,:,:) = ZBMY1* &
( ZBFX1*ZFIELD1(JI-1,JJ-1,:,:)+ZBFX2*ZFIELD1(JI ,JJ-1,:,:) &
+ZBFX3*ZFIELD1(JI+1,JJ-1,:,:)+ZBFX4*ZFIELD1(JI+2,JJ-1,:,:)) &
+ZBMY2* &
( ZBFX1*ZFIELD1(JI-1,JJ ,:,:)+ZBFX2*ZFIELD1(JI ,JJ ,:,:) &
+ZBFX3*ZFIELD1(JI+1,JJ ,:,:)+ZBFX4*ZFIELD1(JI+2,JJ ,:,:)) &
+ZBMY3* &
( ZBFX1*ZFIELD1(JI-1,JJ+1,:,:)+ZBFX2*ZFIELD1(JI ,JJ+1,:,:) &
+ZBFX3*ZFIELD1(JI+1,JJ+1,:,:)+ZBFX4*ZFIELD1(JI+2,JJ+1,:,:)) &
+ZBMY4* &
( ZBFX1*ZFIELD1(JI-1,JJ+2,:,:)+ZBFX2*ZFIELD1(JI ,JJ+2,:,:) &
+ZBFX3*ZFIELD1(JI+1,JJ+2,:,:)+ZBFX4*ZFIELD1(JI+2,JJ+2,:,:))
END IF
END DO
END DO
END DO
END DO
!
!* 2.3 V points
!
CASE (3,7)
!
DO JEPSX = 1,KDXRATIO
ZBMX1 = PBMX1(JEPSX)
ZBMX2 = PBMX2(JEPSX)
ZBMX3 = PBMX3(JEPSX)
ZBMX4 = PBMX4(JEPSX)
DO JEPSY = 1,KDYRATIO
ZBFY1 = PBFY1(JEPSY)
ZBFY2 = PBFY2(JEPSY)
ZBFY3 = PBFY3(JEPSY)
ZBFY4 = PBFY4(JEPSY)
DO JI = KXOR,KXEND
IIS = IIB+JEPSX-1+KDXRATIO/2+(JI-KXOR-JPHEXT)*KDXRATIO
IJF = IJB+JEPSY-1 +(JJ-KYOR-JPHEXT)*KDYRATIO
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
IF (1 <= IIS .AND. IIS <= IIU .AND. 1 <= IJF .AND. IJF <= IJU) THEN
!
PFIELD2 (IIS,IJF,:,:) = ZBFY1* &
( ZBMX1*ZFIELD1(JI-1,JJ-1,:,:)+ZBMX2*ZFIELD1(JI ,JJ-1,:,:) &
+ZBMX3*ZFIELD1(JI+1,JJ-1,:,:)+ZBMX4*ZFIELD1(JI+2,JJ-1,:,:)) &
+ZBFY2* &
( ZBMX1*ZFIELD1(JI-1,JJ ,:,:)+ZBMX2*ZFIELD1(JI ,JJ ,:,:) &
+ZBMX3*ZFIELD1(JI+1,JJ ,:,:)+ZBMX4*ZFIELD1(JI+2,JJ ,:,:)) &
+ZBFY3* &
( ZBMX1*ZFIELD1(JI-1,JJ+1,:,:)+ZBMX2*ZFIELD1(JI ,JJ+1,:,:) &
+ZBMX3*ZFIELD1(JI+1,JJ+1,:,:)+ZBMX4*ZFIELD1(JI+2,JJ+1,:,:)) &
+ZBFY4* &
( ZBMX1*ZFIELD1(JI-1,JJ+2,:,:)+ZBMX2*ZFIELD1(JI ,JJ+2,:,:) &
+ZBMX3*ZFIELD1(JI+1,JJ+2,:,:)+ZBMX4*ZFIELD1(JI+2,JJ+2,:,:))
END IF
END DO
END DO
END DO
END DO
!
!
!* 2.4 vertical vorticity points
!
CASE (5,8)
!
DO JEPSX = 1,KDXRATIO
ZBFX1 = PBFX1(JEPSX)
ZBFX2 = PBFX2(JEPSX)
ZBFX3 = PBFX3(JEPSX)
ZBFX4 = PBFX4(JEPSX)
DO JEPSY = 1,KDYRATIO
ZBFY1 = PBFY1(JEPSY)
ZBFY2 = PBFY2(JEPSY)
ZBFY3 = PBFY3(JEPSY)
ZBFY4 = PBFY4(JEPSY)
DO JI = KXOR,KXEND
IIF = IIB+JEPSX-1 +(JI-KXOR-JPHEXT)*KDXRATIO
IJF = IJB+JEPSY-1 +(JJ-KYOR-JPHEXT)*KDYRATIO
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
IF (1 <= IIF .AND. IIF <= IIU .AND. 1 <= IJF .AND. IJF <= IJU) THEN
!
PFIELD2 (IIF,IJF,:,:) = ZBFY1* &
( ZBFX1*ZFIELD1(JI-1,JJ-1,:,:)+ZBFX2*ZFIELD1(JI ,JJ-1,:,:) &
+ZBFX3*ZFIELD1(JI+1,JJ-1,:,:)+ZBFX4*ZFIELD1(JI+2,JJ-1,:,:)) &
+ZBFY2* &
( ZBFX1*ZFIELD1(JI-1,JJ ,:,:)+ZBFX2*ZFIELD1(JI ,JJ ,:,:) &
+ZBFX3*ZFIELD1(JI+1,JJ ,:,:)+ZBFX4*ZFIELD1(JI+2,JJ ,:,:)) &
+ZBFY3* &
( ZBFX1*ZFIELD1(JI-1,JJ+1,:,:)+ZBFX2*ZFIELD1(JI ,JJ+1,:,:) &
+ZBFX3*ZFIELD1(JI+1,JJ+1,:,:)+ZBFX4*ZFIELD1(JI+2,JJ+1,:,:)) &
+ZBFY4* &
( ZBFX1*ZFIELD1(JI-1,JJ+2,:,:)+ZBFX2*ZFIELD1(JI ,JJ+2,:,:) &
+ZBFX3*ZFIELD1(JI+1,JJ+2,:,:)+ZBFX4*ZFIELD1(JI+2,JJ+2,:,:))
END IF
END DO
END DO
END DO
END DO
!
END SELECT
!-------------------------------------------------------------------------------
!
!
!
END SUBROUTINE BIKHARDT4D
!
! #########################################################################
SUBROUTINE BIKHARDT3D (PBMX1,PBMX2,PBMX3,PBMX4,PBMY1,PBMY2,PBMY3,PBMY4, &
PBFX1,PBFX2,PBFX3,PBFX4,PBFY1,PBFY2,PBFY3,PBFY4, &
KXOR,KYOR,KXEND,KYEND,KDXRATIO,KDYRATIO,KGRID, &
HLBCX,HLBCY,PFIELD1,PFIELD2)
! #########################################################################
!
!!**** *BIKHARDT * - interpolates with Bikhardt method
!!
!! PURPOSE
!! -------
!!
! This routine interpolates a field from outer model (PFIELD1) to
! inner model (PFIELD2), using Bikhardt interpolation.
!!
!!** METHOD
!! ------
!!
!! The outer model field is extrapolated in each horizontal dimension
!! in order to allow all cases of KXOR,KYOR,KXEND and KYEND
!!
!! EXTERNAL
!! --------
!!
!!
!! IMPLICIT ARGUMENTS
!! ------------------
!!
!!
!! REFERENCE
!! ---------
!!
!! Book1 of the documentation
!! Routine BIKHARDT (Book2 of the documentation)
!!
!!
!! AUTHOR
!! ------
!!
!! V. Masson * METEO-FRANCE *
!!
!! MODIFICATIONS
!! -------------
!!
!! Original 10/06/96
!! J.P. Lafore 22/10/96 interpolation coefficients added to the arguments
!! list to avoid duplication.
!-------------------------------------------------------------------------------
!
!* 0. DECLARATIONS
! ------------
!
IMPLICIT NONE
!
!* 0.1 Declarations of dummy arguments :
!
! interpolation coefficients
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
REAL, DIMENSION(:), INTENT(IN) :: PBMX1,PBMX2,PBMX3,PBMX4 ! Mass points in X-direc.
REAL, DIMENSION(:), INTENT(IN) :: PBMY1,PBMY2,PBMY3,PBMY4 ! Mass points in Y-direc.
REAL, DIMENSION(:), INTENT(IN) :: PBFX1,PBFX2,PBFX3,PBFX4 ! Flux points in X-direc.
REAL, DIMENSION(:), INTENT(IN) :: PBFY1,PBFY2,PBFY3,PBFY4 ! Flux points in Y-direc.
!
INTEGER, INTENT(IN) :: KXOR,KXEND ! horizontal position (i,j) of the ORigin and END
INTEGER, INTENT(IN) :: KYOR,KYEND ! of the inner model domain, relative to outer model
INTEGER, INTENT(IN) :: KDXRATIO ! x and y-direction Resolution ratio
INTEGER, INTENT(IN) :: KDYRATIO ! between inner model and outer model
INTEGER, INTENT(IN) :: KGRID ! code of grid point
CHARACTER (LEN=4), DIMENSION (2), INTENT(IN) :: HLBCX ! type of lateral
CHARACTER (LEN=4), DIMENSION (2), INTENT(IN) :: HLBCY ! boundary conditions
REAL, DIMENSION(:,:,:), INTENT(IN) :: PFIELD1 ! field of outer model
REAL, DIMENSION(:,:,:), INTENT(OUT):: PFIELD2 ! field of inner model
!
!* 0.2 Declarations of local variables :
!
REAL, DIMENSION(SIZE(PFIELD1,1),SIZE(PFIELD1,2),SIZE(PFIELD1,3),1) :: ZFIELD1
REAL, DIMENSION(SIZE(PFIELD2,1),SIZE(PFIELD2,2),SIZE(PFIELD2,3),1) :: ZFIELD2
!
!-------------------------------------------------------------------------------
ZFIELD1(:,:,:,1)=PFIELD1(:,:,:)
CALL BIKHARDT4D(PBMX1,PBMX2,PBMX3,PBMX4,PBMY1,PBMY2,PBMY3,PBMY4, &
PBFX1,PBFX2,PBFX3,PBFX4,PBFY1,PBFY2,PBFY3,PBFY4, &
KXOR,KYOR,KXEND,KYEND,KDXRATIO,KDYRATIO,KGRID,HLBCX,HLBCY,ZFIELD1,ZFIELD2)
PFIELD2(:,:,:) =ZFIELD2(:,:,:,1)
!-------------------------------------------------------------------------------
!
END SUBROUTINE BIKHARDT3D
!
! #########################################################################
SUBROUTINE BIKHARDT2D (PBMX1,PBMX2,PBMX3,PBMX4,PBMY1,PBMY2,PBMY3,PBMY4, &
PBFX1,PBFX2,PBFX3,PBFX4,PBFY1,PBFY2,PBFY3,PBFY4, &
KXOR,KYOR,KXEND,KYEND,KDXRATIO,KDYRATIO,KGRID, &
HLBCX,HLBCY,PFIELD1,PFIELD2)
! #########################################################################
!
!!**** *BIKHARDT * - interpolates with Bikhardt method
!!
!! PURPOSE
!! -------
!!
! This routine interpolates a field from outer model (PFIELD1) to
! inner model (PFIELD2), using Bikhardt interpolation.
!!
!!** METHOD
!! ------
!!
!! The outer model field is extrapolated in each horizontal dimension
!! in order to allow all cases of KXOR,KYOR,KXEND and KYEND
!!
!! EXTERNAL
!! --------
!!
!!
!! IMPLICIT ARGUMENTS
!! ------------------
!!
!!
!! REFERENCE
!! ---------
!!
!! Book1 of the documentation
!! Routine BIKHARDT (Book2 of the documentation)
!!
!!
!! AUTHOR
!! ------
!!
!! V. Masson * METEO-FRANCE *
!!
!! MODIFICATIONS
!! -------------
!!
!! Original 10/06/96
!! J.P. Lafore 22/10/96 interpolation coefficients added to the arguments
!! list to avoid duplication.
!-------------------------------------------------------------------------------
!
!* 0. DECLARATIONS
! ------------
!
IMPLICIT NONE
!
!* 0.1 Declarations of dummy arguments :
!
! interpolation coefficients
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
REAL, DIMENSION(:), INTENT(IN) :: PBMX1,PBMX2,PBMX3,PBMX4 ! Mass points in X-direc.
REAL, DIMENSION(:), INTENT(IN) :: PBMY1,PBMY2,PBMY3,PBMY4 ! Mass points in Y-direc.
REAL, DIMENSION(:), INTENT(IN) :: PBFX1,PBFX2,PBFX3,PBFX4 ! Flux points in X-direc.
REAL, DIMENSION(:), INTENT(IN) :: PBFY1,PBFY2,PBFY3,PBFY4 ! Flux points in Y-direc.
!
INTEGER, INTENT(IN) :: KXOR,KXEND ! horizontal position (i,j) of the ORigin and END
INTEGER, INTENT(IN) :: KYOR,KYEND ! of the inner model domain, relative to outer model
INTEGER, INTENT(IN) :: KDXRATIO ! x and y-direction Resolution ratio
INTEGER, INTENT(IN) :: KDYRATIO ! between inner model and outer model
INTEGER, INTENT(IN) :: KGRID ! code of grid point
CHARACTER (LEN=4), DIMENSION (2), INTENT(IN) :: HLBCX ! type of lateral
CHARACTER (LEN=4), DIMENSION (2), INTENT(IN) :: HLBCY ! boundary conditions
REAL, DIMENSION(:,:), INTENT(IN) :: PFIELD1 ! field of outer model
REAL, DIMENSION(:,:), INTENT(OUT):: PFIELD2 ! field of inner model
!
!* 0.2 Declarations of local variables :
!
REAL, DIMENSION(SIZE(PFIELD1,1),SIZE(PFIELD1,2),1,1) :: ZFIELD1
REAL, DIMENSION(SIZE(PFIELD2,1),SIZE(PFIELD2,2),1,1) :: ZFIELD2
!
!-------------------------------------------------------------------------------
ZFIELD1(:,:,1,1)=PFIELD1(:,:)
CALL BIKHARDT4D(PBMX1,PBMX2,PBMX3,PBMX4,PBMY1,PBMY2,PBMY3,PBMY4, &
PBFX1,PBFX2,PBFX3,PBFX4,PBFY1,PBFY2,PBFY3,PBFY4, &
KXOR,KYOR,KXEND,KYEND,KDXRATIO,KDYRATIO,KGRID,HLBCX,HLBCY,ZFIELD1,ZFIELD2)
PFIELD2(:,:) =ZFIELD2(:,:,1,1)
!-------------------------------------------------------------------------------
!
END SUBROUTINE BIKHARDT2D
end module mode_bikhardt