--- trunk/libf/phylmd/Mobidic/o3_chem.f90 2008/03/31 13:58:05 9 +++ trunk/phylmd/Mobidic/o3_chem.f 2014/05/13 17:23:16 98 @@ -1,7 +1,5 @@ module o3_chem_m - ! This module is clean: no C preprocessor directive, no include line. - IMPLICIT none private o3_prod @@ -13,29 +11,29 @@ ! This procedure evolves the ozone mass fraction through a time ! step taking only chemistry into account. - use nrutil, only: assert + ! All the 2-dimensional arrays are on the "physics" grid. + ! Their shape is "(/klon, llm/)". + ! Index "(i, :)" is for longitude "rlon(i)", latitude "rlat(i)". + + use nr_util, only: assert, pi use dimphy, only: klon use dimens_m, only: llm use regr_pr_comb_coefoz_m, only: c_Mob, a4_mass, a2, r_het_interm - use orbite_m, only: orbite, zenang - use nrtype, only: pi + use orbite_m, only: orbite + use zenang_m, only: zenang integer, intent(in):: julien ! jour julien, 1 <= julien <= 360 real, intent(in):: gmtime ! heure de la journée en fraction de jour - real, intent(in):: t_seri(:, :) ! temperature, in K + real, intent(in):: t_seri(:, :) ! (klon, llm) temperature, in K - real, intent(in):: zmasse(:, :) + real, intent(in):: zmasse(:, :) ! (klon, llm) ! (column-density of mass of air in a cell, in kg m-2) - ! (On the "physics" grid. - ! "zmasse(i, k)" is at longitude "rlon(i)", latitude "rlat(i)", for - ! layer "k".) + ! "zmasse(:, k)" is for layer "k".) real, intent(in):: pdtphys ! time step for physics, in s - real, intent(inout):: q(:, :) ! mass fraction of ozone - ! (On the "physics" grid. - ! "q(i, k)" is at longitude "rlon(i)", latitude "rlat(i)", middle of - ! layer "k".) + real, intent(inout):: q(:, :) ! (klon, llm) mass fraction of ozone + ! "q(:, k)" is at middle of layer "k".) ! Variables local to the procedure: integer k @@ -43,22 +41,16 @@ real c(klon, llm) ! (constant term during a time step in the net mass production ! rate of ozone by chemistry, per unit mass of air, in s-1) - ! (On the "physics" grid. - ! "c(i, k)" is at longitude "rlon(i)", latitude "rlat(i)", middle of - ! layer "k".) + ! "c(:, k)" is at middle of layer "k".) real b(klon, llm) ! (coefficient of "q" in the net mass production ! rate of ozone by chemistry, per unit mass of air, in s-1) - ! (On the "physics" grid. - ! "b(i, k)" is at longitude "rlon(i)", latitude "rlat(i)", middle of - ! layer "k".) + ! "b(:, k)" is at middle of layer "k".) real dq_o3_chem(klon, llm) ! (variation of ozone mass fraction due to chemistry during a time step) - ! (On the "physics" grid. - ! "dq_o3_chem(i, k)" is at longitude "rlon(i)", latitude - ! "rlat(i)", middle of layer "k".) + ! "dq_o3_chem(:, k)" is at middle of layer "k".) real earth_long ! (longitude vraie de la Terre dans son orbite solaire, par @@ -112,50 +104,42 @@ ! This function computes the production rate of ozone by chemistry. + ! All the 2-dimensional arrays are on the "physics" grid. + ! Their shape is "(/klon, llm/)". + ! Index "(i, :)" is for longitude "rlon(i)", latitude "rlat(i)". + use regr_pr_comb_coefoz_m, only: a6_mass - use nrutil, only: assert + use nr_util, only: assert use dimens_m, only: llm use dimphy, only: klon real, intent(in):: q(:, :) ! mass fraction of ozone - ! (On the "physics" grid. - ! "q(i, k)" is at longitude "rlon(i)", latitude "rlat(i)", middle of - ! layer "k".) + ! "q(:, k)" is at middle of layer "k".) real, intent(in):: zmasse(:, :) ! (column-density of mass of air in a layer, in kg m-2) - ! (On the "physics" grid. - ! "zmasse(i, k)" is at longitude "rlon(i)", latitude "rlat(i)", middle of - ! layer "k".) + ! ("zmasse(:, k)" is for layer "k".) real, intent(in):: c(:, :) ! (constant term during a time step in the net mass production ! rate of ozone by chemistry, per unit mass of air, in s-1) - ! (On the "physics" grid. - ! "c(i, k)" is at longitude "rlon(i)", latitude "rlat(i)", middle of - ! layer "k".) + ! "c(:, k)" is at middle of layer "k".) real, intent(in):: b(:, :) - ! (coefficient of "q" in the net mass production - ! rate of ozone by chemistry, per unit mass of air, in s-1) - ! (On the "physics" grid. - ! "b(i, k)" is at longitude "rlon(i)", latitude "rlat(i)", middle of - ! layer "k".) + ! (coefficient of "q" in the net mass production rate of ozone by + ! chemistry, per unit mass of air, in s-1) + ! ("b(:, k)" is at middle of layer "k".) real o3_prod(klon, llm) ! (net mass production rate of ozone by chemistry, per unit mass ! of air, in s-1) - ! (On the "physics" grid. - ! "o3_prod(i, k)" is at longitude "rlon(i)", latitude "rlat(i)", middle of - ! layer "k".) + ! ("o3_prod(:, k)" is at middle of layer "k".) ! Variables local to the procedure: real sigma_mass(klon, llm) ! (mass column-density of ozone above point, in kg m-2) - ! (On the "physics" grid. - ! "sigma_mass(i, k)" is at longitude "rlon(i)", latitude - ! "rlat(i)", middle of layer "k".) + ! ("sigma_mass(:, k)" is at middle of layer "k".) integer k