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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 140 - (hide 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 guez 37 module tau2alpha_m
2    
3 guez 103 IMPLICIT NONE
4 guez 37
5     contains
6    
7 guez 115 SUBROUTINE tau2alpha(dxdy, rlat, taumin, taumax, alpha)
8 guez 37
9 guez 115 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 guez 37
13 guez 115 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 guez 103
18     ! Local:
19     REAL alphamin, alphamax, xi
20 guez 115 INTEGER i, j, n_lon, n_lat
21 guez 37
22 guez 44 !------------------------------------------------------------
23    
24 guez 115 PRINT *, 'Call sequence information: tau2alpha'
25 guez 109
26 guez 115 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 guez 109
30 guez 115 alphamin = factt / taumax
31     alphamax = factt / taumin
32 guez 113
33 guez 115 DO j = 1, n_lat
34 guez 140 IF (lat_min_guide <= rlat(j) .AND. rlat(j) <= lat_max_guide) THEN
35 guez 115 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 guez 37 END DO
40     ELSE
41 guez 115 alpha(:, j) = 0.
42 guez 37 END IF
43     END DO
44    
45     END SUBROUTINE tau2alpha
46    
47     end module tau2alpha_m

  ViewVC Help
Powered by ViewVC 1.1.21