- Timestamp:
- 02/09/24 17:10:59 (4 months ago)
- Location:
- branches/GRISLIv3/SOURCES
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GRISLIv3/SOURCES/Alps_files/lect-alps_mod.f90
r474 r484 1 1 module lect_topo_alps 2 2 3 use module3D_phy 4 use interface_input 5 use io_netcdf_grisli 3 implicit none 6 4 7 implicit none 8 5 contains 6 7 subroutine input_topo 8 9 use module3D_phy,only: num_rep_42,num_param,mk0,H0,Bsoc0,S0,H,Bsoc,S,xcc,ycc,xlong,ylat, & 10 ghf,secyear 11 use runparam, only: xmin,xmax,ymin,ymax 12 use geography, only: nx,ny,dirnameinp 13 use interface_input,only: lect_input 14 9 15 character(len=100) :: topo_dep ! Topo de départ 10 16 character(len=100) :: topo_ref ! Topo de référence … … 14 20 character(len=100) :: file_ncdf !< fichier netcdf issue des fichiers .dat 15 21 16 contains17 18 subroutine input_topo19 20 22 integer :: ios 21 23 real, dimension(nx,ny) :: varloc 24 25 integer :: i,j,k 22 26 23 27 namelist/topo_file/topo_ref,topo_dep,grid_topo !,ghf_fich -
branches/GRISLIv3/SOURCES/Alps_files/output_alps_mod.f90
r465 r484 13 13 module output_alps_mod 14 14 15 USE module3D_phy 15 use module3D_phy,only: xlong,ylat,b,s,acc,h,t,tbdot,ux,uy,uzk,uzsdot, & 16 hdot,bdot,num_ritz,tafor,sealevel,ts 17 use geography, only: nx,ny,nz,geoplace,dirnameinp 18 use runparam, only: dirnameout,runname 16 19 use bilan_eau_mod 17 20 use netcdf … … 19 22 use bilan_flux_mod 20 23 24 21 25 implicit none 22 26 23 !real :: vol ; !integer :: np 27 real :: vol 24 28 integer :: nflot !< nbr de point flottant 25 29 real :: bmean !< … … 76 80 character(len=100),dimension(nvar) :: units 77 81 82 integer :: k 78 83 79 84 … … 151 156 ! 1_initialization 152 157 !------------------ 153 real :: smax 154 integer :: np 158 real :: smax,hmax,hmean 159 integer :: np,i,j,k 160 155 161 156 162 vol=0. -
branches/GRISLIv3/SOURCES/Ant40_files/lect-anteis_mod.f90
r474 r484 11 11 !! @note - use param_phy_mod 12 12 !< 13 module lect_topo_anteis 14 15 use module3D_phy, only: num_rep_42,num_param,bsoc0,mk0,s0,h0,bsoc,s,h,flot,ghf,sealevel_2d, & 16 xcc,ycc,xlong,ylat,secyear 17 use runparam, only: xmin,ymin,xmax,ymax 18 use geography, only: nx,ny,dirnameinp 19 use param_phy_mod, only: ro,row 20 use interface_input 21 use io_netcdf_grisli 13 module lect_topo_anteis 22 14 23 15 implicit none 24 25 character(len=100) :: topo_dep ! Topo de départ26 character(len=100) :: topo_ref ! Topo de référence27 character(len=100) :: grid_topo ! fichier grille28 character(len=100) :: ghf_fich ! fichier grille29 character(len=100) :: filin30 character(len=100) :: file_ncdf !< fichier netcdf issue des fichiers .dat31 32 ! character(len=100) :: file133 ! character(len=100) :: file234 35 ! afq 8/1/19: real :: sealevel036 16 37 17 contains 38 18 39 19 subroutine input_topo 20 21 use module3D_phy, only: num_rep_42,num_param,bsoc0,mk0,s0,h0,bsoc,s,h,flot,ghf,sealevel_2d, & 22 xcc,ycc,xlong,ylat,secyear 23 use runparam, only: xmin,ymin,xmax,ymax 24 use geography, only: nx,ny,dirnameinp 25 use param_phy_mod, only: ro,row 26 use io_netcdf_grisli, only: read_ncdf_var 27 28 character(len=100) :: topo_dep ! Topo de départ 29 character(len=100) :: topo_ref ! Topo de référence 30 character(len=100) :: grid_topo ! fichier grille 31 character(len=100) :: ghf_fich ! fichier grille 32 character(len=100) :: filin 33 character(len=100) :: file_ncdf !< fichier netcdf issue des fichiers .dat 40 34 41 35 integer :: i,j,k … … 76 70 H0(:,:) = tab(:,:) 77 71 78 ! where (S0(:,:).GT.0) 79 ! H0(:,:)=S0(:,:)-BSOC0(:,:) 80 ! elsewhere 81 ! H0(:,:)=1. 82 ! endwhere 72 where (BSOC(:,:).LT.-9999.) 73 BSOC(:,:)=-9999. 74 endwhere 83 75 76 mk0(:,:) = 1 ! mk0=0 pour les zones interdites 84 77 85 where (BSOC(:,:).LT.-9999.) 86 BSOC(:,:)=-9999. 87 endwhere 88 89 ! afq 8/1/19: sealevel0=0. ! voir a passer dans le fichier parametre 90 ! afq 8/1/19: S0(:,:)=max(S0(:,:),sealevel0) ! pour etre au niveau des mers : ATTENTION si SEALEV <0 91 mk0(:,:) = 1 ! mk0=0 pour les zones interdites 92 93 ! lecture de la topo de depart 94 ! --------------------------- 95 ! lecture pour eviter plantage avec compile -O0 78 ! lecture de la topo de depart 79 ! --------------------------- 80 ! lecture pour eviter plantage avec compile -O0 96 81 call Read_Ncdf_var('Bsoc',topo_dep,tab) 97 82 Bsoc(:,:) = tab(:,:) … … 101 86 H(:,:) = tab(:,:) 102 87 103 ! where (S(:,:).GT.0) 104 ! H(:,:)=S(:,:)-BSOC(:,:) 105 ! elsewhere 106 ! H(:,:)=1. 107 ! endwhere 108 ! afq 8/1/19: S(:,:)=max(S(:,:),0.) ! pour etre au niveau des mers : ATTENTION si SEALEV <0 109 H(:,:)=max(H(:,:),0.) ! pas d epaisseurs negatives 88 H(:,:)=max(H(:,:),0.) ! pas d epaisseurs negatives 110 89 111 ! S0(:,:)=S(:,:) 90 ! pour l'Antarctique masque mko vrai partout (version 2006) 91 MK0(:,:)=1 112 92 113 ! pour l'Antarctique masque mko vrai partout (version 2006) 114 MK0(:,:)=1 93 ! determination des flot 94 do J=1,NY 95 do I=1,NX 96 if ((BSOC(I,J)+H(I,J)*RO/ROW -sealevel_2d(i,j)).LT.0.) then 97 FLOT(I,J)=.TRUE. 98 else 99 FLOT(I,J)=.FALSE. 100 endif 101 enddo 102 enddo 115 103 116 ! determination des flot 117 do J=1,NY 118 do I=1,NX 119 if ((BSOC(I,J)+H(I,J)*RO/ROW -sealevel_2d(i,j)).LT.0.) then 120 FLOT(I,J)=.TRUE. 121 else 122 FLOT(I,J)=.FALSE. 123 endif 124 enddo 125 enddo 104 ! les coordonnees sont calculees en °dec avec GMT, 105 ! les longitudes sont comprises entre -180 et +180 (negative a l'Ouest de 106 ! Greenwich et positive a l'Est) 107 open(unit=2004,file=grid_topo,iostat=ios) 108 do k=1,nx*ny 109 read(2004,*) i,j,xcc(i,j),ycc(i,j),Xlong(i,j),Ylat(i,j) 110 enddo 111 close(2004) 126 112 127 ! les coordonnees sont calculees en °dec avec GMT, 128 ! les longitudes sont comprises entre -180 et +180 (negative a l'Ouest de 129 ! Greenwich et positive a l'Est) 130 open(unit=2004,file=grid_topo,iostat=ios) 131 do k=1,nx*ny 132 read(2004,*) i,j,xcc(i,j),ycc(i,j),Xlong(i,j),Ylat(i,j) 133 enddo 134 close(2004) 113 xmin=xcc(1,1)/1000. 114 ymin=ycc(1,1)/1000. 115 xmax=xcc(nx,ny)/1000. 116 ymax=ycc(nx,ny)/1000. 135 117 136 xmin=xcc(1,1)/1000. 137 ymin=ycc(1,1)/1000. 138 xmax=xcc(nx,ny)/1000. 139 ymax=ycc(nx,ny)/1000. 118 ! lecture du flux geothermique de Shapiro 119 open(88,file=ghf_fich) 140 120 141 ! lecture du flux geothermique de Shapiro 142 open(88,file=ghf_fich) 121 ! pour eviter plantage -O0 122 call Read_Ncdf_var('ghf',ghf_fich,tab) 123 ghf(:,:) = tab(:,:) 143 124 144 ! pour eviter plantage -O0 145 call Read_Ncdf_var('ghf',ghf_fich,tab) 146 ghf(:,:) = tab(:,:) 147 148 ! pour passer les flux des mW/m2 au J/m2/an 149 ghf(:,:)=-SECYEAR/1000.*ghf(:,:) 125 ! pour passer les flux des mW/m2 au J/m2/an 126 ghf(:,:)=-SECYEAR/1000.*ghf(:,:) 150 127 151 128 !------------------------------------------------ 152 129 ! mko vrai partout (version 2006) 153 MK0(:,:)=1130 MK0(:,:)=1 154 131 155 132 !------------------------------------------------ -
branches/GRISLIv3/SOURCES/Fichiers-parametres/Makefile.tof-lsce3130.inc
r481 r484 23 23 24 24 # mettre debug à 1 pour compiler avec options strictes 25 debug ?= 125 debug ?= 0 26 26 27 27 # compilation avec ifort : -
branches/GRISLIv3/SOURCES/Hemin40_files/lect-hemin40_mod.f90
r474 r484 1 1 module lect_topo_hemin40 2 3 use module3D_phy4 use runparam, only: xmin,xmax,ymin,ymax5 use geography, only: dirnameinp6 use interface_input7 use io_netcdf_grisli8 2 9 3 implicit none … … 19 13 20 14 subroutine input_topo 15 16 use module3D_phy,only: num_rep_42,num_param,mk0,H0,Bsoc0,S0,H,Bsoc,S,xcc,ycc,xlong,ylat, & 17 ghf,secyear 18 use runparam, only: xmin,xmax,ymin,ymax 19 use geography, only: dirnameinp,nx,ny 20 use interface_input, only: lect_input 21 21 22 22 integer :: i,j,k,ios … … 44 44 topo_dep=trim(dirnameinp)//trim(topo_dep) 45 45 grid_topo=trim(dirnameinp)//trim(grid_topo) 46 ghf_fich=trim(dirnameinp)//trim(ghf_fich) 47 48 !write(num_rep_42,*) 'file1 = ', file1 49 !write(num_rep_42,*) 'file2 = ', file2 50 !write(num_rep_42,*)'/' 51 !write(num_rep_42,428) '! file1 : topo de depart' 52 !write(num_rep_42,428) '! file2 : topo de reference' 53 !write(num_rep_42,*) 54 55 !====================================== La reponse est 42 =========== 56 ! write(42,*) 57 ! write(42,*)' Fichiers en entree' 58 ! write(42,*)'----------------------' 59 !==================================================================== 60 61 ! dans param : 62 ! file1=TRIM(DIRNAMEINP)//'topo-21k.g40' ! topo LGM ICE_5G (1=topo de depart) 63 ! file1=TRIM(DIRNAMEINP)//'hemin2.g40' 64 ! file2=TRIM(DIRNAMEINP)//'hemin2.g40' ! topo actuelle 65 ! write(42,*) 'topo de depart', file1 66 ! write(42,*) 'topo reference', file2 67 68 69 !!$! lecture adaptee aux fichiers intercomparaison EISMINT 70 !!$ nxx=nx 71 !!$ nyy=ny 72 73 !!$! lecture de la topo actuelle 74 !!$! --------------------------- 75 !!$ open (20,file=TRIM(DIRNAMEINP)//file2,status='old') 76 !!$ 77 !!$ read(20,'(A80)') TITRE 78 !!$ read(20,*) NI,NJ,NXX,NYY,STEP 79 !!$ read(20,*) 80 !!$ do J=1,ny 81 !!$ do I=1,nx 82 !!$ read (20,*) S0(I,J),H0(I,J),BSOC0(I,J) 83 !!$ S0(i,j)=max(S0(i,j),0.) 84 !!$ end do 85 !!$ end do 86 !!$ close(20) 87 !!$ 88 !!$ 89 !!$! lecture de la topo de depart 90 !!$! --------------------------- 91 !!$ open (20,file=TRIM(DIRNAMEINP)//file1,status='old') 92 !!$! open (20,file='../INPUT-DATA/hemin.g50') 93 !!$ read(20,'(A80)') TITRE 94 !!$ read(20,*) NI,NJ,NXX,NYY,STEP 95 !!$ read(20,*) 96 !!$ do J=1,ny 97 !!$ do I=1,nx 98 !!$ read (20,*) S(I,J),H(I,J),BSOC(I,J) 99 !!$ end do 100 !!$ end do 101 !!$ close(20) 102 46 ghf_fich=trim(dirnameinp)//trim(ghf_fich) 103 47 104 48 ! lecture de la topo de référence
Note: See TracChangeset
for help on using the changeset viewer.