source: trunk/LMDZ.MARS/libf/phymars/co2snow.F @ 706

Last change on this file since 706 was 690, checked in by acolaitis, 13 years ago

Code re-organization in diverse parts of the GCM code. These are NOT cosmetic changes, but are needed for compilation of the Mesoscale model in NESTED configuration

File size: 3.9 KB
RevLine 
[690]1      SUBROUTINE co2snow (ngrid,nlayer,ptimestep,emisref,condsub
2     &         ,pplev,pcondicea,pcondices,pfallice,pemisurf)
[38]3
4       IMPLICIT NONE
5
6c=======================================================================
7c     Program for simulate the impact of the CO2 snow fall on
8c     the surface infrared emission (emissivity)  and on
9c     the airborne dust
10c     F.Forget 1996
11c=======================================================================
12
13c Declarations
14c ------------
15
16#include "dimensions.h"
17#include "dimphys.h"
18#include "comcstfi.h"
19#include "surfdat.h"
20#include "callkeys.h"
21
22c     input
23c     -----
24
25      INTEGER ngrid,nlayer
26      REAL ptimestep , emisref(ngrid) ! grd or ice  emissivity without snow
27      logical condsub(ngrid)
28
29      REAL pplev(ngrid,nlayer+1)
30      REAL pcondicea(ngrid,nlayer), pcondices(ngrid)
31      REAL pfallice(ngrid,nlayer+1)
32
33c     output
34c     ------
35
36      REAL pemisurf(ngrid)
37
38c     local
39c     -----
40      integer ig , l , icap
41
42      REAL zdemisurf ,dtemis
43      REAL sumdaer
44
45c     saved
46c     -----
47      REAL Kscat(2), scaveng
48      LOGICAL firstcall
49      SAVE firstcall
50      save Kscat , scaveng
51      DATA firstcall/.true./
52
53c --------------
54c Initialisation
55c --------------
56
57      if (firstcall) then
58
59c   Kscat : coefficient for decreasing the surface emissivity
60c           =(0.001/3.)*alpha/iceradius ,
61c           with 0.3< alpha < 0.6, set to 0.45 (coeff from emis = f (tau))
62c           and iceradius the mean radius of the
63c           scaterring particles  (200.e-6<iceradius<10.e-6)
64
65            Kscat(1)=(0.001/3.)*0.45/iceradius(1)
66            Kscat(2)=(0.001/3.)*0.45/iceradius(2)
67
68c          Scavenging Ratio (dust concentration in the air / in the snow)
69           scaveng = 100.0
70           
71c          Collision Scavenging coefficient  (m2.kg-1)
72c          Csca  = 2.3  ! not used yet !!!!!!!!!!!
73           firstcall = .false.
74
75      end if
76
77
78c     LOOP on grid points
79c     -------------------
80      do ig=1,ngrid
81         if (condsub(ig)) then
82
83c         IF (scavenging) then
84c          Airborne Dust
85c          -------------
86c          sumdaer=0.
87c          do l=nlayer, 1, -1
88c             pdaerosol(ig,l)= -paerosol(ig,l,1)*
89c    &              (1-exp(-scaveng*pcondicea(ig,l)*ptimestep*g/
90c    &               (pplev(ig,l)-pplev(ig,l+1))))/ptimestep 
91
92c    &           - Csca*paerosol(ig,l,1) ! Scavenging by collision
93c    &           * 0.5*(pfallice(ig,l)) ! not included
94
95c             test to avoid releasing to much dust when subliming:
96c             if(pdaerosol(ig,l).gt.-sumdaer)pdaerosol(ig,l)=-sumdaer
97c             sumdaer=sumdaer + pdaerosol(ig,l)
98
99c            if (-pdaerosol(ig,l)*ptimestep.gt.paerosol(ig,l,1)) then
100c                write(*,*) 'ds co2snow: aerosol < 0.0 !!!'
101c                write(*,*) 'ig =' , ig
102c            end if
103c          end do
104c         END IF
105
106c          Surface emissivity
107c          ------------------
108c   dtemis: Time scale for increasing the ice emissivity
109
110           IF(ig.GT.ngrid/2+1) THEN
111              icap=2
112           ELSE
113              icap=1
114           ENDIF
115
116           zdemisurf =
117     &    (emisref(ig)-pemisurf(ig))/(dtemisice(icap)*daysec)
118c Using directly the diferential equation:
119c    &       -Kscat(icap)*emisref(ig)*
120c    &      (pemisurf(ig)/emisref(ig))**4 *pfallice(ig,1)
121c Using an integrated form for numerical safety instead
122     & +(emisref(ig)* ((pemisurf(ig)/emisref(ig))**(-3)+3.*Kscat(icap)*
123     & pfallice(ig,1)*ptimestep)**(-1/3.) -pemisurf(ig))/ptimestep   
124
125
126           pemisurf(ig) = pemisurf(ig) + zdemisurf*ptimestep
127
128           if (pemisurf(ig).lt.0.1) then
129                 write(*,*) 'ds co2snow: emis < 0.1 !!!'
130                 write(*,*) 'ig =' , ig
131                 write(*,*)'pemisurf(ig)',pemisurf(ig)
132                 write(*,*) 'zdemisurf*ptimestep',zdemisurf*ptimestep
133           end if
134         else
135           pemisurf(ig) = emisref(ig)
136         end if
137      end do
138
139      return
140      end
Note: See TracBrowser for help on using the repository browser.