/[lmdze]/trunk/Sources/bibio/acc.f
ViewVC logotype

Annotation of /trunk/Sources/bibio/acc.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 144 - (hide annotations)
Wed Jun 10 16:46:46 2015 UTC (8 years, 11 months ago) by guez
File size: 411 byte(s)
In procedure fxhyp, the convoluted computation of tanh(fa/fb) occurred
three times. Extracted it into a function. Also, the computation of
xmoy and fxm was repeated. So stored the values in arrays instead.

In procedure fxhyp, in the computation of fhyp, there were tests
xtild(i) == 0. and xtild(i) == pi_d. No use to do these tests at each
iteration. We now they are true for i == nmax and i == 2 * nmax,
respectively, and we know they are false for other values of
"i". Similarly, in the computations of ffdx and xxpr, there were the
tests xmoy == 0. and xmoy == pi_d, these could not be true.

Moved files from bibio to dyn3d, following LMDZ.

1 guez 143 module acc_m
2 guez 81
3 guez 108 implicit none
4 guez 81
5 guez 143 contains
6    
7     SUBROUTINE acc(vec)
8    
9     ! From LMDZ4/libf/filtrez/acc.F, v 1.1.1.1 2004/05/19 12:53:09
10    
11     ! Normalize each column of vec.
12    
13     real, intent(inout):: vec(:, :)
14    
15     ! Local:
16     integer j
17    
18     !--------------------------------------------------
19    
20     forall (j = 1:size(vec, 2)) vec(:, j) = vec(:, j) / sqrt(sum(vec(:, j)**2))
21    
22     END SUBROUTINE acc
23    
24     end module acc_m

  ViewVC Help
Powered by ViewVC 1.1.21