47 real(dp),
intent(out) :: dxi, deta
49 integer(i4b) :: i, j, n
50 integer(i4b) :: ios, n_dummy
53 real(dp) :: h_ice, freeboard_ratio
56 character(len= 8) :: ch_imax
57 character(len=128) :: fmt4
59 write(ch_imax, fmt=
'(i8)') imax
60 write(fmt4, fmt=
'(a)')
'('//trim(adjustl(ch_imax))//
'(i1),i1)'
64 open(21, iostat=ios, &
65 file=inpath//
'/'//trim(ch_domain_short)//
'/'//zs_present_file, &
66 recl=8192, status=
'old')
68 if (ios /= 0) stop
' topography1: Error when opening the zs file!'
70 open(25, iostat=ios, &
71 file=inpath//
'/'//trim(ch_domain_short)//
'/'//zb_present_file, &
72 recl=8192, status=
'old')
74 if (ios /= 0) stop
' topography1: Error when opening the zb file!'
76 open(22, iostat=ios, &
77 file=inpath//
'/'//trim(ch_domain_short)//
'/'//zl_present_file, &
78 recl=8192, status=
'old')
80 if (ios /= 0) stop
' topography1: Error when opening the zl file!'
82 open(23, iostat=ios, &
83 file=inpath//
'/'//trim(ch_domain_short)//
'/'//zl0_file, &
84 recl=8192, status=
'old')
86 if (ios /= 0) stop
' topography1: Error when opening the zl0 file!'
88 open(24, iostat=ios, &
89 file=inpath//
'/'//trim(ch_domain_short)//
'/'//mask_present_file, &
90 recl=1024, status=
'old')
92 if (ios /= 0) stop
' topography1: Error when opening the mask file!'
94 do n=1, 6;
read(21, fmt=
'(a)') ch_dummy;
end do
95 do n=1, 6;
read(25, fmt=
'(a)') ch_dummy;
end do
96 do n=1, 6;
read(22, fmt=
'(a)') ch_dummy;
end do
97 do n=1, 6;
read(23, fmt=
'(a)') ch_dummy;
end do
98 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do
101 read(21, fmt=*) (zs(j,i), i=0,imax)
102 read(25, fmt=*) (zb(j,i), i=0,imax)
103 read(22, fmt=*) (zl(j,i), i=0,imax)
104 read(23, fmt=*) (zl0(j,i), i=0,imax)
105 read(24, fmt=trim(fmt4)) (maske(j,i), i=0,imax)
108 close(21, status=
'keep')
109 close(25, status=
'keep')
110 close(22, status=
'keep')
111 close(23, status=
'keep')
112 close(24, status=
'keep')
122 freeboard_ratio = (rho_sw-rho)/rho_sw
127 if (maske(j,i) <= 1 )
then
131 else if (maske(j,i) == 2 )
then
133 #if ( MARGIN==1 || MARGIN==2 )
141 else if (maske(j,i) == 3 )
then
143 #if ( MARGIN==1 || ( MARGIN==2 && MARINE_ICE_FORMATION==1 ) )
147 #elif ( MARGIN==2 && MARINE_ICE_FORMATION==2 )
149 h_ice = zs(j,i)-zb(j,i)
150 zs(j,i) = zl(j,i)+h_ice
153 h_ice = zs(j,i)-zb(j,i)
154 zs(j,i) = freeboard_ratio*h_ice
155 zb(j,i) = zs(j,i)-h_ice
160 xi(i) = xi0 +
real(i,dp)*dxi
161 eta(j) = eta0 +
real(j,dp)*deta
163 call
geo_coord(phi(j,i), lambda(j,i), xi(i), eta(j))
169 h_c(j,i) = zs(j,i)-zm(j,i)
172 dzs_dtau(j,i) = 0.0_dp
173 dzm_dtau(j,i) = 0.0_dp
174 dzb_dtau(j,i) = 0.0_dp
175 dzl_dtau(j,i) = 0.0_dp
176 dh_c_dtau(j,i) = 0.0_dp
177 dh_t_dtau(j,i) = 0.0_dp
196 area(j,i) = sq_g11_g(j,i)*sq_g22_g(j,i)*dxi*deta
subroutine topograd_2(dxi, deta, n_switch)
Calculation of topography gradients on the staggered grid and on the grid points (the latter by fourt...
subroutine topography1(dxi, deta)
Definition of the initial surface and bedrock topography (including gradients) and of the horizontal ...
Declarations of kind types for SICOPOLIS.
subroutine topograd_1(dxi, deta, n_switch)
Calculation of topography gradients on the staggered grid and on the grid points (the latter by secon...
Declarations of global variables for SICOPOLIS (for the ANT domain).
subroutine geo_coord(phi_val, lambda_val, x_val, y_val)
Computation of longitude lambda and latitude phi for position (x,y) in the numerical domain...
subroutine metric()
Definition of the components g11 and g22 of the metric tensor of the applied coordinates.
Declarations of global variables for SICOPOLIS.