1 |
jmc |
1.1 |
C $Header: $ |
2 |
|
|
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "AIM_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
SUBROUTINE INPHYS (HSG, myThid) |
7 |
|
|
|
8 |
|
|
IMPLICIT NONE |
9 |
|
|
|
10 |
|
|
C-- |
11 |
|
|
C-- SUBROUTINE INPHYS (HSG,PPL,RLAT) |
12 |
|
|
C-- |
13 |
|
|
C-- Purpose: Initialize common blocks for physical parametrization routines |
14 |
|
|
C-- Input : HSG : sigma at half levels |
15 |
|
|
C-- PPL : pressure levels for post-processing |
16 |
|
|
C-- RLAT : gaussian-grid latitudes |
17 |
|
|
C-- Initialized common blocks: PHYCON, FSIGLT, FORCON, |
18 |
|
|
C-- CNVCON, LSCCON, RADCON, SFLCON, VDICON |
19 |
|
|
C-- |
20 |
|
|
C Resolution parameters |
21 |
|
|
|
22 |
|
|
C-- size for MITgcm & Physics package : |
23 |
|
|
#include "AIM_SIZE.h" |
24 |
|
|
|
25 |
|
|
#include "GRID.h" |
26 |
|
|
#include "EEPARAMS.h" |
27 |
|
|
#include "PARAMS.h" |
28 |
|
|
|
29 |
|
|
c #include "AIM_GRID.h" |
30 |
|
|
|
31 |
|
|
C Physical constants + functions of sigma and latitude |
32 |
|
|
|
33 |
|
|
#include "com_physcon.h" |
34 |
|
|
|
35 |
|
|
C Constants for sub-grid-scale physics |
36 |
|
|
|
37 |
|
|
#include "com_forcon.h" |
38 |
|
|
#include "com_cnvcon.h" |
39 |
|
|
#include "com_lsccon.h" |
40 |
|
|
#include "com_radcon.h" |
41 |
|
|
#include "com_sflcon.h" |
42 |
|
|
#include "com_vdicon.h" |
43 |
|
|
|
44 |
|
|
C == Routine Arguments == |
45 |
|
|
INTEGER myThid |
46 |
|
|
c REAL HSG(0:NLEV), PPL(NLEV), RLAT(NLAT) |
47 |
|
|
_RL HSG(0:NLEV) |
48 |
|
|
|
49 |
|
|
#ifdef ALLOW_AIM |
50 |
|
|
|
51 |
|
|
C == Local Variables == |
52 |
|
|
INTEGER K |
53 |
|
|
|
54 |
|
|
_BEGIN_MASTER(myThid) |
55 |
|
|
|
56 |
|
|
C--- 1. Time independent parameters and arrays |
57 |
|
|
C |
58 |
|
|
C 1.1 Physical constants |
59 |
|
|
|
60 |
|
|
c P0 = 1. _d +5 |
61 |
|
|
c GG = 9.81 _d 0 |
62 |
|
|
c RD = 287. _d 0 |
63 |
|
|
c CP = 1004. _d 0 |
64 |
|
|
P0 = atm_po |
65 |
|
|
GG = gravity |
66 |
|
|
RD = atm_cp*atm_kappa |
67 |
|
|
CP = atm_cp |
68 |
|
|
C Latent heat is in J/g for consistency with spec.hum. in g/Kg |
69 |
|
|
ALHC = 2501. _d 0 |
70 |
|
|
SBC = 5.67 _d -8 |
71 |
|
|
C |
72 |
|
|
C 1.2 Functions of sigma and latitude |
73 |
|
|
C |
74 |
|
|
SIGH(0)=HSG(0) |
75 |
|
|
C |
76 |
|
|
DO K=1,NLEV |
77 |
|
|
SIG(K) = 0.5*(HSG(K)+HSG(K-1)) |
78 |
|
|
SIGL(K) = LOG(SIG(K)) |
79 |
|
|
SIGH(K) = HSG(K) |
80 |
|
|
DSIG(K) = HSG(K)-HSG(K-1) |
81 |
|
|
c POUT(K) = PPL(K) |
82 |
|
|
GRDSIG(K) = GG/(DSIG(K)*P0) |
83 |
|
|
GRDSCP(K) = GRDSIG(K)/CP |
84 |
|
|
ENDDO |
85 |
|
|
C |
86 |
|
|
C Weights for vertical interpolation at half-levels(1,nlev) and surface |
87 |
|
|
C Note that for phys.par. half-lev(k) is between full-lev k and k+1 |
88 |
|
|
C Fhalf(k) = Ffull(k)+WVI(K,2)*(Ffull(k+1)-Ffull(k)) |
89 |
|
|
C Fsurf = Ffull(nlev)+WVI(nlev,2)*(Ffull(nlev)-Ffull(nlev-1)) |
90 |
|
|
C |
91 |
|
|
DO K=1,NLEV-1 |
92 |
|
|
WVI(K,1)=1./(SIGL(K+1)-SIGL(K)) |
93 |
|
|
WVI(K,2)=(LOG(SIGH(K))-SIGL(K))*WVI(K,1) |
94 |
|
|
ENDDO |
95 |
|
|
C |
96 |
|
|
WVI(NLEV,1)=0. |
97 |
|
|
WVI(NLEV,2)=-SIGL(NLEV)*WVI(NLEV-1,2) |
98 |
|
|
|
99 |
|
|
c--- jmc: write WVI to check: |
100 |
|
|
WRITE(standardMessageUnit,'(A)') |
101 |
|
|
& '- INPHYS: k,SIG, SIGH, SIGL, WVI(1), WVI(2):' |
102 |
|
|
DO K=1,NLEV |
103 |
|
|
WRITE(standardMessageUnit,'(I3,6F9.4)') |
104 |
|
|
& k,SIG(k),SIGH(k),SIGL(k),WVI(K,1),WVI(K,2) |
105 |
|
|
ENDDO |
106 |
|
|
WRITE(standardMessageUnit,'(A)') '- INPHYS: end setup WVI.' |
107 |
|
|
c--- jmc. |
108 |
|
|
|
109 |
|
|
c- jmc: initialize SLAT & CLAT in aim_dyn2aim.F |
110 |
|
|
c DO J=1,NLAT |
111 |
|
|
c SLAT(J)=SIN(RLAT(J)) |
112 |
|
|
c CLAT(J)=COS(RLAT(J)) |
113 |
|
|
c ENDDO |
114 |
|
|
|
115 |
|
|
C-- 2. Constants for physical parametrization routines: |
116 |
|
|
|
117 |
|
|
c_FM include "cls_inphys.h" |
118 |
|
|
#include "phy_const.h" |
119 |
|
|
|
120 |
|
|
_END_MASTER(myThid) |
121 |
|
|
|
122 |
|
|
#endif /* ALLOW_AIM */ |
123 |
|
|
|
124 |
|
|
RETURN |
125 |
|
|
END |