source: branches/GRISLIv3/SOURCES/bmelt-grounded.f90 @ 446

Last change on this file since 446 was 446, checked in by aquiquet, 8 months ago

Cleaning branch: use only statement in module3D

File size: 2.5 KB
Line 
1!> \file bmelt-grounded.f90
2!! Calcule de la fusion basale et le type de base pour la partie posee
3!<
4
5!> SUBROUTINE: bmelt_grounded
6!! Calcule la fusion basale et le type de base pour la partie posee.
7!! \author ...
8!! \date ...
9!! @note cette routine est appelee quelle que soit le type de fusion sous les ice shelves
10!! c'est pour cela qu'elle n'est pas dans bmelt-ant-regions_mod.f90
11!! @note Used modules:
12!! @note   - use module3D_phy
13!! @note   - use param_phy_mod
14!! @note   - use Icetemp_declar
15!<
16
17subroutine bmelt_grounded
18
19  use module3d_phy, only: flot,bmelt,ibase,hwater,T,phid,cl,H,ghf,dtt
20  use geography, only: nx,ny,nz
21  use param_phy_mod, only: ro
22  use icetemp_declar, only: ct,dee,cm,dzm,ncond
23  use runparam, only: itracebug
24
25  integer :: i,j
26
27  if (itracebug.eq.1)  call tracebug('entree dans  bmelt-grounded')
28
29  do j=2,ny-1
30     do i=2,nx-1
31
32        noflot :   if (.not.flot(i,j)) then    ! partie posée
33
34           temper_gen:   if ((H(i,j).gt.10.).and.(ibase(i,j).ne.1)) then
35
36              if (ncond.eq.1) then   !  avec socle
37                 bmelt(i,j)=(ct(i,j,nz)*(T(i,j,nz-1)-T(i,j,nz))/dee/H(i,j) &
38                      -cm*(T(i,j,nz)-T(i,j,nz+1))/dzm+phid(i,j))/ro/cl 
39              else                   ! sans socle
40                 bmelt(i,j)=(ct(i,j,nz)*(T(i,j,nz-1)-T(i,j,nz))/dee/H(i,j) &
41                      +(phid(i,j)-ghf(i,j)))/ro/cl
42              endif
43
44
45              if (bmelt(i,j).ge.0.) then    !  fusion base 2
46                 ibase(i,j)=2
47
48              else                          !   regel 
49
50                 !              il reste de l'eau -> regel et on reste en base 2
51                 if (hwater(i,j).gt.-bmelt(i,j)*dtt) then
52                    ibase(i,j)=2
53
54                    !                 passage a base froide
55                 else if (ibase(i,j).eq.3) then
56                    ibase(i,j)=4
57                    bmelt(i,j)=0.
58                    hwater(i,j)=0.
59
60                    !                 regel mais il ne reste pas assez d'eau
61                 else if (hwater(i,j).le.-bmelt(i,j)*dtt) then
62                    ibase(i,j)=3
63                 endif           !          fin du test si regel 
64
65              endif              !          fin du test fusion ou regel glace posee
66
67           else                 ! glace tres fine ou ibase=1 
68              bmelt(i,j)=0.
69           endif temper_gen
70
71           bmelt(i,j)=min(bmelt(i,j),15.0)
72
73        endif noflot
74
75     end do
76  end do
77
78  return
79end subroutine bmelt_grounded
80
81   
Note: See TracBrowser for help on using the repository browser.