Changeset 3989 for trunk/LMDZ.COMMON/libf/evolution/glaciers.F90
- Timestamp:
- Dec 11, 2025, 12:56:05 PM (6 weeks ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/glaciers.F90
r3988 r3989 1 MODULE glaciers_mod 2 3 implicit none 4 5 ! Different types of ice 6 type :: ice 7 real :: h2o 8 real :: co2 9 end type ice 10 11 ! Perennial ice manage by the PEM 12 type(ice), dimension(:,:), allocatable :: perice 1 MODULE glaciers 2 3 implicit none 13 4 14 5 ! Flags for ice flow 15 logical :: h2oice_flow ! True by default, to compute H2O ice flow. Read in "run_PEM.def" 16 logical :: co2ice_flow ! True by default, to compute CO2 ice flow. Read in "run_PEM.def" 17 18 ! Threshold to consider H2O ice as watercap 19 real :: inf_h2oice_threshold ! To consider the amount of H2O ice as an infinite reservoir [kg.m-2] 20 21 ! Ice properties 22 real, parameter :: rho_co2ice = 1650. ! Density of CO2 ice [kg.m-3] 23 real, parameter :: rho_h2oice = 920. ! Density of H2O ice [kg.m-3] 6 logical :: h2oice_flow ! True by default, flag to compute H2O ice flow 7 logical :: co2ice_flow ! True by default, flag to compute CO2 ice flow 24 8 25 9 !======================================================================= 26 10 contains 27 !=======================================================================28 29 SUBROUTINE set_perice4PCM(ngrid,nslope,PCMfrost,is_perh2oice,PCMh2oice,PCMco2ice)30 31 use metamorphism, only: iPCM_h2ofrost32 use comslope_mod, only: subslope_dist, def_slope_mean33 use phys_constants, only: pi34 35 36 implicit none37 38 ! Arguments39 !----------40 integer, intent(in) :: ngrid, nslope41 real, dimension(:,:,:), intent(inout) :: PCMfrost42 logical, dimension(ngrid), intent(out) :: is_perh2oice43 real, dimension(ngrid,nslope), intent(out) :: PCMco2ice, PCMh2oice44 45 ! Local variables46 !----------------47 integer :: i48 49 ! Code50 !-----51 write(*,*) '> Reconstructing perennial ic for the PCM'52 PCMco2ice(:,:) = perice(:,:)%co253 PCMh2oice(:,:) = 0. ! Because in the Mars PCM, only the variation of perennial H2O ice is monitored, not the absolute quantity54 do i = 1,ngrid55 ! Is H2O ice still considered as an infinite reservoir for the PCM?56 if (sum(perice(i,:)%h2o*subslope_dist(i,:)/cos(pi*def_slope_mean(:)/180.)) > inf_h2oice_threshold) then57 ! There is enough ice to be considered as an infinite reservoir58 is_perh2oice(i) = .true.59 else60 ! Too little ice to be considered as an infinite reservoir so ice is transferred to the frost61 is_perh2oice(i) = .false.62 PCMfrost(i,iPCM_h2ofrost,:) = PCMfrost(i,iPCM_h2ofrost,:) + perice(i,:)%h2o63 perice(i,:)%h2o = 0.64 endif65 enddo66 67 END SUBROUTINE set_perice4PCM68 !=======================================================================69 70 SUBROUTINE ini_ice(ngrid,nslope)71 72 implicit none73 74 ! Arguments75 !----------76 integer, intent(in) :: ngrid, nslope77 78 ! Local variables79 !----------------80 81 ! Code82 !-----83 if (.not. allocated(perice)) allocate(perice(ngrid,nslope))84 85 END SUBROUTINE ini_ice86 !=======================================================================87 88 SUBROUTINE end_ice()89 90 implicit none91 92 ! Arguments93 !----------94 95 ! Local variables96 !----------------97 98 ! Code99 !-----100 if (allocated(perice)) deallocate(perice)101 102 END SUBROUTINE end_ice103 104 11 !======================================================================= 105 12 … … 186 93 SUBROUTINE compute_hmaxglaciers(ngrid,nslope,iflat,def_slope_mean,Tice,name_ice,hmax) 187 94 188 use ice_table _mod, only: rho_ice189 use abort_pem_mod, only: abort_pem95 use ice_table, only: rho_ice 96 use stop_pem, only: stop_clean 190 97 use phys_constants, only: pi, g 191 98 … … 222 129 tau_d = 5.e3 223 130 case default 224 call abort_pem("compute_hmaxglaciers","Type of ice not known!",1)131 call stop_clean("compute_hmaxglaciers","Type of ice not known!",1) 225 132 end select 226 133 … … 249 156 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 250 157 251 use ice_table _mod,only: rho_ice252 use abort_pem_mod, only: abort_pem158 use ice_table, only: rho_ice 159 use stop_pem, only: stop_clean 253 160 use phys_constants, only: pi 254 161 … … 345 252 END SUBROUTINE computeTcondCO2 346 253 347 END MODULE glaciers _mod254 END MODULE glaciers
Note: See TracChangeset
for help on using the changeset viewer.
