/[lmdze]/trunk/libf/dyn3d/disvert.f90
ViewVC logotype

Diff of /trunk/libf/dyn3d/disvert.f90

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 48 by guez, Tue Jul 19 12:54:20 2011 UTC revision 65 by guez, Thu Sep 20 09:57:03 2012 UTC
# Line 28  contains Line 28  contains
28    
29      use nr_util, only: pi      use nr_util, only: pi
30      use jumble, only: new_unit      use jumble, only: new_unit
31        use unit_nml_m, only: unit_nml
32    
33      REAL s(llm+1)      REAL s(llm+1)
34      ! "s(l)" is the atmospheric hybrid sigma-pressure coordinate at      ! "s(l)" is the atmospheric hybrid sigma-pressure coordinate at
# Line 37  contains Line 38  contains
38      ! "ds(l)" : épaisseur de la couche "l" dans la coordonnée "s"      ! "ds(l)" : épaisseur de la couche "l" dans la coordonnée "s"
39    
40      INTEGER l, unit      INTEGER l, unit
41      REAL alpha, x(llm), trash      REAL alpha, x(llm)
42    
43      character(len=7):: s_sampling = "LMD5"      character(len=7):: s_sampling = "tropo"
44      ! (other allowed values are "param", "strato1", "strato2" and "read")      ! (other allowed values are "param", "strato1", "strato" and "read")
45    
46      real:: h = 7. ! scale height, in km      real:: h = 7. ! scale height, in km
47      ! (used only if "s_sampling" == "param" or "strato1")      ! (used only if "s_sampling" == "param" or "strato1")
# Line 66  contains Line 67  contains
67    
68      print *, "Enter namelist 'disvert_nml'."      print *, "Enter namelist 'disvert_nml'."
69      read(unit=*, nml=disvert_nml)      read(unit=*, nml=disvert_nml)
70      write(unit=*, nml=disvert_nml)      write(unit_nml, nml=disvert_nml)
71    
72      select case (s_sampling)      select case (s_sampling)
73      case ("param")      case ("param")
# Line 77  contains Line 78  contains
78              = cosh((l - 1) / k0) **(- alpha * k0 / h) &              = cosh((l - 1) / k0) **(- alpha * k0 / h) &
79              * exp(- alpha / h * tanh((llm - k1) / k0) &              * exp(- alpha / h * tanh((llm - k1) / k0) &
80              * beta **(l - 1 - (llm - k1)) / log(beta))              * beta **(l - 1 - (llm - k1)) / log(beta))
81      case ("LMD5")      case ("tropo")
        ! Ancienne discrétisation  
82         s(1) = 1.         s(1) = 1.
83         s(llm+1) = 0.         s(llm+1) = 0.
84         forall (l = 1: llm) ds(l) &         forall (l = 1: llm) ds(l) &
# Line 102  contains Line 102  contains
102    
103         s(2:llm) = (exp(- zz(2:llm) / h) - exp(- zz(llm + 1) / h)) &         s(2:llm) = (exp(- zz(2:llm) / h) - exp(- zz(llm + 1) / h)) &
104              / (1. - exp(- zz(llm + 1) / h))              / (1. - exp(- zz(llm + 1) / h))
105      case ("strato2")      case ("strato")
106         ! Recommended by F. Lott for a domain including the stratosphere         ! Recommended by F. Lott for a domain including the stratosphere
107         s(1) = 1.         s(1) = 1.
108         s(llm+1) = 0.         s(llm+1) = 0.
# Line 120  contains Line 120  contains
120              position="rewind")              position="rewind")
121         read(unit, fmt=*) ! skip title line         read(unit, fmt=*) ! skip title line
122         do l = 1, llm + 1         do l = 1, llm + 1
123            read(unit, fmt=*) trash, s(l)            read(unit, fmt=*) s(l)
124         end do         end do
125         close(unit)         close(unit)
126         ! Quick check:         ! Quick check:

Legend:
Removed from v.48  
changed lines
  Added in v.65

  ViewVC Help
Powered by ViewVC 1.1.21