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

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

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


Revision 1.6 - (show annotations) (download)
Thu Mar 11 14:33:19 2004 UTC (20 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint53, checkpoint53d_post, checkpoint52m_post, checkpoint53c_post, checkpoint53a_post, checkpoint52l_post, checkpoint52n_post, checkpoint53b_pre, checkpoint53b_post, checkpoint53d_pre
Changes since 1.5: +4 -1 lines
a) Treat separately land / ocean / sea-ice surface fluxes
   to allow implicit computation of land & sea-ice surface temp.
b) add snow precipitation
c) other (little) modifications for new land formulation.

1 C $Header: /u/gcmpack/MITgcm/pkg/aim_v23/aim_initialise.F,v 1.5 2003/07/31 18:40:57 jmc Exp $
2 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 | 3) initialisation of AIM arrays (time-ave)
14 C *==================================================================*
15 IMPLICIT NONE
16
17 C -------------- Global variables ------------------------------------
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "PARAMS.h"
21 #include "GRID.h"
22 #include "SURFACE.h"
23 #include "DYNVARS.h"
24 #include "AIM_PARAMS.h"
25 #include "AIM_FFIELDS.h"
26 c #include "AIM_GRID.h"
27 #include "AIM_DIAGS.h"
28
29 C == Routine arguments ==
30 C myThid - Number of this instance
31 INTEGER myThid
32
33 #ifdef ALLOW_AIM
34 C == Local variables ==
35 C HSG - Cell face in vertical
36 C pGround - Lower boundary pressure
37 C i, j, k, bi,bj - Loop counters
38 _RL HSG(0:Nr)
39 _RL pGround, tmpPgrnd
40 INTEGER i, j, K, bi, bj
41 INTEGER Katm
42
43 C-- Set default value for AIM interface code (AIM_PARAMS.h):
44 aim_useFMsurfBC = .TRUE.
45 aim_useMMsurfFc = .FALSE.
46 aim_surfPotTemp = .FALSE.
47 aim_energPrecip = .FALSE.
48 aim_splitSIOsFx = .FALSE.
49 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 aim_dragStrato = 0.
60 aim_taveFreq = taveFreq
61 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 ENDDO
70 k=Nr+1
71 Katm = _KD2KA( k )
72 HSG(Katm) = rF(k)/pGround
73
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 C-- Read AIM parameters (from file data.aimphys):
84 CALL AIM_READPARMS( myThid )
85
86 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 C-- Set truncSurfP : used to correct for truncation (because of hFacMin)
93 C of surface reference pressure Ro_surf that affects Surf.Temp.
94 CALL INI_P_GROUND(1, topoZ, truncSurfP, myThid )
95 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 C-- Initialise surface forcing fields (in AIM_FFIELDS.h):
116 c DO bj = myByLo(myThid), myByHi(myThid)
117 c DO bi = myBxLo(myThid), myBxHi(myThid)
118 c DO j=1-Oly,sNy+Oly
119 c DO i=1-Olx,sNx+Olx
120 c aim_surfTemp(i,j,bi,bj) = 300.
121 c aim_soilWater(i,j,bi,bj) = 0.
122 c aim_albedo (i,j,bi,bj) = 0.
123 c aim_landFr (i,j,bi,bj) = 0.
124 c ENDDO
125 c ENDDO
126 c ENDDO
127 c ENDDO
128
129 #ifdef ALLOW_AIM_TAVE
130 C Initialise diagnostic counters (these are cleared on model start
131 C i.e. not loaded from history file for now ).
132 DO bj = myByLo(myThid), myByHi(myThid)
133 DO bi = myBxLo(myThid), myBxHi(myThid)
134 CALL TIMEAVE_RESET(USTRtave, 1, bi, bj, myThid)
135 CALL TIMEAVE_RESET(VSTRtave, 1, bi, bj, myThid)
136 CALL TIMEAVE_RESET(TSRtave, 1, bi, bj, myThid)
137 CALL TIMEAVE_RESET(OLRtave, 1, bi, bj, myThid)
138 CALL TIMEAVE_RESET(SSRtave, 1, bi, bj, myThid)
139 CALL TIMEAVE_RESET(SLRtave, 1, bi, bj, myThid)
140 CALL TIMEAVE_RESET(SHFtave, 1, bi, bj, myThid)
141 CALL TIMEAVE_RESET(EVAPtave, 1, bi, bj, myThid)
142 CALL TIMEAVE_RESET(PRECNVtave,1, bi, bj, myThid)
143 CALL TIMEAVE_RESET(PRECLStave,1, bi, bj, myThid)
144 CALL TIMEAVE_RESET(CLOUDCtave,1, bi, bj, myThid)
145 CALL TIMEAVE_RESET(CLTOPtave, 1, bi, bj, myThid)
146 CALL TIMEAVE_RESET(CBMFtave, 1, bi, bj, myThid)
147 CALL TIMEAVE_RESET(DRAGtave, 1, bi, bj, myThid)
148 CALL TIMEAVE_RESET(aimV0tave, 1, bi, bj, myThid)
149 CALL TIMEAVE_RESET(aimT0tave, 1, bi, bj, myThid)
150 CALL TIMEAVE_RESET(aimQ0tave, 1, bi, bj, myThid)
151 CALL TIMEAVE_RESET(EnFxPrtave,1, bi, bj, myThid)
152 CALL TIMEAVE_RESET(aimRHtave,Nr, bi, bj, myThid)
153 DO k=1,Nr
154 aim_timeAve(k,bi,bj) = 0.
155 ENDDO
156 ENDDO
157 ENDDO
158 #endif /* ALLOW_AIM_TAVE */
159
160 #endif /* ALLOW_AIM */
161
162 RETURN
163 END

  ViewVC Help
Powered by ViewVC 1.1.22