1 | !> \file lect-hemin40_mod.f90 |
---|
2 | !! Module de lecture de la topography a 40 km |
---|
3 | !< |
---|
4 | |
---|
5 | !> \namespace dragging_calc_beta |
---|
6 | !! Module de lecture de la topography a 40 km |
---|
7 | !! \author ... |
---|
8 | !! \date ... |
---|
9 | !! @note Used module |
---|
10 | !! @note - use module3D_phy |
---|
11 | !< |
---|
12 | |
---|
13 | module lect_topo_hemin40 |
---|
14 | |
---|
15 | use module3D_phy |
---|
16 | |
---|
17 | character(len=35) :: FILE1 ! CHARACTER(LEN=30) :: FILE1, FILE2, FILE3 |
---|
18 | character(len=35) :: FILE2 |
---|
19 | character(len=80) :: filin |
---|
20 | real,dimension(nx,ny) :: xcc , ycc !< coordeonnes en m |
---|
21 | real, dimension(nx,ny,5) :: bidon !< pour l'appel a courbure |
---|
22 | |
---|
23 | contains |
---|
24 | |
---|
25 | subroutine input_topo |
---|
26 | |
---|
27 | !====================================== La reponse est 42 =========== |
---|
28 | write(42,*) |
---|
29 | write(42,*)' Fichiers en entree' |
---|
30 | write(42,*)'----------------------' |
---|
31 | !==================================================================== |
---|
32 | |
---|
33 | |
---|
34 | file1=TRIM(DIRNAMEINP)//'topo-21k.g40' ! topo LGM ICE_5G (1=topo de depart) |
---|
35 | ! file1=TRIM(DIRNAMEINP)//'hemin2.g40' |
---|
36 | file2=TRIM(DIRNAMEINP)//'hemin2.g40' ! topo actuelle |
---|
37 | write(42,*) 'topo de depart', file1 |
---|
38 | write(42,*) 'topo reference', file2 |
---|
39 | |
---|
40 | |
---|
41 | ! lecture adaptee aux fichiers intercomparaison EISMINT |
---|
42 | nxx=nx |
---|
43 | nyy=ny |
---|
44 | |
---|
45 | ! lecture de la topo actuelle |
---|
46 | ! --------------------------- |
---|
47 | open (20,file=file2) |
---|
48 | |
---|
49 | read(20,'(A80)') TITRE |
---|
50 | read(20,*) NI,NJ,NXX,NYY,STEP |
---|
51 | read(20,*) |
---|
52 | do J=1,ny |
---|
53 | do I=1,nx |
---|
54 | read (20,*) S0(I,J),H0(I,J),Bsoc0(I,J) |
---|
55 | S0(i,j)=max(S0(i,j),0.) |
---|
56 | end do |
---|
57 | end do |
---|
58 | close(20) |
---|
59 | |
---|
60 | |
---|
61 | ! lecture de la topo de depart |
---|
62 | ! --------------------------- |
---|
63 | open (20,file=file1) |
---|
64 | ! open (20,file='../INPUT-DATA/hemin.g50') |
---|
65 | read(20,'(A80)') TITRE |
---|
66 | read(20,*) NI,NJ,NXX,NYY,STEP |
---|
67 | read(20,*) |
---|
68 | do J=1,ny |
---|
69 | do I=1,nx |
---|
70 | read (20,*) S(I,J),H(I,J),BSOC(I,J) |
---|
71 | end do |
---|
72 | end do |
---|
73 | close(20) |
---|
74 | |
---|
75 | ! lecture des coordonnées geographiques |
---|
76 | |
---|
77 | filin=TRIM(DIRNAMEINP)//'coord-nord-40km.dat' |
---|
78 | |
---|
79 | ! les coordonnees sont calculees en °dec avec GMT, |
---|
80 | ! les longitudes sont comprises entre -180 et +180 (negative a l'Ouest de |
---|
81 | ! Greenwich et positive a l'Est) |
---|
82 | open(unit=2004,file=filin,iostat=ios) |
---|
83 | do k=1,nx*ny |
---|
84 | read(2004,*) i,j,XCC(i,j),YCC(i,j),XLONG(i,j),YLAT(i,j) |
---|
85 | enddo |
---|
86 | close(2004) |
---|
87 | write(42,*) 'fichier grille: ', filin |
---|
88 | |
---|
89 | xmin=xcc(1,1)/1000. |
---|
90 | ymin=ycc(1,1)/1000. |
---|
91 | xmax=xcc(nx,ny)/1000. |
---|
92 | ymax=ycc(nx,ny)/1000. |
---|
93 | |
---|
94 | ! appel a la routine de calcul de courbure |
---|
95 | call courbure(nx,ny,dx,Bsoc,bidon(:,:,1),bidon(:,:,2),bidon(:,:,3), & |
---|
96 | bidon(:,:,4),socle_cry,bidon(:,:,5)) |
---|
97 | |
---|
98 | socle_cry(:,:)=socle_cry(:,:)*dx*dx |
---|
99 | |
---|
100 | |
---|
101 | |
---|
102 | ! lecture du flux geothermique de Shapiro |
---|
103 | open(88,file=TRIM(DIRNAMEINP)//'ijphi_hemin40.dat') |
---|
104 | |
---|
105 | write(42,*) 'flux geothermique Shapiro : ',TRIM(DIRNAMEINP)//'ijphi_hemin40.dat' |
---|
106 | |
---|
107 | do k=1,nx*ny |
---|
108 | read(88,*) i,j,ghf(i,j) |
---|
109 | ! print*, i,j,ghf(i,j) |
---|
110 | end do |
---|
111 | close(88) |
---|
112 | ! pour passer les flux des mW/m2 au J/m2/an |
---|
113 | ghf(:,:)=-SECYEAR/1000.*ghf(:,:) |
---|
114 | ! write(42,*) 'flux geothermique fixe : 55 mW/m2' |
---|
115 | ! ghf(:,:)=-SECYEAR/1000.*55. !B6norcg2 |
---|
116 | |
---|
117 | print*,'lect topo' |
---|
118 | print*,'shb',S(101,91),H(101,91),B(101,91) |
---|
119 | print*,'shb0',S0(101,91),H0(101,91),Bsoc0(101,91) |
---|
120 | ! Initialisation du Masque |
---|
121 | !------------------------------------------------ |
---|
122 | ! pour l'Hemisphere Nord mko vrai partout (version 2006) |
---|
123 | MK0(:,:)=1 |
---|
124 | |
---|
125 | !------------------------------------------------ |
---|
126 | end subroutine input_topo |
---|
127 | |
---|
128 | end module lect_topo_hemin40 |
---|