[1216] | 1 | SUBROUTINE inifis(ngrid,nlayer,nq, |
---|
[135] | 2 | $ day_ini,pdaysec,ptimestep, |
---|
| 3 | $ plat,plon,parea, |
---|
| 4 | $ prad,pg,pr,pcpp) |
---|
[253] | 5 | |
---|
| 6 | use radinc_h, only : naerkind |
---|
[374] | 7 | use datafile_mod, only: datadir |
---|
[1216] | 8 | use comdiurn_h, only: sinlat, coslat, sinlon, coslon |
---|
[1295] | 9 | use comgeomfi_h, only: long, lati, area, totarea, totarea_planet |
---|
[1216] | 10 | use comsoil_h, only: ini_comsoil_h |
---|
| 11 | use control_mod, only: ecritphy |
---|
[1384] | 12 | use comcstfi_mod, only: rad, daysec, dtphys, cpp, g, r, rcp, |
---|
| 13 | & mugaz, pi, avocado |
---|
[1308] | 14 | use planete_mod, only: nres |
---|
[1295] | 15 | use planetwide_mod, only: planetwide_sumval |
---|
[1397] | 16 | use callkeys_mod |
---|
[253] | 17 | |
---|
[135] | 18 | !======================================================================= |
---|
| 19 | ! |
---|
| 20 | ! purpose: |
---|
| 21 | ! ------- |
---|
| 22 | ! |
---|
| 23 | ! Initialisation for the physical parametrisations of the LMD |
---|
[305] | 24 | ! Generic Model. |
---|
[135] | 25 | ! |
---|
| 26 | ! author: Frederic Hourdin 15 / 10 /93 |
---|
| 27 | ! ------- |
---|
| 28 | ! modified: Sebastien Lebonnois 11/06/2003 (new callphys.def) |
---|
| 29 | ! Ehouarn Millour (oct. 2008) tracers are now identified |
---|
| 30 | ! by their names and may not be contiguously |
---|
| 31 | ! stored in the q(:,:,:,:) array |
---|
| 32 | ! E.M. (june 2009) use getin routine to load parameters |
---|
| 33 | ! |
---|
| 34 | ! |
---|
| 35 | ! arguments: |
---|
| 36 | ! ---------- |
---|
| 37 | ! |
---|
| 38 | ! input: |
---|
| 39 | ! ------ |
---|
| 40 | ! |
---|
| 41 | ! ngrid Size of the horizontal grid. |
---|
| 42 | ! All internal loops are performed on that grid. |
---|
| 43 | ! nlayer Number of vertical layers. |
---|
| 44 | ! pdayref Day of reference for the simulation |
---|
| 45 | ! pday Number of days counted from the North. Spring |
---|
| 46 | ! equinoxe. |
---|
| 47 | ! |
---|
| 48 | !======================================================================= |
---|
| 49 | ! |
---|
| 50 | !----------------------------------------------------------------------- |
---|
| 51 | ! declarations: |
---|
| 52 | ! ------------- |
---|
[374] | 53 | use datafile_mod, only: datadir |
---|
[135] | 54 | ! to use 'getin' |
---|
[1315] | 55 | ! USE ioipsl_getincom |
---|
| 56 | USE ioipsl_getincom_p |
---|
[135] | 57 | IMPLICIT NONE |
---|
[1384] | 58 | |
---|
[135] | 59 | |
---|
| 60 | |
---|
[1216] | 61 | REAL,INTENT(IN) :: prad,pg,pr,pcpp,pdaysec,ptimestep |
---|
[135] | 62 | |
---|
[1216] | 63 | INTEGER,INTENT(IN) :: ngrid,nlayer,nq |
---|
| 64 | REAL,INTENT(IN) :: plat(ngrid),plon(ngrid),parea(ngrid) |
---|
[135] | 65 | integer day_ini |
---|
| 66 | INTEGER ig,ierr |
---|
| 67 | |
---|
| 68 | EXTERNAL iniorbit,orbite |
---|
| 69 | EXTERNAL SSUM |
---|
| 70 | REAL SSUM |
---|
| 71 | |
---|
| 72 | CHARACTER ch1*12 |
---|
| 73 | CHARACTER ch80*80 |
---|
| 74 | |
---|
| 75 | logical chem, h2o |
---|
| 76 | logical :: parameter, doubleq=.false. |
---|
| 77 | |
---|
[253] | 78 | real psurf,pN2 ! added by RW for Gliese 581d N2+CO2 |
---|
| 79 | |
---|
[1315] | 80 | !$OMP MASTER |
---|
[135] | 81 | rad=prad |
---|
| 82 | daysec=pdaysec |
---|
| 83 | dtphys=ptimestep |
---|
| 84 | cpp=pcpp |
---|
| 85 | g=pg |
---|
| 86 | r=pr |
---|
| 87 | rcp=r/cpp |
---|
| 88 | |
---|
| 89 | avocado = 6.02214179e23 ! added by RW |
---|
| 90 | |
---|
[1315] | 91 | !$OMP END MASTER |
---|
| 92 | !$OMP BARRIER |
---|
[135] | 93 | |
---|
[1216] | 94 | ! read in 'ecritphy' (frequency of calls to physics, in dynamical steps) |
---|
| 95 | ! (also done in dyn3d/defrun_new but not in LMDZ.COMMON) |
---|
[1315] | 96 | call getin_p("ecritphy",ecritphy) |
---|
[1216] | 97 | |
---|
[135] | 98 | ! -------------------------------------------------------------- |
---|
| 99 | ! Reading the "callphys.def" file controlling some key options |
---|
| 100 | ! -------------------------------------------------------------- |
---|
| 101 | |
---|
[1315] | 102 | !$OMP MASTER |
---|
[135] | 103 | ! check that 'callphys.def' file is around |
---|
| 104 | OPEN(99,file='callphys.def',status='old',form='formatted' |
---|
| 105 | & ,iostat=ierr) |
---|
| 106 | CLOSE(99) |
---|
[1397] | 107 | IF(ierr.EQ.0) iscallphys=.true. !iscallphys initialised as false in callkeys_mod module |
---|
[1315] | 108 | !$OMP END MASTER |
---|
| 109 | !$OMP BARRIER |
---|
[135] | 110 | |
---|
[1315] | 111 | !!! IF(ierr.EQ.0) THEN |
---|
| 112 | IF(iscallphys) THEN |
---|
[135] | 113 | PRINT* |
---|
| 114 | PRINT* |
---|
| 115 | PRINT*,'--------------------------------------------' |
---|
| 116 | PRINT*,' inifis: Parametres pour la physique (callphys.def)' |
---|
| 117 | PRINT*,'--------------------------------------------' |
---|
| 118 | |
---|
[374] | 119 | write(*,*) "Directory where external input files are:" |
---|
| 120 | ! default 'datadir' is set in "datadir_mod" |
---|
[1315] | 121 | call getin_p("datadir",datadir) ! default path |
---|
[374] | 122 | write(*,*) " datadir = ",trim(datadir) |
---|
| 123 | |
---|
[135] | 124 | write(*,*) "Run with or without tracer transport ?" |
---|
| 125 | tracer=.false. ! default value |
---|
[1315] | 126 | call getin_p("tracer",tracer) |
---|
[135] | 127 | write(*,*) " tracer = ",tracer |
---|
| 128 | |
---|
[728] | 129 | write(*,*) "Run with or without atm mass update ", |
---|
| 130 | & " due to tracer evaporation/condensation?" |
---|
| 131 | mass_redistrib=.false. ! default value |
---|
[1315] | 132 | call getin_p("mass_redistrib",mass_redistrib) |
---|
[728] | 133 | write(*,*) " mass_redistrib = ",mass_redistrib |
---|
| 134 | |
---|
[135] | 135 | write(*,*) "Diurnal cycle ?" |
---|
| 136 | write(*,*) "(if diurnal=false, diurnal averaged solar heating)" |
---|
| 137 | diurnal=.true. ! default value |
---|
[1315] | 138 | call getin_p("diurnal",diurnal) |
---|
[135] | 139 | write(*,*) " diurnal = ",diurnal |
---|
| 140 | |
---|
| 141 | write(*,*) "Seasonal cycle ?" |
---|
| 142 | write(*,*) "(if season=false, Ls stays constant, to value ", |
---|
| 143 | & "set in 'start'" |
---|
| 144 | season=.true. ! default value |
---|
[1315] | 145 | call getin_p("season",season) |
---|
[135] | 146 | write(*,*) " season = ",season |
---|
| 147 | |
---|
| 148 | write(*,*) "Tidally resonant rotation ?" |
---|
| 149 | tlocked=.false. ! default value |
---|
[1315] | 150 | call getin_p("tlocked",tlocked) |
---|
[135] | 151 | write(*,*) "tlocked = ",tlocked |
---|
| 152 | |
---|
[1133] | 153 | write(*,*) "Saturn ring shadowing ?" |
---|
| 154 | rings_shadow = .false. |
---|
[1315] | 155 | call getin_p("rings_shadow", rings_shadow) |
---|
[1133] | 156 | write(*,*) "rings_shadow = ", rings_shadow |
---|
| 157 | |
---|
[1194] | 158 | write(*,*) "Compute latitude-dependent gravity field?" |
---|
| 159 | oblate = .false. |
---|
[1315] | 160 | call getin_p("oblate", oblate) |
---|
[1194] | 161 | write(*,*) "oblate = ", oblate |
---|
| 162 | |
---|
| 163 | write(*,*) "Flattening of the planet (a-b)/a " |
---|
[1174] | 164 | flatten = 0.0 |
---|
[1315] | 165 | call getin_p("flatten", flatten) |
---|
[1174] | 166 | write(*,*) "flatten = ", flatten |
---|
| 167 | |
---|
[1194] | 168 | |
---|
| 169 | write(*,*) "Needed if oblate=.true.: J2" |
---|
| 170 | J2 = 0.0 |
---|
[1315] | 171 | call getin_p("J2", J2) |
---|
[1194] | 172 | write(*,*) "J2 = ", J2 |
---|
| 173 | |
---|
| 174 | write(*,*) "Needed if oblate=.true.: Planet mass (*1e24 kg)" |
---|
| 175 | MassPlanet = 0.0 |
---|
[1315] | 176 | call getin_p("MassPlanet", MassPlanet) |
---|
[1194] | 177 | write(*,*) "MassPlanet = ", MassPlanet |
---|
| 178 | |
---|
| 179 | write(*,*) "Needed if oblate=.true.: Planet mean radius (m)" |
---|
| 180 | Rmean = 0.0 |
---|
[1315] | 181 | call getin_p("Rmean", Rmean) |
---|
[1194] | 182 | write(*,*) "Rmean = ", Rmean |
---|
| 183 | |
---|
[135] | 184 | ! Test of incompatibility: |
---|
| 185 | ! if tlocked, then diurnal should be false |
---|
| 186 | if (tlocked.and.diurnal) then |
---|
| 187 | print*,'If diurnal=true, we should turn off tlocked.' |
---|
| 188 | stop |
---|
| 189 | endif |
---|
| 190 | |
---|
| 191 | write(*,*) "Tidal resonance ratio ?" |
---|
| 192 | nres=0 ! default value |
---|
[1315] | 193 | call getin_p("nres",nres) |
---|
[135] | 194 | write(*,*) "nres = ",nres |
---|
| 195 | |
---|
| 196 | write(*,*) "Write some extra output to the screen ?" |
---|
| 197 | lwrite=.false. ! default value |
---|
[1315] | 198 | call getin_p("lwrite",lwrite) |
---|
[135] | 199 | write(*,*) " lwrite = ",lwrite |
---|
| 200 | |
---|
| 201 | write(*,*) "Save statistics in file stats.nc ?" |
---|
| 202 | callstats=.true. ! default value |
---|
[1315] | 203 | call getin_p("callstats",callstats) |
---|
[135] | 204 | write(*,*) " callstats = ",callstats |
---|
| 205 | |
---|
| 206 | write(*,*) "Test energy conservation of model physics ?" |
---|
| 207 | enertest=.false. ! default value |
---|
[1315] | 208 | call getin_p("enertest",enertest) |
---|
[135] | 209 | write(*,*) " enertest = ",enertest |
---|
| 210 | |
---|
[538] | 211 | write(*,*) "Check to see if cpp values used match gases.def ?" |
---|
| 212 | check_cpp_match=.true. ! default value |
---|
[1315] | 213 | call getin_p("check_cpp_match",check_cpp_match) |
---|
[538] | 214 | write(*,*) " check_cpp_match = ",check_cpp_match |
---|
| 215 | |
---|
[135] | 216 | write(*,*) "call radiative transfer ?" |
---|
| 217 | callrad=.true. ! default value |
---|
[1315] | 218 | call getin_p("callrad",callrad) |
---|
[135] | 219 | write(*,*) " callrad = ",callrad |
---|
| 220 | |
---|
| 221 | write(*,*) "call correlated-k radiative transfer ?" |
---|
| 222 | corrk=.true. ! default value |
---|
[1315] | 223 | call getin_p("corrk",corrk) |
---|
[135] | 224 | write(*,*) " corrk = ",corrk |
---|
| 225 | |
---|
[1145] | 226 | write(*,*) "prohibit calculations outside corrk T grid?" |
---|
| 227 | strictboundcorrk=.true. ! default value |
---|
[1315] | 228 | call getin_p("strictboundcorrk",strictboundcorrk) |
---|
[1145] | 229 | write(*,*) "strictboundcorrk = ",strictboundcorrk |
---|
| 230 | |
---|
[135] | 231 | write(*,*) "call gaseous absorption in the visible bands?", |
---|
| 232 | & "(matters only if callrad=T)" |
---|
| 233 | callgasvis=.false. ! default value |
---|
[1315] | 234 | call getin_p("callgasvis",callgasvis) |
---|
[135] | 235 | write(*,*) " callgasvis = ",callgasvis |
---|
[538] | 236 | |
---|
[526] | 237 | write(*,*) "call continuum opacities in radiative transfer ?", |
---|
| 238 | & "(matters only if callrad=T)" |
---|
[873] | 239 | continuum=.true. ! default value |
---|
[1315] | 240 | call getin_p("continuum",continuum) |
---|
[873] | 241 | write(*,*) " continuum = ",continuum |
---|
[538] | 242 | |
---|
[716] | 243 | write(*,*) "use analytic function for H2O continuum ?" |
---|
| 244 | H2Ocont_simple=.false. ! default value |
---|
[1315] | 245 | call getin_p("H2Ocont_simple",H2Ocont_simple) |
---|
[716] | 246 | write(*,*) " H2Ocont_simple = ",H2Ocont_simple |
---|
[538] | 247 | |
---|
[135] | 248 | write(*,*) "call turbulent vertical diffusion ?" |
---|
| 249 | calldifv=.true. ! default value |
---|
[1315] | 250 | call getin_p("calldifv",calldifv) |
---|
[135] | 251 | write(*,*) " calldifv = ",calldifv |
---|
| 252 | |
---|
[596] | 253 | write(*,*) "use turbdiff instead of vdifc ?" |
---|
| 254 | UseTurbDiff=.true. ! default value |
---|
[1315] | 255 | call getin_p("UseTurbDiff",UseTurbDiff) |
---|
[596] | 256 | write(*,*) " UseTurbDiff = ",UseTurbDiff |
---|
| 257 | |
---|
[135] | 258 | write(*,*) "call convective adjustment ?" |
---|
| 259 | calladj=.true. ! default value |
---|
[1315] | 260 | call getin_p("calladj",calladj) |
---|
[135] | 261 | write(*,*) " calladj = ",calladj |
---|
| 262 | |
---|
| 263 | write(*,*) "call CO2 condensation ?" |
---|
[716] | 264 | co2cond=.false. ! default value |
---|
[1315] | 265 | call getin_p("co2cond",co2cond) |
---|
[135] | 266 | write(*,*) " co2cond = ",co2cond |
---|
[650] | 267 | ! Test of incompatibility |
---|
| 268 | if (co2cond.and.(.not.tracer)) then |
---|
| 269 | print*,'We need a CO2 ice tracer to condense CO2' |
---|
| 270 | call abort |
---|
[716] | 271 | endif |
---|
| 272 | |
---|
[253] | 273 | write(*,*) "CO2 supersaturation level ?" |
---|
| 274 | co2supsat=1.0 ! default value |
---|
[1315] | 275 | call getin_p("co2supsat",co2supsat) |
---|
[253] | 276 | write(*,*) " co2supsat = ",co2supsat |
---|
| 277 | |
---|
| 278 | write(*,*) "Radiative timescale for Newtonian cooling ?" |
---|
| 279 | tau_relax=30. ! default value |
---|
[1315] | 280 | call getin_p("tau_relax",tau_relax) |
---|
[253] | 281 | write(*,*) " tau_relax = ",tau_relax |
---|
| 282 | tau_relax=tau_relax*24*3600 ! convert Earth days --> seconds |
---|
| 283 | |
---|
[135] | 284 | write(*,*)"call thermal conduction in the soil ?" |
---|
| 285 | callsoil=.true. ! default value |
---|
[1315] | 286 | call getin_p("callsoil",callsoil) |
---|
[135] | 287 | write(*,*) " callsoil = ",callsoil |
---|
| 288 | |
---|
[253] | 289 | write(*,*)"Rad transfer is computed every iradia", |
---|
[135] | 290 | & " physical timestep" |
---|
| 291 | iradia=1 ! default value |
---|
[1315] | 292 | call getin_p("iradia",iradia) |
---|
[135] | 293 | write(*,*)" iradia = ",iradia |
---|
| 294 | |
---|
| 295 | write(*,*)"Rayleigh scattering ?" |
---|
| 296 | rayleigh=.false. |
---|
[1315] | 297 | call getin_p("rayleigh",rayleigh) |
---|
[135] | 298 | write(*,*)" rayleigh = ",rayleigh |
---|
| 299 | |
---|
[253] | 300 | write(*,*) "Use blackbody for stellar spectrum ?" |
---|
| 301 | stelbbody=.false. ! default value |
---|
[1315] | 302 | call getin_p("stelbbody",stelbbody) |
---|
[253] | 303 | write(*,*) " stelbbody = ",stelbbody |
---|
[135] | 304 | |
---|
[253] | 305 | write(*,*) "Stellar blackbody temperature ?" |
---|
| 306 | stelTbb=5800.0 ! default value |
---|
[1315] | 307 | call getin_p("stelTbb",stelTbb) |
---|
[253] | 308 | write(*,*) " stelTbb = ",stelTbb |
---|
| 309 | |
---|
[135] | 310 | write(*,*)"Output mean OLR in 1D?" |
---|
| 311 | meanOLR=.false. |
---|
[1315] | 312 | call getin_p("meanOLR",meanOLR) |
---|
[135] | 313 | write(*,*)" meanOLR = ",meanOLR |
---|
| 314 | |
---|
| 315 | write(*,*)"Output spectral OLR in 3D?" |
---|
| 316 | specOLR=.false. |
---|
[1315] | 317 | call getin_p("specOLR",specOLR) |
---|
[135] | 318 | write(*,*)" specOLR = ",specOLR |
---|
| 319 | |
---|
[253] | 320 | write(*,*)"Operate in kastprof mode?" |
---|
| 321 | kastprof=.false. |
---|
[1315] | 322 | call getin_p("kastprof",kastprof) |
---|
[253] | 323 | write(*,*)" kastprof = ",kastprof |
---|
| 324 | |
---|
[596] | 325 | write(*,*)"Uniform absorption in radiative transfer?" |
---|
[305] | 326 | graybody=.false. |
---|
[1315] | 327 | call getin_p("graybody",graybody) |
---|
[305] | 328 | write(*,*)" graybody = ",graybody |
---|
[253] | 329 | |
---|
[1297] | 330 | ! Slab Ocean |
---|
| 331 | write(*,*) "Use slab-ocean ?" |
---|
| 332 | ok_slab_ocean=.false. ! default value |
---|
[1315] | 333 | call getin_p("ok_slab_ocean",ok_slab_ocean) |
---|
[1297] | 334 | write(*,*) "ok_slab_ocean = ",ok_slab_ocean |
---|
| 335 | |
---|
| 336 | write(*,*) "Use slab-sea-ice ?" |
---|
| 337 | ok_slab_sic=.true. ! default value |
---|
[1315] | 338 | call getin_p("ok_slab_sic",ok_slab_sic) |
---|
[1297] | 339 | write(*,*) "ok_slab_sic = ",ok_slab_sic |
---|
| 340 | |
---|
| 341 | write(*,*) "Use heat transport for the ocean ?" |
---|
| 342 | ok_slab_heat_transp=.true. ! default value |
---|
[1315] | 343 | call getin_p("ok_slab_heat_transp",ok_slab_heat_transp) |
---|
[1297] | 344 | write(*,*) "ok_slab_heat_transp = ",ok_slab_heat_transp |
---|
| 345 | |
---|
| 346 | |
---|
| 347 | |
---|
[253] | 348 | ! Test of incompatibility: |
---|
| 349 | ! if kastprof used, we must be in 1D |
---|
[787] | 350 | if (kastprof.and.(ngrid.gt.1)) then |
---|
[253] | 351 | print*,'kastprof can only be used in 1D!' |
---|
| 352 | call abort |
---|
| 353 | endif |
---|
| 354 | |
---|
| 355 | write(*,*)"Stratospheric temperature for kastprof mode?" |
---|
| 356 | Tstrat=167.0 |
---|
[1315] | 357 | call getin_p("Tstrat",Tstrat) |
---|
[253] | 358 | write(*,*)" Tstrat = ",Tstrat |
---|
| 359 | |
---|
| 360 | write(*,*)"Remove lower boundary?" |
---|
[952] | 361 | nosurf=.false. |
---|
[1315] | 362 | call getin_p("nosurf",nosurf) |
---|
[952] | 363 | write(*,*)" nosurf = ",nosurf |
---|
[253] | 364 | |
---|
| 365 | ! Tests of incompatibility: |
---|
[952] | 366 | if (nosurf.and.callsoil) then |
---|
| 367 | print*,'nosurf not compatible with soil scheme!' |
---|
| 368 | print*,'... got to make a choice!' |
---|
[253] | 369 | call abort |
---|
| 370 | endif |
---|
| 371 | |
---|
[952] | 372 | write(*,*)"Add an internal heat flux?", |
---|
| 373 | . "... matters only if callsoil=F" |
---|
| 374 | intheat=0. |
---|
[1315] | 375 | call getin_p("intheat",intheat) |
---|
[952] | 376 | write(*,*)" intheat = ",intheat |
---|
| 377 | |
---|
[253] | 378 | write(*,*)"Use Newtonian cooling for radiative transfer?" |
---|
| 379 | newtonian=.false. |
---|
[1315] | 380 | call getin_p("newtonian",newtonian) |
---|
[253] | 381 | write(*,*)" newtonian = ",newtonian |
---|
| 382 | |
---|
| 383 | ! Tests of incompatibility: |
---|
| 384 | if (newtonian.and.corrk) then |
---|
| 385 | print*,'newtonian not compatible with correlated-k!' |
---|
| 386 | call abort |
---|
| 387 | endif |
---|
| 388 | if (newtonian.and.calladj) then |
---|
| 389 | print*,'newtonian not compatible with adjustment!' |
---|
| 390 | call abort |
---|
| 391 | endif |
---|
| 392 | if (newtonian.and.calldifv) then |
---|
| 393 | print*,'newtonian not compatible with a boundary layer!' |
---|
| 394 | call abort |
---|
| 395 | endif |
---|
| 396 | |
---|
| 397 | write(*,*)"Test physics timescale in 1D?" |
---|
| 398 | testradtimes=.false. |
---|
[1315] | 399 | call getin_p("testradtimes",testradtimes) |
---|
[253] | 400 | write(*,*)" testradtimes = ",testradtimes |
---|
| 401 | |
---|
| 402 | ! Test of incompatibility: |
---|
| 403 | ! if testradtimes used, we must be in 1D |
---|
[787] | 404 | if (testradtimes.and.(ngrid.gt.1)) then |
---|
[253] | 405 | print*,'testradtimes can only be used in 1D!' |
---|
| 406 | call abort |
---|
| 407 | endif |
---|
| 408 | |
---|
[135] | 409 | write(*,*)"Default planetary temperature?" |
---|
| 410 | tplanet=215.0 |
---|
[1315] | 411 | call getin_p("tplanet",tplanet) |
---|
[135] | 412 | write(*,*)" tplanet = ",tplanet |
---|
| 413 | |
---|
| 414 | write(*,*)"Which star?" |
---|
| 415 | startype=1 ! default value = Sol |
---|
[1315] | 416 | call getin_p("startype",startype) |
---|
[135] | 417 | write(*,*)" startype = ",startype |
---|
| 418 | |
---|
| 419 | write(*,*)"Value of stellar flux at 1 AU?" |
---|
| 420 | Fat1AU=1356.0 ! default value = Sol today |
---|
[1315] | 421 | call getin_p("Fat1AU",Fat1AU) |
---|
[135] | 422 | write(*,*)" Fat1AU = ",Fat1AU |
---|
| 423 | |
---|
| 424 | |
---|
| 425 | ! TRACERS: |
---|
| 426 | |
---|
[253] | 427 | write(*,*)"Varying H2O cloud fraction?" |
---|
| 428 | CLFvarying=.false. ! default value |
---|
[1315] | 429 | call getin_p("CLFvarying",CLFvarying) |
---|
[253] | 430 | write(*,*)" CLFvarying = ",CLFvarying |
---|
| 431 | |
---|
| 432 | write(*,*)"Value of fixed H2O cloud fraction?" |
---|
| 433 | CLFfixval=1.0 ! default value |
---|
[1315] | 434 | call getin_p("CLFfixval",CLFfixval) |
---|
[253] | 435 | write(*,*)" CLFfixval = ",CLFfixval |
---|
| 436 | |
---|
[728] | 437 | write(*,*)"fixed radii for Cloud particles?" |
---|
| 438 | radfixed=.false. ! default value |
---|
[1315] | 439 | call getin_p("radfixed",radfixed) |
---|
[728] | 440 | write(*,*)" radfixed = ",radfixed |
---|
| 441 | |
---|
| 442 | if(kastprof)then |
---|
| 443 | radfixed=.true. |
---|
| 444 | endif |
---|
| 445 | |
---|
| 446 | write(*,*)"Number mixing ratio of CO2 ice particles:" |
---|
| 447 | Nmix_co2=1.e6 ! default value |
---|
[1315] | 448 | call getin_p("Nmix_co2",Nmix_co2) |
---|
[135] | 449 | write(*,*)" Nmix_co2 = ",Nmix_co2 |
---|
| 450 | |
---|
[726] | 451 | ! write(*,*)"Number of radiatively active aerosols:" |
---|
| 452 | ! naerkind=0. ! default value |
---|
[1315] | 453 | ! call getin_p("naerkind",naerkind) |
---|
[726] | 454 | ! write(*,*)" naerkind = ",naerkind |
---|
| 455 | |
---|
[253] | 456 | write(*,*)"Opacity of dust (if used):" |
---|
| 457 | dusttau=0. ! default value |
---|
[1315] | 458 | call getin_p("dusttau",dusttau) |
---|
[253] | 459 | write(*,*)" dusttau = ",dusttau |
---|
| 460 | |
---|
[726] | 461 | write(*,*)"Radiatively active CO2 aerosols?" |
---|
| 462 | aeroco2=.false. ! default value |
---|
[1315] | 463 | call getin_p("aeroco2",aeroco2) |
---|
[726] | 464 | write(*,*)" aeroco2 = ",aeroco2 |
---|
[253] | 465 | |
---|
[726] | 466 | write(*,*)"Fixed CO2 aerosol distribution?" |
---|
| 467 | aerofixco2=.false. ! default value |
---|
[1315] | 468 | call getin_p("aerofixco2",aerofixco2) |
---|
[726] | 469 | write(*,*)" aerofixco2 = ",aerofixco2 |
---|
| 470 | |
---|
| 471 | write(*,*)"Radiatively active water ice?" |
---|
| 472 | aeroh2o=.false. ! default value |
---|
[1315] | 473 | call getin_p("aeroh2o",aeroh2o) |
---|
[726] | 474 | write(*,*)" aeroh2o = ",aeroh2o |
---|
| 475 | |
---|
| 476 | write(*,*)"Fixed H2O aerosol distribution?" |
---|
| 477 | aerofixh2o=.false. ! default value |
---|
[1315] | 478 | call getin_p("aerofixh2o",aerofixh2o) |
---|
[726] | 479 | write(*,*)" aerofixh2o = ",aerofixh2o |
---|
| 480 | |
---|
| 481 | write(*,*)"Radiatively active sulfuric acid aersols?" |
---|
| 482 | aeroh2so4=.false. ! default value |
---|
[1315] | 483 | call getin_p("aeroh2so4",aeroh2so4) |
---|
[726] | 484 | write(*,*)" aeroh2so4 = ",aeroh2so4 |
---|
[1026] | 485 | |
---|
[1151] | 486 | !================================= |
---|
| 487 | |
---|
[1026] | 488 | write(*,*)"Radiatively active two-layer aersols?" |
---|
| 489 | aeroback2lay=.false. ! default value |
---|
[1315] | 490 | call getin_p("aeroback2lay",aeroback2lay) |
---|
[1026] | 491 | write(*,*)" aeroback2lay = ",aeroback2lay |
---|
[726] | 492 | |
---|
[1155] | 493 | write(*,*)"TWOLAY AEROSOL: total optical depth ", |
---|
| 494 | & "in the tropospheric layer (visible)" |
---|
[1151] | 495 | obs_tau_col_tropo=8.D0 |
---|
[1315] | 496 | call getin_p("obs_tau_col_tropo",obs_tau_col_tropo) |
---|
[1151] | 497 | write(*,*)" obs_tau_col_tropo = ",obs_tau_col_tropo |
---|
[1026] | 498 | |
---|
[1155] | 499 | write(*,*)"TWOLAY AEROSOL: total optical depth ", |
---|
| 500 | & "in the stratospheric layer (visible)" |
---|
[1151] | 501 | obs_tau_col_strato=0.08D0 |
---|
[1315] | 502 | call getin_p("obs_tau_col_strato",obs_tau_col_strato) |
---|
[1151] | 503 | write(*,*)" obs_tau_col_strato = ",obs_tau_col_strato |
---|
| 504 | |
---|
| 505 | write(*,*)"TWOLAY AEROSOL: pres_bottom_tropo? in pa" |
---|
| 506 | pres_bottom_tropo=66000.0 |
---|
[1315] | 507 | call getin_p("pres_bottom_tropo",pres_bottom_tropo) |
---|
[1151] | 508 | write(*,*)" pres_bottom_tropo = ",pres_bottom_tropo |
---|
| 509 | |
---|
| 510 | write(*,*)"TWOLAY AEROSOL: pres_top_tropo? in pa" |
---|
| 511 | pres_top_tropo=18000.0 |
---|
[1315] | 512 | call getin_p("pres_top_tropo",pres_top_tropo) |
---|
[1151] | 513 | write(*,*)" pres_top_tropo = ",pres_top_tropo |
---|
| 514 | |
---|
| 515 | write(*,*)"TWOLAY AEROSOL: pres_bottom_strato? in pa" |
---|
| 516 | pres_bottom_strato=2000.0 |
---|
[1315] | 517 | call getin_p("pres_bottom_strato",pres_bottom_strato) |
---|
[1151] | 518 | write(*,*)" pres_bottom_strato = ",pres_bottom_strato |
---|
| 519 | |
---|
| 520 | write(*,*)"TWOLAY AEROSOL: pres_top_strato? in pa" |
---|
| 521 | pres_top_strato=100.0 |
---|
[1315] | 522 | call getin_p("pres_top_strato",pres_top_strato) |
---|
[1151] | 523 | write(*,*)" pres_top_strato = ",pres_top_strato |
---|
| 524 | |
---|
[1155] | 525 | write(*,*)"TWOLAY AEROSOL: particle size in the ", |
---|
| 526 | & "tropospheric layer, in meters" |
---|
[1151] | 527 | size_tropo=2.e-6 |
---|
[1315] | 528 | call getin_p("size_tropo",size_tropo) |
---|
[1151] | 529 | write(*,*)" size_tropo = ",size_tropo |
---|
| 530 | |
---|
[1155] | 531 | write(*,*)"TWOLAY AEROSOL: particle size in the ", |
---|
| 532 | & "stratospheric layer, in meters" |
---|
[1151] | 533 | size_strato=1.e-7 |
---|
[1315] | 534 | call getin_p("size_strato",size_strato) |
---|
[1151] | 535 | write(*,*)" size_strato = ",size_strato |
---|
| 536 | |
---|
| 537 | !================================= |
---|
| 538 | |
---|
[305] | 539 | write(*,*)"Cloud pressure level (with kastprof only):" |
---|
| 540 | cloudlvl=0. ! default value |
---|
[1315] | 541 | call getin_p("cloudlvl",cloudlvl) |
---|
[305] | 542 | write(*,*)" cloudlvl = ",cloudlvl |
---|
| 543 | |
---|
[135] | 544 | write(*,*)"Is the variable gas species radiatively active?" |
---|
[305] | 545 | Tstrat=167.0 |
---|
[135] | 546 | varactive=.false. |
---|
[1315] | 547 | call getin_p("varactive",varactive) |
---|
[135] | 548 | write(*,*)" varactive = ",varactive |
---|
| 549 | |
---|
| 550 | write(*,*)"Is the variable gas species distribution set?" |
---|
| 551 | varfixed=.false. |
---|
[1315] | 552 | call getin_p("varfixed",varfixed) |
---|
[135] | 553 | write(*,*)" varfixed = ",varfixed |
---|
| 554 | |
---|
| 555 | write(*,*)"What is the saturation % of the variable species?" |
---|
| 556 | satval=0.8 |
---|
[1315] | 557 | call getin_p("satval",satval) |
---|
[135] | 558 | write(*,*)" satval = ",satval |
---|
| 559 | |
---|
| 560 | |
---|
| 561 | ! Test of incompatibility: |
---|
| 562 | ! if varactive, then varfixed should be false |
---|
| 563 | if (varactive.and.varfixed) then |
---|
| 564 | print*,'if varactive, varfixed must be OFF!' |
---|
| 565 | stop |
---|
| 566 | endif |
---|
| 567 | |
---|
| 568 | write(*,*) "Gravitationnal sedimentation ?" |
---|
[716] | 569 | sedimentation=.false. ! default value |
---|
[1315] | 570 | call getin_p("sedimentation",sedimentation) |
---|
[135] | 571 | write(*,*) " sedimentation = ",sedimentation |
---|
| 572 | |
---|
| 573 | write(*,*) "Compute water cycle ?" |
---|
| 574 | water=.false. ! default value |
---|
[1315] | 575 | call getin_p("water",water) |
---|
[135] | 576 | write(*,*) " water = ",water |
---|
| 577 | |
---|
[622] | 578 | ! Test of incompatibility: |
---|
| 579 | ! if water is true, there should be at least a tracer |
---|
| 580 | if (water.and.(.not.tracer)) then |
---|
| 581 | print*,'if water is ON, tracer must be ON too!' |
---|
| 582 | stop |
---|
| 583 | endif |
---|
| 584 | |
---|
[135] | 585 | write(*,*) "Include water condensation ?" |
---|
| 586 | watercond=.false. ! default value |
---|
[1315] | 587 | call getin_p("watercond",watercond) |
---|
[135] | 588 | write(*,*) " watercond = ",watercond |
---|
| 589 | |
---|
[622] | 590 | ! Test of incompatibility: |
---|
| 591 | ! if watercond is used, then water should be used too |
---|
| 592 | if (watercond.and.(.not.water)) then |
---|
| 593 | print*,'if watercond is used, water should be used too' |
---|
| 594 | stop |
---|
| 595 | endif |
---|
| 596 | |
---|
[135] | 597 | write(*,*) "Include water precipitation ?" |
---|
| 598 | waterrain=.false. ! default value |
---|
[1315] | 599 | call getin_p("waterrain",waterrain) |
---|
[135] | 600 | write(*,*) " waterrain = ",waterrain |
---|
| 601 | |
---|
[253] | 602 | write(*,*) "Include surface hydrology ?" |
---|
| 603 | hydrology=.false. ! default value |
---|
[1315] | 604 | call getin_p("hydrology",hydrology) |
---|
[253] | 605 | write(*,*) " hydrology = ",hydrology |
---|
[135] | 606 | |
---|
[253] | 607 | write(*,*) "Evolve surface water sources ?" |
---|
| 608 | sourceevol=.false. ! default value |
---|
[1315] | 609 | call getin_p("sourceevol",sourceevol) |
---|
[253] | 610 | write(*,*) " sourceevol = ",sourceevol |
---|
[135] | 611 | |
---|
[486] | 612 | write(*,*) "Ice evolution timestep ?" |
---|
| 613 | icetstep=100.0 ! default value |
---|
[1315] | 614 | call getin_p("icetstep",icetstep) |
---|
[486] | 615 | write(*,*) " icetstep = ",icetstep |
---|
| 616 | |
---|
[253] | 617 | write(*,*) "Snow albedo ?" |
---|
| 618 | albedosnow=0.5 ! default value |
---|
[1315] | 619 | call getin_p("albedosnow",albedosnow) |
---|
[253] | 620 | write(*,*) " albedosnow = ",albedosnow |
---|
[135] | 621 | |
---|
[253] | 622 | write(*,*) "Maximum ice thickness ?" |
---|
| 623 | maxicethick=2.0 ! default value |
---|
[1315] | 624 | call getin_p("maxicethick",maxicethick) |
---|
[253] | 625 | write(*,*) " maxicethick = ",maxicethick |
---|
[135] | 626 | |
---|
[253] | 627 | write(*,*) "Freezing point of seawater ?" |
---|
| 628 | Tsaldiff=-1.8 ! default value |
---|
[1315] | 629 | call getin_p("Tsaldiff",Tsaldiff) |
---|
[253] | 630 | write(*,*) " Tsaldiff = ",Tsaldiff |
---|
[135] | 631 | |
---|
[589] | 632 | write(*,*) "Does user want to force cpp and mugaz?" |
---|
| 633 | force_cpp=.false. ! default value |
---|
[1315] | 634 | call getin_p("force_cpp",force_cpp) |
---|
[589] | 635 | write(*,*) " force_cpp = ",force_cpp |
---|
| 636 | |
---|
| 637 | if (force_cpp) then |
---|
| 638 | mugaz = -99999. |
---|
| 639 | PRINT *,'MEAN MOLECULAR MASS in g mol-1 ?' |
---|
[1315] | 640 | call getin_p("mugaz",mugaz) |
---|
[589] | 641 | IF (mugaz.eq.-99999.) THEN |
---|
| 642 | PRINT *, "mugaz must be set if force_cpp = T" |
---|
| 643 | STOP |
---|
| 644 | ELSE |
---|
| 645 | write(*,*) "mugaz=",mugaz |
---|
| 646 | ENDIF |
---|
| 647 | cpp = -99999. |
---|
| 648 | PRINT *,'SPECIFIC HEAT CAPACITY in J K-1 kg-1 ?' |
---|
[1315] | 649 | call getin_p("cpp",cpp) |
---|
[589] | 650 | IF (cpp.eq.-99999.) THEN |
---|
| 651 | PRINT *, "cpp must be set if force_cpp = T" |
---|
| 652 | STOP |
---|
| 653 | ELSE |
---|
| 654 | write(*,*) "cpp=",cpp |
---|
| 655 | ENDIF |
---|
[961] | 656 | ! else |
---|
| 657 | ! mugaz=8.314*1000./pr |
---|
[589] | 658 | endif |
---|
[253] | 659 | call su_gases |
---|
| 660 | call calc_cpp_mugaz |
---|
[135] | 661 | |
---|
| 662 | PRINT*,'--------------------------------------------' |
---|
| 663 | PRINT* |
---|
| 664 | PRINT* |
---|
| 665 | ELSE |
---|
| 666 | write(*,*) |
---|
| 667 | write(*,*) 'Cannot read file callphys.def. Is it here ?' |
---|
| 668 | stop |
---|
| 669 | ENDIF |
---|
| 670 | |
---|
| 671 | 8000 FORMAT(t5,a12,l8) |
---|
| 672 | 8001 FORMAT(t5,a12,i8) |
---|
| 673 | |
---|
| 674 | PRINT* |
---|
| 675 | PRINT*,'inifis: daysec',daysec |
---|
| 676 | PRINT* |
---|
| 677 | PRINT*,'inifis: The radiative transfer is computed:' |
---|
| 678 | PRINT*,' each ',iradia,' physical time-step' |
---|
| 679 | PRINT*,' or each ',iradia*dtphys,' seconds' |
---|
| 680 | PRINT* |
---|
| 681 | |
---|
| 682 | |
---|
| 683 | !----------------------------------------------------------------------- |
---|
| 684 | ! Some more initialization: |
---|
| 685 | ! ------------------------ |
---|
| 686 | |
---|
[787] | 687 | ! ALLOCATE ARRAYS IN comgeomfi_h |
---|
| 688 | IF (.not. ALLOCATED(lati)) ALLOCATE(lati(ngrid)) |
---|
| 689 | IF (.not. ALLOCATED(long)) ALLOCATE(long(ngrid)) |
---|
| 690 | IF (.not. ALLOCATED(area)) ALLOCATE(area(ngrid)) |
---|
| 691 | |
---|
[135] | 692 | CALL SCOPY(ngrid,plon,1,long,1) |
---|
| 693 | CALL SCOPY(ngrid,plat,1,lati,1) |
---|
| 694 | CALL SCOPY(ngrid,parea,1,area,1) |
---|
[787] | 695 | totarea=SSUM(ngrid,area,1) |
---|
[1295] | 696 | call planetwide_sumval(area,totarea_planet) |
---|
[135] | 697 | |
---|
[787] | 698 | !! those are defined in comdiurn_h.F90 |
---|
| 699 | IF (.not.ALLOCATED(sinlat)) ALLOCATE(sinlat(ngrid)) |
---|
| 700 | IF (.not.ALLOCATED(coslat)) ALLOCATE(coslat(ngrid)) |
---|
| 701 | IF (.not.ALLOCATED(sinlon)) ALLOCATE(sinlon(ngrid)) |
---|
| 702 | IF (.not.ALLOCATED(coslon)) ALLOCATE(coslon(ngrid)) |
---|
| 703 | |
---|
[135] | 704 | DO ig=1,ngrid |
---|
| 705 | sinlat(ig)=sin(plat(ig)) |
---|
| 706 | coslat(ig)=cos(plat(ig)) |
---|
| 707 | sinlon(ig)=sin(plon(ig)) |
---|
| 708 | coslon(ig)=cos(plon(ig)) |
---|
| 709 | ENDDO |
---|
[1216] | 710 | |
---|
[1315] | 711 | !$OMP MASTER |
---|
[1384] | 712 | pi=2.*asin(1.) ! NB: pi is a common in comcstfi_mod |
---|
[1315] | 713 | !$OMP END MASTER |
---|
| 714 | !$OMP BARRIER |
---|
[135] | 715 | |
---|
[1216] | 716 | ! allocate "comsoil_h" arrays |
---|
| 717 | call ini_comsoil_h(ngrid) |
---|
| 718 | |
---|
[135] | 719 | END |
---|