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

Contents of /trunk/Sources/phylmd/screenc.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 227 - (show annotations)
Thu Nov 2 15:47:03 2017 UTC (6 years, 6 months ago) by guez
File size: 3004 byte(s)
Rename phisinit to phis in restart.nc: clearer, same name as Fortran variable.

In aaam_bud, use rlat and rlon from phyetat0_m instead of having these
module variables associated to actual arguments in physiq.

In clmain, too many wind variables make the procedure hard to
understand. Use yu(:knon, 1) and yv(:knon, 1) instead of u1lay(:knon)
and v1lay(:knon). Note that when yu(:knon, 1) and yv(:knon, 1) are
used as actual arguments, they are probably copied to new arrays since
the elements are not contiguous. Rename yu10m to wind10m because this
is the norm of wind vector, not its zonal component. Rename yustar to
ustar. Rename uzon and vmer to u1 and v1 since these are wind
components at first layer and u1 and v1 are the names of corresponding
dummy arguments in stdlevvar.

In clmain, rename yzlev to zlev.

In clmain, screenc, stdlevvar and coefcdrag, remove the code
corresponding to zxli true (not used in LMDZ either).

Subroutine ustarhb becomes a function. Simplifications using the fact
that zx_alf2 = 0 and zx_alf1 = 1 (discarding the possibility to change
this).

In procedure vdif_kcay, remove unused dummy argument plev. Remove
useless computations of sss and sssq.

In clouds_gno, exp(100.) would overflow in single precision. Set
maximum to exp(80.) instead.

In physiq, use u(:, 1) and v(:, 1) as arguments to phytrac instead of
creating ad hoc variables yu1 and yv1.

In stdlevvar, rename dummy argument u_10m to wind10m, following the
corresponding modification in clmain. Simplifications using the fact
that ok_pred = 0 and ok_corr = 1 (discarding the possibility to change
this).

1 module screenc_m
2
3 IMPLICIT NONE
4
5 contains
6
7 SUBROUTINE screenc(klon, knon, nsrf, speed, temp, q_zref, zref, ts, &
8 qsurf, rugos, psol, ustar, testar, qstar, pref, delu, delte, delq)
9
10 ! From LMDZ4/libf/phylmd/screenc.F90, version 1.1.1.1, 2004/05/19 12:53:09
11
12 ! Objet : calcul "correcteur" des anomalies du vent, de la
13 ! temp\'erature potentielle et de l'humidit\'e relative au niveau
14 ! de r\'ef\'erence zref et par rapport au 1er niveau (pour u) ou
15 ! \`a la surface (pour theta et q) \`a partir des equations de
16 ! Louis.
17
18 ! Reference: Hess, Colman et McAvaney (1995)
19
20 ! I. Musat, 01.07.2002
21
22 use coefcdrag_m, only: coefcdrag
23 use SUPHEC_M, only: RG
24
25 INTEGER, intent(in):: klon
26 ! klon----input-I- dimension de la grille physique (=
27 ! nb_pts_latitude X nb_pts_longitude)
28 INTEGER, intent(in):: knon
29 ! knon----input-I- nombre de points pour un type de surface
30 INTEGER, intent(in):: nsrf
31 ! nsrf----input-I- indice pour le type de surface; voir indicesol.inc
32 REAL, dimension(klon), intent(in):: speed, temp, q_zref
33 ! speed---input-R- module du vent au 1er niveau du modele
34 ! temp----input-R- temperature de l'air au 1er niveau du modele
35 ! q_zref--input-R- humidite relative au 1er niveau du modele
36 REAL, intent(in):: zref
37 ! zref----input-R- altitude de reference
38 REAL, dimension(klon), intent(in):: ts, qsurf, rugos, psol
39 ! ts------input-R- temperature de l'air a la surface
40 ! qsurf---input-R- humidite relative a la surface
41 ! rugos---input-R- rugosite
42 ! psol----input-R- pression au sol
43 REAL, dimension(klon), intent(in):: ustar, testar, qstar
44 ! ustar---input-R- facteur d'echelle pour le vent
45 ! testar--input-R- facteur d'echelle pour la temperature potentielle
46 ! qstar---input-R- facteur d'echelle pour l'humidite relative
47
48 REAL, dimension(klon), intent(out):: pref
49 ! pref----input-R- pression au niveau de reference
50 REAL, dimension(klon), intent(out):: delu
51 ! delu----input-R- anomalie du vent par rapport au 1er niveau
52 REAL, dimension(klon), intent(out):: delte
53 ! delte---input-R- anomalie de la temperature potentielle par
54 ! rapport a la surface
55 REAL, dimension(klon), intent(out):: delq
56 ! delq----input-R- anomalie de l'humidite relative par rapport a la surface
57
58 ! Local:
59 INTEGER i
60 REAL, dimension(klon):: cdram, cdrah, cdran, zri1, gref
61
62 !-------------------------------------------------------------------------
63
64 DO i=1, knon
65 gref(i) = zref*RG
66 ENDDO
67
68 ! Richardson at reference level
69
70 CALL coefcdrag (knon, nsrf, speed(:knon), temp(:knon), &
71 q_zref(:knon), gref(:knon), psol(:knon), ts, qsurf, rugos, cdram, &
72 cdrah, cdran, zri1, pref)
73
74 DO i = 1, knon
75 delu(i) = ustar(i) / sqrt(cdram(i))
76 delte(i) = testar(i) * sqrt(cdram(i)) / cdrah(i)
77 delq(i) = qstar(i) * sqrt(cdram(i)) / cdrah(i)
78 ENDDO
79
80 END SUBROUTINE screenc
81
82 end module screenc_m

  ViewVC Help
Powered by ViewVC 1.1.21