Ignore:
Timestamp:
Mar 7, 2025, 10:01:32 AM (4 months ago)
Author:
jbclement
Message:

PEM:

  • Correction for the update of average pressure at the end.
  • Addition of pore-filled ice information for 'stratum' in the layering algorithm.
  • Deactivating the soil temperature shifting because of bad values given by interpolation.

JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90

    r3666 r3673  
    6565real, dimension(ngrid,nsoil_PEM,nslope), intent(inout) :: watersoil_avg       ! surface water ice density, yearly averaged (kg/m^3)
    6666! local
    67 real, dimension(ngrid,nsoil_PEM,nslope) :: tsoil_startpem           ! soil temperature saved in the start [K]
    68 real, dimension(ngrid,nsoil_PEM,nslope) :: TI_startPEM              ! soil thermal inertia saved in the start [SI]
    69 logical                                 :: found, found2            ! check if variables are found in the start
    70 integer                                 :: iloop, ig, islope, isoil ! index for loops
    71 real                                    :: delta                    ! Depth of the interface regolith-breccia, breccia -bedrock [m]
    72 character(2)                            :: num                      ! intermediate string to read PEM start sloped variables
    73 logical                                 :: startpem_file            ! boolean to check if we read the startfile or not
    74 real, dimension(:,:,:,:), allocatable   :: stratif_array            ! Array for stratification (layerings)
     67real, dimension(ngrid,nsoil_PEM,nslope) :: tsoil_startpem    ! soil temperature saved in the start [K]
     68real, dimension(ngrid,nsoil_PEM,nslope) :: TI_startPEM       ! soil thermal inertia saved in the start [SI]
     69logical                                 :: found, found2     ! check if variables are found in the start
     70integer                                 :: iloop, ig, islope ! index for loops
     71real                                    :: delta             ! Depth of the interface regolith-breccia, breccia -bedrock [m]
     72character(2)                            :: num               ! intermediate string to read PEM start sloped variables
     73logical                                 :: startpem_file     ! boolean to check if we read the startfile or not
     74real, dimension(:,:,:,:), allocatable   :: stratif_array     ! Array for stratification (layerings)
    7575
    7676#ifdef CPP_STD
     
    143143            nb_str_max = int(inquire_dimension_length('nb_str_max'))
    144144        endif
    145         allocate(stratif_array(ngrid,nslope,nb_str_max,6))
     145        allocate(stratif_array(ngrid,nslope,nb_str_max,7))
    146146        stratif_array = 0.
    147147        do islope = 1,nslope
     
    156156            call get_field('stratif_slope'//num//'_dust_volfrac',stratif_array(:,islope,:,5),found2)
    157157            found = found .or. found2
    158             call get_field('stratif_slope'//num//'_air_volfrac',stratif_array(:,islope,:,6),found2)
     158            call get_field('stratif_slope'//num//'_pore_volfrac',stratif_array(:,islope,:,6),found2)
     159            found = found .or. found2
     160            call get_field('stratif_slope'//num//'_icepore_volfrac',stratif_array(:,islope,:,7),found2)
    159161            found = found .or. found2
    160162            if (.not. found) then
     
    267269                call compute_tsoil_pem(ngrid,nsoil_PEM,.false.,TI_PEM(:,:,islope),timestep,tsurf_avg_yr2(:,islope),tsoil_startpem(:,:,islope))
    268270
    269                 do iloop = nsoil_PCM + 1,nsoil_PEM
    270                     tsoil_PEM(:,iloop,islope) = tsoil_startpem(:,iloop,islope)
    271                 enddo
     271                tsoil_PEM(:,nsoil_PCM + 1:nsoil_PEM,islope) = tsoil_startpem(:,nsoil_PCM + 1:nsoil_PEM,islope)
    272272            endif !found
    273273
    274             do isoil = nsoil_PCM + 1,nsoil_PEM
    275                 watersoil_avg(:,isoil,islope) = exp(beta_clap_h2o/tsoil_PEM(:,isoil,islope) + alpha_clap_h2o)/tsoil_PEM(:,isoil,islope)*mmol(igcm_h2o_vap)/(mugaz*r)
    276             enddo
     274            watersoil_avg(:,nsoil_PCM + 1:nsoil_PEM,islope) = exp(beta_clap_h2o/tsoil_PEM(:,nsoil_PCM + 1:nsoil_PEM,islope) + alpha_clap_h2o)/tsoil_PEM(:,nsoil_PCM + 1:nsoil_PEM,islope)*mmol(igcm_h2o_vap)/(mugaz*r)
    277275        enddo ! islope
    278276        write(*,*) 'PEMETAT0: TSOIL done'
     
    431429
    432430! First raw initialization
    433             do isoil = nsoil_PCM + 1,nsoil_PEM
    434                 do ig = 1,ngrid
    435                     watersoil_avg(ig,isoil,islope) = exp(beta_clap_h2o/tsoil_PEM(ig,isoil,islope) + alpha_clap_h2o)/tsoil_PEM(ig,isoil,islope)*mmol(igcm_h2o_vap)/(mugaz*r)
    436                 enddo
    437             enddo
     431            watersoil_avg(:,nsoil_PCM + 1:nsoil_PEM,islope) = exp(beta_clap_h2o/tsoil_PEM(:,nsoil_PCM + 1:nsoil_PEM,islope) + alpha_clap_h2o)/tsoil_PEM(:,nsoil_PCM + 1:nsoil_PEM,islope)*mmol(igcm_h2o_vap)/(mugaz*r)
    438432        enddo !islope
    439433        write(*,*) 'PEMETAT0: TSOIL done'
Note: See TracChangeset for help on using the changeset viewer.