Ignore:
Timestamp:
Feb 18, 2026, 8:45:27 PM (10 days ago)
Author:
tbertrand
Message:

Pluto PCM:
Allowing atmospheric temperatures to be fixed following an input profile (fixed_temp_prof option)
TB

File:
1 edited

Legend:

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

    r4073 r4078  
    6868                              tracer, UseTurbDiff,                            &
    6969                              global1d, szangle,                              &
    70                               callmufi, callmuclouds, evol1d
     70                              callmufi, callmuclouds, evol1d,fixed_temp_prof, &
     71                              tau_temp
    7172
    7273      use check_fields_mod, only: check_physics_fields
     
    121122!         II.2.a Option 1 : Call correlated-k radiative transfer scheme.
    122123!         II.2.b Option 2 : Atmosphere has no radiative effect.
     124!         II.2.c Option 3 : Fixed temperature profile (using "Newtonian restoring force"-type equation).
    123125!
    124126!      II.3 Gravity wave and subgrid scale topography drag :
     
    502504      real alpha,lay1 ! coefficients for building layers
    503505      integer iloop
     506
     507      ! for fixed temperature profile (fixed_temp_prof option)
     508      real,save,allocatable :: tmean(:,:)
     509      !!read altitudes and radius
     510      integer ifine,Nfine
     511      parameter(Nfine=1751)
     512      character(len=100) :: file_path
     513      real,save :: levdat(Nfine),tempdat(Nfine)
    504514
    505515      ! flags to trigger extra sanity checks
     
    10291039
    10301040! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1031 ! II.a Call correlated-k radiative transfer scheme
     1041! II.2.a Call correlated-k radiative transfer scheme
    10321042! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    10331043               if(kastprof)then
     
    10991109            else
    11001110! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1101 ! II.b Atmosphere has no radiative effect
     1111! II.2.b Atmosphere has no radiative effect
    11021112! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    11031113               fluxtop_dn(1:ngrid)  = fract(1:ngrid)*mu0(1:ngrid)*Fat1AU/dist_star**2
     
    11191129
    11201130            endif ! end of corrk
     1131
     1132! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1133! II.2.c Converging atm temperature toward a fixed profile with a characteristic timescale
     1134! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1135            if (firstcall.and.fixed_temp_prof) then
     1136              allocate(tmean(ngrid,nlayer))
     1137              file_path=trim(datadir)//'/gas_prop/tempNH.txt'
     1138              open(323,file=file_path,form='formatted')
     1139              do ifine=1,Nfine
     1140                read(323,*) levdat(ifine), tempdat(ifine)
     1141              enddo
     1142              close(323)
     1143              print*, 'Read temp file from ',file_path
     1144              ! 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
     1148            endif
     1149            if (fixed_temp_prof) then
     1150               DO ig=1,ngrid
     1151                 dtrad(ig,1:nlayer)=(tmean(ig,1:nlayer)-(pt(ig,1:nlayer)+    &
     1152                   (pdt(ig,1:nlayer)+dtrad(ig,1:nlayer))*ptimestep))         &
     1153                   *(1.-exp(-ptimestep/tau_temp))/ptimestep
     1154               ENDDO
     1155            endif
    11211156
    11221157         endif ! of if(mod(icount-1,iradia).eq.0)
Note: See TracChangeset for help on using the changeset viewer.