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

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

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


Revision 1.1 - (hide annotations) (download)
Wed Apr 7 23:40:34 2004 UTC (20 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint52n_post, checkpoint53d_post, checkpoint54a_pre, checkpoint55c_post, checkpoint54e_post, checkpoint54a_post, checkpoint53c_post, checkpoint55d_pre, checkpoint55j_post, checkpoint56b_post, checkpoint55h_post, checkpoint53b_post, checkpoint54b_post, checkpoint53b_pre, checkpoint55b_post, checkpoint54d_post, checkpoint56c_post, checkpoint52m_post, checkpoint55, checkpoint53a_post, checkpoint57a_post, checkpoint54, checkpoint54f_post, checkpoint55g_post, checkpoint55f_post, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, checkpoint53, checkpoint53g_post, checkpoint55e_post, checkpoint53f_post, checkpoint55a_post, checkpoint53d_pre, checkpoint54c_post, checkpoint56a_post, checkpoint55d_post
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.1 C $Header: $
2     C $Name: $
3    
4     #include "THSICE_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: THSICE_RESHAPE_LAYERS
8     C !INTERFACE:
9     SUBROUTINE THSICE_RESHAPE_LAYERS(
10     U qicen,
11     I hlyr, hnew, myThid )
12    
13     C !DESCRIPTION: \bv
14     C *==========================================================*
15     C | S/R THSICE_RESHAPE_LAYERS
16     C | Repartition into equal-thickness layers, conserving energy.
17     C *==========================================================*
18     C | This is the 2-layer version (formerly "NEW_LAYERS_WINTON")
19     C | from M. Winton 1999, JAOT, sea-ice model.
20     C *==========================================================*
21     C \ev
22    
23     C !USES:
24     IMPLICIT NONE
25    
26     C == Global variables ===
27     #include "THSICE_PARAMS.h"
28    
29     C !INPUT/OUTPUT PARAMETERS:
30     C == Routine Arguments ==
31     C qicen :: ice enthalpy (J m-3)
32     C hnew :: new ice layer thickness (m)
33     C hlyr :: individual ice layer thickness (m)
34     C myThid :: Number of this instance
35     _RL qicen(*)
36     _RL hnew(*)
37     _RL hlyr
38     INTEGER myThid
39     CEOP
40    
41     #ifdef ALLOW_THSICE
42     C == Local Variables ==
43     C f1 :: Fraction of upper layer ice in new layer
44     C qh1, qh2 :: qice*h for layers 1 and 2
45     C qhtot :: qh1 + qh2
46     C q2tmp :: Temporary value of qice for layer 2
47     _RL f1
48     _RL qh1, qh2
49     _RL qhtot
50     _RL q2tmp
51    
52     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
53    
54     if (hnew(1).gt.hnew(2)) then
55     C- Layer 1 gives ice to layer 2
56     f1 = (hnew(1)-hlyr)/hlyr
57     q2tmp = f1*qicen(1) + (1. _d 0-f1)*qicen(2)
58     if (q2tmp.gt.Lfresh) then
59     qicen(2) = q2tmp
60     else
61     C- Keep q2 fixed to avoid q2<Lfresh and T2>0
62     qh2 = hlyr*qicen(2)
63     qhtot = hnew(1)*qicen(1) + hnew(2)*qicen(2)
64     qh1 = qhtot - qh2
65     qicen(1) = qh1/hlyr
66     endif
67     else
68     C- Layer 2 gives ice to layer 1
69     f1 = hnew(1)/hlyr
70     qicen(1) = f1*qicen(1) + (1. _d 0-f1)*qicen(2)
71     endif
72    
73     #endif /* ALLOW_THSICE */
74    
75     RETURN
76     END

  ViewVC Help
Powered by ViewVC 1.1.22