/[lmdze]/trunk/Sources/phylmd/Mobidic/o3_chem.f
ViewVC logotype

Diff of /trunk/Sources/phylmd/Mobidic/o3_chem.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/libf/phylmd/o3_chem_m.f90 revision 3 by guez, Wed Feb 27 13:16:39 2008 UTC trunk/libf/phylmd/Mobidic/o3_chem.f90 revision 13 by guez, Fri Jul 25 19:59:34 2008 UTC
# Line 13  contains Line 13  contains
13      ! This procedure evolves the ozone mass fraction through a time      ! This procedure evolves the ozone mass fraction through a time
14      ! step taking only chemistry into account.      ! step taking only chemistry into account.
15    
16      use nrutil, only: assert      use numer_rec, only: assert, pi
17      use dimphy, only: klon      use dimphy, only: klon
18      use dimens_m, only: llm      use dimens_m, only: llm
19      use read_coefoz_m, only: c_Mob, a4_mass, a2, r_het_interm      use regr_pr_comb_coefoz_m, only: c_Mob, a4_mass, a2, r_het_interm
20      use orbite_m, only: orbite, zenang      use orbite_m, only: orbite, zenang
     use nrtype, only: pi  
21    
22      integer, intent(in):: julien ! jour julien, 1 <= julien <= 360      integer, intent(in):: julien ! jour julien, 1 <= julien <= 360
23      real, intent(in):: gmtime ! heure de la journée en fraction de jour      real, intent(in):: gmtime ! heure de la journée en fraction de jour
# Line 38  contains Line 37  contains
37      ! layer "k".)      ! layer "k".)
38    
39      ! Variables local to the procedure:      ! Variables local to the procedure:
40      integer month, k      integer k
41    
42      real c(klon, llm)      real c(klon, llm)
43      ! (constant term during a time step in the net mass production      ! (constant term during a time step in the net mass production
# Line 73  contains Line 72  contains
72      call assert(llm == (/size(q, 2), size(t_seri, 2), size(zmasse, 2)/), &      call assert(llm == (/size(q, 2), size(t_seri, 2), size(zmasse, 2)/), &
73           "o3_chem llm")           "o3_chem llm")
74    
75      month = (julien - 1) / 30 + 1 ! compute the month from the day number      c = c_Mob + a4_mass * t_seri
     c = c_Mob(:, :, month) + a4_mass(:, :, month) * t_seri  
76    
77      ! Compute coefficient "b":      ! Compute coefficient "b":
78    
79      ! Heterogeneous chemistry is only at low temperature:      ! Heterogeneous chemistry is only at low temperature:
80      where (t_seri < 195.)      where (t_seri < 195.)
81         b = r_het_interm(:, :, month)         b = r_het_interm
82      elsewhere      elsewhere
83         b = 0.         b = 0.
84      end where      end where
# Line 92  contains Line 90  contains
90         where (pmu0 <= cos(87. / 180. * pi)) b(:, k) = 0.         where (pmu0 <= cos(87. / 180. * pi)) b(:, k) = 0.
91      end forall      end forall
92    
93      b = b + a2(:, :, month)      b = b + a2
94    
95      ! Midpoint method:      ! Midpoint method:
96    
97      ! Trial step to the midpoint:      ! Trial step to the midpoint:
98      dq_o3_chem = o3_prod(q, month, zmasse, c, b) * pdtphys  / 2      dq_o3_chem = o3_prod(q, zmasse, c, b) * pdtphys  / 2
99      ! "Real" step across the whole interval:      ! "Real" step across the whole interval:
100      dq_o3_chem = o3_prod(q + dq_o3_chem, month, zmasse, c, b) * pdtphys      dq_o3_chem = o3_prod(q + dq_o3_chem, zmasse, c, b) * pdtphys
101      q = q + dq_o3_chem      q = q + dq_o3_chem
102    
103      ! Confine the mass fraction:      ! Confine the mass fraction:
# Line 109  contains Line 107  contains
107    
108    !*************************************************    !*************************************************
109    
110    function o3_prod(q, month, zmasse, c, b)    function o3_prod(q, zmasse, c, b)
111    
112      ! This function computes the production rate of ozone by chemistry.      ! This function computes the production rate of ozone by chemistry.
113    
114      use read_coefoz_m, only: a6_mass      use regr_pr_comb_coefoz_m, only: a6_mass
115      use nrutil, only: assert      use numer_rec, only: assert
116      use dimens_m, only: llm      use dimens_m, only: llm
117      use dimphy, only: klon      use dimphy, only: klon
118    
# Line 123  contains Line 121  contains
121      ! "q(i, k)" is at longitude "rlon(i)", latitude "rlat(i)", middle of      ! "q(i, k)" is at longitude "rlon(i)", latitude "rlat(i)", middle of
122      ! layer "k".)      ! layer "k".)
123    
     integer, intent(in):: month  
   
124      real, intent(in):: zmasse(:, :)      real, intent(in):: zmasse(:, :)
125      ! (column-density of mass of air in a layer, in kg m-2)      ! (column-density of mass of air in a layer, in kg m-2)
126      ! (On the "physics" grid.      ! (On the "physics" grid.
# Line 177  contains Line 173  contains
173         sigma_mass(:, k) = sigma_mass(:, k+1) + zmasse(:, k) * q(:, k)         sigma_mass(:, k) = sigma_mass(:, k+1) + zmasse(:, k) * q(:, k)
174      end do      end do
175    
176      o3_prod = c + b * q + a6_mass(:, :, month) * sigma_mass      o3_prod = c + b * q + a6_mass * sigma_mass
177    
178    end function o3_prod    end function o3_prod
179    

Legend:
Removed from v.3  
changed lines
  Added in v.13

  ViewVC Help
Powered by ViewVC 1.1.21