source: trunk/SOURCES/New-remplimat/diagno-L2_mod.f90 @ 192

Last change on this file since 192 was 192, checked in by aquiquet, 6 years ago

Model performance improved with a reduced domain extension for elliptic equation resolution for buttressing estimation

File size: 17.9 KB
Line 
1!module diagno_L2_mod               ! Nouvelle version, compatible remplimat 2008 Cat
2module diagno_mod                   ! nom pendant les tests
3 !$ USE OMP_LIB
4use module3D_phy
5use module_choix
6     
7implicit none
8
9
10
11real                   :: somint,test,delp,prec
12real, dimension(nx,ny) :: uxb1
13real, dimension(nx,ny) :: uyb1
14
15real, dimension(nx,ny) :: uxb1ramollo
16real, dimension(nx,ny) :: uyb1ramollo
17real, dimension(nx,ny) :: pvi_keep
18
19!cdc transfere dans module3d pour compatibilite avec furst_schoof_mod
20!cdc  integer, dimension(nx,ny) :: imx_diag
21!cdc  integer, dimension(nx,ny) :: imy_diag
22
23integer :: nneigh=max(int(400000./dx),1) !nb. points around the grline kept for back force comp. in case we reduce the extent
24integer, dimension(nx,ny) :: imx_reduce !afq -- to limit the number of points where vel is computed for backforce
25integer, dimension(nx,ny) :: imy_reduce !afq -- to limit the number of points where vel is computed for backforce
26
27integer :: nxd1,nxd2     ! domaine selon x Dans l'appel rempli_L2
28integer :: nyd1,nyd2     ! domaine selon y
29
30integer :: itour_pvi
31
32integer :: ifail_diagno  ! pour recuperation d'erreur
33integer :: ifail_diagno_ramollo  ! pour recuperation d'erreur shelf ramollo
34integer :: iplus1,jplus1
35integer ::  ctvisco,iumax,jumax
36real  :: delumax,errmax
37real  :: phiphi,bt2,d02,discr,ttau
38real :: sf3,sf1,epsxxm,epsyym,epsm,sf01,sf03    ! pour le calcul de la viscosite
39real :: viscm
40real :: sf_shelf                                ! coef mult enhancement factor pour shelves
41
42logical :: stopvisco,viscolin
43logical :: test_visc
44
45contains   
46
47!------------------------------------------------------------------------------------
48subroutine init_diagno
49
50namelist/diagno_rheol/sf01,sf03,pvimin
51
52! attribution des coefficients de viscosite
53
54! formats pour les ecritures dans 42
55428 format(A)
56
57! lecture des parametres du run                      block draghwat
58!--------------------------------------------------------------------
59
60rewind(num_param)        ! pour revenir au debut du fichier param_list.dat
61read(num_param,diagno_rheol)
62
63write(num_rep_42,428)'!___________________________________________________________' 
64write(num_rep_42,428) '&diagno_rheol              ! nom du bloc  diagno_rheol'
65write(num_rep_42,*)
66write(num_rep_42,*) 'sf01           = ',sf01 
67write(num_rep_42,*) 'sf03           = ',sf03
68write(num_rep_42,*) 'pvimin         = ',pvimin
69write(num_rep_42,*)'/'     
70write(num_rep_42,428) '! coefficients par rapport a la loi glace posee '                       
71write(num_rep_42,428) '! sf01 : coefficient viscosite loi lineaire '
72write(num_rep_42,428) '! sf03 : coefficient viscosite loi n=3 '
73write(num_rep_42,428) '! pvimin : valeur de pvi pour les noeuds fictifs ~ 1.e3'
74write(num_rep_42,428) '! tres petit par rapport aux valeurs standards ~ 1.e10'
75
76write(num_rep_42,*)
77
78
79!      Precision utilisee dans de calcul
80prec = 1.e-2
81itour_pvi=1   ! si prend les valeurs analytiques dans le shelf
82
83if (geoplace(1:5).eq.'mism3') then
84   sf_shelf = 1.
85   itour_pvi= 0
86
87else
88   sf_shelf = 0.4
89end if
90
91return
92end subroutine init_diagno
93
94!------------------------------------------------------------------------------------
95subroutine diagnoshelf !      Resolution numerique des equations diagnostiques
96
97
98  integer :: diagno_grline
99
100 
101  if (itracebug.eq.1)  call tracebug(' Entree dans diagnoshelf')
102
103
104  itour_pvi=itour_pvi+1       ! boucle sur la viscosite (pour l'instant pas actif)
105
106!  pvi(:,:)=0.
107  Taushelf(:,:)=0.
108
109  ! attention le bloc suivant est pour debug
110!!$gzmx(:,:)=.false.
111!!$gzmy(:,:)=.false.
112!!$ilemx(:,:)=.false.
113!!$ilemy(:,:)=.false.
114!!$flgzmx(:,:)=flotmx(:,:)
115!!$flgzmy(:,:)=flotmy(:,:)
116
117  call dragging                    ! doit etre appele avant imx_imy
118
119
120
121if (itour_pvi.le.1) then
122  call calc_pvi                    ! calcule les viscosites integrees
123
124!$OMP PARALLEL
125!$OMP WORKSHARE
126   where (flot(:,:).and.(H.gt.1))  ! valeur analytique pour les shelfs
127      pvi(:,:) = (4./coef_Sflot/rog)**2/btt(:,:,1,1)/H(:,:)
128   end where
129!$OMP END WORKSHARE
130!$OMP END PARALLEL
131  ! avec couplage thermomecanique
132!  write(166,*) ' apres call calc_pvi',itour_pvi
133
134else
135   call calc_pvi   
136end if
137
138  call imx_imy_nx_ny         ! pour rempli_L2 : calcule les masques imx et imy qui
139
140  diagno_grline=sum(gr_line(2:(nx-1),2:(ny-1)))
141  if ((Schoof.ge.1).and.(diagno_grline.gt.0)) then
142       call imx_imy_nx_ny_reduce(1) !afq: provides imx_reduce and imy_reduce
143  endif
144
145!cdc debug Schoof !!!!!!!!!!!! 
146!~   do j=1,ny
147!~              do i=1,nx
148!~                      write(578,*) uxbar(i,j)
149!~                      write(579,*) uybar(i,j)
150!~              enddo
151!~      enddo   
152 
153  !if (Schoof.eq.1.and.nt.GT.15000) then ! flux grounding line Schoof
154! afq -- below:  if (Schoof.eq.1) then ! flux grounding line Schoof
155! afq -- below:     call interpol_glflux ! calcul flux GL + interpolation sur voisins
156! afq -- below:  endif
157
158!~       do j=1,ny
159!~              do i=1,nx
160!~                      write(588,*) uxbar(i,j)
161!~                      write(589,*) uybar(i,j)
162!~              enddo
163!~      enddo   
164!~      print*,'ecriteure termineee !!!!!!'
165!~      read(*,*)
166
167  ! donnent les cas de conditions aux limites
168  !
169  ! version pour travailler sur tout le domaine nx ny
170
171  if (geoplace(1:5).eq.'mism3') call mismip_boundary_cond
172
173
174  ! appel a la routine rempl_L2 -------------------domaine nx x ny ------------
175  !
176
177  ! pour tout le domaine
178  nxd1=1
179  nxd2=nx
180  nyd1=1
181  nyd2=ny
182
183  !call rempli_L2(1,nx,1,ny,uxbar,uybar,uxb1,uyb1,imx_diag,imy_diag,ifail_diagno)   
184  !nxd1=15
185  !nxd2=19
186  !nyd1=30
187  !nyd2=34
188
189  !nxd1=35
190  !nxd2=60
191  !nyd1=35
192  !nyd2=60
193
194       
195  !if (Schoof.eq.1.and.nt.GT.15000) then ! flux grounding line Schoof avec calcul de la back force par shelf ramollo
196  if ((Schoof.ge.1).and.(diagno_grline.gt.0)) then ! flux grounding line Schoof avec calcul de la back force par shelf ramollo
197
198    call rempli_L2(nxd1,nxd2,nyd1,nyd2,uxbar(nxd1:nxd2,nyd1:nyd2),uybar(nxd1:nxd2,nyd1:nyd2), & 
199          uxb1(nxd1:nxd2,nyd1:nyd2),uyb1(nxd1:nxd2,nyd1:nyd2),  &
200          imx_reduce(nxd1:nxd2,nyd1:nyd2),imy_reduce(nxd1:nxd2,nyd1:nyd2),ifail_diagno)
201
202    pvi_keep(:,:)=pvi(:,:)       
203    where (flot(:,:).and.H(:,:).GT.2.)
204!       pvi(:,:)=1.e5   
205       pvi(:,:)=pvimin
206    endwhere
207
208    call rempli_L2(nxd1,nxd2,nyd1,nyd2,uxbar(nxd1:nxd2,nyd1:nyd2),uybar(nxd1:nxd2,nyd1:nyd2), & 
209       uxb1ramollo(nxd1:nxd2,nyd1:nyd2),uyb1ramollo(nxd1:nxd2,nyd1:nyd2),  &
210       imx_reduce(nxd1:nxd2,nyd1:nyd2),imy_reduce(nxd1:nxd2,nyd1:nyd2),ifail_diagno_ramollo)
211       
212    pvi(:,:)=pvi_keep(:,:) 
213   
214    where (abs(uxb1ramollo(:,:)) .GT.1.e-5)
215       back_force_x(:,:) = 1.0 * abs(uxb1(:,:)) / abs(uxb1ramollo(:,:))
216    elsewhere
217       back_force_x(:,:)=1.
218    endwhere
219    where (abs(uyb1ramollo(:,:)) .GT.1.e-5)
220       back_force_y(:,:) = 1.0 * abs(uyb1(:,:)) / abs(uyb1ramollo(:,:))
221    elsewhere
222       back_force_y(:,:)=1.
223    endwhere
224    back_force_x(:,:) = min ( back_force_x(:,:), 1. )
225    back_force_y(:,:) = min ( back_force_y(:,:), 1. )
226    debug_3D(:,:,64) = back_force_x(:,:)
227    debug_3D(:,:,65) = back_force_y(:,:)
228
229    if (ifail_diagno_ramollo.gt.0) then
230!       write(6,*) ' Probleme resolution systeme L2. ramollo ifail=',ifail_diagno_ramollo
231!       STOP
232       write(*,*) ' Probleme resolution systeme L2. ramollo ifail=',ifail_diagno_ramollo
233       write(*,*) '          ... we go on anyway!'
234    endif
235!~   do j=1,ny
236!~              do i=1,nx
237!~                if (sqrt(uxb1(i,j)**2+ uyb1(i,j)**2).gt.0..and..not.flot(i,j)) then
238!~                              write(1034,*) sqrt(uxb1(i,j)**2+ uyb1(i,j)**2) / sqrt(uxb1ramollo(i,j)**2 + uyb1ramollo(i,j)**2)
239!~                else
240!~                              write(1034,*) 1.
241!~                      endif
242!~              enddo           
243!~      enddo
244
245!~   print*,'apres calcul rempli_L2'
246!~   read(*,*)
247   
248    call interpol_glflux ! calcul flux GL + interpolation sur voisins
249   
250  endif
251 
252  call rempli_L2(nxd1,nxd2,nyd1,nyd2,uxbar(nxd1:nxd2,nyd1:nyd2),uybar(nxd1:nxd2,nyd1:nyd2), & 
253       uxb1(nxd1:nxd2,nyd1:nyd2),uyb1(nxd1:nxd2,nyd1:nyd2),  &
254       imx_diag(nxd1:nxd2,nyd1:nyd2),imy_diag(nxd1:nxd2,nyd1:nyd2),ifail_diagno)
255 
256
257  ! Dans rempli_L2
258
259  !      uxprex(n1,n2)                                                 
260  !      uyprec(n1,n2) vitesses de l'iteration precedente     
261  !                                                                   
262  !      uxnew(n1,n2)                                                   
263  !      uynew(n1,n2) uynew resultat de cette iteration
264  !
265  !      imx(n1,n2) masque pour imposer les vitesses ou leur dérivee   
266  !      imy(n1,n2) masque pour imposer les vitesses ou leur dérivée   
267
268  ! eventuellement le domaine n1,n2 peut etre un sous-domaine de nx,ny
269  ! attention il faudra alors appeler avec des sous-tableaux
270
271  ! Dans l'appel uxbar -> uxprec   et Uxb1 -> Uxnew
272
273  !---------------------------------------------------------------------------
274
275  if (ifail_diagno.gt.0) then
276     write(6,*) ' Probleme resolution systeme L2. ifail=',ifail_diagno
277     STOP
278  endif
279
280  !      nouvelles vitesses         
281  !$OMP PARALLEL
282  !$OMP WORKSHARE
283  uxbar(:,:)=uxb1(:,:)
284  uybar(:,:)=uyb1(:,:)
285  !$OMP END WORKSHARE
286
287
288  !    calcul de tobmx et tobmy (frottement basal) apres calcul des vitesses
289  !    ---------------------------------------------------------------------
290  !$OMP DO
291  do j=1,ny
292     do i=1,nx
293        tobmx(i,j)=-betamx(i,j)*uxbar(i,j)
294        tobmy(i,j)=-betamy(i,j)*uybar(i,j)
295     enddo
296  enddo
297  !$OMP END DO
298  !$OMP BARRIER
299
300  ! afq -- initMIP outputs:
301  !$OMP DO
302  do j=2,ny-1 
303     do i=2,nx-1
304        taub(i,j) = sqrt( ((tobmx(i,j)+tobmx(i+1,j))*0.5)**2 &
305             + ((tobmy(i,j)+tobmy(i,j+1))*0.5)**2 )
306     end do
307  end do
308  !$OMP END DO
309  !$OMP WORKSHARE
310  debug_3d(:,:,117) = taub(:,:)
311  !$OMP END WORKSHARE
312
313 
314  ! Mise ne réserve des vitesses flgzmx et flgzmy
315  !$OMP WORKSHARE
316  where (flgzmx(:,:))
317     uxflgz(:,:)=uxbar(:,:)
318  elsewhere
319     uxflgz(:,:)=0.
320  endwhere
321
322  where (flgzmy(:,:))
323     uyflgz(:,:)=uybar(:,:)
324  elsewhere
325     uyflgz(:,:)=0.
326  endwhere
327  !$OMP END WORKSHARE
328  !$OMP END PARALLEL
329  !i=92
330  !j=152
331  !write(6,*) 'time',time, uxbar(92,152),gzmx(92,152),ilemx(92,152),flotmx(92,152), flgzmx(92,152)
332
333  return
334end subroutine diagnoshelf
335
336
337!-------------------------------------------------------------------
338subroutine calc_pvi
339
340! calcule les viscosites integrees pvi et pvm
341! loi polynomiale + couplage thermomécanique
342!
343!     Attention ne marche que si la loi est la loi en n=3 + n=1
344!     y compris le pur glen (n=3) ou le pur Newtonien (n=1)
345! --------------------------------------------------------------------
346
347!     les deformations sont supposées indépendantes de la profondeur
348!     et sont calculées dans strain_rate (appelé par main)       
349
350!     eps(i,j) -> eps
351!     ttau -> tau (2eme invariant du deviateur des contraintes)
352!     BT2 loi en n=3, phiphi loi en n=1 calculés dans flowlaw
353
354!
355     
356
357! La viscosité est calculée partout y compris pour la glace posée (ou elle est moins
358! précise qu'un calcul direct avec la loi de déformation.)
359! Pour les noeuds posés mais ayant un voisin stream ou flottant, on calcule
360! la viscosité avec stream/shelves
361! le calcul se fait sur les noeuds majeurs
362
363!$  integer :: rang ,nb_taches
364!$  logical :: paral
365
366if (itracebug.eq.1)  call tracebug(' Calc pvi')
367
368!$OMP PARALLEL PRIVATE(rang,iplus1,jplus1,sf3,sf1,BT2,phiphi,ttau,d02,discr)
369!$ paral = OMP_IN_PARALLEL()
370!$ rang=OMP_GET_THREAD_NUM()
371!$ nb_taches=OMP_GET_NUM_THREADS()
372
373!$OMP WORKSHARE
374pvi(:,:)  = pvimin
375Abar(:,:) = 0.
376!$OMP END WORKSHARE
377
378!$OMP DO
379do j=1,ny
380   do i=1,nx
381      iplus1=min(i+1,nx)
382      jplus1=min(j+1,ny)
383
384
385      if (flot(i,j)) then    ! noeuds flottants
386         sf3=sf03*sf_shelf     
387         sf1=sf01*sf_shelf
388     
389      else if (gzmx(i,j).or.gzmx(iplus1,j).or.gzmy(i,j).or.gzmy(i,jplus1)) then
390         sf1=sf01
391         sf3=max(sf03,0.01)   ! pour les fleuves de glace, un peu de Glen
392     
393      else if (ilemx(i,j).or.ilemx(iplus1,j).or.ilemy(i,j).or.ilemy(i,jplus1)) then
394         sf1=sf01
395         sf3=max(sf03,0.01)   ! pour les iles aussi
396
397      else
398!         sf1=1
399!         sf3=1
400         sf1=sf01             ! pour la viscosite anisotrope (ici en longitudinal)
401         sf3=sf03
402      endif
403
404
405      do k=1,nz 
406
407         BT2=BTT(i,j,k,1)*sf3    ! changement du sf
408         phiphi=BTT(i,j,k,2)*sf1 !  changement du sf
409
410
411
412         if (BT2.lt.1.e-25) then      ! pur newtonien
413            visc(i,j,k)=1./phiphi
414            ttau=2.*visc(i,j,k)*eps(i,j)
415         else                         ! polynomial
416
417
418!  en mettant Bt2 en facteur
419            d02=eps(i,j) 
420            discr=((phiphi/3.)**3.)/Bt2+d02**2
421            discr=discr**0.5
422
423            ttau=(d02+discr)**(1./3.)-(discr-d02)**(1./3.)
424
425
426            ttau=ttau*Bt2**(-1./3.)
427
428
429            visc(i,j,k)=Bt2*ttau*ttau+phiphi
430
431            if (visc(i,j,k).gt.1.e-15) then
432               visc(i,j,k)=1./visc(i,j,k)
433            else
434               visc(i,j,k)=1.e15
435            endif
436         endif
437         pvi(i,j)=pvi(i,j)+visc(i,j,k)
438         Abar(i,j) =(Bt2/2.)**(-1./3.) + Abar(i,j)
439         
440         Taushelf(i,j)=Taushelf(i,j)+ttau
441
442
443      end do
444     
445
446   
447      pvi(i,j)  = pvi(i,j)*H(i,j)/nz
448      Abar(i,j) = (Abar(i,j) /nz)**(-3.)
449     
450
451      Taushelf(i,j)=Taushelf(i,j)/nz
452   
453   
454   end do
455end do
456!$OMP END DO
457
458! cas des noeuds fictifs, si l'épaisseur est très petite
459! pvimin est très petit
460!$OMP WORKSHARE
461where (H(:,:).le.1.)
462   pvi(:,:) = pvimin
463end where
464
465where (ramollo(:,:).ge..5)
466   pvi(:,:) = pvimin
467end where
468
469
470debug_3D(:,:,27)=pvi(:,:)
471!$OMP END WORKSHARE
472! attention run 35
473!--------------------
474!!$if (time.gt.10.) then
475!!$   where (flot(:,:))
476!!$      pvi(:,:)=pvimin
477!!$   end where
478!!$end if
479
480!  calcul de la viscosite integree au milieu des mailles (pvm)
481!$OMP DO
482do i=2,nx
483   do j=2,ny
484
485! les lignes suivantes pour un pvm moyenne des pvi
486      pvm(i,j)=0.25*((pvi(i,j)+pvi(i-1,j-1))+    &   
487           (pvi(i,j-1)+pvi(i-1,j)))
488
489   end do
490end do
491!$OMP END DO
492!$OMP END PARALLEL
493
494end subroutine calc_pvi
495!------------------------------------------------------------------
496
497subroutine imx_imy_nx_ny
498
499! definition des masques
500! pour rempli_L2 : calcule les masques imx et imy qui
501! donnent les cas de conditions aux limites
502! version pour travailler sur tout le domaine nx ny
503!----------------------------------------------------
504
505
506
507!   -34                -3   Nord              -23   
508!     !----------------------------------------!
509!     !                                        !
510!     !              1 (prescrite)             !
511!  -4 !                   ou                   ! -2
512! West!              2 (L2)                    !  Est
513!     !                                        !
514!     !                                        !
515!     !----------------------------------------!
516!    -41               -1  Sud                -12
517
518!$OMP PARALLEL
519!$OMP WORKSHARE
520imx_diag(:,:)=0
521imy_diag(:,:)=0
522
523! a l'interieur du domaine
524!-------------------------
525
526where (flgzmx(:,:))
527   imx_diag(:,:)=2             ! shelf ou stream       
528elsewhere
529   imx_diag(:,:)=1             ! vitesse imposee
530end where
531
532where (flgzmy(:,:))     
533   imy_diag(:,:)=2             ! shelf ou stream
534elsewhere
535   imy_diag(:,:)=1             ! vitesse imposee
536end where
537
538! bord sud
539imx_diag(:,1)=-1
540imy_diag(:,2)=-1
541
542! bord nord
543imx_diag(:,ny)=-3
544imy_diag(:,ny)=-3
545
546! bord Est
547imx_diag(1,:)=0    ! hors domaine a cause des mailles alternees
548imx_diag(2,:)=-4
549imy_diag(1,:)=-4
550
551! bord West
552imx_diag(nx,:)=-2
553imy_diag(nx,:)=-2
554
555! Coins
556imx_diag(2,1)=-41       ! SW
557imy_diag(1,2)=-41
558
559imx_diag(nx,1)=-12      ! SE
560imy_diag(nx,2)=-12
561
562imx_diag(nx,ny)=-23     ! NE
563imy_diag(nx,ny)=-23
564
565imx_diag(2,ny)=-34      ! NW
566imy_diag(1,ny)=-34
567
568! hors domaine
569imx_diag(1,:)=0     ! hors domaine a cause des mailles alternees
570imy_diag(:,1)=0     ! hors domaine a cause des mailles alternees
571!$OMP END WORKSHARE
572!$OMP END PARALLEL
573 
574end subroutine imx_imy_nx_ny
575
576
577subroutine imx_imy_nx_ny_reduce(choix)
578
579!afq -- For the backforce computation we do not need to compute the velocities everywhere
580!       We simply compute the velocities around (nneigh) the grounding line
581
582  integer, intent(in) :: choix
583
584  integer i,j,nvx,nvy
585  integer bordouest,bordest,bordsud,bordnord
586
587  if (choix.eq.1) then ! we reduce the extent of velocity computation
588
589  imx_reduce(:,:) = 1
590  imy_reduce(:,:) = 1
591
592  where (flot(:,:)) 
593     imx_reduce(:,:) = imx_diag(:,:)
594     imy_reduce(:,:) = imy_diag(:,:)
595  endwhere
596
597  do j=1,ny
598     do i=1,nx
599        if (gr_line(i,j).eq.1) then
600           bordouest=max(i-nneigh,1)
601           bordest=min(i+nneigh,nx)
602           bordsud=max(j-nneigh,1)
603           bordnord=min(j+nneigh,ny)
604           do nvx=bordouest,bordest
605              do nvy=bordsud,bordnord
606                 imx_reduce(nvx,nvy)=imx_diag(nvx,nvy)
607                 imy_reduce(nvx,nvy)=imy_diag(nvx,nvy)
608              enddo
609           enddo
610        endif
611     enddo
612  enddo
613
614! -- we need to keep imx_diag for the domain edges for land terminating geometries
615  imx_reduce(:,1) = imx_diag(:,1)
616  imx_reduce(:,2) = imx_diag(:,2)
617  imx_reduce(:,ny) = imx_diag(:,ny)
618  imx_reduce(1,:) = imx_diag(1,:)
619  imx_reduce(2,:) = imx_diag(2,:)
620  imx_reduce(nx,:) = imx_diag(nx,:)
621
622  imy_reduce(:,1) = imy_diag(:,1)
623  imy_reduce(:,2) = imy_diag(:,2)
624  imy_reduce(:,ny) = imy_diag(:,ny)
625  imy_reduce(1,:) = imy_diag(1,:)
626  imy_reduce(2,:) = imy_diag(2,:)
627  imy_reduce(nx,:) = imy_diag(nx,:)
628
629
630  else ! we do not reduce the extent
631     imx_reduce(:,:)=imx_diag(:,:)
632     imy_reduce(:,:)=imy_diag(:,:)
633  endif
634
635end subroutine imx_imy_nx_ny_reduce
636
637
638!___________________________________________________________________________
639! pour imposer les conditions de mismip sur les bords du fleuve
640! a appeler apres imx_imy_nx_ny
641
642subroutine mismip_boundary_cond
643if (itracebug.eq.1)  call tracebug(' Subroutine mismip_boundray_cond')
644
645! Condition pas de flux sur les bords nord et sud
646
647 imy_diag(:,2)      = 1
648 imy_diag(:,3)      = 1
649 imy_diag(:,ny-1)   = 1
650 imy_diag(:,ny)     = 1
651
652
653 Uybar(:,2)    = 0.
654 Uybar(:,3)    = 0.
655 Uybar(:,ny-1) = 0.
656 Uybar(:,ny)   = 0.
657
658
659! condition pas de cisaillement sur les bords nord et sud
660imx_diag(:,2)    = -1
661imx_diag(:,ny-1) = -3
662
663! coins
664imx_diag(2,2)     =  -41
665imx_diag(nx,2)    =  -12
666imx_diag(2,ny-1)  =  -34
667imx_diag(nx,ny-1) =  -23
668imx_diag(1,:)     =    0     ! ces points sont hors grille
669
670end subroutine mismip_boundary_cond
671
672!end module diagno_L2_mod
673end module diagno_mod
Note: See TracBrowser for help on using the repository browser.