1 | module lect_topo_hudson_shelf |
---|
2 | |
---|
3 | use module3D_phy |
---|
4 | use sedim_declar |
---|
5 | |
---|
6 | |
---|
7 | character(len=80) :: filin |
---|
8 | character(len=80) :: filin2 |
---|
9 | |
---|
10 | contains |
---|
11 | |
---|
12 | subroutine input_topo |
---|
13 | |
---|
14 | |
---|
15 | write(6,*)' Heino: entree dans routine input_topo' |
---|
16 | !====================================== La reponse est 42 =========== |
---|
17 | write(42,*) |
---|
18 | write(42,*)' Fichiers en entree' |
---|
19 | write(42,*)'----------------------' |
---|
20 | !==================================================================== |
---|
21 | |
---|
22 | nxx=nx |
---|
23 | nyy=ny |
---|
24 | print*,'nx,ny',nx,ny |
---|
25 | |
---|
26 | !jalv: nouvelle facon de determiner la topo: lecture du mask sediments |
---|
27 | ! et mask topographie independement. |
---|
28 | |
---|
29 | |
---|
30 | filin='mask-sedim-hudson.dat' |
---|
31 | |
---|
32 | filin2='topo-init-hudson.dat' |
---|
33 | |
---|
34 | filin = TRIM(DIRNAMEINP)//TRIM(filin) |
---|
35 | |
---|
36 | filin2 = TRIM(DIRNAMEINP)//TRIM(filin2) |
---|
37 | |
---|
38 | |
---|
39 | |
---|
40 | !............TOPOGRAPHIE....HUDSON................................... |
---|
41 | |
---|
42 | ! jalv: ouverture du masque topo : |
---|
43 | open(num_coupe,file=filin2) |
---|
44 | do i=1,6 |
---|
45 | read(num_coupe,*) ! 6 lignes de commentaires |
---|
46 | end do |
---|
47 | ! lecture proprement dite |
---|
48 | do j=ny, 1, -1 |
---|
49 | read(num_coupe,'(151i1)') (mk(i,j), i=1,nx) |
---|
50 | end do |
---|
51 | close(num_coupe) |
---|
52 | |
---|
53 | |
---|
54 | do j=1,NY |
---|
55 | do i=1,NX |
---|
56 | IF (MK(i,j).EQ.9) THEN ! Surface a 400 metres |
---|
57 | |
---|
58 | |
---|
59 | S(i,j)=400. |
---|
60 | S0(i,j)=400. |
---|
61 | BSOC(i,j)=400. |
---|
62 | B(i,j)=400. |
---|
63 | ENDIF |
---|
64 | |
---|
65 | |
---|
66 | IF (MK(i,j).EQ.8) THEN! Surface a 100 mettres |
---|
67 | S(i,j)=100. |
---|
68 | S0(i,j)=100. |
---|
69 | BSOC(i,j)=100. |
---|
70 | B(i,j)=100. |
---|
71 | ENDIF |
---|
72 | |
---|
73 | IF (MK(i,j).EQ.7) THEN! ocean peu profond (200 m) |
---|
74 | S(i,j)=0. |
---|
75 | S0(i,j)=0. |
---|
76 | BSOC(i,j)=-200. |
---|
77 | B(i,j)=0. |
---|
78 | ENDIF |
---|
79 | |
---|
80 | IF (MK(i,j).EQ.6) THEN! ocean interm (600 m) |
---|
81 | S(i,j)=0. |
---|
82 | S0(i,j)=0. |
---|
83 | BSOC(i,j)=-600. |
---|
84 | B(i,j)=0. |
---|
85 | ENDIF |
---|
86 | IF (MK(i,j).EQ.5) THEN! ocean (1200 m) |
---|
87 | S(i,j)=0. |
---|
88 | S0(i,j)=0. |
---|
89 | BSOC(i,j)=-1200. |
---|
90 | B(i,j)=0. |
---|
91 | ENDIF |
---|
92 | |
---|
93 | IF (MK(i,j).EQ.4) THEN! ocean (1700 m) |
---|
94 | S(i,j)=0. |
---|
95 | S0(i,j)=0. |
---|
96 | BSOC(i,j)=-1800. |
---|
97 | B(i,j)=0. |
---|
98 | ENDIF |
---|
99 | |
---|
100 | IF (MK(i,j).EQ.3) THEN! ocean (2200 m) |
---|
101 | S(i,j)=0. |
---|
102 | S0(i,j)=0. |
---|
103 | BSOC(i,j)=-2400. |
---|
104 | B(i,j)=0. |
---|
105 | ENDIF |
---|
106 | |
---|
107 | IF (MK(i,j).EQ.1) THEN! ocean tres profond (2800 m) |
---|
108 | S(i,j)=0. |
---|
109 | S0(i,j)=0. |
---|
110 | BSOC(i,j)=-2800. |
---|
111 | B(i,j)=0. |
---|
112 | ENDIF |
---|
113 | |
---|
114 | enddo |
---|
115 | enddo |
---|
116 | |
---|
117 | !......FINI.....TOPO............................................... |
---|
118 | |
---|
119 | |
---|
120 | |
---|
121 | !.............MASK...SEDIMENTS.................................... |
---|
122 | |
---|
123 | |
---|
124 | !jalv: ouverture du masque sediments : |
---|
125 | open(num_coupe,file=filin) |
---|
126 | do i=1,6 |
---|
127 | read(num_coupe,*) ! 6 lignes de commentaires |
---|
128 | end do |
---|
129 | ! lecture proprement dite |
---|
130 | do j=ny, 1, -1 |
---|
131 | read(num_coupe,'(151i1)') (mk(i,j), i=1,nx) |
---|
132 | end do |
---|
133 | close(num_coupe) |
---|
134 | |
---|
135 | ! initialisation du mask de sediment mksedim : |
---|
136 | mksedim(:,:)=mk(:,:) |
---|
137 | ! a la frontiere le demi noeud est sediment. |
---|
138 | ! calcul du masque sur les demi mailles : frontiere -> sedim |
---|
139 | mkxsedim(:,:)=max(mksedim(:,:),eoshift(mksedim(:,:),shift=-1,boundary=0,dim=1)) |
---|
140 | mkysedim(:,:)=max(mksedim(:,:),eoshift(mksedim(:,:),shift=-1,boundary=0,dim=2)) |
---|
141 | ! write(42,*) 'sur les bords zone sediment, masque exterieur ' |
---|
142 | |
---|
143 | |
---|
144 | where (mk(:,:)>1) mk(:,:)=0 ! le masque mk est terre (0) ou ocean (1) |
---|
145 | |
---|
146 | |
---|
147 | where (BSOC(:,:).le.0) mk(:,:)=1 ! jalv: pour qu'il voit l'ocean lors de l'initialisation |
---|
148 | |
---|
149 | |
---|
150 | |
---|
151 | !.................................................................. |
---|
152 | !.........FINI.....MASQUE....SEDIMENTS............................. |
---|
153 | |
---|
154 | |
---|
155 | |
---|
156 | ! masque mko vrai partout pour autoriser la presence de glace dans icethick |
---|
157 | ! Attention MK0 defini les points de grille ou on autrorise la presence de glace |
---|
158 | MK0(:,:)=0 |
---|
159 | do I=2,NX-1 |
---|
160 | do J=2,NY-1 |
---|
161 | mk0(I,J)=1 |
---|
162 | end do |
---|
163 | end do |
---|
164 | !call init_sliding |
---|
165 | |
---|
166 | xlong(:,:)=0. |
---|
167 | ylat(:,:)=0. |
---|
168 | |
---|
169 | xmin=0. |
---|
170 | ymin=0. |
---|
171 | xmax=(nx-1)*dx/1000. |
---|
172 | ymax=(ny-1)*dx/1000. |
---|
173 | |
---|
174 | !write(num_rep_42,*) 'domaine geographique en km, 0 en bas gauche',int(xmax),'x',int(ymax) |
---|
175 | write(42,*) 'domaine geographique en km : xmin : ',int(xmin),' ymin : ',int(ymin), & |
---|
176 | ' xmax : ',int(xmax),' ymax : ',int(ymax) |
---|
177 | |
---|
178 | ! flux geothermique 42 mW/m2 |
---|
179 | ghf(:,:)=42. |
---|
180 | |
---|
181 | write(42,*) 'flux geothermique uniforme (mW/m2) :',ghf(1,1) |
---|
182 | ghf(:,:)=-SECYEAR/1000.*ghf(:,:) |
---|
183 | |
---|
184 | |
---|
185 | |
---|
186 | end subroutine input_topo |
---|
187 | |
---|
188 | |
---|
189 | end module lect_topo_hudson_shelf |
---|