Changeset 3673 for trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90
- Timestamp:
- Mar 7, 2025, 10:01:32 AM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90 ¶
r3666 r3673 65 65 real, dimension(ngrid,nsoil_PEM,nslope), intent(inout) :: watersoil_avg ! surface water ice density, yearly averaged (kg/m^3) 66 66 ! local 67 real, dimension(ngrid,nsoil_PEM,nslope) :: tsoil_startpem 68 real, dimension(ngrid,nsoil_PEM,nslope) :: TI_startPEM 69 logical :: found, found2 70 integer :: iloop, ig, islope , isoil! index for loops71 real :: delta 72 character(2) :: num 73 logical :: startpem_file 74 real, dimension(:,:,:,:), allocatable :: stratif_array 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 ! 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) 75 75 76 76 #ifdef CPP_STD … … 143 143 nb_str_max = int(inquire_dimension_length('nb_str_max')) 144 144 endif 145 allocate(stratif_array(ngrid,nslope,nb_str_max, 6))145 allocate(stratif_array(ngrid,nslope,nb_str_max,7)) 146 146 stratif_array = 0. 147 147 do islope = 1,nslope … … 156 156 call get_field('stratif_slope'//num//'_dust_volfrac',stratif_array(:,islope,:,5),found2) 157 157 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) 159 161 found = found .or. found2 160 162 if (.not. found) then … … 267 269 call compute_tsoil_pem(ngrid,nsoil_PEM,.false.,TI_PEM(:,:,islope),timestep,tsurf_avg_yr2(:,islope),tsoil_startpem(:,:,islope)) 268 270 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) 272 272 endif !found 273 273 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) 277 275 enddo ! islope 278 276 write(*,*) 'PEMETAT0: TSOIL done' … … 431 429 432 430 ! 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) 438 432 enddo !islope 439 433 write(*,*) 'PEMETAT0: TSOIL done'
Note: See TracChangeset
for help on using the changeset viewer.