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

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

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


Revision 1.3 - (show annotations) (download)
Thu Mar 11 14:33:19 2004 UTC (20 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint53, checkpoint53d_post, checkpoint52m_post, checkpoint53c_post, checkpoint53a_post, checkpoint52l_post, checkpoint52n_post, checkpoint53b_pre, checkpoint53b_post, checkpoint53d_pre
Changes since 1.2: +6 -1 lines
a) Treat separately land / ocean / sea-ice surface fluxes
   to allow implicit computation of land & sea-ice surface temp.
b) add snow precipitation
c) other (little) modifications for new land formulation.

1 C $Header: /u/gcmpack/MITgcm/pkg/aim_v23/phy_inphys.F,v 1.2 2002/12/10 02:35:27 jmc Exp $
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_Rd
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 ALHF = 334. _d 0
71 SBC = 5.67 _d -8
72 C Heat capacity of rain is also in J/g/K for the same reasons
73 c rainCP = HeatCapacity_Cp / 1000. _d 0
74 rainCP = 4200. _d 0 / 1000. _d 0
75 tFreeze= celsius2K
76 C
77 C 1.2 Functions of sigma and latitude
78 C
79 SIGH(0)=HSG(0)
80 C
81 DO K=1,NLEV
82 SIG(K) = 0.5*(HSG(K)+HSG(K-1))
83 SIGL(K) = LOG(SIG(K))
84 SIGH(K) = HSG(K)
85 DSIG(K) = HSG(K)-HSG(K-1)
86 c POUT(K) = PPL(K)
87 GRDSIG(K) = GG/(DSIG(K)*P0)
88 GRDSCP(K) = GRDSIG(K)/CP
89 ENDDO
90 C
91 C Weights for vertical interpolation at half-levels(1,nlev) and surface
92 C Note that for phys.par. half-lev(k) is between full-lev k and k+1
93 C Fhalf(k) = Ffull(k)+WVI(K,2)*(Ffull(k+1)-Ffull(k))
94 C Fsurf = Ffull(nlev)+WVI(nlev,2)*(Ffull(nlev)-Ffull(nlev-1))
95 C
96 DO K=1,NLEV-1
97 WVI(K,1)=1./(SIGL(K+1)-SIGL(K))
98 WVI(K,2)=(LOG(SIGH(K))-SIGL(K))*WVI(K,1)
99 ENDDO
100 C
101 WVI(NLEV,1)=0.
102 WVI(NLEV,2)=-SIGL(NLEV)*WVI(NLEV-1,2)
103
104 c--- jmc: write WVI to check:
105 WRITE(standardMessageUnit,'(A)')
106 & '- INPHYS: k,SIG, SIGH, SIGL, WVI(1), WVI(2):'
107 DO K=1,NLEV
108 WRITE(standardMessageUnit,'(I3,6F9.4)')
109 & k,SIG(k),SIGH(k),SIGL(k),WVI(K,1),WVI(K,2)
110 ENDDO
111 WRITE(standardMessageUnit,'(A)') '- INPHYS: end setup WVI.'
112 c--- jmc.
113
114 c- jmc: initialize SLAT & CLAT in aim_dyn2aim.F
115 c DO J=1,NLAT
116 c SLAT(J)=SIN(RLAT(J))
117 c CLAT(J)=COS(RLAT(J))
118 c ENDDO
119
120 C-- 2. Constants for physical parametrization routines:
121
122 c_FM include "cls_inphys.h"
123 #include "phy_const.h"
124
125 _END_MASTER(myThid)
126
127 #endif /* ALLOW_AIM */
128
129 RETURN
130 END

  ViewVC Help
Powered by ViewVC 1.1.22