[4] | 1 | module lect_topo_hemin40 |
---|
| 2 | |
---|
| 3 | use module3D_phy |
---|
| 4 | |
---|
[27] | 5 | character(len=50) :: FILE1 |
---|
[9] | 6 | character(len=50) :: FILE2 |
---|
[4] | 7 | character(len=80) :: filin |
---|
[9] | 8 | real, dimension(nx,ny,5) :: bidon ! pour l'appel a courbure |
---|
[4] | 9 | |
---|
| 10 | contains |
---|
| 11 | |
---|
| 12 | subroutine input_topo |
---|
| 13 | |
---|
[9] | 14 | namelist/topo_file/file1,file2 |
---|
| 15 | rewind(num_param) ! pour revenir au debut du fichier param_list.dat |
---|
| 16 | read(num_param,topo_file) |
---|
| 17 | ! formats pour les ecritures dans 42 |
---|
| 18 | 428 format(A) |
---|
| 19 | write(num_rep_42,428)'!___________________________________________________________' |
---|
| 20 | write(num_rep_42,428) '&topo_file ! nom du bloc ' |
---|
| 21 | write(num_rep_42,*) |
---|
| 22 | write(num_rep_42,*) 'file1 = ', file1 |
---|
| 23 | write(num_rep_42,*) 'file2 = ', file2 |
---|
| 24 | write(num_rep_42,*)'/' |
---|
| 25 | write(num_rep_42,428) '! file1 : topo de depart' |
---|
| 26 | write(num_rep_42,428) '! file2 : topo de reference' |
---|
| 27 | write(num_rep_42,*) |
---|
| 28 | |
---|
[4] | 29 | !====================================== La reponse est 42 =========== |
---|
[9] | 30 | ! write(42,*) |
---|
| 31 | ! write(42,*)' Fichiers en entree' |
---|
| 32 | ! write(42,*)'----------------------' |
---|
[4] | 33 | !==================================================================== |
---|
| 34 | |
---|
[9] | 35 | ! dans param : |
---|
| 36 | ! file1=TRIM(DIRNAMEINP)//'topo-21k.g40' ! topo LGM ICE_5G (1=topo de depart) |
---|
[4] | 37 | ! file1=TRIM(DIRNAMEINP)//'hemin2.g40' |
---|
[9] | 38 | ! file2=TRIM(DIRNAMEINP)//'hemin2.g40' ! topo actuelle |
---|
| 39 | ! write(42,*) 'topo de depart', file1 |
---|
| 40 | ! write(42,*) 'topo reference', file2 |
---|
[4] | 41 | |
---|
| 42 | |
---|
| 43 | ! lecture adaptee aux fichiers intercomparaison EISMINT |
---|
| 44 | nxx=nx |
---|
| 45 | nyy=ny |
---|
| 46 | |
---|
| 47 | ! lecture de la topo actuelle |
---|
| 48 | ! --------------------------- |
---|
[9] | 49 | open (20,file=TRIM(DIRNAMEINP)//file2,status='old') |
---|
[4] | 50 | |
---|
| 51 | read(20,'(A80)') TITRE |
---|
| 52 | read(20,*) NI,NJ,NXX,NYY,STEP |
---|
| 53 | read(20,*) |
---|
| 54 | do J=1,ny |
---|
| 55 | do I=1,nx |
---|
[9] | 56 | read (20,*) S0(I,J),H0(I,J),BSOC0(I,J) |
---|
[4] | 57 | S0(i,j)=max(S0(i,j),0.) |
---|
| 58 | end do |
---|
| 59 | end do |
---|
| 60 | close(20) |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | ! lecture de la topo de depart |
---|
| 64 | ! --------------------------- |
---|
[9] | 65 | open (20,file=TRIM(DIRNAMEINP)//file1,status='old') |
---|
[4] | 66 | ! open (20,file='../INPUT-DATA/hemin.g50') |
---|
| 67 | read(20,'(A80)') TITRE |
---|
| 68 | read(20,*) NI,NJ,NXX,NYY,STEP |
---|
| 69 | read(20,*) |
---|
| 70 | do J=1,ny |
---|
| 71 | do I=1,nx |
---|
| 72 | read (20,*) S(I,J),H(I,J),BSOC(I,J) |
---|
| 73 | end do |
---|
| 74 | end do |
---|
| 75 | close(20) |
---|
[9] | 76 | |
---|
| 77 | ! calcul des courbures du socle |
---|
| 78 | |
---|
| 79 | call courbure(nx,ny,dx,Bsoc,bidon(:,:,1),bidon(:,:,2),bidon(:,:,3), & |
---|
| 80 | bidon(:,:,4),socle_cry,bidon(:,:,5)) |
---|
| 81 | socle_cry(:,:)=socle_cry(:,:)*dx*dx |
---|
| 82 | |
---|
[4] | 83 | ! lecture des coordonnées geographiques |
---|
| 84 | |
---|
| 85 | filin=TRIM(DIRNAMEINP)//'coord-nord-40km.dat' |
---|
| 86 | |
---|
| 87 | ! les coordonnees sont calculees en °dec avec GMT, |
---|
| 88 | ! les longitudes sont comprises entre -180 et +180 (negative a l'Ouest de |
---|
| 89 | ! Greenwich et positive a l'Est) |
---|
[9] | 90 | open(unit=2004,file=filin,iostat=ios) |
---|
| 91 | do k=1,nx*ny |
---|
| 92 | read(2004,*) i,j,XCC(i,j),YCC(i,j),XLONG(i,j),YLAT(i,j) |
---|
| 93 | enddo |
---|
| 94 | close(2004) |
---|
| 95 | write(42,*) 'fichier grille: ', filin |
---|
[4] | 96 | |
---|
[9] | 97 | xmin=xcc(1,1)/1000. |
---|
| 98 | ymin=ycc(1,1)/1000. |
---|
| 99 | xmax=xcc(nx,ny)/1000. |
---|
| 100 | ymax=ycc(nx,ny)/1000. |
---|
| 101 | |
---|
[4] | 102 | ! lecture du flux geothermique de Shapiro |
---|
[9] | 103 | open(88,file=TRIM(DIRNAMEINP)//'ijphi_hemin40.dat') |
---|
[4] | 104 | |
---|
[9] | 105 | write(42,*) 'flux geothermique Shapiro : ',TRIM(DIRNAMEINP)//'ijphi_hemin40.dat' |
---|
[4] | 106 | |
---|
[9] | 107 | do k=1,nx*ny |
---|
| 108 | read(88,*) i,j,ghf(i,j) |
---|
[4] | 109 | ! print*, i,j,ghf(i,j) |
---|
[9] | 110 | end do |
---|
| 111 | close(88) |
---|
[4] | 112 | ! pour passer les flux des mW/m2 au J/m2/an |
---|
[9] | 113 | ghf(:,:)=-SECYEAR/1000.*ghf(:,:) |
---|
[4] | 114 | ! write(42,*) 'flux geothermique fixe : 55 mW/m2' |
---|
| 115 | ! ghf(:,:)=-SECYEAR/1000.*55. !B6norcg2 |
---|
| 116 | |
---|
[9] | 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) |
---|
[4] | 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 |
---|