Changeset 3989 for trunk/LMDZ.COMMON/libf/evolution/layered_deposits.F90
- Timestamp:
- Dec 11, 2025, 12:56:05 PM (6 weeks ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/layered_deposits.F90
r3988 r3989 1 MODULE layer ing_mod1 MODULE layered_deposits 2 2 3 3 !======================================================================= … … 8 8 !======================================================================= 9 9 10 use glaciers_mod, only: rho_co2ice, rho_h2oice10 use surf_ice, only: rho_co2ice, rho_h2oice 11 11 12 12 implicit none … … 76 76 ! > print_layering 77 77 ! > get_nb_str_max 78 ! > stratif2array79 ! > array2 stratif78 ! > map2array 79 ! > array2map 80 80 ! > print_layerings_map 81 81 ! Procedures to get information about a stratum: … … 277 277 SUBROUTINE ini_layering(this) 278 278 279 use comsoil_h_PEM, only: soil_pem, nsoilmx_PEM, layer_PEM, index_breccia, index_bedrock279 use soil, only: do_soil, nsoilmx_PEM, layer_PEM, index_breccia, index_bedrock 280 280 281 281 implicit none … … 290 290 !---- Code 291 291 ! Creation of strata at the bottom of the layering to describe the sub-surface 292 if ( soil_pem) then292 if (do_soil) then 293 293 do i = nsoilmx_PEM,index_bedrock,-1 294 294 h_soil = layer_PEM(i) - layer_PEM(i - 1) ! No porosity … … 391 391 !======================================================================= 392 392 ! To convert the layerings map into an array able to be outputted 393 SUBROUTINE stratif2array(layerings_map,ngrid,nslope,stratif_array)393 SUBROUTINE map2array(layerings_map,ngrid,nslope,layerings_array) 394 394 395 395 implicit none … … 398 398 integer, intent(in) :: ngrid, nslope 399 399 type(layering), dimension(ngrid,nslope), intent(in) :: layerings_map 400 real, dimension(:,:,:,:), allocatable, intent(inout) :: stratif_array400 real, dimension(:,:,:,:), allocatable, intent(inout) :: layerings_array 401 401 402 402 !---- Local variables … … 405 405 406 406 !---- Code 407 stratif_array = 0.407 layerings_array = 0. 408 408 do islope = 1,nslope 409 409 do ig = 1,ngrid … … 411 411 k = 1 412 412 do while (associated(current)) 413 stratif_array(ig,islope,k,1) = current%top_elevation414 stratif_array(ig,islope,k,2) = current%h_co2ice415 stratif_array(ig,islope,k,3) = current%h_h2oice416 stratif_array(ig,islope,k,4) = current%h_dust417 stratif_array(ig,islope,k,5) = current%h_pore418 stratif_array(ig,islope,k,6) = current%poreice_volfrac413 layerings_array(ig,islope,k,1) = current%top_elevation 414 layerings_array(ig,islope,k,2) = current%h_co2ice 415 layerings_array(ig,islope,k,3) = current%h_h2oice 416 layerings_array(ig,islope,k,4) = current%h_dust 417 layerings_array(ig,islope,k,5) = current%h_pore 418 layerings_array(ig,islope,k,6) = current%poreice_volfrac 419 419 current => current%up 420 420 k = k + 1 … … 423 423 enddo 424 424 425 END SUBROUTINE stratif2array425 END SUBROUTINE map2array 426 426 427 427 !======================================================================= 428 428 ! To convert the stratification array into the layerings map 429 SUBROUTINE array2 stratif(stratif_array,ngrid,nslope,layerings_map)429 SUBROUTINE array2map(layerings_array,ngrid,nslope,layerings_map) 430 430 431 431 implicit none … … 433 433 !---- Arguments 434 434 integer, intent(in) :: ngrid, nslope 435 real, dimension(:,:,:,:), allocatable, intent(in) :: stratif_array435 real, dimension(:,:,:,:), allocatable, intent(in) :: layerings_array 436 436 type(layering), dimension(ngrid,nslope), intent(inout) :: layerings_map 437 437 … … 442 442 do islope = 1,nslope 443 443 do ig = 1,ngrid 444 do k = 1,size( stratif_array,3)445 call add_stratum(layerings_map(ig,islope), stratif_array(ig,islope,k,1),stratif_array(ig,islope,k,2),stratif_array(ig,islope,k,3),stratif_array(ig,islope,k,4),stratif_array(ig,islope,k,5),stratif_array(ig,islope,k,6))444 do k = 1,size(layerings_array,3) 445 call add_stratum(layerings_map(ig,islope),layerings_array(ig,islope,k,1),layerings_array(ig,islope,k,2),layerings_array(ig,islope,k,3),layerings_array(ig,islope,k,4),layerings_array(ig,islope,k,5),layerings_array(ig,islope,k,6)) 446 446 enddo 447 447 enddo 448 448 enddo 449 449 450 END SUBROUTINE array2 stratif450 END SUBROUTINE array2map 451 451 452 452 !======================================================================= … … 1018 1018 END SUBROUTINE make_layering 1019 1019 1020 END MODULE layer ing_mod1020 END MODULE layered_deposits
Note: See TracChangeset
for help on using the changeset viewer.
