Changeset 1524 for trunk/LMDZ.GENERIC/libf/phystd/dyn1d
- Timestamp:
- Mar 29, 2016, 11:45:49 AM (9 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd/dyn1d
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/dyn1d/rcm1d.F
r1494 r1524 19 19 & obliquit,nres,z0,lmixmin,emin_turb,coefvis,coefir, 20 20 & timeperi,e_elips,p_elips 21 use comcstfi_mod, only: pi, cpp, daysec, dtphys,rad, g, r,21 use comcstfi_mod, only: pi, cpp, rad, g, r, 22 22 & mugaz, rcp, omeg 23 use time_phylmdz_mod, only: daysec, dtphys 23 24 use callkeys_mod, only: tracer,check_cpp_match,rings_shadow, 24 & 25 & specOLR,water,pceil,ok_slab_ocean 25 26 USE comvert_mod, ONLY: ap,bp,aps,bps,pa,preff 26 27 USE logic_mod, ONLY: hybrid,autozlevs 28 use inifis_mod, only: inifis 27 29 implicit none 28 30 … … 130 132 character*20,allocatable :: nametrac(:) ! name of the tracer (no need for adv trac common) 131 133 132 real :: latitude , longitude134 real :: latitude(1), longitude(1) 133 135 134 136 c======================================================================= … … 339 341 longitude=longitude*pi/180.E+0 340 342 343 344 !!!!!!!!!!!!!!!!!!!!!!!!!!!!! 345 !!!! PLANETARY CONSTANTS !!!! 346 !!!!!!!!!!!!!!!!!!!!!!!!!!!!! 347 348 g = -99999. 349 PRINT *,'GRAVITY in m s-2 ?' 350 call getin("g",g) 351 IF (g.eq.-99999.) THEN 352 PRINT *,"STOP. I NEED g IN RCM1D.DEF." 353 STOP 354 ELSE 355 PRINT *,"--> g = ",g 356 ENDIF 357 358 rad = -99999. 359 PRINT *,'PLANETARY RADIUS in m ?' 360 call getin("rad",rad) 361 ! Planetary radius is needed to compute shadow of the rings 362 IF (rad.eq.-99999. .and. rings_shadow .eqv. .true.) THEN 363 PRINT *,"STOP. I NEED rad IN RCM1D.DEF." 364 STOP 365 ELSE 366 PRINT *,"--> rad = ",rad 367 ENDIF 368 369 daysec = -99999. 370 PRINT *,'LENGTH OF A DAY in s ?' 371 call getin("daysec",daysec) 372 IF (daysec.eq.-99999.) THEN 373 PRINT *,"STOP. I NEED daysec IN RCM1D.DEF." 374 STOP 375 ELSE 376 PRINT *,"--> daysec = ",daysec 377 ENDIF 378 omeg=4.*asin(1.)/(daysec) 379 PRINT *,"OK. FROM THIS I WORKED OUT:" 380 PRINT *,"--> omeg = ",omeg 381 382 year_day = -99999. 383 PRINT *,'LENGTH OF A YEAR in days ?' 384 call getin("year_day",year_day) 385 IF (year_day.eq.-99999.) THEN 386 PRINT *,"STOP. I NEED year_day IN RCM1D.DEF." 387 STOP 388 ELSE 389 PRINT *,"--> year_day = ",year_day 390 ENDIF 391 392 periastr = -99999. 393 PRINT *,'MIN DIST STAR-PLANET in AU ?' 394 call getin("periastr",periastr) 395 IF (periastr.eq.-99999.) THEN 396 PRINT *,"STOP. I NEED periastr IN RCM1D.DEF." 397 STOP 398 ELSE 399 PRINT *,"--> periastr = ",periastr 400 ENDIF 401 402 apoastr = -99999. 403 PRINT *,'MAX DIST STAR-PLANET in AU ?' 404 call getin("apoastr",apoastr) 405 IF (apoastr.eq.-99999.) THEN 406 PRINT *,"STOP. I NEED apoastr IN RCM1D.DEF." 407 STOP 408 ELSE 409 PRINT *,"--> apoastr = ",apoastr 410 ENDIF 411 412 peri_day = -99999. 413 PRINT *,'DATE OF PERIASTRON in days ?' 414 call getin("peri_day",peri_day) 415 IF (peri_day.eq.-99999.) THEN 416 PRINT *,"STOP. I NEED peri_day IN RCM1D.DEF." 417 STOP 418 ELSE IF (peri_day.gt.year_day) THEN 419 PRINT *,"STOP. peri_day.gt.year_day" 420 STOP 421 ELSE 422 PRINT *,"--> peri_day = ", peri_day 423 ENDIF 424 425 obliquit = -99999. 426 PRINT *,'OBLIQUITY in deg ?' 427 call getin("obliquit",obliquit) 428 IF (obliquit.eq.-99999.) THEN 429 PRINT *,"STOP. I NEED obliquit IN RCM1D.DEF." 430 STOP 431 ELSE 432 PRINT *,"--> obliquit = ",obliquit 433 ENDIF 434 435 psurf = -99999. 436 PRINT *,'SURFACE PRESSURE in Pa ?' 437 call getin("psurf",psurf) 438 IF (psurf.eq.-99999.) THEN 439 PRINT *,"STOP. I NEED psurf IN RCM1D.DEF." 440 STOP 441 ELSE 442 PRINT *,"--> psurf = ",psurf 443 ENDIF 444 !! we need reference pressures 445 pa=psurf/30. 446 preff=psurf ! these values are not needed in 1D (are you sure JL12) 447 448 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 449 !!!! END PLANETARY CONSTANTS !!!! 450 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 451 452 c Date et heure locale du debut du run 453 c ------------------------------------ 454 c Date (en sols depuis le solstice de printemps) du debut du run 455 day0 = 0 ! default value for day0 456 write(*,*) 'Initial date (in martian sols ; =0 at Ls=0)?' 457 call getin("day0",day0) 458 day=float(day0) 459 write(*,*) " day0 = ",day0 460 c Heure de demarrage 461 time=0 ! default value for time 462 write(*,*)'Initial local time (in hours, between 0 and 24)?' 463 call getin("time",time) 464 write(*,*)" time = ",time 465 time=time/24.E+0 ! convert time (hours) to fraction of sol 466 467 468 c Discretisation (Definition de la grille et des pas de temps) 469 c -------------- 470 c 471 nlayer=llm 472 nlevel=nlayer+1 473 nsoil=nsoilmx 474 475 day_step=48 ! default value for day_step 476 PRINT *,'Number of time steps per sol ?' 477 call getin("day_step",day_step) 478 write(*,*) " day_step = ",day_step 479 480 481 ecritphy=day_step ! default value for ecritphy 482 PRINT *,'Nunber of steps between writediagfi ?' 483 call getin("ecritphy",ecritphy) 484 write(*,*) " ecritphy = ",ecritphy 485 486 ndt=10 ! default value for ndt 487 PRINT *,'Number of sols to run ?' 488 call getin("ndt",ndt) 489 write(*,*) " ndt = ",ndt 490 491 ndt=ndt*day_step 492 dtphys=daysec/day_step 493 write(*,*)"-------------------------------------" 494 write(*,*)"-------------------------------------" 495 write(*,*)"--> Physical timestep is ",dtphys 496 write(*,*)"-------------------------------------" 497 write(*,*)"-------------------------------------" 498 341 499 !!! CALL INIFIS 342 500 !!! - read callphys.def … … 355 513 r = 8.314511E+0 * 1000.E+0 / mugaz 356 514 rcp = r / cpp 357 358 359 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!360 !!!! PLANETARY CONSTANTS !!!!361 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!362 363 g = -99999.364 PRINT *,'GRAVITY in m s-2 ?'365 call getin("g",g)366 IF (g.eq.-99999.) THEN367 PRINT *,"STOP. I NEED g IN RCM1D.DEF."368 STOP369 ELSE370 PRINT *,"--> g = ",g371 ENDIF372 373 rad = -99999.374 PRINT *,'PLANETARY RADIUS in m ?'375 call getin("rad",rad)376 ! Planetary radius is needed to compute shadow of the rings377 IF (rad.eq.-99999. .and. rings_shadow .eqv. .true.) THEN378 PRINT *,"STOP. I NEED rad IN RCM1D.DEF."379 STOP380 ELSE381 PRINT *,"--> rad = ",rad382 ENDIF383 384 daysec = -99999.385 PRINT *,'LENGTH OF A DAY in s ?'386 call getin("daysec",daysec)387 IF (daysec.eq.-99999.) THEN388 PRINT *,"STOP. I NEED daysec IN RCM1D.DEF."389 STOP390 ELSE391 PRINT *,"--> daysec = ",daysec392 ENDIF393 omeg=4.*asin(1.)/(daysec)394 PRINT *,"OK. FROM THIS I WORKED OUT:"395 PRINT *,"--> omeg = ",omeg396 397 year_day = -99999.398 PRINT *,'LENGTH OF A YEAR in days ?'399 call getin("year_day",year_day)400 IF (year_day.eq.-99999.) THEN401 PRINT *,"STOP. I NEED year_day IN RCM1D.DEF."402 STOP403 ELSE404 PRINT *,"--> year_day = ",year_day405 ENDIF406 407 periastr = -99999.408 PRINT *,'MIN DIST STAR-PLANET in AU ?'409 call getin("periastr",periastr)410 IF (periastr.eq.-99999.) THEN411 PRINT *,"STOP. I NEED periastr IN RCM1D.DEF."412 STOP413 ELSE414 PRINT *,"--> periastr = ",periastr415 ENDIF416 417 apoastr = -99999.418 PRINT *,'MAX DIST STAR-PLANET in AU ?'419 call getin("apoastr",apoastr)420 IF (apoastr.eq.-99999.) THEN421 PRINT *,"STOP. I NEED apoastr IN RCM1D.DEF."422 STOP423 ELSE424 PRINT *,"--> apoastr = ",apoastr425 ENDIF426 427 peri_day = -99999.428 PRINT *,'DATE OF PERIASTRON in days ?'429 call getin("peri_day",peri_day)430 IF (peri_day.eq.-99999.) THEN431 PRINT *,"STOP. I NEED peri_day IN RCM1D.DEF."432 STOP433 ELSE IF (peri_day.gt.year_day) THEN434 PRINT *,"STOP. peri_day.gt.year_day"435 STOP436 ELSE437 PRINT *,"--> peri_day = ", peri_day438 ENDIF439 440 obliquit = -99999.441 PRINT *,'OBLIQUITY in deg ?'442 call getin("obliquit",obliquit)443 IF (obliquit.eq.-99999.) THEN444 PRINT *,"STOP. I NEED obliquit IN RCM1D.DEF."445 STOP446 ELSE447 PRINT *,"--> obliquit = ",obliquit448 ENDIF449 450 psurf = -99999.451 PRINT *,'SURFACE PRESSURE in Pa ?'452 call getin("psurf",psurf)453 IF (psurf.eq.-99999.) THEN454 PRINT *,"STOP. I NEED psurf IN RCM1D.DEF."455 STOP456 ELSE457 PRINT *,"--> psurf = ",psurf458 ENDIF459 !! we need reference pressures460 pa=psurf/30.461 preff=psurf ! these values are not needed in 1D (are you sure JL12)462 463 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!464 !!!! END PLANETARY CONSTANTS !!!!465 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!466 467 c Date et heure locale du debut du run468 c ------------------------------------469 c Date (en sols depuis le solstice de printemps) du debut du run470 day0 = 0 ! default value for day0471 write(*,*) 'Initial date (in martian sols ; =0 at Ls=0)?'472 call getin("day0",day0)473 day=float(day0)474 write(*,*) " day0 = ",day0475 c Heure de demarrage476 time=0 ! default value for time477 write(*,*)'Initial local time (in hours, between 0 and 24)?'478 call getin("time",time)479 write(*,*)" time = ",time480 time=time/24.E+0 ! convert time (hours) to fraction of sol481 482 483 c Discretisation (Definition de la grille et des pas de temps)484 c --------------485 c486 nlayer=llm487 nlevel=nlayer+1488 nsoil=nsoilmx489 490 day_step=48 ! default value for day_step491 PRINT *,'Number of time steps per sol ?'492 call getin("day_step",day_step)493 write(*,*) " day_step = ",day_step494 495 496 ecritphy=day_step ! default value for ecritphy497 PRINT *,'Nunber of steps between writediagfi ?'498 call getin("ecritphy",ecritphy)499 write(*,*) " ecritphy = ",ecritphy500 501 ndt=10 ! default value for ndt502 PRINT *,'Number of sols to run ?'503 call getin("ndt",ndt)504 write(*,*) " ndt = ",ndt505 506 ndt=ndt*day_step507 dtphys=daysec/day_step508 write(*,*)"-------------------------------------"509 write(*,*)"-------------------------------------"510 write(*,*)"--> Physical timestep is ",dtphys511 write(*,*)"-------------------------------------"512 write(*,*)"-------------------------------------"513 515 514 516 c output spectrum?
Note: See TracChangeset
for help on using the changeset viewer.