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

Contents of /MITgcm/model/src/ini_psurf.F

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


Revision 1.8 - (show annotations) (download)
Tue Jul 6 00:54:07 2004 UTC (19 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint57g_pre, checkpoint57s_post, checkpoint58b_post, checkpoint57b_post, checkpoint57g_post, checkpoint56b_post, checkpoint57y_post, checkpoint54d_post, checkpoint54e_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint58, checkpoint55, checkpoint57, checkpoint56, checkpoint58f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58a_post, checkpoint57z_post, checkpoint54f_post, checkpoint55i_post, checkpoint58m_post, checkpoint57l_post, checkpoint57t_post, checkpoint55c_post, checkpoint57v_post, checkpoint57f_post, checkpoint57a_post, checkpoint57h_pre, checkpoint54b_post, checkpoint57h_post, checkpoint57y_pre, checkpoint55g_post, checkpoint57c_post, checkpoint55d_post, checkpoint58e_post, checkpoint55d_pre, checkpoint57c_pre, checkpoint55j_post, checkpoint54a_post, checkpoint55h_post, checkpoint57e_post, checkpoint55b_post, checkpoint55f_post, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, eckpoint57e_pre, checkpoint58k_post, checkpoint56a_post, checkpoint58l_post, checkpoint57h_done, checkpoint57j_post, checkpoint57f_pre, checkpoint58g_post, checkpoint58h_post, checkpoint56c_post, checkpoint58j_post, checkpoint57a_pre, checkpoint55a_post, checkpoint57o_post, checkpoint57k_post, checkpoint57w_post, checkpoint58i_post, checkpoint57x_post, checkpoint58c_post, checkpoint55e_post, checkpoint54c_post
Changes since 1.7: +10 -6 lines
re-write staggerTimeStep: change pickup file ;
 (flag usePickupBeforeC54 to start from old pickup)

1 C $Header: /u/gcmpack/MITgcm/model/src/ini_psurf.F,v 1.7 2003/10/30 12:00:41 edhill Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6
7 CBOP
8 C !ROUTINE: INI_PSURF
9 C !INTERFACE:
10 SUBROUTINE INI_PSURF( myThid )
11
12 C !DESCRIPTION: \bv
13 C *==========================================================*
14 C | SUBROUTINE INI_PSURF |
15 C | o Set model initial free-surface height/pressure. |
16 C *==========================================================*
17 C | There are several options for setting the initial |
18 C | surface displacement (r unit) field. |
19 C | 1. Inline code |
20 C | 2. Two-dimensional data from a file. |
21 C *==========================================================*
22 C \ev
23
24 C !USES:
25 IMPLICIT NONE
26 C === Global variables ===
27 #include "SIZE.h"
28 #include "EEPARAMS.h"
29 #include "PARAMS.h"
30 #include "GRID.h"
31 #include "DYNVARS.h"
32 #include "SURFACE.h"
33 #ifdef ALLOW_CD_CODE
34 #include "CD_CODE_VARS.h"
35 #endif
36
37 C !INPUT/OUTPUT PARAMETERS:
38 C == Routine arguments ==
39 C myThid - Number of this instance of INI_PSURF
40 INTEGER myThid
41
42 C !LOCAL VARIABLES:
43 C == Local variables ==
44 C bi,bj - Loop counters
45 C I,J
46 INTEGER bi, bj
47 INTEGER I, J
48 CEOP
49
50 C-- Initialise surface position anomaly to zero
51 DO bj = myByLo(myThid), myByHi(myThid)
52 DO bi = myBxLo(myThid), myBxHi(myThid)
53 DO J=1-Oly,sNy+Oly
54 DO I=1-Olx,sNx+Olx
55 etaN(I,J,bi,bj) = 0. _d 0
56 ENDDO
57 ENDDO
58 ENDDO
59 ENDDO
60 C Read an initial state
61 IF (pSurfInitFile .NE. ' ') THEN
62 _BEGIN_MASTER( myThid )
63 CALL READ_FLD_XY_RL( pSurfInitFile, ' ', etaN, 0, myThid )
64 _END_MASTER(myThid)
65 ENDIF
66 C
67 _EXCH_XY_R8(etaN, myThid)
68
69 #ifdef ALLOW_CD_CODE
70 C-- By default, initialize etaNm1 with etaN :
71 DO bj=myByLo(myThid),myByHi(myThid)
72 DO bi=myBxLo(myThid),myBxHi(myThid)
73 DO J=1-Oly,sNy+Oly
74 DO I=1-Olx,sNx+Olx
75 etaNm1(I,J,bi,bj) = etaN(I,J,bi,bj)
76 ENDDO
77 ENDDO
78 ENDDO
79 ENDDO
80
81 C _EXCH_XY_R8(etaNm1, myThid)
82 #endif
83
84 #ifdef EXACT_CONSERV
85 C-- By default, initialize etaH with etaN :
86 DO bj=myByLo(myThid),myByHi(myThid)
87 DO bi=myBxLo(myThid),myBxHi(myThid)
88 DO j=1-Oly,sNy+Oly
89 DO i=1-Olx,sNx+Olx
90 etaH(i,j,bi,bj) = etaN(i,j,bi,bj)
91 etaHnm1(i,j,bi,bj) = etaN(i,j,bi,bj)
92 dEtaHdt(i,j,bi,bj) = 0. _d 0
93 ENDDO
94 ENDDO
95 ENDDO
96 ENDDO
97 #endif /* EXACT_CONSERV */
98
99 RETURN
100 END

  ViewVC Help
Powered by ViewVC 1.1.22