source: LMDZ4/branches/LMDZ4-dev-20091210/libf/dyn3d/coefpoly.F @ 5005

Last change on this file since 5005 was 1220, checked in by lguez, 15 years ago

-- Replaced "integer*4" declarations by "integer", "real*8" by

"real(kind=8)" and "real*4" by "real". Note that these are the only
modifications in the files "radiation_AR4.F" and "sw_aeroAR4.F90".

-- Corrected the kind of arguments to "max" and "min".

-- Replaced "nH" edit descriptors, which is a deleted feature in

Fortran 95, by character strings.

-- "regr_lat_time_climoz" now allows the pressure coordinate in the

input file to be in descending order.

-- Replaced call to not standard function "float" by call to intrinsic

function "real".

-- Included file "radepsi.h" in "physiq" was not used. Removed it.

The following set of modifications is related to the management of time.

-- In "gcm", "leapfrog" and "sortvarc0", "day_ini" was defined as 1

plus number of days between the reference date "(annee_ref,
day_ref)" and the first day of the current simulation. Changed
definition: "(annee_ref, day_ini)" is the first day of the current
simulation. There is an accompanying modification for "day_end".

-- Corrected bug in call to "ioconf_startdate" in "gcm".

-- Added call to "ioconf_calendar" in "create_etat0_limit".

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1!
2! $Header$
3!
4      SUBROUTINE coefpoly ( Xf1, Xf2, Xprim1, Xprim2, xtild1,xtild2 ,
5     ,                                          a0,a1,a2,a3         )
6      IMPLICIT NONE
7c
8c   ...  Auteur :   P. Le Van  ...
9c
10c
11c    Calcul des coefficients a0, a1, a2, a3 du polynome de degre 3 qui
12c      satisfait aux 4 equations  suivantes :
13
14c    a0 + a1*xtild1 + a2*xtild1*xtild1 + a3*xtild1*xtild1*xtild1 = Xf1
15c    a0 + a1*xtild2 + a2*xtild2*xtild2 + a3*xtild2*xtild2*xtild2 = Xf2
16c               a1  +     2.*a2*xtild1 +     3.*a3*xtild1*xtild1 = Xprim1
17c               a1  +     2.*a2*xtild2 +     3.*a3*xtild2*xtild2 = Xprim2
18
19c  On en revient a resoudre un systeme de 4 equat.a 4 inconnues a0,a1,a2,a3
20
21      REAL(KIND=8) Xf1, Xf2,Xprim1,Xprim2, xtild1,xtild2, xi
22      REAL(KIND=8) Xfout, Xprim
23      REAL(KIND=8) a1,a2,a3,a0, xtil1car, xtil2car,derr,x1x2car
24
25      xtil1car = xtild1 * xtild1
26      xtil2car = xtild2 * xtild2
27
28      derr= 2. *(Xf2-Xf1)/( xtild1-xtild2)
29
30      x1x2car = ( xtild1-xtild2)*(xtild1-xtild2)
31
32      a3 = (derr + Xprim1+Xprim2 )/x1x2car
33      a2     = ( Xprim1 - Xprim2 + 3.* a3 * ( xtil2car-xtil1car ) )    /
34     /           (  2.* ( xtild1 - xtild2 )  )
35
36      a1     = Xprim1 -3.* a3 * xtil1car     -2.* a2 * xtild1
37      a0     =  Xf1 - a3 * xtild1* xtil1car -a2 * xtil1car - a1 *xtild1
38
39      RETURN
40      END
Note: See TracBrowser for help on using the repository browser.