Ignore:
Timestamp:
Feb 20, 2024, 4:46:35 PM (9 months ago)
Author:
tbertrand
Message:

Pluto GCM:
Cleaning code and adding extra options for newstart.F

File:
1 edited

Legend:

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

    r3198 r3228  
    4545      use comcstfi_mod, only: pi, g, rcp, r, rad, mugaz, cpp
    4646      use time_phylmdz_mod, only: daysec
    47       use callkeys_mod, only: albedo_spectral_mode, calladj, calldifv, &
     47      use callkeys_mod, only: fast,albedo_spectral_mode, calladj, calldifv, &
    4848                              callrad, callsoil, nosurf, &
    4949                              aerohaze, corrk, diagdtau,&
     
    293293      ! For Surface Tracers : (kg/m2/s)
    294294      real dqsurf(ngrid,nq)                 ! Cumulated tendencies.
    295       real zdqsurfc(ngrid)                  ! Condense_n2 routine.
     295      !real zdqsurfc(ngrid)                  ! Condense_n2 routine.
    296296      REAL zdqsc(ngrid,nq)                  ! Condense_n2 routine.
    297297      real zdqsdif(ngrid,nq)                ! Turbdiff/vdifc routines.
     
    768768     ! w = F / (rho*area) and rho = P/(r*T)
    769769     ! But first linearly interpolate mass flux to mid-layers
    770       do l=1,nlayer-1
     770      if (.not.fast) then
     771       do l=1,nlayer-1
    771772         pw(1:ngrid,l)=0.5*(flxw(1:ngrid,l)+flxw(1:ngrid,l+1))
    772       enddo
    773       pw(1:ngrid,nlayer)=0.5*flxw(1:ngrid,nlayer) ! since flxw(nlayer+1)=0
    774       do l=1,nlayer
     773       enddo
     774       pw(1:ngrid,nlayer)=0.5*flxw(1:ngrid,nlayer) ! since flxw(nlayer+1)=0
     775       do l=1,nlayer
    775776         pw(1:ngrid,l)=(pw(1:ngrid,l)*r*pt(1:ngrid,l)) /  &
    776777                       (pplay(1:ngrid,l)*cell_area(1:ngrid))
    777       enddo
    778       ! omega in Pa/s
    779       do l=1,nlayer-1
     778       enddo
     779       ! omega in Pa/s
     780       do l=1,nlayer-1
    780781         omega(1:ngrid,l)=0.5*(flxw(1:ngrid,l)+flxw(1:ngrid,l+1))
    781       enddo
    782       omega(1:ngrid,nlayer)=0.5*flxw(1:ngrid,nlayer) ! since flxw(nlayer+1)=0
    783       do l=1,nlayer
     782       enddo
     783       omega(1:ngrid,nlayer)=0.5*flxw(1:ngrid,nlayer) ! since flxw(nlayer+1)=0
     784       do l=1,nlayer
    784785         omega(1:ngrid,l)=g*omega(1:ngrid,l)/cell_area(1:ngrid)
    785       enddo
    786 
     786       enddo
     787      endif
    787788!---------------------------------
    788789! II. Compute radiative tendencies
     
    922923               albedo_equivalent(1:ngrid)=albedo(1:ngrid,1)
    923924               fluxsurfabs_sw(1:ngrid) = fluxtop_dn(1:ngrid)*(1.-albedo(1:ngrid,1))
    924                ! TB24:
    925925               fluxabs_sw(1:ngrid)=fluxsurfabs_sw(1:ngrid)
    926926               fluxrad_sky(1:ngrid)    = fluxsurfabs_sw(1:ngrid)
     
    11381138
    11391139         pdt(1:ngrid,1:nlayer) = pdt(1:ngrid,1:nlayer)+zdtc(1:ngrid,1:nlayer)
     1140         pdv(1:ngrid,1:nlayer) = pdv(1:ngrid,1:nlayer)+zdvc(1:ngrid,1:nlayer)
     1141         pdu(1:ngrid,1:nlayer) = pdu(1:ngrid,1:nlayer)+zduc(1:ngrid,1:nlayer)
    11401142         zdtsurf(1:ngrid)      = zdtsurf(1:ngrid) + zdtsurfc(1:ngrid)
    11411143
    11421144         pdq(1:ngrid,1:nlayer,1:nq)   = pdq(1:ngrid,1:nlayer,1:nq)+ zdqc(1:ngrid,1:nlayer,1:nq)
    1143          ! dqsurf(1:ngrid,igcm_n2_ice) = dqsurf(1:ngrid,igcm_n2_ice) + zdqsurfc(1:ngrid)
     1145         dqsurf(1:ngrid,igcm_n2) = dqsurf(1:ngrid,igcm_n2) + zdqsc(1:ngrid,igcm_n2)
    11441146
    11451147!!         call writediagfi(ngrid,"condense_n2_post_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_vap))
     
    13241326
    13251327      tsurf(1:ngrid)=tsurf(1:ngrid)+ptimestep*zdtsurf(1:ngrid)
    1326 
    13271328      ! Compute soil temperatures and subsurface heat flux.
    13281329      if (callsoil) then
     
    13781379      ! Surface pressure.
    13791380      ps(1:ngrid) = pplev(1:ngrid,1) + pdpsrf(1:ngrid)*ptimestep
    1380 
    13811381
    13821382
     
    16451645      call writediagfi(ngrid,"tsurf","Surface temperature","K",2,tsurf)
    16461646      call writediagfi(ngrid,"ps","Surface pressure","Pa",2,ps)
    1647       call writediagfi(ngrid,"temp","temperature","K",3,zt)
    1648       call writediagfi(ngrid,"teta","potential temperature","K",3,zh)
    1649       call writediagfi(ngrid,"u","Zonal wind","m.s-1",3,zu)
    1650       call writediagfi(ngrid,"v","Meridional wind","m.s-1",3,zv)
    1651       call writediagfi(ngrid,"w","Vertical wind","m.s-1",3,pw)
    1652       call writediagfi(ngrid,"p","Pressure","Pa",3,pplay)
     1647
     1648      if (.not.fast) then
     1649       call writediagfi(ngrid,"temp","temperature","K",3,zt)
     1650       call writediagfi(ngrid,"teta","potential temperature","K",3,zh)
     1651       call writediagfi(ngrid,"u","Zonal wind","m.s-1",3,zu)
     1652       call writediagfi(ngrid,"v","Meridional wind","m.s-1",3,zv)
     1653       call writediagfi(ngrid,"w","Vertical wind","m.s-1",3,pw)
     1654       call writediagfi(ngrid,"p","Pressure","Pa",3,pplay)
     1655      endif
    16531656
    16541657!     Subsurface temperatures
Note: See TracChangeset for help on using the changeset viewer.