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

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

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


Revision 1.3 - (show annotations) (download)
Thu Jun 12 17:59:05 2003 UTC (21 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint52d_pre, checkpoint51o_pre, checkpoint51l_post, checkpoint51, checkpoint52, checkpoint51f_post, checkpoint51d_post, checkpoint51t_post, checkpoint51n_post, checkpoint51s_post, checkpoint51j_post, checkpoint51n_pre, checkpoint52b_pre, checkpoint51l_pre, checkpoint51q_post, checkpoint51b_pre, checkpoint52b_post, checkpoint52c_post, checkpoint51h_pre, branchpoint-genmake2, checkpoint51r_post, checkpoint51i_post, checkpoint51b_post, checkpoint51c_post, checkpoint52a_pre, checkpoint50h_post, checkpoint50i_post, checkpoint51i_pre, branch-netcdf, checkpoint51e_post, checkpoint51o_post, checkpoint51f_pre, checkpoint52a_post, checkpoint51g_post, ecco_c52_e35, checkpoint51m_post, checkpoint51a_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-genmake2, branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.2: +19 -1 lines
A simple land model provide surface B.C. for AIM (_v23) atmospheric physics

1 C $Header: /u/gcmpack/MITgcm/pkg/aim_v23/aim_do_physics.F,v 1.2 2002/12/10 02:35:27 jmc Exp $
2 C $Name: $
3
4 #include "AIM_OPTIONS.h"
5
6 SUBROUTINE AIM_DO_PHYSICS( bi, bj, myTime, myIter, myThid )
7
8 C *==================================================================*
9 C | S/R AIM_DO_PHYSICS
10 C *==================================================================*
11 C | Interface between atmospheric physics package and the
12 C | dynamical model.
13 C | Routine calls physics pacakge after setting surface BC.
14 C | Package should derive and set tendency terms
15 C | which can be included as external forcing terms in the dynamical
16 C | tendency routines. Packages should communicate this information
17 C | through common blocks.
18 C *==================================================================*
19 IMPLICIT NONE
20
21 C -------------- Global variables ------------------------------------
22 C-- size for MITgcm & Physics package :
23 #include "AIM_SIZE.h"
24
25 C-- MITgcm
26 #include "EEPARAMS.h"
27 #include "PARAMS.h"
28 #include "DYNVARS.h"
29 #include "GRID.h"
30 #include "SURFACE.h"
31
32 C-- Physics package
33 #include "AIM_PARAMS.h"
34 #include "AIM_FFIELDS.h"
35 #include "AIM_GRID.h"
36 #include "com_physvar.h"
37 #include "com_forcing.h"
38
39 C == Routine arguments ==
40 C bi,bj - Tile index
41 C myTime - Current time of simulation ( s )
42 C myIter - Current iteration number in simulation
43 C myThid - Number of this instance of the routine
44 INTEGER bi, bj, myIter, myThid
45 _RL myTime
46
47 #ifdef ALLOW_AIM
48 C == Local variables ==
49 C I,J,K,I2 - Loop counters
50 C tYear - Fraction into year
51 C Katm - Atmospheric K index
52 INTEGER I,J,K,I2
53 c INTEGER Katm
54 _RL tYear, yearLength
55
56 C_jmc: Because AIM physics LSC is not applied in the stratosphere (top level),
57 C ==> move water wapor from the stratos to the surface level.
58 DO j = 1-Oly, sNy+Oly
59 DO i = 1-Olx, sNx+Olx
60 k = ksurfC(i,j,bi,bj)
61 IF (k.LE.Nr)
62 & salt(i,j,k,bi,bj) = salt(i,j,k,bi,bj)
63 & + salt(i,j,Nr,bi,bj)*drF(Nr)*recip_drF(k)
64 & *hFacC(i,j,Nr,bi,bj)*recip_hFacC(i,j,k,bi,bj)
65 salt(i,j,Nr,bi,bj) = 0.
66 ENDDO
67 ENDDO
68
69 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
70
71 C- Physics package needs to know time of year as a fraction
72 yearLength = 86400.*360.
73 tYear = mod(myTime/yearLength, 1. _d 0)
74 c tYear = myTime/(86400.*360.) -
75 c & FLOAT(INT(myTime/(86400.*360.)))
76
77 C-- Set surface Boundary Conditions for atmos. physics package:
78 C (Albedo, Soil moisture, Surf Temp, Land sea mask)
79 C includes some parts of S/R FORDATE from F.Molteni SPEDDY code (ver23)
80 CALL AIM_SURF_BC( tYear, myTime, myIter, bi, bj, myThid )
81
82 C-- Set surface geopotential: (g * orographic height)
83 DO J=1,sNy
84 DO I=1,sNx
85 I2 = I+(J-1)*sNx
86 PHI0(I2) = gravity*topoZ(i,j,bi,bj)
87 ENDDO
88 ENDDO
89
90 C-- Set topographic dependent FOROG var (originally in common SFLFIX);
91 C used to compute for wind stress over land
92
93 c_FM IF (IDAY.EQ.0) THEN
94 c_FM CALL SFLSET (PHIS0)
95 CALL SFLSET (PHI0, fOrogr(1,myThid), bi,bj,myThid)
96 c_FM ENDIF
97 c_FM CALL SOL_OZ (SOLC,TYEAR)
98
99 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
100
101 C- Compute atmospheric-physics tendencies (call the main AIM S/R)
102 CALL PHY_DRIVER( tYear, myTime, myIter, bi, bj, myThid )
103
104 C- AIM diagnostics : write snap-shot & cumulate for TimeAve output
105 CALL AIM_DIAGNOSTICS( bi, bj, myTime, myIter, myThid )
106
107 CALL AIM_AIM2DYN( bi, bj, myTime, myIter, myThid )
108
109 #ifdef ALLOW_LAND
110 IF (useLand) THEN
111 C- prepare Surface flux over land for land package
112 CALL AIM_AIM2LAND( aim_landFr, bi, bj,
113 I myTime, myIter, myThid )
114
115 C- Step forward land model
116 CALL LAND_STEPFWD( aim_landFr, bi, bj,
117 I myTime, myIter, myThid )
118
119 C- Land diagnostics : write snap-shot & cumulate for TimeAve output
120 CALL LAND_DIAGNOSTICS( aim_landFr, bi, bj,
121 I myTime, myIter, myThid )
122
123 ENDIF
124 #endif /* ALLOW_LAND */
125
126 #endif /* ALLOW_AIM */
127
128 RETURN
129 END

  ViewVC Help
Powered by ViewVC 1.1.22