1 | !> \file lect-anteis_mod.f90 |
---|
2 | !!Module pour la lecture de la topographie |
---|
3 | !< |
---|
4 | |
---|
5 | !> \namespace lect_topo_anteis |
---|
6 | !! Module pour la lecture de la topographie |
---|
7 | !! \author ... |
---|
8 | !! \date ... |
---|
9 | !! @note Used module |
---|
10 | !! @note - use module3D_phy |
---|
11 | !! @note - use param_phy_mod |
---|
12 | !< |
---|
13 | module lect_topo_anteis |
---|
14 | |
---|
15 | use module3D_phy |
---|
16 | |
---|
17 | character(len=80) :: filin |
---|
18 | real,dimension(nx,ny) :: xcc , ycc !< coordeonnes en m |
---|
19 | real, dimension(nx,ny,5) :: bidon !< pour l'appel a courbure |
---|
20 | contains |
---|
21 | |
---|
22 | subroutine input_topo |
---|
23 | |
---|
24 | !====================================== La reponse est 42 =========== |
---|
25 | write(num_rep_42,*) |
---|
26 | write(num_rep_42,*)' Fichiers en entree' |
---|
27 | write(num_rep_42,*)'----------------------' |
---|
28 | !==================================================================== |
---|
29 | |
---|
30 | ! lecture adaptee aux fichiers intercomparaison EISMINT |
---|
31 | nxx=nx |
---|
32 | nyy=ny |
---|
33 | ! socle |
---|
34 | ! filin=TRIM(DIRNAMEINP)//'bedelev-2000-40km.dat' |
---|
35 | filin='bedelev-2000-40km.dat' |
---|
36 | call lect_eis(nx,ny,BSOC,filin,DIRNAMEINP) |
---|
37 | write(num_rep_42,*) 'fichier BSOC (socle) : ', filin |
---|
38 | Bsoc0(:,:)=Bsoc(:,:) |
---|
39 | ! surface |
---|
40 | filin='surface-2000-40km.dat' |
---|
41 | call lect_eis(nx,ny,S,filin,DIRNAMEINP) |
---|
42 | write(num_rep_42,*) 'fichier surface : ', filin |
---|
43 | |
---|
44 | ! epaisseur |
---|
45 | filin='icethic-2000-40km.dat' |
---|
46 | call lect_eis(nx,ny,H,filin,DIRNAMEINP) |
---|
47 | write(num_rep_42,*) 'fichier epaisseur : ', filin |
---|
48 | H0(:,:)=H(:,:) |
---|
49 | |
---|
50 | !!$ ! coupure du shelf |
---|
51 | !!$ filin=TRIM(DIRNAMEINP)//'coupe.ijz' |
---|
52 | !!$ open(11,file=filin) |
---|
53 | !!$ ! distcent devient la condition de coupure |
---|
54 | !!$ do k=1,nx*ny |
---|
55 | !!$ read(11,*) i,j,distcent(i,j) |
---|
56 | !!$ end do |
---|
57 | !!$ close(11) |
---|
58 | !!$ write(num_rep_42,*) 'coupure du shelf (pas activé ?) : ', filin |
---|
59 | |
---|
60 | ! masque |
---|
61 | filin='maskHUY40km.dat' |
---|
62 | call lect_ieis(nx,ny,MK0,filin,DIRNAMEINP) |
---|
63 | write(num_rep_42,*) 'fichier masque : ', filin |
---|
64 | |
---|
65 | !!$ |
---|
66 | !!$ !------------------------------------------------------- juillet 2007 ---- |
---|
67 | !!$ ! corrections du socle pour favoriser les fleuves . A mettre aussi apres lect cptr |
---|
68 | !!$ |
---|
69 | !!$ filin=DIRNAMEINP//'corrections-bsoc.dat' |
---|
70 | !!$ |
---|
71 | !!$ write(num_rep_42,*) 'correction du socle dans',filin |
---|
72 | !!$ |
---|
73 | !!$ open(777,file=filin) |
---|
74 | !!$ read(777,*,end=778) |
---|
75 | !!$ read(777,*,end=778) |
---|
76 | !!$ do k=1,nx*ny |
---|
77 | !!$ read(777,*,end=778) i,j,bsoc(i,j) |
---|
78 | !!$ H(i,j)=S(i,j)-Bsoc(i,j) |
---|
79 | !!$ B(i,j)=S(i,j)-H(i,j) |
---|
80 | !!$ write(166,*) i,j,bsoc(i,j) |
---|
81 | !!$ end do |
---|
82 | !!$778 continue |
---|
83 | !!$ write(num_rep_42,*) k,'points corriges' |
---|
84 | !!$ close(777) |
---|
85 | !------------------------------------------------------------------------ |
---|
86 | |
---|
87 | |
---|
88 | ! enlever les epaisseurs fictives de Philippe |
---|
89 | do I=1,NX |
---|
90 | do J=1,NY |
---|
91 | ! attention les valeurs de masque de Philippe sont differentes |
---|
92 | if ((MK0(I,J).gt.1).and.(H(i,j).le.218.00)) then ! mer libre |
---|
93 | H(i,j)=1. |
---|
94 | S(I,J)=H(i,j)-(RO/ROW)*H(i,j) |
---|
95 | endif |
---|
96 | end do |
---|
97 | end do |
---|
98 | S0(:,:)=S(:,:) |
---|
99 | |
---|
100 | |
---|
101 | |
---|
102 | ! pour l'Antarctique masque mko vrai partout (version 2006) |
---|
103 | MK0(:,:)=1 |
---|
104 | |
---|
105 | ! determination des flot |
---|
106 | do J=1,NY |
---|
107 | do I=1,NX |
---|
108 | if ((BSOC(I,J)+H(I,J)*RO/ROW -SEALEVEL).LT.0.) then |
---|
109 | FLOT(I,J)=.TRUE. |
---|
110 | else |
---|
111 | FLOT(I,J)=.FALSE. |
---|
112 | endif |
---|
113 | enddo |
---|
114 | enddo |
---|
115 | |
---|
116 | |
---|
117 | ! calcul des courbures du socle |
---|
118 | |
---|
119 | call courbure(nx,ny,dx,Bsoc,bidon(:,:,1),bidon(:,:,2),bidon(:,:,3), & |
---|
120 | bidon(:,:,4),socle_cry,bidon(:,:,5)) |
---|
121 | |
---|
122 | socle_cry(:,:)=socle_cry(:,:)*dx*dx |
---|
123 | |
---|
124 | ! lecture des coordonnées geographiques |
---|
125 | |
---|
126 | filin=TRIM(DIRNAMEINP)//'coord-Ant-40km.dat' |
---|
127 | |
---|
128 | ! les coordonnees sont calculees en °dec avec GMT, |
---|
129 | ! les longitudes sont comprises entre -180 et +180 (negative a l'Ouest de |
---|
130 | ! Greenwich et positive a l'Est) |
---|
131 | open(unit=2004,file=filin,iostat=ios) |
---|
132 | do k=1,nx*ny |
---|
133 | read(2004,*) i,j,XCC(i,j),YCC(i,j),XLONG(i,j),YLAT(i,j) |
---|
134 | enddo |
---|
135 | close(2004) |
---|
136 | write(num_rep_42,*) 'fichier grille: ', filin |
---|
137 | |
---|
138 | xmin=xcc(1,1)/1000. |
---|
139 | ymin=ycc(1,1)/1000. |
---|
140 | xmax=xcc(nx,ny)/1000. |
---|
141 | ymax=ycc(nx,ny)/1000. |
---|
142 | |
---|
143 | ! lecture du fichier de reference pour le calcul du niveau des mers : etat actuel |
---|
144 | open(88,file=TRIM(DIRNAMEINP)//'grzone56-k000.pl') |
---|
145 | |
---|
146 | read(88,*) |
---|
147 | read(88,*) |
---|
148 | read(88,*) |
---|
149 | do j=1,ny |
---|
150 | do i=1,nx |
---|
151 | read(88,*) S_sealev(i,j),H_sealev(i,j),B_sealev(i,j),M_sealev(i,j) |
---|
152 | enddo |
---|
153 | enddo |
---|
154 | close(88) |
---|
155 | |
---|
156 | write(num_rep_42,*) 'fichier reference pour le niveau des mers : ', & |
---|
157 | TRIM(DIRNAMEINP)//'grzone56-k000.pl' |
---|
158 | |
---|
159 | ! lecture du flux geothermique de Shapiro |
---|
160 | open(88,file=TRIM(DIRNAMEINP)//'ijphi-40km-ant.dat') |
---|
161 | |
---|
162 | write(num_rep_42,*) 'flux geothermique Shapiro : ', TRIM(DIRNAMEINP)//'ijphi-40km-ant.dat' |
---|
163 | |
---|
164 | do k=1,nx*ny |
---|
165 | read(88,*) i,j,ghf(i,j) |
---|
166 | end do |
---|
167 | |
---|
168 | ! pour passer les flux des mW/m2 au J/m2/an |
---|
169 | ghf(:,:)=-SECYEAR/1000.*ghf(:,:) |
---|
170 | |
---|
171 | |
---|
172 | |
---|
173 | |
---|
174 | end subroutine input_topo |
---|
175 | |
---|
176 | |
---|
177 | end module lect_topo_anteis |
---|