Changeset 899
- Timestamp:
- Mar 12, 2013, 1:15:20 PM (12 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r890 r899 1841 1841 == 27/02/2013 == EM 1842 1842 - minor bug correction in newcondens.F and some code tidying (in co2snow.F also). 1843 1844 == 12/03/2013 == EM 1845 - added possibility to set slope parameters in testphys1d -
trunk/LMDZ.MARS/deftank/run.def.1d
r627 r899 33 33 # Initial CO2 ice on the surface (kg.m-2) 34 34 co2ice=0 35 # Water ice cap on ground ? 36 watercaptag=.false. 37 ## Slopes parameters: 38 # (for slope insolation scheme, when callslope=.true. in callphys.def) 39 # slope_inclination angle (deg) 0: horizontal, 90: vertical 40 slope_inclination=20.0 41 # slope orientation (deg) 42 # 0 == Northward, 90 == Eastward, 180 == Southward, 270 == Westward 43 slope_orientation=90.0 44 35 45 # hybrid vertical coordinate ? (.true. for hybrid and .false. for sigma levels) 36 46 hybrid=.true. 37 # Water ice cap on ground ?38 watercaptag=.false.39 47 40 48 ###### Initial atmospheric temperature profile -
trunk/LMDZ.MARS/libf/phymars/testphys1d.F
r720 r899 29 29 #include "comgeomfi.h" 30 30 #include "surfdat.h" 31 #include "slope.h" 31 32 #include "comsoil.h" 32 33 #include "comdiurn.h" … … 100 101 101 102 c ------------------------------------------------------ 102 c Constantes prescrites ICI103 c Prescribed constants to be set here 103 104 c ------------------------------------------------------ 104 105 105 106 pi=2.E+0*asin(1.E+0) 106 107 107 c Constante de la Planete Mars108 c Mars planetary constants 108 109 c ---------------------------- 109 rad=3397200. ! rayon de mars (m) ~3397200 m110 daysec=88775. ! duree dusol (s) ~88775 s111 omeg=4.*asin(1.)/(daysec) ! vitesse de rotation(rad.s-1)112 g=3.72 ! gravit e(m.s-2) ~3.72113 mugaz=43.49 ! Masse molaire de l'atm(g.mol-1) ~43.49110 rad=3397200. ! mars radius (m) ~3397200 m 111 daysec=88775. ! length of a sol (s) ~88775 s 112 omeg=4.*asin(1.)/(daysec) ! rotation rate (rad.s-1) 113 g=3.72 ! gravity (m.s-2) ~3.72 114 mugaz=43.49 ! atmosphere mola mass (g.mol-1) ~43.49 114 115 rcp=.256793 ! = r/cp ~0.256793 115 116 r= 8.314511E+0 *1000.E+0/mugaz 116 117 cpp= r/rcp 117 year_day = 669 ! duree de l'annee(sols) ~668.6118 periheli = 206.66 ! dist.min. soleil-mars(Mkm) ~206.66119 aphelie = 249.22 ! dist.max. soleil-mars(Mkm) ~249.22120 peri_day = 485. ! date du perihelie (sols depuis printemps)121 obliquit = 25.2 ! Obliquite de la planete(deg) ~25.2122 123 c P arametres Couche limite et Turbulence124 c -------------------------------------- 125 z0_default = 1.e-2 126 emin_turb = 1.e-6 ! energie minimale~1.e-8127 lmixmin = 30 ! longueur de melange~100128 129 c propriete optiques des calottes et emissivite du sol118 year_day = 669 ! lenght of year (sols) ~668.6 119 periheli = 206.66 ! minimum sun-mars distance (Mkm) ~206.66 120 aphelie = 249.22 ! maximum sun-mars distance (Mkm) ~249.22 121 peri_day = 485. ! perihelion date (sols since N. Spring) 122 obliquit = 25.2 ! Obliquity (deg) ~25.2 123 124 c Planetary Boundary Layer and Turbulence parameters 125 c -------------------------------------------------- 126 z0_default = 1.e-2 ! surface roughness (m) ~0.01 127 emin_turb = 1.e-6 ! minimal turbulent energy ~1.e-8 128 lmixmin = 30 ! mixing length ~100 129 130 c cap properties and surface emissivities 130 131 c ---------------------------------------------------- 131 emissiv= 0.95 ! Emissivite du sol martien~.95132 emisice(1)=0.95 ! Emissivite calotte nord133 emisice(2)=0.95 ! Emissivite calotte sud134 albedice(1)=0.5 ! Albedo calotte nord135 albedice(2)=0.5 ! Albedo calotte sud132 emissiv= 0.95 ! Bare ground emissivity ~.95 133 emisice(1)=0.95 ! Northern cap emissivity 134 emisice(2)=0.95 ! Southern cap emisssivity 135 albedice(1)=0.5 ! Northern cap albedo 136 albedice(2)=0.5 ! Southern cap albedo 136 137 iceradius(1) = 100.e-6 ! mean scat radius of CO2 snow (north) 137 138 iceradius(2) = 100.e-6 ! mean scat radius of CO2 snow (south) 138 139 dtemisice(1) = 2. ! time scale for snow metamorphism (north) 139 140 dtemisice(2) = 2. ! time scale for snow metamorphism (south 140 hybrid=.false. 141 141 142 142 143 c ------------------------------------------------------ 143 c L ecture des parametres dans "run.def"144 c Loading run parameters from "run.def" file 144 145 c ------------------------------------------------------ 145 146 … … 354 355 tnom(iq)=str7 355 356 enddo 357 ! and just to be clean, also initialize tracers to zero for physdem1 358 q(:,:)=0 359 qsurf(:)=0 356 360 endif ! of if (tracer) 357 361 … … 359 363 !write(*,*) "testphys1d qsurf", qsurf 360 364 361 c Date et heure locale du debut durun362 c ------------------------------------ 363 c Date ( en sols depuis le solstice de printemps) du debut durun365 c Date and local time at beginning of run 366 c --------------------------------------- 367 c Date (in sols since spring solstice) at beginning of run 364 368 day0 = 0 ! default value for day0 365 369 write(*,*) 'Initial date (in martian sols ; =0 at Ls=0)?' … … 367 371 day=float(day0) 368 372 write(*,*) " day0 = ",day0 369 c Heure de demarrage373 c Local time at beginning of run 370 374 time=0 ! default value for time 371 375 write(*,*)'Initial local time (in hours, between 0 and 24)?' … … 374 378 time=time/24.E+0 ! convert time (hours) to fraction of sol 375 379 376 c Discreti sation (Definition de la grille et des pas de temps)380 c Discretization (Definition of grid and time steps) 377 381 c -------------- 378 382 c … … 393 397 ndt=ndt*day_step 394 398 dtphys=daysec/day_step 395 c Pression de surface sur la planete 399 400 c Imposed surface pressure 396 401 c ------------------------------------ 397 402 c … … 400 405 call getin("psurf",psurf) 401 406 write(*,*) " psurf = ",psurf 402 c Pression de reference403 pa=20. 404 preff=610. 405 406 c Proprietes des poussiere aerosol407 c Reference pressures 408 pa=20. ! transition pressure (for hybrid coord.) 409 preff=610. ! reference surface pressure 410 411 c Aerosol properties 407 412 c -------------------------------- 408 tauvis=0.2 ! default value for tauvis 413 tauvis=0.2 ! default value for tauvis (dust opacity) 409 414 write(*,'("Reference dust opacity at ",f4.0," Pa ?")')odpref 410 415 call getin("tauvis",tauvis) … … 439 444 long(1)=long(1)*pi/180.E+0 440 445 441 c Initiali sation albedo / inertie du sol442 c -------------------------------------- 446 c Initialize albedo / soil thermal inertia 447 c ---------------------------------------- 443 448 c 444 449 albedodat(1)=0.2 ! default value for albedodat … … 456 461 call getin("z0",z0(1)) 457 462 write(*,*) " z0 = ",z0(1) 458 c 459 c pour le schema d'ondes de gravite 463 464 ! Initialize local slope parameters (only matters if "callslope" 465 ! is .true. in callphys.def) 466 ! slope inclination angle (deg) 0: horizontal, 90: vertical 467 theta_sl(1)=0.0 ! default: no inclination 468 call getin("slope_inclination",theta_sl(1)) 469 ! slope orientation (deg) 470 ! 0 == Northward, 90 == Eastward, 180 == Southward, 270 == Westward 471 psi_sl(1)=0.0 ! default value 472 call getin("slope_orientation",psi_sl(1)) 473 474 c 475 c for the gravity wave scheme 460 476 c --------------------------------- 461 477 c … … 467 483 468 484 469 470 c Initialisation speciales "physiq" 471 c --------------------------------- 472 c la surface de chaque maille est inutile en 1D ---> 485 c Specific initializations for "physiq" 486 c ------------------------------------- 487 c mesh surface (not a very usefull quantity in 1D) 473 488 area(1)=1.E+0 474 489 475 c le geopotentiel au sol est inutile en 1D car tout est controle476 c par la pression de surface --->490 c surface geopotential is not used (or useful) since in 1D 491 c everything is controled by surface pressure 477 492 phisfi(1)=0.E+0 478 493 479 c "inifis" reproduit un certain nombre d'initialisations deja faites 480 c + lecture des clefs de callphys.def 481 c + calcul de la frequence d'appel au rayonnement 482 c + calcul des sinus et cosinus des longitude latitude 494 c "inifis" does some initializations (some of which have already been 495 c done above!) and loads parameters set in callphys.def 483 496 484 497 !Mars possible matter with dtphys in input and include!!! 485 498 CALL inifis(1,llm,day0,daysec,dtphys, 486 499 . lati,long,area,rad,g,r,cpp) 487 c Initialisation pour prendre en compte les vents en 1-D 500 501 c Initialization to take into account prescribed winds 488 502 c ------------------------------------------------------ 489 503 ptif=2.E+0*omeg*sinlat(1) 490 504 491 c vent geostrophique505 c geostrophic wind 492 506 gru=10. ! default value for gru 493 507 PRINT *,'zonal eastward component of the geostrophic wind (m/s) ?' … … 500 514 write(*,*) " v = ",grv 501 515 502 c Initiali sation des vents au premier pas de temps516 c Initialize winds for first time step 503 517 DO ilayer=1,nlayer 504 518 u(ilayer)=gru … … 506 520 ENDDO 507 521 508 c energie cinetique turbulente522 c Initialize turbulente kinetic energy 509 523 DO ilevel=1,nlevel 510 524 q2(ilevel)=0.E+0 511 525 ENDDO 512 526 513 c glace de CO2 au sol527 c CO2 ice on the surface 514 528 c ------------------- 515 529 co2ice=0.E+0 ! default value for co2ice … … 519 533 520 534 c 521 c emissivit e535 c emissivity 522 536 c ---------- 523 537 emis=emissiv … … 529 543 530 544 531 c calcul des pressions et altitudes en utilisant les niveaux sigma545 c Compute pressures and altitudes of atmospheric levels 532 546 c ---------------------------------------------------------------- 533 547 … … 555 569 556 570 557 c profil de temperature au premier appel571 c Initialize temperature profile 558 572 c -------------------------------------- 559 573 pks=psurf**rcp 560 574 561 c altitude en km dans profile: on divise zlay par1000575 c altitude in km in profile: divide zlay by 1000 562 576 tmp1(0)=0.E+0 563 577 DO ilayer=1,nlayer … … 591 605 enddo 592 606 593 c Initiali sation destraceurs607 c Initialize traceurs 594 608 c --------------------------- 595 609 596 610 if (photochem.or.callthermos) then 597 write(*,*) ' Especes chimiques initialisees'598 ! thermo=0: initiali sation pour toutes les couches611 write(*,*) 'Initializing chemical species' 612 ! thermo=0: initialize over all atmospheric layers 599 613 thermo=0 600 614 call inichim_newstart(q,psurf,sig,nqmx,lati,long,area, … … 602 616 endif 603 617 604 c Regarder si le sol est un reservoir de glace d'eau618 c Check if the surface is a water ice reservoir 605 619 c -------------------------------------------------- 606 watercaptag(ngridmx)=.false. ! Par defaut il n'y pas de glace au sol620 watercaptag(ngridmx)=.false. ! Default: no water ice reservoir 607 621 print *,'Water ice cap on ground ?' 608 622 call getin("watercaptag",watercaptag) … … 610 624 611 625 612 c Initiali sation pour les sorties GRADS dans "g1d.dat" et"g1d.ctl"626 c Initialization for GRADS outputs in "g1d.dat" and "g1d.ctl" 613 627 c ---------------------------------------------------------------- 614 c (effectuee avec "writeg1d" a partir de "physiq.F" 615 c ou tout autre subroutine physique, y compris celle ci). 628 c (output done in "writeg1d", typically called by "physiq.F") 616 629 617 630 g1d_nlayer=nlayer … … 623 636 g2d_premier=.true. 624 637 625 c Ecriture de "startfi"638 c Write a "startfi" file 626 639 c -------------------- 627 c (Ce fichier sera aussitot relu au premier 628 c appel de "physiq", mais il est necessaire pour passer 629 c les variables purement physiques a "physiq"... 640 c This file will be read during the first call to "physiq". 641 c It is needed to transfert physics variables to "physiq"... 630 642 631 643 call physdem1("startfi.nc",long,lati,nsoilmx,nqmx, … … 633 645 . tsoil,co2ice,emis,q2,qsurf,area,albedodat, 634 646 . inertiedat,zmea,zstd,zsig,zgam,zthe) 647 635 648 c======================================================================= 636 c BOUCLE TEMPORELLE DU MODELE 1D649 c 1D MODEL TIME STEPPING LOOP 637 650 c======================================================================= 638 651 c … … 656 669 ENDIF 657 670 658 c calcul du geopotentiel671 c compute geopotential 659 672 c ~~~~~~~~~~~~~~~~~~~~~ 660 673 DO ilayer=1,nlayer … … 670 683 ENDDO 671 684 672 c appel de la physique685 c call physics 673 686 c -------------------- 674 687 ! write(*,*) "testphys1d avant q", q(1,:) … … 679 692 , u, v,temp, q, 680 693 , w, 681 C - sorties694 C - outputs 682 695 s du, dv, dtemp, dq,dpsurf,tracerdyn) 683 696 ! write(*,*) "testphys1d apres q", q(1,:) 684 697 685 698 686 c evolution du vent : modele1D687 c ----------------------------- 688 689 c la physique calcule les derivees temporelles de u et v.690 c on y rajoute betement un effet Coriolis.699 c wind increment : specific for 1D 700 c -------------------------------- 701 702 c The physics compute the tendencies on u and v, 703 c here we just add Coriolos effect 691 704 c 692 705 c DO ilayer=1,nlayer … … 695 708 c ENDDO 696 709 697 c Pour certain test : pas de coriolis a l'equateur710 c For some tests : No coriolis force at equator 698 711 c if(lati(1).eq.0.) then 699 712 DO ilayer=1,nlayer … … 704 717 c 705 718 c 706 c C alcul du temps au pas de temps suivant719 c Compute time for next time step 707 720 c --------------------------------------- 708 721 firstcall=.false. … … 713 726 ENDIF 714 727 715 c c alcul des vitesses et temperature au pas de temps suivant728 c compute winds and temperature for next time step 716 729 c ---------------------------------------------------------- 717 730 … … 722 735 ENDDO 723 736 724 c c alcul des pressions au pas de temps suivant737 c compute pressure for next time step 725 738 c ---------------------------------------------------------- 726 739 727 psurf=psurf+dtphys*dpsurf ! evolution de la pression de surface740 psurf=psurf+dtphys*dpsurf ! surface pressure change 728 741 DO ilevel=1,nlevel 729 742 plev(ilevel)=ap(ilevel)+psurf*bp(ilevel) … … 733 746 ENDDO 734 747 735 ! increment tracer values748 ! increment tracers 736 749 DO iq = 1, nqmx 737 750 DO ilayer=1,nlayer … … 740 753 ENDDO 741 754 742 ENDDO ! fin de la boucle temporelle755 ENDDO ! of idt=1,ndt ! end of time stepping loop 743 756 744 757 c ======================================================== 745 c GESTION DES SORTIE758 c OUTPUTS 746 759 c ======================================================== 747 760 748 c fermeture pour conclure les sorties format grads dans "g1d.dat" 749 c et "g1d.ctl" (effectuee avec "writeg1d" a partir de "physiq.F" 750 c ou tout autre subroutine physique, y compris celle ci). 761 c finalize and close grads files "g1d.dat" and "g1d.ctl" 751 762 752 763 c CALL endg1d(1,nlayer,zphi/(g*1000.),ndt) … … 758 769 c*********************************************************************** 759 770 c*********************************************************************** 760 c Subroutines Bidons utilise seulement en 3D, mais 761 c necessaire a la compilation de testphys1d en 1-D 762 763 subroutine gr_fi_dyn 764 RETURN 765 END 771 c Dummy subroutines used only in 3D, but required to 772 c compile testphys1d (to cleanly use writediagfi) 773 774 subroutine gr_fi_dyn(nfield,ngrid,im,jm,pfi,pdyn) 775 776 IMPLICIT NONE 777 778 INTEGER im,jm,ngrid,nfield 779 REAL pdyn(im,jm,nfield) 780 REAL pfi(ngrid,nfield) 781 782 if (ngrid.ne.1) then 783 write(*,*) "gr_fi_dyn error: in 1D ngrid should be 1!!!" 784 stop 785 endif 786 787 pdyn(1,1,1:nfield)=pfi(1,1:nfield) 788 789 end 766 790 767 791 c***********************************************************************
Note: See TracChangeset
for help on using the changeset viewer.