1 |
jmc |
1.3 |
C $Header: /u/gcmpack/MITgcm/pkg/aim_ocn_coupler/atm_to_ocn_mapxyr8.F,v 1.1 2003/12/15 02:28:00 jmc Exp $ |
2 |
jmc |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "CPP_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
CStartOfInterface |
7 |
|
|
SUBROUTINE ATM_TO_OCN_MAPXYR8( |
8 |
|
|
I aNx, aNy, |
9 |
|
|
I fld_atm, |
10 |
|
|
I oNx, oNy, |
11 |
|
|
O fld_ocn ) |
12 |
|
|
C /==========================================================\ |
13 |
|
|
C | SUBROUTINE ATM_TO_OCN_MAPXYR8 | |
14 |
|
|
C | o Maps atmos. field to ocean field for XY 64-bit float | |
15 |
|
|
C | field. | |
16 |
|
|
C \==========================================================/ |
17 |
|
|
IMPLICIT NONE |
18 |
|
|
|
19 |
|
|
C == Routine arguments == |
20 |
|
|
C fld_atm - Atmos. grid field |
21 |
|
|
C aNx - Atmos. grid global extent in X |
22 |
|
|
C aNy - Atmos. grid global extent in Y |
23 |
|
|
C fld_ocn - Ocean grid field (atmos field will be mapped to this |
24 |
|
|
C field). |
25 |
|
|
C oNx - Ocean grid global extent in X |
26 |
|
|
C oNy - Ocean grid global extent in Y |
27 |
|
|
INTEGER aNx |
28 |
|
|
INTEGER aNy |
29 |
|
|
Real*8 fld_atm(aNx, aNy) |
30 |
|
|
INTEGER oNx |
31 |
|
|
INTEGER oNy |
32 |
|
|
Real*8 fld_ocn(oNx, oNy) |
33 |
|
|
CEndOfInterface |
34 |
|
|
|
35 |
|
|
C == Local variables == |
36 |
|
|
INTEGER I,J |
37 |
|
|
|
38 |
|
|
C Set to zero's everywhere |
39 |
|
|
DO J=1,oNy |
40 |
|
|
DO I=1,oNx |
41 |
|
|
fld_ocn(I,J)=0. |
42 |
|
|
ENDDO |
43 |
|
|
ENDDO |
44 |
|
|
C Now copy intersection of _atm and _ocn into |
45 |
|
|
C _ocn. |
46 |
|
|
DO J=1,MIN(aNy,oNy) |
47 |
|
|
DO I=1,MIN(aNx,oNx) |
48 |
|
|
fld_ocn(I,J)=fld_atm(I,J) |
49 |
|
|
ENDDO |
50 |
|
|
ENDDO |
51 |
|
|
|
52 |
|
|
RETURN |
53 |
|
|
END |