Ignore:
Timestamp:
05/29/18 17:49:59 (6 years ago)
Author:
aquiquet
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SOURCES/New-remplimat/diagno-L2_mod.f90

    r180 r192  
    2020!cdc  integer, dimension(nx,ny) :: imx_diag 
    2121!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 
    2226 
    2327integer :: nxd1,nxd2     ! domaine selon x Dans l'appel rempli_L2 
     
    9296 
    9397 
     98  integer :: diagno_grline 
     99 
     100   
    94101  if (itracebug.eq.1)  call tracebug(' Entree dans diagnoshelf') 
    95102 
     
    130137 
    131138  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 
    132144 
    133145!cdc debug Schoof !!!!!!!!!!!!   
     
    180192  !nyd2=60 
    181193 
    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) 
    185194        
    186195  !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 
    188202    pvi_keep(:,:)=pvi(:,:)        
    189203    where (flot(:,:).and.H(:,:).GT.2.) 
     
    194208    call rempli_L2(nxd1,nxd2,nyd1,nyd2,uxbar(nxd1:nxd2,nyd1:nyd2),uybar(nxd1:nxd2,nyd1:nyd2), &  
    195209       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) 
    197211        
    198212    pvi(:,:)=pvi_keep(:,:)  
     
    234248    call interpol_glflux ! calcul flux GL + interpolation sur voisins 
    235249     
    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), &  
    237253       uxb1(nxd1:nxd2,nyd1:nyd2),uyb1(nxd1:nxd2,nyd1:nyd2),  & 
    238254       imx_diag(nxd1:nxd2,nyd1:nyd2),imy_diag(nxd1:nxd2,nyd1:nyd2),ifail_diagno) 
    239    
    240   endif 
    241255   
    242256 
     
    559573  
    560574end 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 
    561638!___________________________________________________________________________ 
    562639! pour imposer les conditions de mismip sur les bords du fleuve 
Note: See TracChangeset for help on using the changeset viewer.