Changeset 1194 for trunk/LMDZ.GENERIC/libf
- Timestamp:
- Mar 4, 2014, 11:32:02 AM (11 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/callcorrk.F90
r1161 r1194 180 180 REAL*8 muvarrad(L_LEVELS) 181 181 182 183 182 !=============================================================== 184 183 ! Initialization on first call … … 227 226 call suaer_corrk ! set up aerosol optical properties 228 227 229 Cmk= 0.01 * 1.0 / (g * mugaz * 1.672621e-27) ! q_main=1.0 assumed230 228 231 229 if((igcm_h2o_vap.eq.0) .and. varactive)then … … 714 712 715 713 714 Cmk= 0.01 * 1.0 / (glat(ig) * mugaz * 1.672621e-27) ! q_main=1.0 assumed 715 glat_ig=glat(ig) 716 716 717 !----------------------------------------------------------------------- 717 718 ! Shortwave 718 719 719 720 if(fract(ig) .ge. 1.0e-4) then ! only during daylight! 720 ! if(sum(eclipse) .eq. 0.) then721 ! write(*,*) 'but eclipse is still 0 in physiq !'722 ! endif723 721 if((ngrid.eq.1).and.(global1d))then 724 722 do nw=1,L_NSPECTV … … 801 799 DO l=2,L_NLAYRAD 802 800 dtsw(ig,L_NLAYRAD+1-l)=(fmnetv(l)-fmnetv(l-1)) & 803 *g /(cpp*scalep*(plevrad(2*l+1)-plevrad(2*l-1)))801 *glat(ig)/(cpp*scalep*(plevrad(2*l+1)-plevrad(2*l-1))) 804 802 dtlw(ig,L_NLAYRAD+1-l)=(fmneti(l)-fmneti(l-1)) & 805 *g /(cpp*scalep*(plevrad(2*l+1)-plevrad(2*l-1)))803 *glat(ig)/(cpp*scalep*(plevrad(2*l+1)-plevrad(2*l-1))) 806 804 END DO 807 805 808 806 ! These are values at top of atmosphere 809 807 dtsw(ig,L_NLAYRAD)=(fmnetv(1)-nfluxtopv) & 810 *g /(cpp*scalep*(plevrad(3)-plevrad(1)))808 *glat(ig)/(cpp*scalep*(plevrad(3)-plevrad(1))) 811 809 dtlw(ig,L_NLAYRAD)=(fmneti(1)-nfluxtopi) & 812 *g /(cpp*scalep*(plevrad(3)-plevrad(1)))810 *glat(ig)/(cpp*scalep*(plevrad(3)-plevrad(1))) 813 811 814 812 ! --------------------------------------------------------------- -
trunk/LMDZ.GENERIC/libf/phystd/callkeys.h
r1175 r1194 12 12 & , meanOLR, specOLR & 13 13 & , kastprof, Tstrat & 14 & , nosurf, intheat, flatten 14 & , nosurf, intheat, flatten, oblate & 15 15 & , newtonian, tau_relax, testradtimes & 16 16 & , check_cpp_match, force_cpp & … … 39 39 & , cloudlvl & 40 40 & , pceil & 41 & , Rmean, J2, MassPlanet & 41 42 & , strictboundcorrk 42 43 … … 74 75 logical CLFvarying 75 76 logical nosurf 77 logical oblate 76 78 77 79 integer iddist … … 108 110 real intheat 109 111 real flatten 112 real Rmean 113 real J2 114 real MassPlanet -
trunk/LMDZ.GENERIC/libf/phystd/inifis.F
r1175 r1194 158 158 write(*,*) "rings_shadow = ", rings_shadow 159 159 160 write(*,*) "Flattening of the planet (a-b)/a ?" 160 write(*,*) "Compute latitude-dependent gravity field?" 161 oblate = .false. 162 call getin("oblate", oblate) 163 write(*,*) "oblate = ", oblate 164 165 write(*,*) "Flattening of the planet (a-b)/a " 161 166 flatten = 0.0 162 167 call getin("flatten", flatten) 163 168 write(*,*) "flatten = ", flatten 169 170 171 write(*,*) "Needed if oblate=.true.: J2" 172 J2 = 0.0 173 call getin("J2", J2) 174 write(*,*) "J2 = ", J2 175 176 write(*,*) "Needed if oblate=.true.: Planet mass (*1e24 kg)" 177 MassPlanet = 0.0 178 call getin("MassPlanet", MassPlanet) 179 write(*,*) "MassPlanet = ", MassPlanet 180 181 write(*,*) "Needed if oblate=.true.: Planet mean radius (m)" 182 Rmean = 0.0 183 call getin("Rmean", Rmean) 184 write(*,*) "Rmean = ", Rmean 164 185 165 186 ! Test of incompatibility: -
trunk/LMDZ.GENERIC/libf/phystd/mass_redistribution.F90
r787 r1194 6 6 USE watercommon_h, Only: Tsat_water,RLVTT 7 7 use surfdat_h 8 use radcommon_h, only: glat 8 9 USE comgeomfi_h 9 10 USE tracer_h … … 128 129 zdmass_sum(ig,nlayermx+1)=0. 129 130 DO l = nlayermx, 1, -1 130 zmass(ig,l) = (pplev(ig,l)-pplev(ig,l+1))/g 131 zmass(ig,l) = (pplev(ig,l)-pplev(ig,l+1))/glat(ig) 131 132 zdmass_sum(ig,l)= zdmass_sum(ig,l+1)+pdmassmr(ig,l) 132 133 END DO -
trunk/LMDZ.GENERIC/libf/phystd/optci.F90
r1016 r1194 4 4 5 5 use radinc_h 6 use radcommon_h, only: gasi,tlimit,wrefVAR,Cmk,tgasref,pfgasref,wnoi,scalep,indi 6 use radcommon_h, only: gasi,tlimit,wrefVAR,Cmk,tgasref,pfgasref,wnoi,scalep,indi,glat_ig 7 7 use gases_h 8 8 implicit none … … 123 123 U(k) = Cmk*DPR(k)*mugaz/muvar(k) 124 124 else 125 dz(k) = dpr(k)*R*TMID(K)/(g *PMID(K))*mugaz/muvar(k)125 dz(k) = dpr(k)*R*TMID(K)/(glat_ig*PMID(K))*mugaz/muvar(k) 126 126 U(k) = Cmk*DPR(k)*mugaz/muvar(k) ! only Cmk line in optci.F 127 127 !JL13 the mugaz/muvar factor takes into account water meanmolecular weight if water is present -
trunk/LMDZ.GENERIC/libf/phystd/optcv.F90
r1016 r1194 4 4 5 5 use radinc_h 6 use radcommon_h, only: gasv, tlimit, wrefVAR, Cmk, tgasref, pfgasref,wnov,scalep,indv 6 use radcommon_h, only: gasv, tlimit, wrefVAR, Cmk, tgasref, pfgasref,wnov,scalep,indv,glat_ig 7 7 use gases_h 8 8 … … 111 111 U(k) = Cmk*DPR(k)*mugaz/muvar(k) 112 112 else 113 dz(k) = dpr(k)*R*TMID(K)/(g *PMID(K))*mugaz/muvar(k)113 dz(k) = dpr(k)*R*TMID(K)/(glat_ig*PMID(K))*mugaz/muvar(k) 114 114 U(k) = Cmk*DPR(k)*mugaz/muvar(k) ! only Cmk line in optci.F 115 115 !JL13 the mugaz/muvar factor takes into account water meanmolecular weight if water is present -
trunk/LMDZ.GENERIC/libf/phystd/physiq.F90
r1174 r1194 11 11 use watercommon_h, only : RLVTT, Psat_water,epsi 12 12 use gases_h 13 use radcommon_h, only: sigma, eclipse 13 use radcommon_h, only: sigma, eclipse, glat, grav 14 14 use radii_mod, only: h2o_reffrad, co2_reffrad, h2o_cloudrad 15 15 use aerosol_mod … … 267 267 real ztime_fin 268 268 real zdh(ngrid,nlayermx) 269 real gmplanet 270 269 271 integer length 270 272 parameter (length=100) … … 471 473 !! this is defined in radcommon_h 472 474 ALLOCATE(eclipse(ngrid)) 475 ALLOCATE(glat(ngrid)) 473 476 474 477 ! variables set to 0 … … 648 651 end if 649 652 653 654 655 ! Compute variations of g with latitude (oblate case) 656 ! 657 if (oblate .eq. .false.) then 658 glat(:) = g 659 else if (flatten .eq. 0.0 .or. J2 .eq. 0.0 .or. Rmean .eq. 0.0 .or. MassPlanet .eq. 0.0) then 660 print*,'I need values for flatten, J2, Rmean and MassPlanet to compute glat (else set oblate=.false.)' 661 call abort 662 else 663 664 gmplanet = MassPlanet*grav*1e24 665 do ig=1,ngrid 666 glat(ig)= gmplanet/(Rmean**2) * (1.D0 + 0.75 *J2 - 2.0*flatten/3. + (2.*flatten - 15./4.* J2) * cos(2. * (pi/2. - lati(ig)))) 667 end do 668 endif 669 670 !! write(*,*) 'lati, glat =',lati(1)*180./pi,glat(1), lati(ngrid/2)*180./pi, glat(ngrid/2) 671 672 673 650 674 ! Compute geopotential between layers 651 675 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 652 676 653 zzlay(1:ngrid,1:nlayermx)=pphi(1:ngrid,1:nlayermx)/g 677 zzlay(1:ngrid,1:nlayermx)=pphi(1:ngrid,1:nlayermx) 678 do l=1,nlayermx 679 zzlay(1:ngrid,l)= zzlay(1:ngrid,l)/glat(1:ngrid) 680 enddo 654 681 655 682 zzlev(1:ngrid,1)=0. … … 672 699 zpopsk(ig,l)=(pplay(ig,l)/pplev(ig,1))**rcp 673 700 zh(ig,l)=pt(ig,l)/zpopsk(ig,l) 674 mass(ig,l) = (pplev(ig,l) - pplev(ig,l+1))/g 701 mass(ig,l) = (pplev(ig,l) - pplev(ig,l+1))/glat(ig) 675 702 massarea(ig,l)=mass(ig,l)*area(ig) 676 703 enddo 677 704 enddo 705 678 706 679 707 !----------------------------------------------------------------------- -
trunk/LMDZ.GENERIC/libf/phystd/radcommon_h.F90
r1149 r1194 131 131 132 132 real*8, parameter :: sigma = 5.67032D-8 133 real*8, parameter :: grav = 6.672E-11 133 134 134 135 real*8 Cmk 135 136 save Cmk 137 real*8 glat_ig 138 save glat_ig 136 139 137 140 ! extinction of incoming sunlight (Saturn's rings, eclipses, etc...) 138 141 REAL, DIMENSION(:), ALLOCATABLE :: eclipse 139 142 143 !Latitude-dependent gravity 144 REAL, DIMENSION(:), ALLOCATABLE :: glat 145 140 146 end module radcommon_h -
trunk/LMDZ.GENERIC/libf/phystd/turbdiff.F90
r1016 r1194 8 8 9 9 use watercommon_h, only : RLVTT, T_h2O_ice_liq, RCPD, mx_eau_sol,Psat_water 10 use radcommon_h, only : sigma 10 use radcommon_h, only : sigma, glat 11 11 USE surfdat_h 12 12 USE comgeomfi_h … … 165 165 DO ilay=1,nlay 166 166 DO ig=1,ngrid 167 zmass(ig,ilay)=(pplev(ig,ilay)-pplev(ig,ilay+1))/g 167 zmass(ig,ilay)=(pplev(ig,ilay)-pplev(ig,ilay+1))/glat(ig) 168 168 zExner(ig,ilay)=(pplev(ig,ilay)/pplev(ig,1))**rcp 169 169 zovExner(ig,ilay)=1./ppopsk(ig,ilay)
Note: See TracChangeset
for help on using the changeset viewer.