34 |
|
|
35 |
contains |
contains |
36 |
|
|
37 |
subroutine regr_pr_comb_coefoz(julien) |
subroutine regr_pr_comb_coefoz(julien, paprs, pplay) |
38 |
|
|
39 |
! "regr_pr_comb_coefoz" stands for "regrid pressure combine |
! "regr_pr_comb_coefoz" stands for "regrid pressure combine |
40 |
! coefficients ozone". |
! coefficients ozone". |
54 |
|
|
55 |
integer, intent(in):: julien ! jour julien, 1 <= julien <= 360 |
integer, intent(in):: julien ! jour julien, 1 <= julien <= 360 |
56 |
|
|
57 |
|
real, intent(in):: paprs(:, :) ! (klon, llm + 1) |
58 |
|
! (pression pour chaque inter-couche, en Pa) |
59 |
|
|
60 |
|
real, intent(in):: pplay(:, :) ! (klon, llm) |
61 |
|
! (pression pour le mileu de chaque couche, en Pa) |
62 |
|
|
63 |
! Variables local to the procedure: |
! Variables local to the procedure: |
64 |
|
|
65 |
integer ncid ! for NetCDF |
integer ncid ! for NetCDF |
90 |
|
|
91 |
call nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid) |
call nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid) |
92 |
|
|
93 |
call regr_pr_av(ncid, "a2", julien, a2) |
call regr_pr_av(ncid, "a2", julien, paprs, a2) |
94 |
|
|
95 |
call regr_pr_av(ncid, "a4", julien, a4_mass) |
call regr_pr_av(ncid, "a4", julien, paprs, a4_mass) |
96 |
a4_mass = a4_mass * 48. / 29. |
a4_mass = a4_mass * 48. / 29. |
97 |
|
|
98 |
call regr_pr_av(ncid, "a6", julien, a6) |
call regr_pr_av(ncid, "a6", julien, paprs, a6) |
99 |
|
|
100 |
! Compute "a6_mass" avoiding underflow, do not divide by 1e4 |
! Compute "a6_mass" avoiding underflow, do not divide by 1e4 |
101 |
! before dividing by molecular mass: |
! before dividing by molecular mass: |
106 |
! (We use as few local variables as possible, in order to spare |
! (We use as few local variables as possible, in order to spare |
107 |
! main memory.) |
! main memory.) |
108 |
|
|
109 |
call regr_pr_av(ncid, "P_net_Mob", julien, c_Mob) |
call regr_pr_av(ncid, "P_net_Mob", julien, paprs, c_Mob) |
110 |
|
|
111 |
call regr_pr_av(ncid, "r_Mob", julien, coefoz) |
call regr_pr_av(ncid, "r_Mob", julien, paprs, coefoz) |
112 |
c_mob = c_mob - a2 * coefoz |
c_mob = c_mob - a2 * coefoz |
113 |
|
|
114 |
call regr_pr_int(ncid, "Sigma_Mob", julien, top_value=0., v3=coefoz) |
call regr_pr_int(ncid, "Sigma_Mob", julien, pplay, top_value=0., v3=coefoz) |
115 |
c_mob = (c_mob - a6 * coefoz) * 48. / 29. |
c_mob = (c_mob - a6 * coefoz) * 48. / 29. |
116 |
|
|
117 |
call regr_pr_av(ncid, "temp_Mob", julien, coefoz) |
call regr_pr_av(ncid, "temp_Mob", julien, paprs, coefoz) |
118 |
c_mob = c_mob - a4_mass * coefoz |
c_mob = c_mob - a4_mass * coefoz |
119 |
|
|
120 |
call regr_pr_av(ncid, "R_Het", julien, r_het_interm) |
call regr_pr_av(ncid, "R_Het", julien, paprs, r_het_interm) |
121 |
! Heterogeneous chemistry is only at high latitudes: |
! Heterogeneous chemistry is only at high latitudes: |
122 |
forall (k = 1: llm) |
forall (k = 1: llm) |
123 |
where (abs(rlat) <= 45.) r_het_interm(:, k) = 0. |
where (abs(rlat) <= 45.) r_het_interm(:, k) = 0. |