/[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.15 - (show annotations) (download)
Wed Sep 2 19:13:25 2009 UTC (14 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62c, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint64, checkpoint62, checkpoint63, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint62b, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint61z, checkpoint61v, checkpoint61w, checkpoint61x, checkpoint61y
Changes since 1.14: +8 -7 lines
change (fix) type of array "truncSurfP", from _RL to _RS.

1 C $Header: /u/gcmpack/MITgcm/pkg/aim_v23/aim_initialise.F,v 1.14 2007/04/04 01:51:34 jmc Exp $
2 C $Name: $
3
4 #include "AIM_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: AIM_INITIALISE
8 C !INTERFACE:
9 SUBROUTINE AIM_INITIALISE( myThid )
10
11 C !DESCRIPTION: \bv
12 C *==================================================================*
13 C | S/R AIM_INITIALISE
14 C *==================================================================*
15 C | Initialisation of AIM atmospheric physics package :
16 C | 1) call iniphys (=> set parameters to default value)
17 C | 2) read AIM parameters
18 C *==================================================================*
19 C \ev
20 C !USES:
21 IMPLICIT NONE
22
23 C === Global variables ===
24 #include "SIZE.h"
25 #include "EEPARAMS.h"
26 #include "PARAMS.h"
27 #include "GRID.h"
28 #include "SURFACE.h"
29 #include "AIM_PARAMS.h"
30 #include "AIM_FFIELDS.h"
31 c #include "AIM_GRID.h"
32 c #include "AIM_DIAGS.h"
33
34 C !INPUT/OUTPUT PARAMETERS:
35 C == Routine arguments ==
36 C myThid :: my Thread Id. number
37 INTEGER myThid
38
39 #ifdef ALLOW_AIM
40 C !LOCAL VARIABLES:
41 C == Local variables ==
42 C HSG :: Cell face in vertical
43 C pGround :: Lower boundary pressure
44 C bi,bj :: Tile indices
45 C i, j, k :: Loop counters
46 _RL HSG(0:Nr)
47 _RL pGround, tmpPgrnd, tmpVar
48 INTEGER bi, bj
49 INTEGER i, j, k
50 INTEGER Katm
51 CEOP
52
53 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
54
55 _BEGIN_MASTER(myThid )
56
57 C-- Set default value for atmos. physics parameters:
58 pGround = atm_Po
59 DO k=1,Nr
60 Katm = _KD2KA( k )
61 HSG(Katm) = rF(k)/pGround
62 ENDDO
63 k=Nr+1
64 Katm = _KD2KA( k )
65 HSG(Katm) = rF(k)/pGround
66
67 _END_MASTER ( myThid )
68
69 C-- set default value for all atmos. physics parameter:
70 CALL INPHYS( HSG, myThid )
71
72 C-- Read AIM parameters (from file data.aimphys):
73 CALL AIM_READPARMS( myThid )
74
75 C-- set energy fractions in LW bands as a function of temperature:
76 C initialize common block RADFIX (originally called from FORDATE in SPEEDY)
77 _BEGIN_MASTER(myThid )
78 CALL RADSET( myThid )
79 _END_MASTER ( myThid )
80
81 C-- Set truncSurfP : used to correct for truncation (because of hFacMin)
82 C of surface reference pressure Ro_surf that affects Surf.Temp.
83 CALL INI_P_GROUND(1, topoZ, truncSurfP, myThid )
84 DO bj = myByLo(myThid), myByHi(myThid)
85 DO bi = myBxLo(myThid), myBxHi(myThid)
86 DO j=1,sNy
87 DO i=1,sNx
88 tmpPgrnd = truncSurfP(i,j,bi,bj)
89 tmpVar = Ro_surf(i,j,bi,bj)
90 tmpPgrnd = MIN( tmpPgrnd, atm_Po )
91 truncSurfP(i,j,bi,bj) = ( tmpVar/tmpPgrnd )**atm_kappa
92 ENDDO
93 ENDDO
94 IF (aim_useMMsurfFc .AND. aim_surfPotTemp) THEN
95 DO j=1,sNy
96 DO i=1,sNx
97 tmpVar = Ro_surf(i,j,bi,bj)
98 truncSurfP(i,j,bi,bj) = ( tmpVar/atm_Po )**atm_kappa
99 ENDDO
100 ENDDO
101 ENDIF
102 ENDDO
103 ENDDO
104
105 C-- Initialise Land Fraction (in AIM_FFIELDS.h):
106 DO bj = myByLo(myThid), myByHi(myThid)
107 DO bi = myBxLo(myThid), myBxHi(myThid)
108 DO j=1-Oly,sNy+Oly
109 DO i=1-Olx,sNx+Olx
110 aim_landFr (i,j,bi,bj) = 0.
111 ENDDO
112 ENDDO
113 ENDDO
114 ENDDO
115
116 IF ( aim_LandFile .NE. ' ' ) THEN
117 _BARRIER
118 CALL READ_REC_XY_RS(aim_LandFile,aim_landFr,1,nIter0,myThid)
119 C- better to fill land fraction overlap (likely to be needed for sea-ice)
120 CALL EXCH_XY_RS( aim_landFr, myThid )
121 ENDIF
122
123 #ifdef ALLOW_MNC
124 IF (useMNC) THEN
125 CALL AIM_MNC_INIT( myThid )
126 ENDIF
127 #endif /* ALLOW_MNC */
128
129 #ifdef ALLOW_DIAGNOSTICS
130 IF ( useDiagnostics ) THEN
131 CALL AIM_DIAGNOSTICS_INIT( myThid )
132 ENDIF
133 #endif
134
135 C-- Everyone else must wait for the parameters to be set
136 _BARRIER
137
138 #endif /* ALLOW_AIM */
139
140 RETURN
141 END

  ViewVC Help
Powered by ViewVC 1.1.22