/[lmdze]/trunk/Sources/misc/coefpoly.f
ViewVC logotype

Annotation of /trunk/Sources/misc/coefpoly.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 91 - (hide annotations)
Wed Mar 26 17:18:58 2014 UTC (10 years, 1 month ago) by guez
Original Path: trunk/dyn3d/coefpoly.f
File size: 1197 byte(s)
Removed unused variables lock_startdate and time_stamp of module
calendar.

Noticed that physiq does not change the surface pressure. So removed
arguments ps and dpfi of subroutine addfi. dpfi was always 0. The
computation of ps in addfi included some averaging at the poles. In
principle, this does not change ps but in practice it does because of
finite numerical precision. So the results of the simulation are
changed. Removed arguments ps and dpfi of calfis. Removed argument
d_ps of physiq.

du at the poles is not computed by dudv1, so declare only the
corresponding latitudes in dudv1. caldyn passes only a section of the
array dudyn as argument.

Removed variable niadv of module iniadvtrac_m.

Declared arguments of exner_hyb as assumed-shape arrays and made all
other horizontal sizes in exner_hyb dynamic. This allows the external
program test_disvert to use exner_hyb at a single horizontal position.

1 guez 3
2 guez 81 ! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/coefpoly.F,v 1.1.1.1 2004/05/19
3     ! 12:53:05 lmdzadmin Exp $
4 guez 3
5 guez 81 SUBROUTINE coefpoly(xf1, xf2, xprim1, xprim2, xtild1, xtild2, a0, a1, a2, a3)
6     IMPLICIT NONE
7 guez 3
8 guez 81 ! ... Auteur : P. Le Van ...
9 guez 3
10    
11 guez 81 ! Calcul des coefficients a0, a1, a2, a3 du polynome de degre 3 qui
12     ! satisfait aux 4 equations suivantes :
13 guez 3
14 guez 81 ! a0 + a1*xtild1 + a2*xtild1*xtild1 + a3*xtild1*xtild1*xtild1 = Xf1
15     ! a0 + a1*xtild2 + a2*xtild2*xtild2 + a3*xtild2*xtild2*xtild2 = Xf2
16     ! a1 + 2.*a2*xtild1 + 3.*a3*xtild1*xtild1 = Xprim1
17     ! a1 + 2.*a2*xtild2 + 3.*a3*xtild2*xtild2 = Xprim2
18 guez 3
19 guez 81 ! On en revient a resoudre un systeme de 4 equat.a 4 inconnues a0,a1,a2,a3
20 guez 3
21 guez 91 DOUBLE PRECISION xf1, xf2, xprim1, xprim2, xtild1, xtild2
22 guez 81 DOUBLE PRECISION a1, a2, a3, a0, xtil1car, xtil2car, derr, x1x2car
23 guez 3
24 guez 81 xtil1car = xtild1*xtild1
25     xtil2car = xtild2*xtild2
26    
27     derr = 2.*(xf2-xf1)/(xtild1-xtild2)
28    
29     x1x2car = (xtild1-xtild2)*(xtild1-xtild2)
30    
31     a3 = (derr+xprim1+xprim2)/x1x2car
32     a2 = (xprim1-xprim2+3.*a3*(xtil2car-xtil1car))/(2.*(xtild1-xtild2))
33    
34     a1 = xprim1 - 3.*a3*xtil1car - 2.*a2*xtild1
35     a0 = xf1 - a3*xtild1*xtil1car - a2*xtil1car - a1*xtild1
36    
37     END SUBROUTINE coefpoly

  ViewVC Help
Powered by ViewVC 1.1.21