Changeset 2408 for LMDZ5/branches/testing/libf/phylmd/o3_chem_m.F90
- Timestamp:
- Dec 14, 2015, 11:43:09 AM (9 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 2293-2295,2297,2299-2302,2305-2313,2315,2317-2380,2382-2396
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/phylmd/o3_chem_m.F90
r1910 r2408 14 14 15 15 ! All the 2-dimensional arrays are on the partial "physics" grid. 16 ! Their shape is "(/klon, llm/)".16 ! Their shape is "(/klon, nbp_lev/)". 17 17 ! Index "(i, :)" is for longitude "rlon(i)", latitude "rlat(i)". 18 18 … … 20 20 use dimphy, only: klon 21 21 use regr_pr_comb_coefoz_m, only: c_Mob, a4_mass, a2, r_het_interm 22 use mod_grid_phy_lmdz, only: nbp_lev 23 use nrtype, only: pi 22 24 23 25 integer, intent(in):: julien ! jour julien, 1 <= julien <= 360 24 26 real, intent(in):: gmtime ! heure de la journée en fraction de jour 25 real, intent(in):: t_seri(:, :) ! (klon, llm) temperature, in K27 real, intent(in):: t_seri(:, :) ! (klon, nbp_lev) temperature, in K 26 28 27 real, intent(in):: zmasse(:, :) ! (klon, llm)29 real, intent(in):: zmasse(:, :) ! (klon, nbp_lev) 28 30 ! (column-density of mass of air in a cell, in kg m-2) 29 31 ! "zmasse(:, k)" is for layer "k".) … … 34 36 ! (longitude and latitude of each horizontal position, in degrees) 35 37 36 real, intent(inout):: q(:, :) ! (klon, llm) mass fraction of ozone38 real, intent(inout):: q(:, :) ! (klon, nbp_lev) mass fraction of ozone 37 39 ! "q(:, k)" is at middle of layer "k".) 38 40 39 41 ! Variables local to the procedure: 40 include "dimensions.h"41 include "comconst.h"42 42 ! (for "pi") 43 43 integer k 44 44 45 real c(klon, llm)45 real c(klon, nbp_lev) 46 46 ! (constant term during a time step in the net mass production 47 47 ! rate of ozone by chemistry, per unit mass of air, in s-1) 48 48 ! "c(:, k)" is at middle of layer "k".) 49 49 50 real b(klon, llm)50 real b(klon, nbp_lev) 51 51 ! (coefficient of "q" in the net mass production 52 52 ! rate of ozone by chemistry, per unit mass of air, in s-1) 53 53 ! "b(:, k)" is at middle of layer "k".) 54 54 55 real dq_o3_chem(klon, llm)55 real dq_o3_chem(klon, nbp_lev) 56 56 ! (variation of ozone mass fraction due to chemistry during a time step) 57 57 ! "dq_o3_chem(:, k)" is at middle of layer "k".) … … 69 69 call assert(klon == (/size(q, 1), size(t_seri, 1), size(zmasse, 1), & 70 70 size(rlat), size(rlon)/), "o3_chem klon") 71 call assert( llm== (/size(q, 2), size(t_seri, 2), size(zmasse, 2)/), &72 "o3_chem llm")71 call assert(nbp_lev == (/size(q, 2), size(t_seri, 2), size(zmasse, 2)/), & 72 "o3_chem nbp_lev") 73 73 74 74 c = c_Mob + a4_mass * t_seri … … 86 86 call orbite(real(julien), earth_long, trash1) 87 87 call zenang(earth_long, gmtime, pdtphys, rlat, rlon, pmu0, trash2) 88 forall (k = 1: llm)88 forall (k = 1: nbp_lev) 89 89 where (pmu0 <= cos(87. / 180. * pi)) b(:, k) = 0. 90 90 end forall … … 112 112 113 113 ! All the 2-dimensional arrays are on the partial "physics" grid. 114 ! Their shape is "(/klon, llm/)".114 ! Their shape is "(/klon, nbp_lev/)". 115 115 ! Index "(i, :)" is for longitude "rlon(i)", latitude "rlat(i)". 116 116 … … 118 118 use assert_m, only: assert 119 119 use dimphy, only: klon 120 use mod_grid_phy_lmdz, only: nbp_lev 120 121 121 122 real, intent(in):: q(:, :) ! mass fraction of ozone … … 136 137 ! ("b(:, k)" is at middle of layer "k".) 137 138 138 include "dimensions.h" 139 140 real o3_prod(klon, llm) 139 real o3_prod(klon, nbp_lev) 141 140 ! (net mass production rate of ozone by chemistry, per unit mass 142 141 ! of air, in s-1) … … 145 144 ! Variables local to the procedure: 146 145 147 real sigma_mass(klon, llm)146 real sigma_mass(klon, nbp_lev) 148 147 ! (mass column-density of ozone above point, in kg m-2) 149 148 ! ("sigma_mass(:, k)" is at middle of layer "k".) … … 155 154 call assert(klon == (/size(q, 1), size(zmasse, 1), size(c, 1), & 156 155 size(b, 1)/), "o3_prod 1") 157 call assert( llm== (/size(q, 2), size(zmasse, 2), size(c, 2), &156 call assert(nbp_lev == (/size(q, 2), size(zmasse, 2), size(c, 2), & 158 157 size(b, 2)/), "o3_prod 2") 159 158 … … 161 160 ! "k", and, as a first approximation, take it as column-density 162 161 ! above the middle of layer "k": 163 sigma_mass(:, llm) = zmasse(:, llm) * q(:, llm) ! top layer164 do k = llm- 1, 1, -1162 sigma_mass(:, nbp_lev) = zmasse(:, nbp_lev) * q(:, nbp_lev) ! top layer 163 do k = nbp_lev - 1, 1, -1 165 164 sigma_mass(:, k) = sigma_mass(:, k+1) + zmasse(:, k) * q(:, k) 166 165 end do
Note: See TracChangeset
for help on using the changeset viewer.