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

Contents of /MITgcm/pkg/thsice/thsice_slab_ocean.F

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


Revision 1.7 - (show annotations) (download)
Mon Oct 1 13:38:08 2007 UTC (16 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint59j, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q
Changes since 1.6: +2 -2 lines
Change EmPmR units: from m/s to kg/m2/s

1 C $Header: /u/gcmpack/MITgcm/pkg/thsice/thsice_slab_ocean.F,v 1.6 2006/10/18 21:07:03 jmc Exp $
2 C $Name: $
3
4 #include "THSICE_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: THSICE_SLAB_OCEAN
8 C !INTERFACE:
9 SUBROUTINE THSICE_SLAB_OCEAN(
10 I aim_sWght0, aim_sWght1,
11 O dTsurf,
12 I bi, bj, myTime, myIter, myThid )
13 C !DESCRIPTION: \bv
14 C *==========================================================*
15 C | S/R THSICE_SLAB_OCEAN
16 C | o Slab ocean for atmosphere (and sea-ice) model
17 C *==========================================================*
18 C | o add ocean-surface fluxes + restoring term
19 C | and step forward ocean mixed-layer Temp. & Salinity
20 C *==========================================================*
21 C \ev
22
23 C !USES:
24 IMPLICIT NONE
25
26 C == Global variables ==
27 C-- MITgcm
28 #include "SIZE.h"
29 #include "EEPARAMS.h"
30 #include "PARAMS.h"
31 #include "FFIELDS.h"
32
33 C-- Sea-Ice package
34 #include "THSICE_PARAMS.h"
35 #include "THSICE_VARS.h"
36
37 C-- Physics package
38 #ifdef ALLOW_AIM
39 #include "AIM_FFIELDS.h"
40 #endif
41
42 C !INPUT/OUTPUT PARAMETERS:
43 C == Routine Arguments ==
44 C aim_sWght0 :: weight for time interpolation of surface BC
45 C aim_sWght1 :: 0/1 = time period before/after the current time
46 C dTsurf :: diagnostics of slab-ocean temperature change [K/iter]
47 C bi,bj :: tile indices
48 C myTime :: Current time of simulation ( s )
49 C myIter :: Current iteration number in simulation
50 C myThid :: my Thread number Id.
51 _RL aim_sWght0, aim_sWght1
52 _RL dTsurf(sNx,sNy)
53 _RL myTime
54 INTEGER bi,bj
55 INTEGER myIter, myThid
56 CEOP
57
58 #ifdef ALLOW_THSICE
59
60 C == Local variables ==
61 C i,j :: Loop counters
62 _RL dtFac, fwFac, heatFac
63 #ifdef ALLOW_AIM
64 _RL oceTfreez, locTemp, dtFacR
65 #endif
66 INTEGER i,j
67
68 cph the following structure is not supported by TAF
69 cph IF ( .NOT.stepFwd_oceMxL ) RETURN
70 IF ( stepFwd_oceMxL ) THEN
71
72 C-- add heat flux and fresh-water + salt flux :
73 dtFac = ocean_deltaT/rhosw
74 fwFac = ocean_deltaT*sMxL_default/rhosw
75 heatFac = ocean_deltaT/(cpwater*rhosw)
76 DO j=1,sNy
77 DO i=1,sNx
78 IF ( hOceMxL(i,j,bi,bj).NE.0. _d 0 ) THEN
79 dTsurf(i,j) = tOceMxL(i,j,bi,bj)
80 tOceMxL(i,j,bi,bj) = tOceMxL(i,j,bi,bj)
81 & - heatFac*Qnet(i,j,bi,bj) / hOceMxL(i,j,bi,bj)
82 sOceMxL(i,j,bi,bj) = sOceMxL(i,j,bi,bj)
83 & + (fwFac*EmPmR(i,j,bi,bj) - dtFac*saltFlux(i,j,bi,bj))
84 & / hOceMxL(i,j,bi,bj)
85 ENDIF
86 ENDDO
87 ENDDO
88
89 #ifdef ALLOW_AIM
90 IF ( tauRelax_MxL .GT. 0. _d 0 ) THEN
91 C-- add restoring (backward) toward climatological Temp. & fixed Salinity
92 dtFac = ocean_deltaT/tauRelax_MxL
93 dtFacR = 1. _d 0 /(1. _d 0 + dtFac)
94 oceTfreez = - 1.9 _d 0
95 DO j=1,sNy
96 DO i=1,sNx
97 IF ( hOceMxL(i,j,bi,bj).NE.0. _d 0 ) THEN
98 sOceMxL(i,j,bi,bj) =
99 & (sOceMxL(i,j,bi,bj) + dtFac*sMxL_default)*dtFacR
100 oceTfreez = -mu_Tf*sOceMxL(i,j,bi,bj)
101 locTemp = ( aim_sWght0*aim_sst0(i,j,bi,bj)
102 & + aim_sWght1*aim_sst1(i,j,bi,bj)
103 & ) - celsius2K
104 locTemp = MAX( locTemp , oceTfreez )
105 tOceMxL(i,j,bi,bj) =
106 & (tOceMxL(i,j,bi,bj) + dtFac*locTemp)*dtFacR
107 ENDIF
108 ENDDO
109 ENDDO
110 ENDIF
111 #endif /* ALLOW_AIM */
112
113 C- Diagnose surf. temp. change
114 DO j=1,sNy
115 DO i=1,sNx
116 IF ( hOceMxL(i,j,bi,bj).NE.0. _d 0 ) THEN
117 dTsurf(i,j) = tOceMxL(i,j,bi,bj) - dTsurf(i,j)
118 ENDIF
119 ENDDO
120 ENDDO
121
122 c-- End of IF ( stepFwd_oceMxL ) THEN
123 ENDIF
124
125 #endif /* ALLOW_THSICE */
126
127 RETURN
128 END

  ViewVC Help
Powered by ViewVC 1.1.22