/[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.5 - (show annotations) (download)
Thu Jul 31 18:40:57 2003 UTC (20 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint52d_pre, checkpoint52j_pre, checkpoint51o_pre, checkpoint51l_post, checkpoint52k_post, checkpoint52, checkpoint52f_post, checkpoint51f_post, checkpoint51t_post, checkpoint51n_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint51j_post, checkpoint52e_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint52b_pre, checkpoint51l_pre, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint51h_pre, checkpoint52f_pre, branchpoint-genmake2, checkpoint51r_post, checkpoint51i_post, checkpoint52d_post, checkpoint52a_pre, checkpoint52i_post, checkpoint51i_pre, checkpoint52h_pre, checkpoint52j_post, branch-netcdf, checkpoint51e_post, checkpoint51o_post, checkpoint51f_pre, checkpoint52a_post, checkpoint51g_post, ecco_c52_e35, checkpoint51m_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-genmake2, branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.4: +2 -1 lines
add stratospheric drag in the upper level (new parameter: aim_dragStrato)

1 C $Header: /u/gcmpack/MITgcm/pkg/aim_v23/aim_initialise.F,v 1.4 2003/02/26 03:10:50 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_MMsufx = '.bin'
48 aim_MMsufxLength = 4
49 aim_LandFile = ' '
50 aim_albFile = ' '
51 aim_vegFile = ' '
52 aim_sstFile = ' '
53 aim_lstFile = ' '
54 aim_oiceFile = ' '
55 aim_snowFile = ' '
56 aim_swcFile = ' '
57 aim_dragStrato = 0.
58 aim_taveFreq = taveFreq
59 aim_diagFreq = dumpFreq
60 aim_tendFreq = 0.
61
62 C-- Set default value for atmos. physics parameters:
63 pGround = atm_Po
64 DO k=1,Nr
65 Katm = _KD2KA( k )
66 HSG(Katm) = rF(k)/pGround
67 ENDDO
68 k=Nr+1
69 Katm = _KD2KA( k )
70 HSG(Katm) = rF(k)/pGround
71
72 c DO bj = myByLo(myThid), myByHi(myThid)
73 c DO bi = myBxLo(myThid), myBxHi(myThid)
74
75 C-- set default value for all atmos. physics parameter:
76 CALL INPHYS( HSG, myThid )
77
78 c ENDDO
79 c ENDDO
80
81 C-- Read AIM parameters (from file data.aimphys):
82 CALL AIM_READPARMS( myThid )
83
84 C-- set energy fractions in LW bands as a function of temperature:
85 C initialize common block RADFIX (originally called from FORDATE in SPEEDY)
86 _BEGIN_MASTER(myThid)
87 CALL RADSET( myThid)
88 _END_MASTER ( myThid)
89
90 C-- Set truncSurfP : used to correct for truncation (because of hFacMin)
91 C of surface reference pressure Ro_surf that affects Surf.Temp.
92 CALL INI_P_GROUND(1, topoZ, truncSurfP, myThid )
93 DO bj = myByLo(myThid), myByHi(myThid)
94 DO bi = myBxLo(myThid), myBxHi(myThid)
95 DO j=1,sNy
96 DO i=1,sNx
97 tmpPgrnd = MIN(truncSurfP(i,j,bi,bj),atm_Po)
98 truncSurfP(i,j,bi,bj)=
99 & ( Ro_surf(i,j,bi,bj)/tmpPgrnd )**atm_kappa
100 ENDDO
101 ENDDO
102 IF (aim_useMMsurfFc .AND. aim_surfPotTemp) THEN
103 DO j=1,sNy
104 DO i=1,sNx
105 truncSurfP(i,j,bi,bj) =
106 & ( Ro_surf(i,j,bi,bj)/atm_Po )**atm_kappa
107 ENDDO
108 ENDDO
109 ENDIF
110 ENDDO
111 ENDDO
112
113 C-- Initialise surface forcing fields (in AIM_FFIELDS.h):
114 c DO bj = myByLo(myThid), myByHi(myThid)
115 c DO bi = myBxLo(myThid), myBxHi(myThid)
116 c DO j=1-Oly,sNy+Oly
117 c DO i=1-Olx,sNx+Olx
118 c aim_surfTemp(i,j,bi,bj) = 300.
119 c aim_soilWater(i,j,bi,bj) = 0.
120 c aim_albedo (i,j,bi,bj) = 0.
121 c aim_landFr (i,j,bi,bj) = 0.
122 c ENDDO
123 c ENDDO
124 c ENDDO
125 c ENDDO
126
127 #ifdef ALLOW_AIM_TAVE
128 C Initialise diagnostic counters (these are cleared on model start
129 C i.e. not loaded from history file for now ).
130 DO bj = myByLo(myThid), myByHi(myThid)
131 DO bi = myBxLo(myThid), myBxHi(myThid)
132 CALL TIMEAVE_RESET(USTRtave, 1, bi, bj, myThid)
133 CALL TIMEAVE_RESET(VSTRtave, 1, bi, bj, myThid)
134 CALL TIMEAVE_RESET(TSRtave, 1, bi, bj, myThid)
135 CALL TIMEAVE_RESET(OLRtave, 1, bi, bj, myThid)
136 CALL TIMEAVE_RESET(SSRtave, 1, bi, bj, myThid)
137 CALL TIMEAVE_RESET(SLRtave, 1, bi, bj, myThid)
138 CALL TIMEAVE_RESET(SHFtave, 1, bi, bj, myThid)
139 CALL TIMEAVE_RESET(EVAPtave, 1, bi, bj, myThid)
140 CALL TIMEAVE_RESET(PRECNVtave,1, bi, bj, myThid)
141 CALL TIMEAVE_RESET(PRECLStave,1, bi, bj, myThid)
142 CALL TIMEAVE_RESET(CLOUDCtave,1, bi, bj, myThid)
143 CALL TIMEAVE_RESET(CLTOPtave, 1, bi, bj, myThid)
144 CALL TIMEAVE_RESET(CBMFtave, 1, bi, bj, myThid)
145 CALL TIMEAVE_RESET(DRAGtave, 1, bi, bj, myThid)
146 CALL TIMEAVE_RESET(aimV0tave, 1, bi, bj, myThid)
147 CALL TIMEAVE_RESET(aimT0tave, 1, bi, bj, myThid)
148 CALL TIMEAVE_RESET(aimQ0tave, 1, bi, bj, myThid)
149 CALL TIMEAVE_RESET(aimRHtave,Nr, bi, bj, myThid)
150 DO k=1,Nr
151 aim_timeAve(k,bi,bj) = 0.
152 ENDDO
153 ENDDO
154 ENDDO
155 #endif /* ALLOW_AIM_TAVE */
156
157 #endif /* ALLOW_AIM */
158
159 RETURN
160 END

  ViewVC Help
Powered by ViewVC 1.1.22