forked from altMITgcm/MITgcm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
atm_get_atmconfig.F
72 lines (60 loc) · 1.61 KB
/
atm_get_atmconfig.F
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
#include "ATM_CPL_OPTIONS.h"
#ifdef ALLOW_AIM
# include "AIM_OPTIONS.h"
#endif
CBOP 0
C !ROUTINE: ATM_GET_ATMCONFIG
C !INTERFACE:
SUBROUTINE ATM_GET_ATMCONFIG(
O landMask,
I myThid )
C !DESCRIPTION:
C *==========================================================*
C | SUBROUTINE ATM_GET_ATMCONFIG
C | o get atmos. config (land/sea mask) from other pkgs
C *==========================================================*
C !USES:
IMPLICIT NONE
C == Global variables ==
#ifdef ALLOW_AIM
# include "AIM_SIZE.h"
#else
# include "SIZE.h"
#endif
#include "EEPARAMS.h"
#include "PARAMS.h"
c#include "GRID.h"
c#include "ATMIDS.h"
c#include "ATMCPL.h"
#ifdef ALLOW_AIM
# include "AIM_FFIELDS.h"
#endif /* ALLOW_AIM */
C !INPUT/OUTPUT PARAMETERS:
C landMask :: land / sea mask (=1 : full land; =0 : full ocean grid cell)
C myThid :: Thread number for this instance of the routine
_RL landMask(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
INTEGER myThid
C !LOCAL VARIABLES:
INTEGER i,j,bi,bj
CEOP
DO bj = myByLo(myThid), myByHi(myThid)
DO bi = myBxLo(myThid), myBxHi(myThid)
C-- Initialise to zero (no land, full oceanic):
DO j=1-OLy,sNy+OLy
DO i=1-OLx,sNx+OLx
landMask(i,j,bi,bj) = 0. _d 0
ENDDO
ENDDO
#ifdef ALLOW_AIM
IF ( useAIM ) THEN
DO j=1-OLy,sNy+OLy
DO i=1-OLx,sNx+OLx
landMask(i,j,bi,bj) = aim_landFr(i,j,bi,bj)
ENDDO
ENDDO
ENDIF
#endif /* ALLOW_AIM */
ENDDO
ENDDO
RETURN
END