/[lmdze]/trunk/Sources/dyn3d/PPM3d/cosa.f
ViewVC logotype

Annotation of /trunk/Sources/dyn3d/PPM3d/cosa.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 166 - (hide annotations)
Wed Jul 29 14:32:55 2015 UTC (8 years, 10 months ago) by guez
File size: 550 byte(s)
Split ppm3d.f into files containing a single procedure.

Factorized computations of filtering matrices into a procedure
inifilr_hemisph. Had then to change the matrices from allocatable to
pointer and from customized lower bound to lower bound 1. The change
in lower bounds does not matter because the matrices are only used as
a whole as actual arguments.

Also, in infilr, instead of finding jfilt[ns][uv] from approximately
jjm /2, start at index j1 that corresponds to the equator. This is not
the same if there is a zoom in latitude.

Also, the test (rlamda(modfrst[ns][uv](j)) * cos(rlat[uv](j)) < 1) in
the loops on filtered latitudes is not useful now that we start from
j1: it is necessarily true. See notes.

Just encapsulated lwvn into a module and removed unused argument ktraer.

1 guez 166 SUBROUTINE cosa(cosp, cose, jnp, pi, dp)
2     DIMENSION cosp(*), cose(*)
3    
4     jmr = jnp - 1
5     DO j = 2, jnp
6     ph5 = -0.5*pi + (float(j-1)-0.5)*dp
7     cose(j) = cos(ph5)
8     END DO
9    
10     jeq = (jnp+1)/2
11     IF (jmr==2*(jmr/2)) THEN
12     DO j = jnp, jeq + 1, -1
13     cose(j) = cose(jnp+2-j)
14     END DO
15     ELSE
16     ! cell edge at equator.
17     cose(jeq+1) = 1.
18     DO j = jnp, jeq + 2, -1
19     cose(j) = cose(jnp+2-j)
20     END DO
21     END IF
22    
23     DO j = 2, jmr
24     cosp(j) = 0.5*(cose(j)+cose(j+1))
25     END DO
26     cosp(1) = 0.
27     cosp(jnp) = 0.
28     RETURN
29     END SUBROUTINE cosa
30    

  ViewVC Help
Powered by ViewVC 1.1.21