/[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.16 - (show annotations) (download)
Mon Jan 6 14:53:34 2014 UTC (10 years, 4 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65o, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, HEAD
Changes since 1.15: +3 -3 lines
replace  _END_MASTER ( myThid ) with _END_MASTER( myThid ) to please
Apples /usr/bin/cpp

1 C $Header: /u/gcmpack/MITgcm/pkg/aim_v23/aim_initialise.F,v 1.15 2009/09/02 19:13:25 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