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

Annotation of /MITgcm/pkg/aim_v23/phy_suflux_post.F

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


Revision 1.3 - (hide annotations) (download)
Thu Jun 24 23:43:11 2004 UTC (19 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint58l_post, checkpoint64z, checkpoint57t_post, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint57o_post, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint58e_post, checkpoint57v_post, checkpoint58u_post, checkpoint58w_post, checkpoint54a_pre, checkpoint57m_post, checkpoint55c_post, checkpoint54e_post, checkpoint57s_post, checkpoint54a_post, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint57b_post, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint55h_post, checkpoint58n_post, checkpoint58x_post, checkpoint57g_pre, checkpoint54b_post, checkpoint55b_post, checkpoint58t_post, checkpoint58h_post, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint54d_post, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint56c_post, checkpoint57y_pre, checkpoint55, checkpoint57f_pre, checkpoint57a_post, checkpoint54, checkpoint58q_post, checkpoint54f_post, checkpoint59q, checkpoint59p, checkpoint55g_post, checkpoint59r, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint58f_post, checkpoint53g_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint57c_post, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint55e_post, checkpoint58k_post, checkpoint58v_post, checkpoint53f_post, checkpoint55a_post, checkpoint54c_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint57j_post, checkpoint61z, checkpoint61x, checkpoint61y, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post, checkpoint55d_post, HEAD
Changes since 1.2: +5 -14 lines
- include stability function into surf.Flux derivative relative to Ts
- calculate clear-sky radiation & surface temp. change
- update diagnostics (snap-shot, timeave & diagnostics)

1 jmc 1.3 C $Header: /u/gcmpack/MITgcm/pkg/aim_v23/phy_suflux_post.F,v 1.2 2004/04/08 00:14:09 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     #include "AIM_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: SUFLUX_POST
8     C !INTERFACE:
9     SUBROUTINE SUFLUX_POST(
10     I FMASK, EMISloc,
11     I TLAND, TSEA, TSICE, dTskin, SLRD,
12 jmc 1.3 I T0, Q0, DENVV,
13 jmc 1.1 U DRAG, SHF, EVAP, SLRup,
14     O SLRU, TSFC, TSKIN,
15     I bi,bj,myThid)
16    
17     C !DESCRIPTION: \bv
18     C *==========================================================*
19     C | S/R SUFLUX_POST
20     C | o finish surface flux calculation
21     C *==========================================================*
22     C | o contain 2nd part of original S/R SUFLUX (Speedy code)
23     C *==========================================================*
24     C--
25     C-- SUBROUTINE SUFLUX (PSA,UA,VA,TA,QA,RH,PHI,
26     C-- & PHI0,FMASK,TLAND,TSEA,SWAV,SSR,SLRD,
27     C-- & USTR,VSTR,SHF,EVAP,SLRU,
28     C-- & TSFC,TSKIN,U0,V0,T0,Q0)
29     C--
30     C-- Purpose: Compute surface fluxes of momentum, energy and moisture,
31     C-- and define surface skin temperature from energy balance
32     C *==========================================================*
33     C \ev
34    
35     C !USES:
36     IMPLICIT NONE
37    
38     C Resolution parameters
39    
40     C-- size for MITgcm & Physics package :
41     #include "AIM_SIZE.h"
42    
43     #include "EEPARAMS.h"
44 jmc 1.2 #include "GRID.h"
45 jmc 1.1
46     C Physical constants + functions of sigma and latitude
47     #include "com_physcon.h"
48    
49     C Surface flux constants
50     #include "com_sflcon.h"
51    
52     C !INPUT/OUTPUT PARAMETERS:
53     C == Routine Arguments ==
54     C-- Input:
55     C FMASK :: fraction land - sea - sea-ice (2.5-dim)
56     C EMISloc:: longwave surface emissivity
57     C TLAND :: land-surface temperature (2-dim)
58     C TSEA :: sea-surface temperature (2-dim)
59     C TSICE :: sea-ice surface temperature (2-dim)
60     C dTskin :: temp. correction for daily-cycle heating [K]
61     C SLRD :: sfc lw radiation (downward flux)(2-dim)
62     C SSR :: sfc sw radiation (net flux) (2-dim)
63     C T0 :: near-surface air temperature (2-dim)
64     C Q0 :: near-surface sp. humidity [g/kg](2-dim)
65 jmc 1.3 C DENVV :: surface flux (sens,lat.) coeff. (=Rho*|V|) [kg/m2/s]
66 jmc 1.1 C-- Output:
67     C DRAG :: surface Drag term (= Cd*Rho*|V|)(2-dim)
68     C SHF :: sensible heat flux (2-dim)
69     C EVAP :: evaporation [g/(m^2 s)] (2-dim)
70     C SLRU :: sfc lw radiation (upward flux) (2-dim)
71     C SLRup :: same, for each surface type (2-dim)
72     C TSFC :: surface temperature (clim.) (2-dim)
73     C TSKIN :: skin surface temperature (2-dim)
74     C-- Input:
75     C bi,bj :: tile index
76     C myThid :: Thread number for this instance of the routine
77     C--
78     _RL FMASK(NGP,3), EMISloc
79     _RL TLAND(NGP), TSEA(NGP), TSICE(NGP), dTskin(NGP), SLRD(NGP)
80 jmc 1.3 _RL T0(NGP), Q0(NGP), DENVV(NGP)
81 jmc 1.1
82     _RL DRAG(NGP,0:3), SHF(NGP,0:3), EVAP(NGP,0:3), SLRup(NGP,3)
83     _RL SLRU(NGP), TSFC(NGP), TSKIN(NGP)
84    
85     INTEGER bi,bj,myThid
86     CEOP
87    
88     #ifdef ALLOW_AIM
89    
90     C-- Local variables:
91 jmc 1.2 C J,i1,j1 :: Loop counters
92     C msgBuf :: Informational/error message buffer
93     INTEGER J,i1,j1
94     CHARACTER*(MAX_LEN_MBUF) msgBuf
95 jmc 1.1
96     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
97    
98     C-- 1. Extrapolation of wind, temp, hum. and density to the surface
99    
100     C-- 2. Computation of fluxes over land and sea
101    
102     C-- 3. Adjustment of skin temperature and fluxes over land
103     C-- based on energy balance (to be implemented)
104    
105    
106     C-- 4. Weighted average of surface fluxes and temperatures
107     C-- according to land-sea mask
108    
109     DO J=1,NGP
110     c USTR(J,3) = USTR(J,2)+FMASK(J,1)*(USTR(J,1)-USTR(J,2))
111     c VSTR(J,3) = VSTR(J,2)+FMASK(J,1)*(VSTR(J,1)-VSTR(J,2))
112     c DRAG(J,0) = DRAG(J,2)+FMASK(J,1)*(DRAG(J,1)-DRAG(J,2))
113     c SHF(J,0) = SHF(J,2)+FMASK(J,1)*( SHF(J,1)- SHF(J,2))
114     c EVAP(J,0) = EVAP(J,2)+FMASK(J,1)*(EVAP(J,1)-EVAP(J,2))
115     c SLRU(J) = SLRup(J,2)+FMASK(J,1)*(SLRup(J,1)-SLRup(J,2))
116     DRAG(J,0) = (FMASK(J,1)*DRAG(J,1)+FMASK(J,2)*DRAG(J,2)
117     & +FMASK(J,3)*DRAG(J,3))
118     SHF (J,0) = (FMASK(J,1)*SHF(J,1) +FMASK(J,2)*SHF(J,2)
119     & +FMASK(J,3)*SHF(J,3) )
120     EVAP(J,0) = (FMASK(J,1)*EVAP(J,1)+FMASK(J,2)*EVAP(J,2)
121     & +FMASK(J,3)*EVAP(J,3))
122     SLRU(J) = (FMASK(J,1)*SLRup(J,1)+FMASK(J,2)*SLRup(J,2)
123     & +FMASK(J,3)*SLRup(J,3))
124     ENDDO
125    
126     DO J=1,NGP
127     c TSFC(J) = TSEA(J)+FMASK(J,1)*(TLAND(J)-TSEA(J))
128     TSFC(J) = (FMASK(J,1)*TLAND(J) + FMASK(J,2)*TSEA(J)
129     & + FMASK(J,3)*TSICE(J))
130     TSKIN(J) = TSFC(J)+FMASK(J,1)*dTskin(J)
131     ENDDO
132    
133     C- Compute Net LW surf flux (+=upward) for each surface type:
134     C (for diagnostic only)
135     DO J=1,NGP
136     SLRup(J,1)=EMISloc*SLRup(J,1)-SLRD(J)
137     SLRup(J,2)=EMISloc*SLRup(J,2)-SLRD(J)
138     SLRup(J,3)=EMISloc*SLRup(J,3)-SLRD(J)
139 jmc 1.3 SLRU(J) =EMISloc*SLRU(J)
140 jmc 1.1 ENDDO
141 jmc 1.2
142     C- Check that Temp is OK for LW Radiation scheme :
143     DO J=1,NGP
144     IF ( TSFC(J).LT.lwTemp1 .OR.
145     & TSFC(J).GT.lwTemp2 ) THEN
146     i1 = 1 + mod((J-1),sNx)
147     j1 = 1 + int((J-1)/sNx)
148     WRITE(msgBuf,'(A,1PE20.13,A,2I4)')
149     & 'SUFLUX_POST: TS=', TSFC(J),
150     & ' out of range ',lwTemp1,lwTemp2
151     CALL PRINT_ERROR( msgBuf , myThid)
152     WRITE(msgBuf,'(A,1P3E10.3,A,0P3F8.5)')
153     & 'SUFLUX_POST: T_Lnd,Sea,Sic=',TLAND(J),TSEA(J),TSICE(J),
154     & ' Mask:',FMASK(J,1),FMASK(J,2),FMASK(J,3)
155     CALL PRINT_ERROR( msgBuf , myThid)
156     WRITE(msgBuf,'(A,2I4,3I3,I6,2F9.3)')
157     & 'SUFLUX_POST: Pb in i,j,bi,bj,myThid,IJ,X,Y=',
158     & i1,j1,bi,bj,myThid,J,xC(i1,j1,bi,bj),yC(i1,j1,bi,bj)
159     CALL PRINT_ERROR( msgBuf , myThid)
160     STOP 'ABNORMAL END: S/R SUFLUX_POST'
161     ENDIF
162     ENDDO
163 jmc 1.1
164     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
165     #endif /* ALLOW_AIM */
166    
167     RETURN
168     END

  ViewVC Help
Powered by ViewVC 1.1.22