/[MITgcm]/MITgcm_contrib/verification_other/shelfice_remeshing/code/shelfice_init_depths.F
ViewVC logotype

Contents of /MITgcm_contrib/verification_other/shelfice_remeshing/code/shelfice_init_depths.F

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


Revision 1.1 - (show annotations) (download)
Mon Apr 10 23:55:33 2017 UTC (8 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint66g, checkpoint67a, checkpoint67b, checkpoint67d, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, HEAD
import changes from main code:
- move setting of maskSHI from shelfice_update_masks.F to shelfice_init_fixed.F
- change S/R SHELFICE_UPDATE_MASKS to SHELFICE_INIT_DEPTHS to update ocean upper
  boundary position according to ice-shelf topography

1 C $Header: /u/gcmpack/MITgcm/pkg/shelfice/shelfice_update_masks.F,v 1.6 2014/09/11 19:20:38 jmc Exp $
2 C $Name: $
3
4 #include "SHELFICE_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: SHELFICE_INIT_DEPTHS
8 C !INTERFACE:
9 SUBROUTINE SHELFICE_INIT_DEPTHS(
10 U rLowC, rSurfC,
11 I myThid )
12 C !DESCRIPTION: \bv
13 C *==========================================================*
14 C | SUBROUTINE SHELFICE_INIT_DEPTHS
15 C | o Modify ocean upper boundary position according to
16 C | ice-shelf topography
17 C *==========================================================*
18 C \ev
19
20 C !USES:
21 IMPLICIT NONE
22 C === Global variables ===
23 #include "SIZE.h"
24 #include "EEPARAMS.h"
25 #include "PARAMS.h"
26 #ifdef ALLOW_SHELFICE
27 # include "SHELFICE.h"
28 #endif /* ALLOW_SHELFICE */
29
30 C !INPUT/OUTPUT PARAMETERS:
31 C == Routine arguments ==
32 C rLowC :: base of fluid column in r_unit at grid-cell center
33 C rSurfC :: surface reference position (r_unit) at grid-cell center
34 C myThid :: my Thread Id number
35 _RS rLowC (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
36 _RS rSurfC (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
37 INTEGER myThid
38
39 #ifdef ALLOW_SHELFICE
40 C !LOCAL VARIABLES:
41 C == Local variables ==
42 C bi, bj :: tile indices
43 C i, j :: Loop counters
44 INTEGER bi, bj
45 INTEGER i, j
46 CEOP
47
48 C-- Initialize R_shelfIce
49 DO bj = myByLo(myThid), myByHi(myThid)
50 DO bi = myBxLo(myThid), myBxHi(myThid)
51 DO j=1-OLy,sNy+OLy
52 DO i=1-OLx,sNx+OLx
53 R_shelfIce(i,j,bi,bj) = 0. _d 0
54 ENDDO
55 ENDDO
56 ENDDO
57 ENDDO
58
59 IF ( SHELFICEtopoFile .NE. ' ' ) THEN
60 _BARRIER
61 C- Read the shelfIce draught using the mid-level I/O pacakage read_write_rec
62 C The 0 is the "iteration" argument. The 1 is the record number.
63 CALL READ_REC_XY_RS( SHELFICEtopoFile, R_shelfIce,
64 & 1, 0, myThid )
65 C- Read the shelfIce draught using the mid-level I/O pacakage read_write_fld
66 C The 0 is the "iteration" argument. The ' ' is an empty suffix
67 C CALL READ_FLD_XY_RS( SHELFICEtopoFile, ' ', R_shelfIce,
68 C & 0, myThid )
69 C- end setup R_shelfIce in the interior
70 ENDIF
71
72 IF (shelficeMassStepping) THEN
73 IF ( .NOT. ( startTime .EQ. baseTime .AND. nIter0 .EQ. 0
74 & .AND. pickupSuff .EQ. ' ' ) ) THEN
75 CALL SHELFICE_READ_PICKUP ( myThid )
76 ENDIF
77 ENDIF
78
79 C- fill in the overlap (+ BARRIER):
80 _EXCH_XY_RS( R_shelfIce, myThid )
81
82 C-- Modify ocean upper boundary position according to ice-shelf topography
83 IF ( usingZCoords ) THEN
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 rSurfC(i,j,bi,bj) =
89 & MIN( rSurfC(i,j,bi,bj), R_shelfIce(i,j,bi,bj) )
90 ENDDO
91 ENDDO
92 ENDDO
93 ENDDO
94 ELSE
95 STOP 'SHELFICE_INIT_DEPTHS: Missing code for P-coords'
96 ENDIF
97
98 #endif /* ALLOW_SHELFICE */
99
100 RETURN
101 END

  ViewVC Help
Powered by ViewVC 1.1.22