source: trunk/WRF.COMMON/INTERFACES/module_model_constants.F @ 2751

Last change on this file since 2751 was 2751, checked in by aslmd, 3 years ago

removed LMD_LES_MARS_install save_LES_MARS correcfft now useless

adding links to interfaces in WRFV3 folder

moved module_model_constants to INTERFACES since it is common to WRFV2 and WRFV3.

removed module_model_constants in WRFV3 since it is about to be overwritten by a link to INTERFACES

linked module_model_constants in WRFV2/share and WRFV3/share to the common file in INTERFACES. had to do this after previous commit in a separate way to keep history.

module_init_utilities is linked from WRFV3 to WRFV2 version because we added another interpolation option

removed modif_mars

changed linking to interfaces. symbolic links for routines are in WRFV3/phys and point towards a symbolic link dynphy_wrf_CURRENT in INTERFACES that simply needs to be changed to the correct planetary environment.

added gitignore to avoid committing files created when compiling WRF (now that we compile directly within the source folder)

additions to gitignore, mostly in LMDZ.COMMON

File size: 11.5 KB
Line 
1!WRF:MODEL_LAYER:CONSTANTS
2!
3!PLANET MARS
4
5 MODULE module_model_constants
6   USE module_configure
7   !  2. Following are constants for use in defining real number bounds.
8
9   !  A really small number.
10   character(len=15) :: planet
11   REAL    , PARAMETER :: epsilon         = 1.E-15
12
13   !  4. Following is information related to the physical constants.
14
15   !  These are the physical parameter used within the model.
16
17   !! added in WRFV3
18   real    , parameter :: mwdry        = 43.49 ! molecular weight of dry air (g/mole)
19!
20!-------------------------------
21
22   REAL    , PARAMETER :: asselin      = .025
23!   REAL    , PARAMETER :: asselin      = .0
24   REAL    , PARAMETER :: cb           = 25.
25
26   REAL    , PARAMETER :: XLV0         = 3.15E6
27   REAL    , PARAMETER :: XLV1         = 2370.
28   REAL    , PARAMETER :: XLS0         = 2.905E6
29   REAL    , PARAMETER :: XLS1         = 259.532
30
31   REAL    , PARAMETER :: XLS          = 2.85E6
32   REAL    , PARAMETER :: XLV          = 2.5E6
33   REAL    , PARAMETER :: XLF          = 3.50E5
34
35   REAL    , PARAMETER :: rhowater     = 1000.
36   REAL    , PARAMETER :: rhosnow      = 100.
37   REAL    , PARAMETER :: rhoair0      = 0.02   !Earth Surface density: 1.217 kg/m3
38                                                !Mars Surface density: 0.020 kg/m3
39   REAL    , PARAMETER :: DEGRAD       = 3.1415926/180.
40   REAL    , PARAMETER :: DPD          = 360./669. ! longitude solaire d'un jour?
41
42   REAL    , PARAMETER ::  SVP1=0.6112
43   REAL    , PARAMETER ::  SVP2=17.67
44   REAL    , PARAMETER ::  SVP3=29.65
45   REAL    , PARAMETER ::  SVPT0=273.15
46   REAL    , PARAMETER ::  KARMAN=0.4  ! von karman constant
47   REAL    , PARAMETER ::  STBOLT=5.67051E-8 ! stefan-boltzmann constant
48
49   !! NB: c_s and c_k in WRFV2 moved to module_diffusion_em.F
50   !! NB: no need in WRFV3 because set in namelist
51   REAL    , PARAMETER ::  prandtl = 1./3.0
52                                         ! constants for w-damping option
53!   REAL    , PARAMETER ::  w_alpha = 0.3 ! strength m/s/s
54   REAL    , PARAMETER ::  w_alpha = 2.0 ! strength m/s/s
55!   REAL    , PARAMETER ::  w_beta  = 1.0 ! activation cfl number
56   REAL    , PARAMETER ::  w_beta  = 0.8 ! activation cfl number
57
58!! in WRFV3
59!   REAL    , PARAMETER ::  w_alpha = 0.3 ! strength m/s/s
60!   REAL    , PARAMETER ::  w_beta  = 1.0 ! activation cfl number
61!!
62       REAL , PARAMETER ::  pq0=379.90516
63       REAL , PARAMETER ::  epsq2=0.2
64!      REAL , PARAMETER ::  epsq2=0.02
65       REAL , PARAMETER ::  a2=17.2693882
66       REAL , PARAMETER ::  a3=273.16
67       REAL , PARAMETER ::  a4=35.86
68       REAL , PARAMETER ::  epsq=1.e-12
69!#if ( NMM_CORE == 1 )
70       REAL , PARAMETER ::  climit=1.e-20
71       REAL , PARAMETER ::  cm1=2937.4
72       REAL , PARAMETER ::  cm2=4.9283
73       REAL , PARAMETER ::  cm3=23.5518
74!       REAL , PARAMETER ::  defc=8.0
75!       REAL , PARAMETER ::  defm=32.0
76       REAL , PARAMETER ::  defc=0.0
77       REAL , PARAMETER ::  defm=99999.0
78       REAL , PARAMETER ::  epsfc=1./1.05
79       REAL , PARAMETER ::  epswet=0.0
80       REAL , PARAMETER ::  fcdif=1./3.
81!       REAL , PARAMETER ::  fcm=0.003
82       REAL , PARAMETER ::  fcm=0.00003
83!       REAL , PARAMETER ::  fcm=0.0
84       REAL , PARAMETER ::  p400=40000.0
85       REAL , PARAMETER ::  phitp=15000.0
86       REAL , PARAMETER ::  pi2=2.*3.1415926
87       REAL , PARAMETER ::  plbtm=105000.0
88       REAL , PARAMETER ::  plomd=64200.0
89       REAL , PARAMETER ::  pmdhi=35000.0
90       REAL , PARAMETER ::  q2ini=0.50
91       REAL , PARAMETER ::  rhcrit_land=0.75
92       REAL , PARAMETER ::  rhcrit_sea=0.80
93       REAL , PARAMETER ::  rlag=14.8125
94       REAL , PARAMETER ::  rlx=0.90
95       REAL , PARAMETER ::  scq2=50.0
96       REAL , PARAMETER ::  slopht=0.001
97       REAL , PARAMETER ::  tlc=2.*0.703972477
98       REAL , PARAMETER ::  wa=0.15
99       REAL , PARAMETER ::  wght=0.35
100       REAL , PARAMETER ::  wpc=0.075
101       REAL , PARAMETER ::  z0land=0.10
102!       REAL , PARAMETER ::  z0max=0.01
103       REAL , PARAMETER ::  z0max=0.008
104       REAL , PARAMETER ::  z0sea=0.001
105       REAL, PARAMETER :: r_v=461.6 ! gas constant for water vapor
106!#endif
107
108!!!! needed in WRFV3
109   !  Earth
110
111   !  The value for P2SI *must* be set to 1.0 for Earth
112   !  Although, now we may not need this declaration here (see above)
113   !REAL    , PARAMETER :: P2SI         = 1.0
114
115   !  Orbital constants:
116
117   INTEGER , PARAMETER :: PLANET_YEAR = 365
118   REAL , PARAMETER :: OBLIQUITY = 23.5
119   REAL , PARAMETER :: ECCENTRICITY = 0.014
120   REAL , PARAMETER :: SEMIMAJORAXIS = 1.0 ! In AU
121   ! Don't know the following values, so we'll fake them for now
122   REAL , PARAMETER :: zero_date = 0.0   ! Time of perihelion passage
123   !  Fraction into the year (from perhelion) of the
124   !  occurrence of the Northern Spring Equinox
125   REAL , PARAMETER :: EQUINOX_FRACTION= 0.0
126!!!! needed in WRFV3
127
128   !  These are the physical constants planet dependent used within the model.
129
130     real :: g
131     REAL :: r_d       
132     REAL :: cp         
133     !REAL :: cpp
134     REAL :: cv               
135     REAL :: cpv         
136     REAL :: cvv         
137     REAL :: cvpm       
138     REAL :: cliq       
139     REAL :: cice         
140     REAL :: psat         
141     REAL :: rcv         
142     REAL :: rcp       
143     REAL :: rovg       
144     REAL :: c2     
145     REAL :: EOMEG ! angular rotation rate (rad.s-1) 
146
147     REAL :: p1000mb     
148     REAL :: t0       
149     REAL :: p0         
150     REAL :: cpovcv       
151     REAL :: cvovcp     
152     REAL :: rvovrd     
153     REAL ::  gma
154     REAL ::  EP_1
155     REAL ::  EP_2
156     REAL ::  rfcp
157     REAL ::  p608
158     REAL :: rad
159     REAL :: reradius 
160     Real :: molmas !Molecular mass
161
162    REAL  :: wdaysec        ! duree du sol (s)  ~88775 s
163    REAL  :: wmugaz         ! Masse molaire de l'atm (g.mol-1) ~43.49
164    REAL  :: womeg          ! omega (rad.s-1)
165    REAL  :: wyear_day      ! Duree de l'annee (sols) ~668.6
166    REAL  :: wperiheli      ! Dist.min. soleil-mars (Mkm) ~206.66     
167    REAL  :: waphelie       ! Dist.max. soleil-mars (Mkm) ~249.22
168    REAL  :: wperi_day      ! Date du perihelie (sols depuis printemps)
169    REAL  :: wobliquit      ! Obliquite de la planete (deg) ~25.2
170    REAL  :: wz0            ! surface roughness (m) ~0.01
171    REAL  :: wlmixmin       ! longueur de melange ~100
172    REAL  :: wemin_turb     ! energie minimale ~1.e-8
173    REAL  :: wemissiv       ! Emissivite du sol martien ~.95
174    REAL  :: wemissiceN     !  Emissivite calotte nord
175    REAL  :: wemissiceS     ! Emissivite calotte sud
176    REAL  :: walbediceN     ! Albedo calotte nord !0.5
177    REAL  :: walbediceS     ! Albedo calotte sud  !0.5
178    REAL  :: wiceradiusN    ! mean scat radius of CO2 snow (north)
179    REAL  :: wiceradiusS    ! mean scat radius of CO2 snow (south)
180    REAL  :: wdtemisiceN    ! time scale for snow metamorphism (north) !2 
181    REAL  :: wdtemisiceS    ! time scale for snow metamorphism (south) !2
182    REAL  :: wvolcapa       ! volumetric capacity of soil (new soil model)
183    REAL  :: z_scale        ! scale height
184
185    REAL :: TT00
186    REAL :: nu
187 CONTAINS
188  SUBROUTINE init_module_model_constants
189    IMPLICIT NONE
190    Call initial_config
191    planet=model_config_rec%planet
192    !write(*,*) "unknown planet type", planet
193    !stop
194   
195   !  These are the physical constants used within the model
196   
197    IF ( planet == "mars" ) then
198! JM NOTE -- can we name this grav instead?
199     g = 3.72  ! acceleration due to gravity (m {s}^-2)
200
201!#if ( NMM_CORE == 1 )
202!    REAL :: r_d          = 192.  ! gas constant m2 s-2 K-1
203!    REAL :: cp           = 844.6   ! r= 8.314511E+0 *1000.E+0/mugaz
204!#else
205!    REAL :: r_d          = 192.
206!    REAL :: cp           = 844.6
207!#endif
208
209     r_d          = 191.
210     cp           = 744.5
211     cliq         = 4190.
212     cice         = 2106.
213     psat         = 610.78
214     t0           = 220. ! earth : 300 ... à remplacer par 220 ?
215     p0           = 610.
216     p1000mb      = 610.
217     reradius     = 1./3397200. ! Rayon de mars (m)  ~3397200 m
218     EOMEG        =7.0721E-5 ! angular rotation rate (rad.s-1)
219     wdaysec       = 88800.     ! duree du sol (s)  ~88775 s
220     wmugaz        = 43.49      ! Masse molaire de l'atm (g.mol-1) ~43.49
221     womeg         = 7.0721E-5  ! omega (rad.s-1)
222     wyear_day     = 669.       ! Duree de l'annee (sols) ~668.6
223     wperiheli     = 206.66     ! Dist.min. soleil-mars (Mkm) ~206.66     
224     waphelie      = 249.22     ! Dist.max. soleil-mars (Mkm) ~249.22
225     wperi_day     = 485.       ! Date du perihelie (sols depuis printemps)
226     wobliquit     = 25.2       ! Obliquite de la planete (deg) ~25.2
227     wz0           = 1.e-2      ! surface roughness (m) ~0.01
228     wlmixmin      = 30.        ! longueur de melange ~100
229     wemin_turb    = 1.e-6      ! energie minimale ~1.e-8
230     wemissiv      = 0.95       ! Emissivite du sol martien ~.95
231     wemissiceN    = 0.95       ! Emissivite calotte nord
232     wemissiceS    = 0.95       ! Emissivite calotte sud
233     walbediceN    = 0.65        ! Albedo calotte nord !0.5
234     walbediceS    = 0.65        ! Albedo calotte sud  !0.5
235     wiceradiusN   = 100.e-6    ! mean scat radius of CO2 snow (north)
236     wiceradiusS   = 100.e-6    ! mean scat radius of CO2 snow (south)
237     wdtemisiceN   = 0.4  ! time scale for snow metamorphism (north) !2 
238     wdtemisiceS   = 0.4  ! time scale for snow metamorphism (south) !2
239#ifdef NEWPHYS
240     wvolcapa      = 1.e6       ! volumetric capacity of soil (new soil model)
241#endif
242     TT00=0.
243     nu=0.
244!#endif
245    ELSE if ( planet == "venus") then
246     g            = 8.87
247     r_d          = 191.84383904727036
248     !cpp          = 1000.
249     cp           = 1000.
250     cliq         = 4190.
251     psat         = 610.78
252     t0           = 735. ! earth : 300
253     p0           = 92.e5
254     p1000mb      = 92.e5
255     reradius     = 1./6051800. ! Rayon de mars (m)  ~6051800 m
256     rad          = 6051800.
257     wmugaz       = 43.49
258     womeg        = 0.2992549E-06
259     wdaysec      = 0.1008707E08
260     TT00=460.
261     nu=0.35
262    ELSE if ( planet == "titan") then
263     g            = 1.35
264     r_d          = 290.6
265     !cpp          = 1000.
266     cp           = 1051.
267     cliq         = 4190.
268     psat         = 610.78
269     t0           = 94. ! earth : 300
270     p0           = 1.45e5
271     p1000mb      = 1.45e5
272     reradius     = 1./2575500.0 ! Rayon de mars (m)  ~6051800 m
273     rad          = 2575500.0
274     wmugaz       = 28.6
275     womeg        = 0.2992549E-06 !!!!!!!!!!!!!!!!!!!
276     wdaysec      = 1377665.28
277     TT00=0.
278     nu=0.
279    ELSE if (( planet == "prescribed").or.(planet == "generic")) then
280     open(17,file='planet_constant',form='formatted',status='old')
281     rewind(17)
282     read(17,*) g
283     read(17,*) cp
284     read(17,*) molmas
285     read(17,*) t0
286     read(17,*) p0
287     read(17,*) rad
288     close(17)
289     r_d=8.314/(molmas*1e-3)
290     p1000mb=p0
291     reradius=1./rad
292     TT00=0.
293     nu=0.
294    Else
295     write(*,*) "unknown planet type:", planet
296     stop
297    endif
298     cv           = cp-r_d
299     cpv          = 3.9*r_v
300     cvv          = cpv-r_v
301     cvpm         = -cv/cp
302     rcv          = r_d/cv
303     rcp          = r_d/cp
304     rovg         = r_d/g
305     c2           = cp * rcv
306     cpovcv       = cp/(cp-r_d)
307     cvovcp       = 1./cpovcv
308     rvovrd       = r_v/r_d
309     gma          = -r_d*(1.-rcp)*0.5
310     EP_1         = r_v/r_d-1.
311     EP_2         = r_d/r_v
312     rfcp         =0.25/cp
313     p608         =rvovrd-1.
314     z_scale      =(r_d*t0/g)*1e-3
315    write(*,*) "planet : ", planet
316    write(*,*) "g = ", g
317    write(*,*) "cp = ", cp
318    write(*,*) "r_d = ", r_d
319    write(*,*) "t0 = ", t0
320    write(*,*) "p0 = ", p0
321    write(*,*) "T0 = ", TT00
322    write(*,*) "nu = ", nu
323  END SUBROUTINE init_module_model_constants
324 END MODULE module_model_constants
Note: See TracBrowser for help on using the repository browser.