Changeset 4082


Ignore:
Timestamp:
Feb 24, 2026, 11:47:22 AM (34 hours ago)
Author:
debatzbr
Message:

Pluto PCM: Allows for calculation of zzlev and zzlay with g variable.
BBT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90

    r4078 r4082  
    407407      real zdpsrfmr(ngrid)        ! Pressure tendency for mass_redistribution routine (Pa/s).
    408408
     409      real gz(ngrid,nlayer)       ! Variation of g with altitude from aeroid surface
     410      real tlaymean               ! Temporary value of mean layer temperature for zzlay
     411
    409412      ! Local variables for MICROPHYSICS:
    410413      ! ---------------------------------
     
    776779      endif
    777780
    778       glat(:) = g !AF24: removed oblateness
    779 
    780781      ! Compute geopotential between layers.
    781782      ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    782       zzlay(1:ngrid,1:nlayer)=pphi(1:ngrid,1:nlayer)
    783       do l=1,nlayer
    784          zzlay(1:ngrid,l)= zzlay(1:ngrid,l)/glat(1:ngrid)
    785       enddo
    786 
    787       zzlev(1:ngrid,1)=0.
    788 
    789       do l=2,nlayer
    790          do ig=1,ngrid
     783      glat(:) = g !AF24: removed oblateness
     784
     785      !zzlay(1:ngrid,1:nlayer)=pphi(1:ngrid,1:nlayer)
     786      !do l=1,nlayer
     787      !   zzlay(1:ngrid,l)= zzlay(1:ngrid,l)/glat(1:ngrid)
     788      !enddo
     789      !zzlev(1:ngrid,1)=0.
     790      !do l=2,nlayer
     791      !   do ig=1,ngrid
     792      !      z1=(pplay(ig,l-1)+pplev(ig,l))/(pplay(ig,l-1)-pplev(ig,l))
     793      !      z2=(pplev(ig,l)+pplay(ig,l))/(pplev(ig,l)-pplay(ig,l))
     794      !      zzlev(ig,l)=(z1*zzlay(ig,l-1)+z2*zzlay(ig,l))/(z1+z2)
     795      !   enddo
     796      !enddo
     797      !Altitude of top interface (nlayer+1), using the thicknesss of the level below the top one. LT22
     798      !zzlev(1:ngrid,nlayer+1) = 2*zzlev(1:ngrid,nlayer)-zzlev(1:ngrid,nlayer-1)
     799     
     800      ! Calculation zzlev & zzlay with g variable (from Mars PCM)
     801      do ig = 1, ngrid
     802         ! First layer
     803         zzlay(ig,1) = -(log(pplay(ig,1)/pplev(ig,1)))*r*pt(ig,1)/g
     804         zzlev(ig,1) = 0
     805         gz(ig,1) = g
     806         do l = 2, nlayer
     807            ! compute "mean" temperature of the layer
     808            if(pt(ig,l) .eq. pt(ig,l-1)) then
     809               tlaymean = pt(ig,l)
     810            else
     811               tlaymean = (pt(ig,l)- pt(ig,l-1))/log(pt(ig,l)/pt(ig,l-1))
     812            endif
     813            ! compute gravitational acceleration (at altitude zaeroid(nlayer-1))
     814            gz(ig,l) = g * (rad**2) / (rad+zzlay(ig,l-1)+(phisfi(ig)/g))**2
     815            zzlay(ig,l)=zzlay(ig,l-1)-(log(pplay(ig,l)/pplay(ig,l-1))*&
     816                        r*tlaymean/gz(ig,l))
    791817            z1=(pplay(ig,l-1)+pplev(ig,l))/(pplay(ig,l-1)-pplev(ig,l))
    792818            z2=(pplev(ig,l)+pplay(ig,l))/(pplev(ig,l)-pplay(ig,l))
    793819            zzlev(ig,l)=(z1*zzlay(ig,l-1)+z2*zzlay(ig,l))/(z1+z2)
    794820         enddo
     821         zzlev(ig,nlayer+1) = 2*zzlev(ig,nlayer)-zzlev(ig,nlayer-1)
    795822      enddo
    796 
    797       !Altitude of top interface (nlayer+1), using the thicknesss of the level below the top one. LT22
    798 
    799       zzlev(1:ngrid,nlayer+1) = 2*zzlev(1:ngrid,nlayer)-zzlev(1:ngrid,nlayer-1)
    800823
    801824      ! Compute potential temperature
     
    838861      endif
    839862
    840       !  Compute variations of g with latitude (to do).
     863      !  Compute variations of g with altitude (to do).
    841864      ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    842865      gzlat(:,:) = g
     866      !gzlat(:,:) = gz(:,:)
    843867
    844868      ! Initialize microphysical diagnostics.
     
    11431167              print*, 'Read temp file from ',file_path
    11441168              ! levs have been put in km
    1145               DO ig=1,ngrid
    1146                 CALL interp_line(levdat,tempdat,Nfine,zzlay(ig,:)/1000.,tmean(ig,:),nlayer)
    1147               enddo
    11481169            endif
    11491170            if (fixed_temp_prof) then
     1171               do ig=1,ngrid
     1172                call interp_line(levdat,tempdat,Nfine,zzlay(ig,:)/1000.,tmean(ig,:),nlayer)
     1173               enddo
    11501174               DO ig=1,ngrid
    11511175                 dtrad(ig,1:nlayer)=(tmean(ig,1:nlayer)-(pt(ig,1:nlayer)+    &
Note: See TracChangeset for help on using the changeset viewer.