Changeset 192 for trunk/SOURCES/New-remplimat/diagno-L2_mod.f90
- Timestamp:
- 05/29/18 17:49:59 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SOURCES/New-remplimat/diagno-L2_mod.f90
r180 r192 20 20 !cdc integer, dimension(nx,ny) :: imx_diag 21 21 !cdc integer, dimension(nx,ny) :: imy_diag 22 23 integer :: nneigh=max(int(400000./dx),1) !nb. points around the grline kept for back force comp. in case we reduce the extent 24 integer, dimension(nx,ny) :: imx_reduce !afq -- to limit the number of points where vel is computed for backforce 25 integer, dimension(nx,ny) :: imy_reduce !afq -- to limit the number of points where vel is computed for backforce 22 26 23 27 integer :: nxd1,nxd2 ! domaine selon x Dans l'appel rempli_L2 … … 92 96 93 97 98 integer :: diagno_grline 99 100 94 101 if (itracebug.eq.1) call tracebug(' Entree dans diagnoshelf') 95 102 … … 130 137 131 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 132 144 133 145 !cdc debug Schoof !!!!!!!!!!!! … … 180 192 !nyd2=60 181 193 182 call rempli_L2(nxd1,nxd2,nyd1,nyd2,uxbar(nxd1:nxd2,nyd1:nyd2),uybar(nxd1:nxd2,nyd1:nyd2), &183 uxb1(nxd1:nxd2,nyd1:nyd2),uyb1(nxd1:nxd2,nyd1:nyd2), &184 imx_diag(nxd1:nxd2,nyd1:nyd2),imy_diag(nxd1:nxd2,nyd1:nyd2),ifail_diagno)185 194 186 195 !if (Schoof.eq.1.and.nt.GT.15000) then ! flux grounding line Schoof avec calcul de la back force par shelf ramollo 187 if (Schoof.eq.1) 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 188 202 pvi_keep(:,:)=pvi(:,:) 189 203 where (flot(:,:).and.H(:,:).GT.2.) … … 194 208 call rempli_L2(nxd1,nxd2,nyd1,nyd2,uxbar(nxd1:nxd2,nyd1:nyd2),uybar(nxd1:nxd2,nyd1:nyd2), & 195 209 uxb1ramollo(nxd1:nxd2,nyd1:nyd2),uyb1ramollo(nxd1:nxd2,nyd1:nyd2), & 196 imx_ diag(nxd1:nxd2,nyd1:nyd2),imy_diag(nxd1:nxd2,nyd1:nyd2),ifail_diagno_ramollo)210 imx_reduce(nxd1:nxd2,nyd1:nyd2),imy_reduce(nxd1:nxd2,nyd1:nyd2),ifail_diagno_ramollo) 197 211 198 212 pvi(:,:)=pvi_keep(:,:) … … 234 248 call interpol_glflux ! calcul flux GL + interpolation sur voisins 235 249 236 call rempli_L2(nxd1,nxd2,nyd1,nyd2,uxbar(nxd1:nxd2,nyd1:nyd2),uybar(nxd1:nxd2,nyd1:nyd2), & 250 endif 251 252 call rempli_L2(nxd1,nxd2,nyd1,nyd2,uxbar(nxd1:nxd2,nyd1:nyd2),uybar(nxd1:nxd2,nyd1:nyd2), & 237 253 uxb1(nxd1:nxd2,nyd1:nyd2),uyb1(nxd1:nxd2,nyd1:nyd2), & 238 254 imx_diag(nxd1:nxd2,nyd1:nyd2),imy_diag(nxd1:nxd2,nyd1:nyd2),ifail_diagno) 239 240 endif241 255 242 256 … … 559 573 560 574 end subroutine imx_imy_nx_ny 575 576 577 subroutine 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 635 end subroutine imx_imy_nx_ny_reduce 636 637 561 638 !___________________________________________________________________________ 562 639 ! pour imposer les conditions de mismip sur les bords du fleuve
Note: See TracChangeset
for help on using the changeset viewer.