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

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

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


Revision 1.2 - (hide annotations) (download)
Wed Apr 7 23:40:34 2004 UTC (20 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint57o_post, checkpoint52n_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, checkpoint52m_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, checkpoint53, 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: +10 -11 lines
major changes in pkg/thsice: allows atmospheric model (AIM) to use thsice.
- split thsice_therm.F in 2 S/R: thsice_solve4temp.F & thsice_calc_thickn.F
- move most of the ocean & bulk_force interface in thsice_main.F
- add a "slab ocean" component to be used with atmospheric model

1 jmc 1.2 C $Header: /u/gcmpack/MITgcm/pkg/thsice/thsice_check_conserv.F,v 1.1 2003/11/23 01:20:13 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     #include "THSICE_OPTIONS.h"
5    
6     C !ROUTINE: THSICE_CHECK_CONSERV
7     C !INTERFACE:
8     SUBROUTINE THSICE_CHECK_CONSERV(
9     I dBug, i, j, bi, bj, iceStart,
10     I iceFrac, compact, hIce, hSnow, qicen,
11     I qleft, ffresh, fsalt, flxAtm, frwAtm,
12     I myTime, myIter, myThid )
13     C *==========================================================*
14 jmc 1.2 C | S/R THSICE_CHECK_CONSERV
15 jmc 1.1 C | o Check Conservation of Energy, water and salt
16     C *==========================================================*
17    
18     C !USES:
19     IMPLICIT NONE
20     C === Global variables ===
21     #include "SIZE.h"
22     #include "EEPARAMS.h"
23     c #include "PARAMS.h"
24     #include "THSICE_SIZE.h"
25     #include "THSICE_PARAMS.h"
26 jmc 1.2 #include "THSICE_VARS.h"
27     #include "THSICE_TAVE.h"
28 jmc 1.1
29     C !INPUT/OUTPUT PARAMETERS:
30     C === Routine arguments ===
31     C myIter :: iteration counter for this thread
32     C myTime :: time counter for this thread
33     C myThid :: thread number for this instance of the routine.
34     LOGICAL dBug
35     INTEGER i,j, bi,bj
36     INTEGER iceStart
37     _RL iceFrac
38     _RL compact, hIce, hSnow, qicen(nlyr)
39     _RL qleft, fsalt, ffresh
40     _RL flxAtm, frwAtm
41     _RL myTime
42     INTEGER myIter
43     INTEGER myThid
44    
45     #ifdef ALLOW_THSICE
46     C !LOCAL VARIABLES:
47     C === Local variables ===
48     _RL dEnerg, dWater, dSalt
49     _RL flxFrac
50    
51     1010 FORMAT(A,1P4E11.3)
52    
53     flxFrac = iceFrac
54     IF (iceStart.EQ.1) flxFrac = 1.
55    
56     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
57     dEnerg= -rhos*snowHeight(i,j,bi,bj)*qsnow
58     & -rhoi*iceHeight(i,j,bi,bj)
59     & *(Qice1(i,j,bi,bj)+Qice2(i,j,bi,bj))*0.5
60     dWater = rhos*snowheight(i,j,bi,bj)+rhoi*iceHeight(i,j,bi,bj)
61     dSalt = rhoi*iceHeight(i,j,bi,bj)*saltice
62     IF (dBug) WRITE(6,1010) 'ThSI_CHK: Ener0,Water0,Salt0 =',
63     & dEnerg, dWater, dSalt
64     C--
65     dEnerg = dEnerg*iceFrac
66     & + compact*( rhos*hSnow*qsnow
67     & + rhoi*hIce*(qicen(1)+qicen(2))*0.5
68     & )
69     dWater = dWater*iceFrac
70     & - compact*( rhos*hSnow + rhoi*hIce )
71     dSalt = dSalt*iceFrac
72     & - compact* rhoi*hIce*saltice
73    
74     IF (dBug) WRITE(6,1010) 'ThSI_CHK: dEner,dH20,dSal /dt=',
75     & dEnerg/thSIce_deltaT,dWater/thSIce_deltaT,dSalt/thSIce_deltaT
76     IF (dBug) WRITE(6,1010) 'ThSI_CHK: fxH,fxW,fxS=',flxAtm-qleft,
77 jmc 1.2 & -ffresh-frwAtm,-fsalt
78 jmc 1.1 dEnerg = dEnerg + thSIce_deltaT*flxFrac*(flxAtm-qleft)
79 jmc 1.2 dWater = dWater - thSIce_deltaT*flxFrac*(ffresh+frwAtm)
80 jmc 1.1 dSalt = dSalt - thSIce_deltaT*flxFrac*fsalt
81    
82     #ifdef ALLOW_TIMEAVE
83 jmc 1.2 ice_flx2oc_Ave(i,j,bi,bj) = ice_flx2oc_Ave(i,j,bi,bj)
84 jmc 1.1 & + dEnerg
85 jmc 1.2 ice_frw2oc_Ave(i,j,bi,bj) = ice_frw2oc_Ave(i,j,bi,bj)
86 jmc 1.1 & + dWater
87 jmc 1.2 ice_salFx_Ave(i,j,bi,bj) = ice_salFx_Ave(i,j,bi,bj)
88 jmc 1.1 & + dSalt
89     #endif /*ALLOW_TIMEAVE*/
90     C--
91     IF (dBug) WRITE(6,1010) 'ThSI_CHK: resid.H,W,S=',
92     & dEnerg/thSIce_deltaT,dWater/thSIce_deltaT,dSalt/thSIce_deltaT
93     IF (dBug) WRITE(6,1010) 'ThSI_CHK: hIc,hSn,snow*dt=',
94 jmc 1.2 & hIce, hSnow, snowPrc(i,j,bi,bj)*thSIce_deltaT/rhos
95 jmc 1.1
96     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
97    
98     #endif /*ALLOW_THSICE*/
99    
100     RETURN
101     END

  ViewVC Help
Powered by ViewVC 1.1.22