source: trunk/LMDZ.MARS/libf/phymars/tcondwater.F90 @ 3026

Last change on this file since 3026 was 1711, checked in by mvals, 8 years ago

Mars GCM

  • implementation of a sub-grid water cloud fraction scheme (by A. Pottier): If CLFvarying is set to true in callphys.def, then the sub-grid cloud fraction routine is applied in watercloud.F and aeropacity.F.
  • accordingly modified files are: watercloud.F, aeropacity.F, callradite.F, conf_phys.F, phyetat0.F, phyredem.F90, physiq_mod.F, testphys1d.F, callkeys.h, newtsart.F, start2archive.F, lect_start_archive.F
  • added file: tcondwater.F90, used by watercloud.F to calculate the condensation temperature of water
  • watercloud.F, aeropacity.F, callradite.F are converted to module files as watercloud_mod.F, aeropacity_mod.F, callradite_mod.F

MV

File size: 2.7 KB
Line 
1SUBROUTINE tcondwater(nbpts,p,q,tcond)
2IMPLICIT NONE
3
4!---------------------------------------------------
5! Condensation temperature for water ice; based on
6! the saturation in watersat.F AP14
7!--------------------------------------------------i
8
9integer, intent(in) :: nbpts
10real, intent(in), dimension(nbpts):: p,q
11real, intent(out), dimension(nbpts):: tcond
12
13real, dimension(nbpts):: res
14real:: x
15integer:: i
16
17do i=1,nbpts
18   !write(*,*) "i en cours", i, "sur nbpts=", nbpts
19   !write(*,*) "q(i)",q(i),"p(i)",p(i)
20   x=alog10(MAX(q(i),1e-16)*p(i)/(100.*0.41)) ! max pour erreur q<=0
21   ! attention change le 0.41 de place le 10 juin 2014 car priorites
22   ! fortran dans watersat.F
23   !write(*,*) "x tcondwater AP14! :) :) :) :P", x
24   !res(i) = 2.52826991e+02+ 2.39287870e+01*x+ 2.27275932e+00*x**2
25   !        + 2.21832905e-01*x**3+ 2.23453930e-02*x**4+2.26075106e-03*x**5
26   !        + 2.12411064e-04*x**6+1.64642075e-05*x**7+9.22615632e-07*x**8
27   !        + 3.18958825e-08*x**9+5.00656720e-10*x**10 degre 10: trop!
28   res(i) = 2.52846556e+02+ 2.39229653e+01*x+ 2.21333897e+00*x**2  &
29                + 1.79977992e-01*x**3+ 1.00068175e-02*x**4+2.55145012e-04*x**5
30   !write(*,*) "rex(x) tcondwater AP14! :) :) :) :P", res(i)
31enddo
32
33tcond=res
34
35return
36end
37!polynome de degre 5 pas 0.0001
38!polynomial coefs [  2.52846556e+02   2.39229653e+01   2.21333897e+00
39!1.79977992e-01
40!   1.00068175e-02   2.55145012e-04]
41!maximum des abs(difference) 0.0604390646026
42
43! polynome de degre 12
44!polynomial coefs [  2.52826992e+02   2.39287716e+01   2.27274870e+00
45!2.21863471e-01
46 !  2.23765903e-02   2.26605393e-03   2.07841624e-04   1.37374700e-05
47 !  2.45106231e-07  -6.16151111e-08  -6.96026651e-09  -3.22690558e-10
48!  -5.86804217e-12]   maximum des abs(difference) 2.73827428146e-05
49! polynome de degre 6
50!polynomial coefs [  2.52831053e+02   2.39333049e+01   2.26006967e+00
51!2.06350715e-01
52!   1.56882616e-02   7.83034223e-04   1.77637297e-05]
53!maximum des abs(difference) 0.013723768413
54! polynome de degre 8
55! polynomial coefs [  2.52827042e+02   2.39294477e+01   2.27281607e+00
56!2.20637577e-01
57!   2.12491384e-02   1.82810482e-03   1.19638702e-04   4.91167244e-06
58!   9.12272144e-08]
59!maximum des abs(difference) 0.000725035990172
60!polynome de degre 9
61!polynomial coefs [  2.52826985e+02   2.39289186e+01   2.27286626e+00
62!2.21623591e-01
63!   2.20538443e-02   2.11335665e-03   1.73307328e-04   1.04920165e-05
64!   3.94201385e-07   6.70874574e-09]
65!maximum des abs(difference) 0.000168806463876
66!polynome de degre 10
67!polynomial coefs [  2.52826991e+02   2.39287870e+01   2.27275932e+00
68!2.21832905e-01
69!   2.23453930e-02   2.26075106e-03   2.12411064e-04   1.64642075e-05
70!   9.22615632e-07   3.18958825e-08   5.00656720e-10]
71!maximum des abs(difference) 3.96286844477e-05
Note: See TracBrowser for help on using the repository browser.