/[MITgcm]/MITgcm/pkg/thsice/thsice_impl_temp.F
ViewVC logotype

Annotation of /MITgcm/pkg/thsice/thsice_impl_temp.F

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


Revision 1.2 - (hide annotations) (download)
Fri May 7 21:33:34 2004 UTC (20 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint57o_post, checkpoint53d_post, checkpoint54a_pre, checkpoint57m_post, checkpoint55c_post, checkpoint54e_post, checkpoint57s_post, checkpoint54a_post, checkpoint53c_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint57b_post, checkpoint57c_pre, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint55h_post, checkpoint53b_post, checkpoint57g_pre, checkpoint54b_post, checkpoint53b_pre, checkpoint55b_post, checkpoint54d_post, checkpoint56c_post, checkpoint57y_pre, checkpoint55, checkpoint53a_post, checkpoint57f_pre, checkpoint57a_post, checkpoint54, checkpoint54f_post, checkpoint57v_post, checkpoint55g_post, checkpoint55f_post, checkpoint57r_post, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint53g_post, checkpoint57x_post, checkpoint57n_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint57q_post, checkpoint57z_post, checkpoint57c_post, checkpoint55e_post, checkpoint53f_post, checkpoint55a_post, checkpoint53d_pre, checkpoint54c_post, checkpoint57j_post, checkpoint57h_pre, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post, checkpoint55d_post
Changes since 1.1: +16 -2 lines
improve "debug" writing.

1 jmc 1.2 C $Header: /u/gcmpack/MITgcm/pkg/thsice/thsice_impl_temp.F,v 1.1 2004/04/07 23:40:34 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     #include "THSICE_OPTIONS.h"
5    
6     C !ROUTINE: THSICE_IMPL_TEMP
7     C !INTERFACE:
8     SUBROUTINE THSICE_IMPL_TEMP(
9     I netSW, sFlx,
10     O dTsurf,
11     I bi, bj, myTime, myIter, myThid)
12     C *==========================================================*
13     C | S/R THSICE_IMPL_TEMP
14     C | o Calculate sea-ice and surface temp. implicitly
15     C *==========================================================*
16     C | o return surface fluxes for atmosphere boundary layer
17     C | physics (and therefore called within atmospheric physics)
18     C *==========================================================*
19    
20     C !USES:
21     IMPLICIT NONE
22     C === Global variables ===
23     #include "SIZE.h"
24     #include "EEPARAMS.h"
25     #include "PARAMS.h"
26     #include "FFIELDS.h"
27     #include "THSICE_SIZE.h"
28     #include "THSICE_PARAMS.h"
29     #include "THSICE_VARS.h"
30    
31     C !INPUT/OUTPUT PARAMETERS:
32     C === Routine arguments ===
33     C netSW :: net Short Wave surf. flux (+=down) [W/m2]
34     C sFlx :: surf. heat flux (+=down) except SW, function of surf. temp Ts:
35     C 0: Flx(Ts=0) ; 1: Flx(Ts=Ts^n) ; 2: d.Flx/dTs(Ts=Ts^n)
36     C dTsurf :: surf. temp adjusment: Ts^n+1 - Ts^n
37     C bi,bj :: Tile index
38     C myIter :: iteration counter for this thread
39     C myTime :: time counter for this thread
40     C myThid :: thread number for this instance of the routine.
41     _RL netSW (sNx,sNy)
42     _RL sFlx (sNx,sNy,0:2)
43     _RL dTsurf (sNx,sNy)
44     INTEGER bi,bj
45     _RL myTime
46     INTEGER myIter
47     INTEGER myThid
48    
49     #ifdef ALLOW_THSICE
50     C !LOCAL VARIABLES:
51     C === Local variables ===
52     C flxSW :: net Short-Wave (+=down) at surface [W/m2]
53     C flxExcSw :: surf. heat flux (+=down) except SW, function of surf. temp Ts:
54     C 0: Flx(Ts=0) ; 1: Flx(Ts=Ts^n) ; 2: d.Flx/dTs(Ts=Ts^n)
55     C sHeating :: surf heating left to melt snow or ice (= Atmos-conduction)
56     C flxCnB :: heat flux conducted through the ice to bottom surface
57     C flxtmp :: net heat flux from the atmosphere ( >0 downward)
58     C evptmp :: evaporation to the atmosphere [kg/m2/s] (>0 if evaporate)
59     INTEGER i,j
60     INTEGER iMin, iMax
61     INTEGER jMin, jMax
62     _RL flxSW
63     _RL Tf
64     _RL flxtmp, evptmp
65     _RL flxExcSw(0:2)
66     _RL hIce, hSnow, Tsf, Tice(nlyr), qicen(nlyr)
67    
68     LOGICAL dBug
69    
70     iMin = 1
71     iMax = sNx
72     jMin = 1
73     jMax = sNy
74     dBug = .FALSE.
75     1010 FORMAT(A,1P4E11.3)
76    
77     DO j = jMin, jMax
78     DO i = iMin, iMax
79 jmc 1.2 c dBug = ( bi.EQ.3 .AND. i.EQ.15 .AND. j.EQ.11 )
80 jmc 1.1
81     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
82     C part.1 : ice-covered fraction ;
83     C Solve for surface and ice temperature (implicitly) ; compute surf. fluxes
84     C-------
85     IF (iceMask(i,j,bi,bj).GT.0. _d 0) THEN
86     Tf = -mu_Tf*sOceMxL(i,j,bi,bj)
87     hIce = iceHeight(i,j,bi,bj)
88     hSnow = snowHeight(i,j,bi,bj)
89     flxExcSw(0) = sFlx(i,j,0)
90     flxExcSw(1) = sFlx(i,j,1)
91     flxExcSw(2) = sFlx(i,j,2)
92     flxSW = netSW(i,j)
93     Tsf = Tsrf(i,j,bi,bj)
94     qicen(1)= Qice1(i,j,bi,bj)
95     qicen(2)= Qice2(i,j,bi,bj)
96 jmc 1.2 IF ( dBug ) THEN
97     WRITE(6,'(A,2I4,2I2)') 'ThSI_IMPL_T: i,j=',i,j,bi,bj
98     WRITE(6,1010) 'ThSI_IMPL_T:-0- iceMask,hIc,hSn,Tsf=',
99     & iceMask(i,j,bi,bj), hIce, hSnow, Tsf
100     ENDIF
101    
102 jmc 1.1 CALL THSICE_SOLVE4TEMP(
103     I useBulkforce, flxExcSw, Tf, hIce, hSnow,
104     U flxSW, Tsf, qicen,
105     O Tice, sHeating(i,j,bi,bj), flxCndBt(i,j,bi,bj),
106     O dTsurf(i,j), flxtmp, evptmp,
107     I i,j, bi,bj, myThid)
108     C-- Update Fluxes :
109     Qsw(i,j,bi,bj) = -flxSW
110     C-- Update Sea-Ice state :
111     Tsrf(i,j,bi,bj) =Tsf
112     Tice1(i,j,bi,bj)=Tice(1)
113     Tice2(i,j,bi,bj)=Tice(2)
114     Qice1(i,j,bi,bj)=qicen(1)
115     Qice2(i,j,bi,bj)=qicen(2)
116 jmc 1.2
117     IF ( dBug ) THEN
118     WRITE(6,1010) 'ThSI_IMPL_T: Tsf, Tice(1,2), dTsurf=',
119     & Tsf, Tice, dTsurf(i,j)
120     WRITE(6,1010) 'ThSI_IMPL_T: sHeat, flxCndBt, Qice =',
121     & sHeating(i,j,bi,bj), flxCndBt(i,j,bi,bj), qicen
122     ENDIF
123 jmc 1.1 ELSE
124     dTsurf(i,j) = 0. _d 0
125     Qsw(i,j,bi,bj) = 0. _d 0
126     ENDIF
127 jmc 1.2
128 jmc 1.1 ENDDO
129     ENDDO
130    
131     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
132     #endif /* ALLOW_THSICE */
133    
134     RETURN
135     END

  ViewVC Help
Powered by ViewVC 1.1.22