source: trunk/SOURCES/ablation-0.2.f @ 10

Last change on this file since 10 was 4, checked in by dumas, 10 years ago

initial import GRISLI trunk

File size: 2.2 KB
Line 
1!> \file ablation-0.2.f
2!! Fichier contenant le subroutine Ablation
3!<
4     
5!> Subroutine ABLATION
6!! Calcule l'ablation
7!! \author ...
8!! \date ...
9!! @note Used modules:
10!! @note  - module3D_phy
11!<
12
13
14c********************************************************************
15
16      subroutine ABLATION()
17
18c     *********************************************************
19c     (******** ABLATION ********)
20c     *********************************************************
21
22
23      use module3d_phy
24
25
26      implicit none
27
28c     (*** positive degree days ***)
29      do i=1,nx
30      do j=1,ny
31!          tjuly(i,j)=min(tjuly(i,j),-4.0)
32!          tann(i,j)=min(tann(i,j),tjuly(i,j))
33        summ=0.0
34        do nday=1,nyear   
35          tt(nday)=tann(i,j)+(tjuly(i,j)-tann(i,j))*cos(py*nday) 
36          temp=0.0 
37          do k=1,50
38            if (temp.gt.tt(nday)+2.5*sigma) goto 205
39            summ=summ+temp*exp(-(temp-tt(nday))*(temp-tt(nday))*s22) 
40            temp=temp+dtp
41          end do
42205       continue
43        end do
44        pdd(i,j)=summ*pddct 
45      end do
46      end do
47
48c     (*** ablation ***)
49      do i=1,nx
50      do j=1,ny
51c       (* positive degrees required to melt the snow layer *)
52        pds=acc(i,j)/csnow 
53c       (* maximum amount of super. ice that can be formed *)
54        simax=acc(i,j)*csi
55c       (* pos. degrees required to melt the superimposed ice *)
56        pdsi=simax/cice
57        if (pdd(i,j).le.csi*pds) then
58          sif=pdd(i,j)*csnow
59        else
60          sif=simax 
61        endif
62
63c       surface temperature
64        ts(i,j)=(tann(i,j)+26.6*sif)
65        ts(i,j)=min(0.0,ts(i,j))
66        tshelf(i,j)=ts(i,j)
67
68c       mass balance
69        if (pdd(i,j).le.csi*pds)  bm(i,j)=acc(i,j) 
70        if ((csi*pds.lt.pdd(i,j)).and.(pdd(i,j).le.pds))
71     1   bm(i,j)=acc(i,j)+simax-pdd(i,j)*csnow 
72        if ((pds.lt.pdd(i,j)).and.(pdd(i,j).le.pds+pdsi))
73     1   bm(i,j)=simax-(pdd(i,j)-pds)*cice
74        if (pds+pdsi.le.pdd(i,j)) bm(i,j)=(pds+pdsi-pdd(i,j))*cice
75
76c       
77c        modif pour l'experience l3a
78         if (icouple.eq.2) then
79          bm(i,j)=acc(i,j)
80          ts(i,j)=tann(i,j)
81         endif
82         
83
84      end do
85      end do
86
87!940   format('%%%% ',a,'   time=',f8.0,' %%%%')
88      end
Note: See TracBrowser for help on using the repository browser.