/[MITgcm]/MITgcm/model/src/update_etah.F
ViewVC logotype

Annotation of /MITgcm/model/src/update_etah.F

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


Revision 1.8 - (hide annotations) (download)
Wed Dec 7 23:57:00 2005 UTC (18 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58b_post, checkpoint57y_post, checkpoint59, checkpoint58, checkpoint58f_post, checkpoint58d_post, checkpoint58a_post, checkpoint57z_post, checkpoint58y_post, checkpoint58t_post, checkpoint58m_post, checkpoint60, checkpoint61, checkpoint58w_post, checkpoint57y_pre, checkpoint58o_post, checkpoint58p_post, checkpoint58q_post, checkpoint58e_post, mitgcm_mapl_00, checkpoint58r_post, checkpoint58n_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint58k_post, checkpoint58v_post, checkpoint58l_post, checkpoint61f, checkpoint58g_post, checkpoint58x_post, checkpoint59j, checkpoint58h_post, checkpoint58j_post, checkpoint61e, checkpoint58i_post, checkpoint58c_post, checkpoint58u_post, checkpoint58s_post, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61l, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i
Changes since 1.7: +5 -6 lines
always reset wVel & eta (to zero or prescribe it) at the OBs.

1 jmc 1.8 C $Header: /u/gcmpack/MITgcm/model/src/update_etah.F,v 1.7 2005/11/04 01:19:24 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4 edhill 1.3 #include "PACKAGES_CONFIG.h"
5 jmc 1.1 #include "CPP_OPTIONS.h"
6    
7     CBOP
8     C !ROUTINE: UPDATE_ETAH
9     C !INTERFACE:
10     SUBROUTINE UPDATE_ETAH( myTime, myIter, myThid )
11     C !DESCRIPTION: \bv
12     C *==========================================================*
13     C | SUBROUTINE UPDATE_ETAH
14     C | o Update etaH at the begining of the time step.
15     C | (required with NLFS to derive surface layer thickness)
16     C *==========================================================*
17     C \ev
18    
19     C !USES:
20     IMPLICIT NONE
21     C == Global variables
22     #include "SIZE.h"
23     #include "EEPARAMS.h"
24     #include "PARAMS.h"
25     #include "DYNVARS.h"
26     #include "GRID.h"
27     #include "SURFACE.h"
28     #include "FFIELDS.h"
29    
30     C !INPUT/OUTPUT PARAMETERS:
31     C == Routine arguments ==
32     C myTime :: Current time in simulation
33     C myIter :: Current iteration number in simulation
34     C myThid :: Thread number for this instance of the routine.
35     _RL myTime
36     INTEGER myIter
37     INTEGER myThid
38    
39     C !LOCAL VARIABLES:
40     #ifdef EXACT_CONSERV
41     C Local variables in common block
42    
43     C Local variables
44 jmc 1.7 C i,j,bi,bj :: Loop counters
45     INTEGER i,j,bi,bj
46 jmc 1.1 CEOP
47    
48    
49     DO bj=myByLo(myThid),myByHi(myThid)
50     DO bi=myBxLo(myThid),myBxHi(myThid)
51    
52     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
53    
54 jmc 1.5 C-- before updating etaH, save current etaH field in etaHnm1
55     DO j=1-Oly,sNy+Oly
56     DO i=1-Olx,sNx+Olx
57     etaHnm1(i,j,bi,bj) = etaH(i,j,bi,bj)
58     ENDDO
59     ENDDO
60    
61     C-- Update etaH at the end of the time step :
62 jmc 1.1 C Incorporate the Explicit part of -Divergence(Barotropic_Flow)
63    
64 jmc 1.5 IF (implicDiv2Dflow.EQ. 1. _d 0) THEN
65     DO j=1-Oly,sNy+Oly
66     DO i=1-Olx,sNx+Olx
67     etaH(i,j,bi,bj) = etaN(i,j,bi,bj)
68     ENDDO
69 jmc 1.1 ENDDO
70    
71 jmc 1.5 ELSE
72     DO j=1,sNy
73     DO i=1,sNx
74     etaH(i,j,bi,bj) = etaN(i,j,bi,bj)
75     & + (1. - implicDiv2Dflow)*dEtaHdt(i,j,bi,bj)
76     & *deltaTfreesurf
77     ENDDO
78 jmc 1.1 ENDDO
79 jmc 1.5 ENDIF
80 jmc 1.1
81     #ifdef ALLOW_OBCS
82 jmc 1.8 C- note (with Non-Lin Free-Surface):
83     C 1) needs to apply OBC to etaH since viscous terms depend on hFacZ.
84 jmc 1.1 C that is not only function of boundaries hFac values.
85     C 2) has to be done before calc_surf_dr; but since obcs_calc is
86     C called later, hFacZ will lag 1 time step behind OBC update.
87     C 3) avoid also unrealistic value of etaH in OB regions that
88     C might produce many "WARNING" message from calc_surf_dr.
89     C-------
90 jmc 1.8 C-- Apply OBC to etaH if NonLin-FreeSurf, reset to zero otherwise:
91     IF ( useOBCS ) CALL OBCS_APPLY_ETA( bi, bj, etaH, myThid )
92 jmc 1.1 #endif /* ALLOW_OBCS */
93    
94     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
95    
96     C- end bi,bj loop.
97     ENDDO
98     ENDDO
99    
100     IF (implicDiv2Dflow .NE. 1. _d 0 .OR. useOBCS )
101 jmc 1.5 & _EXCH_XY_RL( etaH, myThid )
102 jmc 1.1
103 jmc 1.6 c IF (useRealFreshWaterFlux .AND. myTime.EQ.startTime)
104     c & _EXCH_XY_R4( PmEpR, myThid )
105 jmc 1.2
106 jmc 1.4 #endif /* EXACT_CONSERV */
107 jmc 1.1
108     RETURN
109     END

  ViewVC Help
Powered by ViewVC 1.1.22