/[lmdze]/trunk/Sources/dyn3d/Guide/tau2alpha.f
ViewVC logotype

Contents of /trunk/Sources/dyn3d/Guide/tau2alpha.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 140 - (show annotations)
Fri Jun 5 18:58:06 2015 UTC (8 years, 11 months ago) by guez
File size: 1296 byte(s)
Changed unit of variables lat_min_guide and lat_max_guide from module
conf_guide_m from degrees to rad. Then we do not have to convert the
whole array rlat from rad to degrees in SUBROUTINE tau2alpha.

Removed some useless computations in inigeom.

Removed module coefils. Moved variables sddv, unsddv, sddu, unsddu,
eignfnu, eignfnv of module coefils to module inifgn_m. Downgraded
variables coefilu, coefilu2, coefilv, coefilv2, modfrstu, modfrstv of
module coefils to local variables of SUBROUTINE inifilr.

Write and read a 3-dimensional variable Tsoil in restartphy.nc and
startphy.nc instead of multiple variables for the different
subs-urfaces and soil layers. This does not allow any longer to
provide only the surface value in startphy.nc and spread it to other
layers. Instead, if necessary, pre-process the file startphy.nc to
spread the surface value.

1 module tau2alpha_m
2
3 IMPLICIT NONE
4
5 contains
6
7 SUBROUTINE tau2alpha(dxdy, rlat, taumin, taumax, alpha)
8
9 use conf_guide_m, only: lat_min_guide, lat_max_guide, factt
10 use init_tau2alpha_m, only: dxdy_min, dxdy_max, gamma
11 USE nr_util, ONLY: pi, assert_eq
12
13 REAL, intent(in):: dxdy(:, :) ! (n_lon, n_lat)
14 REAL, intent(in):: rlat(:) ! (n_lat)
15 REAL, intent(in):: taumin, taumax
16 real, intent(out):: alpha(:, :) ! (n_lon, n_lat)
17
18 ! Local:
19 REAL alphamin, alphamax, xi
20 INTEGER i, j, n_lon, n_lat
21
22 !------------------------------------------------------------
23
24 PRINT *, 'Call sequence information: tau2alpha'
25
26 n_lon = assert_eq(size(alpha, 1), size(dxdy, 1), "tau2alpha n_lon")
27 n_lat = assert_eq(size(alpha, 2), size(dxdy, 2), size(rlat), &
28 "tau2alpha n_lat")
29
30 alphamin = factt / taumax
31 alphamax = factt / taumin
32
33 DO j = 1, n_lat
34 IF (lat_min_guide <= rlat(j) .AND. rlat(j) <= lat_max_guide) THEN
35 DO i = 1, n_lon
36 xi = min(((dxdy_max - dxdy(i, j)) &
37 / (dxdy_max - dxdy_min))**gamma, 1.)
38 alpha(i, j) = xi * alphamin + (1. - xi) * alphamax
39 END DO
40 ELSE
41 alpha(:, j) = 0.
42 END IF
43 END DO
44
45 END SUBROUTINE tau2alpha
46
47 end module tau2alpha_m

  ViewVC Help
Powered by ViewVC 1.1.21