/[MITgcm]/MITgcm_contrib/shelfice_remeshing/DIG/code/ini_psurf.F
ViewVC logotype

Annotation of /MITgcm_contrib/shelfice_remeshing/DIG/code/ini_psurf.F

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


Revision 1.1 - (hide annotations) (download)
Fri Apr 1 10:19:37 2016 UTC (9 years, 3 months ago) by dgoldberg
Branch: MAIN
CVS Tags: HEAD
Added rough code to dig ice shelf to make continuous ocean

1 dgoldberg 1.1 C $Header: /u/gcmpack/MITgcm/model/src/ini_psurf.F,v 1.11 2009/06/14 21:45:12 jmc 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 :: tiles indices
45     C I,J :: Loop counters
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     c 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     c CALL READ_FLD_XY_RL( pSurfInitFile, ' ', etaN, 0, myThid )
63     C fill the overlap (+ BARRIER)
64     _EXCH_XY_RL(etaN, myThid)
65     ENDIF
66    
67     #ifdef ALLOW_CD_CODE
68     C-- By default, initialize etaNm1 with etaN :
69     DO bj=myByLo(myThid),myByHi(myThid)
70     DO bi=myBxLo(myThid),myBxHi(myThid)
71     DO J=1-Oly,sNy+Oly
72     DO I=1-Olx,sNx+Olx
73     etaNm1(I,J,bi,bj) = etaN(I,J,bi,bj)
74     ENDDO
75     ENDDO
76     ENDDO
77     ENDDO
78    
79     C _EXCH_XY_RL(etaNm1, myThid)
80     #endif
81    
82     #ifdef EXACT_CONSERV
83     C-- By default, initialize etaH with etaN :
84     DO bj=myByLo(myThid),myByHi(myThid)
85     DO bi=myBxLo(myThid),myBxHi(myThid)
86     DO j=1-Oly,sNy+Oly
87     DO i=1-Olx,sNx+Olx
88     etaH(i,j,bi,bj) = etaN(i,j,bi,bj)
89     etaHnm1(i,j,bi,bj) = etaN(i,j,bi,bj)
90     dEtaHdt(i,j,bi,bj) = 0. _d 0
91     ENDDO
92     ENDDO
93     ENDDO
94     ENDDO
95     #endif /* EXACT_CONSERV */
96    
97     RETURN
98     END

  ViewVC Help
Powered by ViewVC 1.1.22