/[lmdze]/trunk/Sources/phylmd/cltrac.f
ViewVC logotype

Annotation of /trunk/Sources/phylmd/cltrac.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (hide annotations)
Mon Mar 31 12:24:17 2008 UTC (16 years, 2 months ago) by guez
Original Path: trunk/libf/phylmd/cltrac.f
File size: 4581 byte(s)
This revision is not in working order. Pending some moving of files.

Important changes. In the program "etat0_lim": ozone coefficients from
Mobidic are regridded in time instead of pressure ; consequences in
"etat0". In the program "gcm", ozone coefficients from Mobidic are
read once per day only for the current day and regridded in pressure ;
consequences in "o3_chem_m", "regr_pr_coefoz", "phytrac" and
"regr_pr_comb_coefoz_m".

NetCDF95 is a library and does not export NetCDF.

New variables "nag_gl_options", "nag_fcalls_options" and
"nag_cross_options" in "nag_tools.mk".

"check_coefoz.jnl" rewritten entirely for new version of
"coefoz_LMDZ.nc".

Target "obj_etat0_lim" moved from "GNUmakefile" to "nag_rules.mk".

Added some "intent" attributes in "calfis", "clmain", "clqh",
"cltrac", "cltracrn", "cvltr", "ini_undefSTD", "moy_undefSTD",
"nflxtr", "phystokenc", "phytrac", "readsulfate", "readsulfate_preind"
and "undefSTD".

In "dynetat0", "dynredem0" and "gcm", "phis" has rank 2 instead of
1. "phis" has assumed shape in "dynredem0".

Added module containing "dynredem0". Changed some calls with NetCDF
Fortran 77 interface to calls with NetCDF95 interface.

Replaced calls to "ssum" by calls to "sum" in "inigeom".

In "make.sh", new option "-c" to change compiler.

In "aaam_bud", argument "rjour" deleted.

In "physiq": renamed some variables; deleted variable "xjour".

In "phytrac": renamed some variables; new argument "lmt_pas".

