Changeset 334
- Timestamp:
- 01/30/21 10:50:17 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SOURCES/dragging_coulomb_friction_mod.f90
r333 r334 38 38 ! - number of iterations (as it is non-linear) 39 39 ! - betamin and betamax 40 ! 41 ! I also add the possibility to tune locally the cf coefficient to account for 42 ! the presence of sediments (could also be Bsoc_relax<0 for Antarctica) 40 43 !______________________________________________________________________________ 41 44 … … 51 54 real :: m_nolin ! Schoof non-linear exponent 52 55 real :: q_nolin ! q=1/m 56 57 real, dimension(nx,ny) :: coef_sedim_mx, coef_sedim_my ! in case we use sediments 53 58 54 59 real, dimension(nx,ny) :: Vcol_x !< uniquement pour compatibilite avec spinup cat … … 69 74 use runparam, only: itracebug 70 75 76 use interface_input !for sediments 77 use io_netcdf_grisli !for sediments 78 71 79 implicit none 72 80 73 namelist/drag_coulomb_friction/cf,m_nolin,niter_nolin,betamax,betamin 81 logical :: bool_sedim ! sediments: yes or no 82 real :: seuil_sedim ! sediment thickness threshold for drag reduction 83 real :: coef_sedim ! drag reduction factor 84 real,dimension(nx,ny) :: h_sedim ! sediment thickness (or rebounded bedrock) 85 real,dimension(nx,ny) :: h_sedimmx,h_sedimmy ! temporary arrays 86 character(len=150) :: file_sedim ! file for sediment thickness for HN or rebounded bsoc for Antar 87 character(len=150) :: file_ncdf ! fichier netcdf issue des fichiers .dat 88 integer i,j 89 90 namelist/drag_coulomb_friction/cf,m_nolin,niter_nolin,betamax,betamin,bool_sedim,file_sedim,seuil_sedim,coef_sedim 74 91 75 92 if (itracebug.eq.1) call tracebug(' dragging avec neff et slope') … … 93 110 write(num_rep_42,*) 'betamax = ', betamax 94 111 write(num_rep_42,*) 'betamin = ', betamin 112 write(num_rep_42,*) 'bool_sedim = ', bool_sedim 113 write(num_rep_42,'(A,A,A)') 'file_sedim = "',trim(file_sedim),'"' 114 write(num_rep_42,*) 'seuil_sedim = ', seuil_sedim 115 write(num_rep_42,*) 'coef_sedim = ', coef_sedim 95 116 write(num_rep_42,*)'/' 96 117 write(num_rep_42,428) '! cf: a friction coefficient (to be tuned)' … … 98 119 write(num_rep_42,428) '! m_nolin=1/q in Pattyn TC 2017, q in [0:1]' 99 120 write(num_rep_42,428) '! niter_nolin: number of iterations to solve the non-linearity (expensive!)' 121 write(num_rep_42,428) '! Possibility to add sediment tuning of cf, if false, the file is not read' 122 write(num_rep_42,428) '! If sediments: where h_sedim > seuil_sedim, beta*coef_sedim' 100 123 101 124 inv_beta=0 … … 116 139 else 117 140 q_nolin = 1 / m_nolin 141 endif 142 143 if (bool_sedim) then 144 145 file_sedim=trim(dirnameinp)//trim(file_sedim) 146 call lect_input(1,'h_sedim',1,h_sedim(:,:),file_sedim,file_ncdf) 147 148 h_sedimmx(1,:)=h_sedim(1,:) 149 h_sedimmy(:,1)=h_sedim(:,1) 150 do i=2,nx 151 h_sedimmx(i,:)=(h_sedim(i-1,:)+h_sedim(i,:))/2. 152 enddo 153 do j=2,ny 154 h_sedimmy(:,j)=(h_sedim(:,j-1)+h_sedim(:,j))/2. 155 enddo 156 157 where (h_sedimmx(:,:).gt.seuil_sedim) 158 coef_sedim_mx(:,:) = coef_sedim 159 elsewhere 160 coef_sedim_mx(:,:) = 1. 161 endwhere 162 where (h_sedimmy(:,:).gt.seuil_sedim) 163 coef_sedim_my(:,:) = coef_sedim 164 elsewhere 165 coef_sedim_my(:,:) = 1. 166 endwhere 167 168 else 169 170 coef_sedim_mx(:,:) = 1. 171 coef_sedim_my(:,:) = 1. 172 118 173 endif 119 174 … … 179 234 !$OMP WORKSHARE 180 235 181 tauc_mx(:,:)= cf*neffmx(:,:) 182 tauc_my(:,:)= cf*neffmy(:,:) 236 tauc_mx(:,:)= cf*neffmx(:,:)*coef_sedim_mx(:,:) 237 tauc_my(:,:)= cf*neffmy(:,:)*coef_sedim_my(:,:) 183 238 184 239 where (abs(ux(:,:,nz)).gt.1)
Note: See TracChangeset
for help on using the changeset viewer.