Ignore:
Timestamp:
Mar 6, 2025, 11:25:14 AM (5 months ago)
Author:
afalco
Message:

generic/pluto: tsurf/tsoil taken from phys_state_var_mod rather than declared locally so they are updated in the outputs (profile.out, restart1D.nc).
AF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.PLUTO/libf/phypluto/dyn1d/rcm1d.F

    r3643 r3672  
    3434      use mod_interface_dyn_phys, only: init_interface_dyn_phys
    3535      use inifis_mod, only: inifis
    36       use phys_state_var_mod, only: phys_state_var_init
     36      use phys_state_var_mod, only: phys_state_var_init, tsurf, tsoil
    3737      use physiq_mod, only: physiq
    3838      implicit none
     
    8484      REAL play(llm)        ! Pressure at the middle of the layers (Pa)
    8585      REAL plev(llm+1)      ! intermediate pressure levels (pa)
    86       REAL psurf,tsurf(1)
     86      REAL psurf
    8787      REAL u(llm),v(llm)    ! zonal, meridional wind
    8888      REAL gru,grv          ! prescribed "geostrophic" background wind
     
    9090      REAL,ALLOCATABLE :: q(:,:)      ! tracer mixing ratio (e.g. kg/kg)
    9191      REAL,ALLOCATABLE :: qsurf(:)    ! tracer surface budget (e.g. kg.m-2)
    92       REAL,ALLOCATABLE :: tsoil(:)    ! subsurface soil temperature (K)
    9392!      REAL n2ice               ! n2ice layer (kg.m-2) !not used anymore
    9493      integer :: i_n2=0     ! tracer index of n2 ice
     
    577576
    578577      nsoil=nsoilmx
    579       allocate(tsoil(nsoilmx))
    580       !! those are defined in comsoil_h.F90
    581       IF (.not.ALLOCATED(layer)) ALLOCATE(layer(nsoilmx))
    582       IF (.not.ALLOCATED(mlayer)) ALLOCATE(mlayer(0:nsoilmx-1))
    583       IF (.not.ALLOCATED(inertiedat)) ALLOCATE(inertiedat(1,nsoilmx))
    584578
    585579! At this point, both getin() and getin_p() functions have been used,
     
    866860         OPEN(14,file='proftsoil',status='old',form='formatted',err=101)
    867861         DO isoil=1,nsoil
    868             READ (14,*) tsoil(isoil)
     862            READ (14,*) tsoil(1,isoil)
    869863            inertiedat(1,isoil)=inertiedat(1,1) ! soil thermal inertia
    870864         ENDDO
     
    874868         CLOSE(14)
    875869
    876       else 
     870      else
    877871        DO isoil=1,nsoil
    878872         inertiedat(1,isoil)=inertiedat(1,1) ! soil thermal inertia
    879          tsoil(isoil)=tsurf(1)  ! soil temperature
     873         tsoil(1,isoil)=tsurf(1)  ! soil temperature
    880874        ENDDO
    881875      endif
     
    10651059      endif
    10661060! save haze profile
    1067       if (haze.and.lecthaze.eq.1) then 
     1061      if (haze.and.lecthaze.eq.1) then
    10681062            OPEN(16,file='profhaze.out',form='formatted')
    10691063            DO iq=1,nq
Note: See TracChangeset for help on using the changeset viewer.