2 |
|
|
3 |
! From inter_barxy.F, version 1.1.1.1 2004/05/19 12:53:07 |
! From inter_barxy.F, version 1.1.1.1 2004/05/19 12:53:07 |
4 |
|
|
|
! This file is clean: there is neither C preprocessor directive, nor |
|
|
! include line. |
|
|
|
|
5 |
implicit none |
implicit none |
6 |
|
|
7 |
private |
private |
13 |
|
|
14 |
! Author: P. Le Van |
! Author: P. Le Van |
15 |
|
|
16 |
use numer_rec, only: assert_eq, assert |
use nr_util, only: assert_eq, assert |
17 |
use dimens_m, only: iim, jjm |
use dimens_m, only: iim, jjm |
18 |
use comgeom, only: aire_2d, apoln, apols |
use comgeom, only: aire_2d, apoln, apols |
19 |
|
|
31 |
! Si taille de la seconde dim = jjm, on veut interpoler sur les |
! Si taille de la seconde dim = jjm, on veut interpoler sur les |
32 |
! jjm latitudes rlatv du modèle (latitudes de V) |
! jjm latitudes rlatv du modèle (latitudes de V) |
33 |
|
|
34 |
! Variables local to the procedure: |
! Local: |
35 |
|
|
36 |
REAL champy(iim, size(champ, 2)) |
REAL champy(iim, size(champ, 2)) |
37 |
integer j, i, jnterfd, jmods |
integer j, i, jnterfd, jmods |
55 |
|
|
56 |
! Check decreasing order for "rlatimod": |
! Check decreasing order for "rlatimod": |
57 |
DO i = 2, jjm |
DO i = 2, jjm |
58 |
IF (rlatimod(i) >= rlatimod(i-1)) stop & |
IF (rlatimod(i) >= rlatimod(i-1)) then |
59 |
'"inter_barxy": "rlatimod" should be strictly decreasing' |
print *, '"inter_barxy": "rlatimod" should be strictly decreasing' |
60 |
|
stop 1 |
61 |
|
end IF |
62 |
ENDDO |
ENDDO |
63 |
|
|
64 |
yjmod(:jjm) = ord_coordm(rlatimod) |
yjmod(:jjm) = ord_coordm(rlatimod) |
65 |
IF (jmods == jjm + 1) THEN |
IF (jmods == jjm + 1) THEN |
66 |
IF (90. - yjmod(jjm) < 0.01) stop & |
IF (90. - yjmod(jjm) < 0.01) then |
67 |
'"inter_barxy": with jmods = jjm + 1, yjmod(jjm) should be < 90.' |
print *, '"inter_barxy": with jmods = jjm + 1, ' & |
68 |
|
// 'yjmod(jjm) should be < 90.' |
69 |
|
stop 1 |
70 |
|
end IF |
71 |
ELSE |
ELSE |
72 |
! jmods = jjm |
! jmods = jjm |
73 |
IF (ABS(yjmod(jjm) - 90.) > 0.01) stop & |
IF (ABS(yjmod(jjm) - 90.) > 0.01) then |
74 |
'"inter_barxy": with jmods = jjm, yjmod(jjm) should be 90.' |
print *, '"inter_barxy": with jmods = jjm, yjmod(jjm) should be 90.' |
75 |
|
stop 1 |
76 |
|
end IF |
77 |
ENDIF |
ENDIF |
78 |
|
|
79 |
if (jmods == jjm + 1) yjmod(jjm + 1) = 90. |
if (jmods == jjm + 1) yjmod(jjm + 1) = 90. |
118 |
! ( L'indice 1 correspond a l'interface mailLE 1 / maille 2) |
! ( L'indice 1 correspond a l'interface mailLE 1 / maille 2) |
119 |
! ( Les abscisses sont exprimées en degres) |
! ( Les abscisses sont exprimées en degres) |
120 |
|
|
121 |
use numer_rec, only: assert_eq |
use nr_util, only: assert_eq |
122 |
|
|
123 |
IMPLICIT NONE |
IMPLICIT NONE |
124 |
|
|
303 |
! Version unidimensionnelle, en latitude. |
! Version unidimensionnelle, en latitude. |
304 |
! L'indice 1 correspond à l'interface maille 1 -- maille 2. |
! L'indice 1 correspond à l'interface maille 1 -- maille 2. |
305 |
|
|
306 |
use numer_rec, only: assert |
use nr_util, only: assert |
307 |
|
|
308 |
IMPLICIT NONE |
IMPLICIT NONE |
309 |
|
|
380 |
! reverses their order. |
! reverses their order. |
381 |
! Finally, the procedure adds 90° as the last value of the array. |
! Finally, the procedure adds 90° as the last value of the array. |
382 |
|
|
383 |
use numer_rec, only: assert_eq |
use nr_util, only: assert_eq, pi |
|
use comconst, only: pi |
|
384 |
|
|
385 |
IMPLICIT NONE |
IMPLICIT NONE |
386 |
|
|
404 |
! Check monotonicity: |
! Check monotonicity: |
405 |
decrois = xi(2) < xi(1) |
decrois = xi(2) < xi(1) |
406 |
DO i = 3, nmax |
DO i = 3, nmax |
407 |
IF (decrois .neqv. xi(i) < xi(i-1)) stop & |
IF (decrois .neqv. xi(i) < xi(i-1)) then |
408 |
'"ord_coord": latitudes are not monotonic' |
print *, '"ord_coord": latitudes are not monotonic' |
409 |
|
stop 1 |
410 |
|
end IF |
411 |
ENDDO |
ENDDO |
412 |
|
|
413 |
IF (abs(xi(1)) < pi) then |
IF (abs(xi(1)) < pi) then |
422 |
print *, "ord_coord" |
print *, "ord_coord" |
423 |
PRINT *, '"xi" should contain the latitudes of the boundaries of ' & |
PRINT *, '"xi" should contain the latitudes of the boundaries of ' & |
424 |
// 'grid cells, not the centers of grid cells.' |
// 'grid cells, not the centers of grid cells.' |
425 |
STOP |
STOP 1 |
426 |
ENDIF |
ENDIF |
427 |
|
|
428 |
IF (decrois) xo(:nmax) = xo(nmax:1:- 1) |
IF (decrois) xo(:nmax) = xo(nmax:1:- 1) |
440 |
! This procedure converts to degrees, if necessary, and inverts the |
! This procedure converts to degrees, if necessary, and inverts the |
441 |
! order. |
! order. |
442 |
|
|
443 |
use comconst, only: pi |
use nr_util, only: pi |
444 |
|
|
445 |
IMPLICIT NONE |
IMPLICIT NONE |
446 |
|
|