Changeset 3778 for trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90
- Timestamp:
- May 26, 2025, 10:34:57 AM (3 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90
r3770 r3778 9 9 SUBROUTINE pemetat0(filename,ngrid,nsoil_PCM,nsoil_PEM,nslope,timelen,timestep,TI_PEM,tsoil_PEM,icetable_depth,icetable_thickness,ice_porefilling, & 10 10 tsurf_avg_yr1,tsurf_avg_yr2,q_co2,q_h2o,ps_timeseries,ps_avg_global,d_h2oice,d_co2ice,co2_ice,h2o_ice, & 11 watersurf_avg,watersoil_avg,m_co2_regolith_phys,deltam_co2_regolith_phys,m_h2o_regolith_phys,deltam_h2o_regolith_phys, stratif)11 watersurf_avg,watersoil_avg,m_co2_regolith_phys,deltam_co2_regolith_phys,m_h2o_regolith_phys,deltam_h2o_regolith_phys,layerings_map) 12 12 13 13 use iostart_PEM, only: open_startphy, close_startphy, get_field, get_var, inquire_dimension, inquire_dimension_length … … 54 54 real, dimension(ngrid,nslope), intent(out) :: h2o_ice ! h2o ice amount [kg/m^2] 55 55 real, dimension(ngrid,nslope), intent(out) :: co2_ice ! co2 ice amount [kg/m^2] 56 type(layering), dimension(ngrid,nslope), intent(inout) :: stratif ! stratification (layerings)56 type(layering), dimension(ngrid,nslope), intent(inout) :: layerings_map ! Layerings 57 57 real, dimension(ngrid,nsoil_PEM,nslope), intent(inout) :: TI_PEM ! soil (mid-layer) thermal inertia in the PEM grid [SI] 58 58 real, dimension(ngrid,nsoil_PEM,nslope), intent(inout) :: tsoil_PEM ! soil (mid-layer) temperature [K] … … 71 71 character(2) :: num ! intermediate string to read PEM start sloped variables 72 72 logical :: startpem_file ! boolean to check if we read the startfile or not 73 real, dimension(:,:,:,:), allocatable :: stratif_array ! Array for stratification (layerings)73 real, dimension(:,:,:,:), allocatable :: stratif_array ! Array for layerings 74 74 75 75 #ifdef CPP_STD … … 132 132 133 133 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 134 ! Stratification (layerings)134 ! Layerings 135 135 nb_str_max = 68 136 136 if (layering_algo) then … … 178 178 enddo ! islope 179 179 if (.not. found) then 180 write(*,*) 'So the deposits are initialized with sub-surface strata.'180 write(*,*) 'So the layerings are initialized with sub-surface strata.' 181 181 write(*,*) 'Ice is added with ''ini_huge_h2oice'' where ''watercaptag'' is true and otherwise with ''perennial_co2ice'' found in the PCM.' 182 182 do ig = 1,ngrid 183 183 if (watercaptag(ig)) then 184 184 do islope = 1,nslope 185 call ini_layering( stratif(ig,islope))186 call add_stratum( stratif(ig,islope),ini_huge_h2oice,0.,ini_huge_h2oice,0.,0.,0.)185 call ini_layering(layerings_map(ig,islope)) 186 call add_stratum(layerings_map(ig,islope),ini_huge_h2oice,0.,ini_huge_h2oice,0.,0.,0.) 187 187 enddo 188 188 else 189 189 do islope = 1,nslope 190 call ini_layering( stratif(ig,islope))191 if (perennial_co2ice(ig,islope) > 0.) call add_stratum( stratif(ig,islope),perennial_co2ice(ig,islope),perennial_co2ice(ig,islope),0.,0.,0.,0.)190 call ini_layering(layerings_map(ig,islope)) 191 if (perennial_co2ice(ig,islope) > 0.) call add_stratum(layerings_map(ig,islope),perennial_co2ice(ig,islope),perennial_co2ice(ig,islope),0.,0.,0.,0.) 192 192 enddo 193 193 endif 194 194 enddo 195 195 else 196 call array2stratif(stratif_array,ngrid,nslope, stratif)196 call array2stratif(stratif_array,ngrid,nslope,layerings_map) 197 197 endif 198 198 deallocate(stratif_array) … … 383 383 co2_ice = perennial_co2ice 384 384 385 ! Stratification (layerings)385 ! Layerings 386 386 nb_str_max = 68 387 387 if (layering_algo) then 388 write(*,*)'So the deposits are initialized with sub-surface strata.'388 write(*,*)'So the layerings are initialized with sub-surface strata.' 389 389 write(*,*)'Ice is added with ''ini_huge_h2oice'' where ''watercaptag'' is true and otherwise with ''perennial_co2ice'' found in the PCM.' 390 390 do ig = 1,ngrid 391 391 if (watercaptag(ig)) then 392 392 do islope = 1,nslope 393 call ini_layering( stratif(ig,islope))394 call add_stratum( stratif(ig,islope),ini_huge_h2oice,0.,ini_huge_h2oice,0.,0.,0.)393 call ini_layering(layerings_map(ig,islope)) 394 call add_stratum(layerings_map(ig,islope),ini_huge_h2oice,0.,ini_huge_h2oice,0.,0.,0.) 395 395 enddo 396 396 else 397 397 do islope = 1,nslope 398 call ini_layering( stratif(ig,islope))399 if (perennial_co2ice(ig,islope) > 0.) call add_stratum( stratif(ig,islope),perennial_co2ice(ig,islope),perennial_co2ice(ig,islope),0.,0.,0.,0.)398 call ini_layering(layerings_map(ig,islope)) 399 if (perennial_co2ice(ig,islope) > 0.) call add_stratum(layerings_map(ig,islope),perennial_co2ice(ig,islope),perennial_co2ice(ig,islope),0.,0.,0.,0.) 400 400 enddo 401 401 endif
Note: See TracChangeset
for help on using the changeset viewer.