/[MITgcm]/MITgcm/pkg/aim_v23/aim_initialise.F
ViewVC logotype

Annotation of /MITgcm/pkg/aim_v23/aim_initialise.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (hide annotations) (download)
Sun Nov 14 19:54:01 2004 UTC (19 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57g_pre, checkpoint57b_post, checkpoint57g_post, checkpoint56b_post, checkpoint57d_post, checkpoint57i_post, checkpoint57, checkpoint56, checkpoint57f_post, checkpoint57a_post, checkpoint57h_pre, checkpoint57h_post, checkpoint57c_post, checkpoint57c_pre, checkpoint57e_post, eckpoint57e_pre, checkpoint56a_post, checkpoint57h_done, checkpoint57f_pre, checkpoint56c_post, checkpoint57a_pre
Changes since 1.7: +10 -43 lines
read landFraction file much earlier (from initialise_fixed).

1 jmc 1.8 C $Header: /u/gcmpack/MITgcm/pkg/aim_v23/aim_initialise.F,v 1.7 2004/06/24 23:43:11 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     #include "AIM_OPTIONS.h"
5    
6     SUBROUTINE AIM_INITIALISE( myThid )
7     C *==================================================================*
8     C | S/R AIM_INITIALISE
9     C *==================================================================*
10     C | Initialisation of AIM atmospheric physics package :
11     C | 1) call iniphys (=> set parameters to default value)
12     C | 2) read AIM parameters
13     C *==================================================================*
14     IMPLICIT NONE
15    
16     C -------------- Global variables ------------------------------------
17     #include "SIZE.h"
18     #include "EEPARAMS.h"
19     #include "PARAMS.h"
20 jmc 1.2 #include "GRID.h"
21     #include "SURFACE.h"
22 jmc 1.1 #include "DYNVARS.h"
23 jmc 1.2 #include "AIM_PARAMS.h"
24     #include "AIM_FFIELDS.h"
25     c #include "AIM_GRID.h"
26 jmc 1.1 #include "AIM_DIAGS.h"
27    
28     C == Routine arguments ==
29     C myThid - Number of this instance
30     INTEGER myThid
31    
32     #ifdef ALLOW_AIM
33     C == Local variables ==
34     C HSG - Cell face in vertical
35     C pGround - Lower boundary pressure
36 jmc 1.2 C i, j, k, bi,bj - Loop counters
37 jmc 1.1 _RL HSG(0:Nr)
38 jmc 1.2 _RL pGround, tmpPgrnd
39     INTEGER i, j, K, bi, bj
40 jmc 1.1 INTEGER Katm
41    
42 jmc 1.2 C-- Set default value for AIM interface code (AIM_PARAMS.h):
43     aim_useFMsurfBC = .TRUE.
44     aim_useMMsurfFc = .FALSE.
45     aim_surfPotTemp = .FALSE.
46 jmc 1.6 aim_energPrecip = .FALSE.
47     aim_splitSIOsFx = .FALSE.
48 jmc 1.7 aim_clrSkyDiag = .FALSE.
49 jmc 1.2 aim_MMsufx = '.bin'
50     aim_MMsufxLength = 4
51     aim_LandFile = ' '
52     aim_albFile = ' '
53     aim_vegFile = ' '
54     aim_sstFile = ' '
55     aim_lstFile = ' '
56     aim_oiceFile = ' '
57     aim_snowFile = ' '
58     aim_swcFile = ' '
59 jmc 1.5 aim_dragStrato = 0.
60 jmc 1.3 aim_taveFreq = taveFreq
61 jmc 1.2 aim_diagFreq = dumpFreq
62     aim_tendFreq = 0.
63    
64     C-- Set default value for atmos. physics parameters:
65     pGround = atm_Po
66     DO k=1,Nr
67     Katm = _KD2KA( k )
68     HSG(Katm) = rF(k)/pGround
69 jmc 1.1 ENDDO
70 jmc 1.2 k=Nr+1
71     Katm = _KD2KA( k )
72     HSG(Katm) = rF(k)/pGround
73 jmc 1.1
74     c DO bj = myByLo(myThid), myByHi(myThid)
75     c DO bi = myBxLo(myThid), myBxHi(myThid)
76    
77     C-- set default value for all atmos. physics parameter:
78     CALL INPHYS( HSG, myThid )
79    
80     c ENDDO
81     c ENDDO
82    
83 jmc 1.2 C-- Read AIM parameters (from file data.aimphys):
84     CALL AIM_READPARMS( myThid )
85    
86 jmc 1.1 C-- set energy fractions in LW bands as a function of temperature:
87     C initialize common block RADFIX (originally called from FORDATE in SPEEDY)
88     _BEGIN_MASTER(myThid)
89     CALL RADSET( myThid)
90     _END_MASTER ( myThid)
91    
92 jmc 1.2 C-- Set truncSurfP : used to correct for truncation (because of hFacMin)
93     C of surface reference pressure Ro_surf that affects Surf.Temp.
94 jmc 1.4 CALL INI_P_GROUND(1, topoZ, truncSurfP, myThid )
95 jmc 1.2 DO bj = myByLo(myThid), myByHi(myThid)
96     DO bi = myBxLo(myThid), myBxHi(myThid)
97     DO j=1,sNy
98     DO i=1,sNx
99     tmpPgrnd = MIN(truncSurfP(i,j,bi,bj),atm_Po)
100     truncSurfP(i,j,bi,bj)=
101     & ( Ro_surf(i,j,bi,bj)/tmpPgrnd )**atm_kappa
102     ENDDO
103     ENDDO
104     IF (aim_useMMsurfFc .AND. aim_surfPotTemp) THEN
105     DO j=1,sNy
106     DO i=1,sNx
107     truncSurfP(i,j,bi,bj) =
108     & ( Ro_surf(i,j,bi,bj)/atm_Po )**atm_kappa
109     ENDDO
110     ENDDO
111     ENDIF
112     ENDDO
113     ENDDO
114    
115 jmc 1.8 C-- Initialise Land Fraction (in AIM_FFIELDS.h):
116 jmc 1.1 DO bj = myByLo(myThid), myByHi(myThid)
117     DO bi = myBxLo(myThid), myBxHi(myThid)
118 jmc 1.8 DO j=1-Oly,sNy+Oly
119     DO i=1-Olx,sNx+Olx
120     aim_landFr (i,j,bi,bj) = 0.
121     ENDDO
122 jmc 1.3 ENDDO
123 jmc 1.1 ENDDO
124     ENDDO
125 jmc 1.8
126     IF ( aim_LandFile .NE. ' ' ) THEN
127     CALL READ_REC_XY_RS(aim_LandFile,aim_landFr,1,nIter0,myThid)
128     ENDIF
129 jmc 1.1
130     #endif /* ALLOW_AIM */
131    
132     RETURN
133     END

  ViewVC Help
Powered by ViewVC 1.1.22