Changeset 3739 for trunk/LMDZ.MARS/libf/phymars/tcondwater.F90
- Timestamp:
- Apr 26, 2025, 8:20:13 PM (7 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/tcondwater.F90
r1711 r3739 1 SUBROUTINE tcondwater(nbpts,p,q,tcond) 1 module tcondwater_mod 2 3 implicit none 4 5 contains 6 7 subroutine tcondwater(ngrid,nlay,p,q,tcond) 2 8 IMPLICIT NONE 3 9 … … 7 13 !--------------------------------------------------i 8 14 9 integer, intent(in) :: nbpts 10 real, intent(in), dimension(nbpts):: p,q 11 real, intent(out), dimension(nbpts):: tcond 15 integer, intent(in) :: ngrid, nlay 16 real, intent(in) :: p(ngrid,nlay) ! pressure (Pa) 17 real, intent(in) :: q(ngrid,nlay) ! water mass mixing ratio (kg/kg_air) 18 real, intent(out):: tcond(ngrid,nlay) ! condensation temeprature (K) 12 19 13 real, dimension(nbpts):: res14 20 real:: x 15 integer:: i 16 17 do i=1,nbpts 21 integer:: i,j 22 do i=1,ngrid 23 do j=1,nlay 18 24 !write(*,*) "i en cours", i, "sur nbpts=", nbpts 19 25 !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<=026 x=alog10(MAX(q(i,j),1e-16)*p(i,j)/(100.*0.41)) ! max pour erreur q<=0 21 27 ! attention change le 0.41 de place le 10 juin 2014 car priorites 22 28 ! fortran dans watersat.F … … 26 32 ! + 2.12411064e-04*x**6+1.64642075e-05*x**7+9.22615632e-07*x**8 27 33 ! + 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 &34 tcond(i,j) = 2.52846556e+02+ 2.39229653e+01*x+ 2.21333897e+00*x**2 & 29 35 + 1.79977992e-01*x**3+ 1.00068175e-02*x**4+2.55145012e-04*x**5 30 36 !write(*,*) "rex(x) tcondwater AP14! :) :) :) :P", res(i) 37 enddo 31 38 enddo 32 39 33 tcond=res 40 end subroutine tcondwater 34 41 35 return 36 end 42 end module tcondwater_mod 37 43 !polynome de degre 5 pas 0.0001 38 44 !polynomial coefs [ 2.52846556e+02 2.39229653e+01 2.21333897e+00
Note: See TracChangeset
for help on using the changeset viewer.