1 guez 3 !
2     ! $Header: /home/cvsroot/LMDZ4/libf/phylmd/cltrac.F,v 1.1.1.1 2004/05/19 12:53:07 lmdzadmin Exp $
3     !
4     SUBROUTINE cltrac(dtime,coef,t,tr,flux,paprs,pplay,delp,
5     s d_tr)
6     use dimens_m
7     use dimphy
8     use YOMCST
9     IMPLICIT none
10     c======================================================================
11     c Auteur(s): O. Boucher (LOA/LMD) date: 19961127
12     c inspire de clvent
13     c Objet: diffusion verticale de traceurs avec flux fixe a la surface
14     c ou/et flux du type c-drag
15     c======================================================================
16     c Arguments:
17     c dtime----input-R- intervalle du temps (en second)
18     c coef-----input-R- le coefficient d'echange (m**2/s) l>1
19     c tr-------input-R- la q. de traceurs
20     c flux-----input-R- le flux de traceurs a la surface
21     c paprs----input-R- pression a inter-couche (Pa)
22     c pplay----input-R- pression au milieu de couche (Pa)
23     c delp-----input-R- epaisseur de couche (Pa)
24     c cdrag----input-R- cdrag pour le flux de surface (non active)
25     c tr0------input-R- traceurs a la surface ou dans l'ocean (non active)
26     c d_tr-----output-R- le changement de tr
27     c flux_tr--output-R- flux de tr
28     c======================================================================
29 guez 7 REAL, intent(in):: dtime
30 guez 3 REAL coef(klon,klev)
31     REAL, intent(in):: t(klon,klev) ! temperature (K)
32     real tr(klon,klev)
33     REAL, intent(in):: paprs(klon,klev+1)
34     real pplay(klon,klev), delp(klon,klev)
35     REAL d_tr(klon,klev)
36     REAL flux(klon), cdrag(klon), tr0(klon)
37     c REAL flux_tr(klon,klev)
38     c======================================================================
39     c======================================================================
40     INTEGER i, k
41     REAL zx_ctr(klon,2:klev)
42     REAL zx_dtr(klon,2:klev)
43     REAL zx_buf(klon)
44     REAL zx_coef(klon,klev)
45     REAL local_tr(klon,klev)
46     REAL zx_alf1(klon), zx_alf2(klon), zx_flux(klon)
47     c======================================================================
48     DO k = 1, klev
49     DO i = 1, klon
50     local_tr(i,k) = tr(i,k)
51     ENDDO
52     ENDDO
53     c
54    
55     c======================================================================
56     DO i = 1, klon
57     zx_alf1(i) = (paprs(i,1)-pplay(i,2))/(pplay(i,1)-pplay(i,2))
58     zx_alf2(i) = 1.0 - zx_alf1(i)
59     zx_flux(i) = -flux(i)*dtime*RG
60     c--pour le moment le flux est prescrit
61     c--cdrag et zx_coef(1) vaut 0
62     cdrag(i) = 0.0
63     tr0(i) = 0.0
64     zx_coef(i,1) = cdrag(i)*dtime*RG
65     ENDDO
66     c======================================================================
67     DO k = 2, klev
68     DO i = 1, klon
69     zx_coef(i,k) = coef(i,k)*RG/(pplay(i,k-1)-pplay(i,k))
70     . *(paprs(i,k)*2/(t(i,k)+t(i,k-1))/RD)**2
71     zx_coef(i,k) = zx_coef(i,k)*dtime*RG
72     ENDDO
73     ENDDO
74     c======================================================================
75     DO i = 1, klon
76     zx_buf(i) = delp(i,1) + zx_coef(i,1)*zx_alf1(i) + zx_coef(i,2)
77     zx_ctr(i,2) = (local_tr(i,1)*delp(i,1)+
78     . zx_coef(i,1)*tr0(i)-zx_flux(i))/zx_buf(i)
79     zx_dtr(i,2) = (zx_coef(i,2)-zx_alf2(i)*zx_coef(i,1)) /
80     . zx_buf(i)
81     ENDDO
82     c
83     DO k = 3, klev
84     DO i = 1, klon
85     zx_buf(i) = delp(i,k-1) + zx_coef(i,k)
86     . + zx_coef(i,k-1)*(1.-zx_dtr(i,k-1))
87     zx_ctr(i,k) = (local_tr(i,k-1)*delp(i,k-1)
88     . +zx_coef(i,k-1)*zx_ctr(i,k-1) )/zx_buf(i)
89     zx_dtr(i,k) = zx_coef(i,k)/zx_buf(i)
90     ENDDO
91     ENDDO
92     DO i = 1, klon
93     local_tr(i,klev) = ( local_tr(i,klev)*delp(i,klev)
94     . +zx_coef(i,klev)*zx_ctr(i,klev) )
95     . / ( delp(i,klev) + zx_coef(i,klev)
96     . -zx_coef(i,klev)*zx_dtr(i,klev) )
97     ENDDO
98     DO k = klev-1, 1, -1
99     DO i = 1, klon
100     local_tr(i,k) = zx_ctr(i,k+1) + zx_dtr(i,k+1)*local_tr(i,k+1)
101     ENDDO
102     ENDDO
103     c======================================================================
104     c== flux_tr est le flux de traceur (positif vers bas)
105     c DO i = 1, klon
106     c flux_tr(i,1) = zx_coef(i,1)/(RG*dtime)
107     c ENDDO
108     c DO k = 2, klev
109     c DO i = 1, klon
110     c flux_tr(i,k) = zx_coef(i,k)/(RG*dtime)
111     c . * (local_tr(i,k)-local_tr(i,k-1))
112     c ENDDO
113     c ENDDO
114     c======================================================================
115     DO k = 1, klev
116     DO i = 1, klon
117     d_tr(i,k) = local_tr(i,k) - tr(i,k)
118     ENDDO
119     ENDDO
120     c
121     RETURN
122     END

  ViewVC Help
Powered by ViewVC 1.1.21