Changeset 3610 for trunk/LMDZ.COMMON/libf/evolution/pem.F90
- Timestamp:
- Feb 5, 2025, 3:06:50 PM (9 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3609 r3610 65 65 use pemetat0_mod, only: pemetat0 66 66 use read_data_PCM_mod, only: read_data_PCM 67 use recomp_tend_ co2_mod, only: recomp_tend_co267 use recomp_tend_mod, only: recomp_tend_co2, recomp_tend_h2o 68 68 use compute_soiltemp_mod, only: compute_tsoil_pem, shift_tsoil2surf 69 69 use writediagpem_mod, only: writediagpem, writediagsoilpem … … 211 211 real, dimension(:,:,:,:), allocatable :: tsoil_timeseries ! Grid points x Soil x Slope x Times field: Soil temperature timeseries [K] 212 212 real, dimension(:,:,:,:), allocatable :: tsoil_PEM_timeseries ! Grid points x Soil x Slope x Times field: Soil temperature timeseries for PEM [K] 213 real, dimension(:,:,:,:), allocatable :: tsoil_PEM_timeseries_old ! Grid points x Soil x Slope x Times field: Soil temperature timeseries for PEM at the previous time step [K] 213 214 real, dimension(:,:,:,:), allocatable :: watersoil_density_timeseries ! Grid points x Soil x Slope x Times Water soil density timeseries [kg /m^3] 214 215 real, dimension(:,:), allocatable :: watersurf_density_avg ! Grid points x Slope: Averaged water surface density [kg/m^3] … … 227 228 real, dimension(:,:), allocatable :: zshift_surf ! Elevation shift for the surface [m] 228 229 real, dimension(:,:), allocatable :: zlag ! Newly built lag thickness [m] 230 real, dimension(:,:), allocatable :: icetable_depth_old ! Old depth of the ice table 229 231 230 232 ! Some variables for the PEM run … … 857 859 ! II_d.3 Update soil temperature 858 860 write(*,*)"> Updating soil temperature profile" 861 allocate(tsoil_avg_old(ngrid,nsoilmx_PEM),tsoil_PEM_timeseries_old(ngrid,nsoilmx_PEM,nslope,timelen)) 862 tsoil_PEM_timeseries_old = tsoil_PEM_timeseries 859 863 do islope = 1,nslope 860 864 tsoil_avg_old = tsoil_PEM(:,:,islope) … … 878 882 879 883 ! II_d.4 Update the ice table 880 allocate(icetable_thickness_old(ngrid,nslope),ice_porefilling_old(ngrid,nsoilmx_PEM,nslope) )884 allocate(icetable_thickness_old(ngrid,nslope),ice_porefilling_old(ngrid,nsoilmx_PEM,nslope),icetable_depth_old(ngrid,nslope)) 881 885 if (icetable_equilibrium) then 882 886 write(*,*) "> Updating ice table (equilibrium method)" … … 887 891 write(*,*) "> Updating ice table (dynamic method)" 888 892 ice_porefilling_old = ice_porefilling 893 icetable_depth_old = icetable_depth 889 894 allocate(porefill(nsoilmx_PEM)) 890 895 do ig = 1,ngrid … … 971 976 !------------------------ 972 977 call recomp_tend_co2(ngrid,nslope,timelen,d_co2ice,d_co2ice_ini,co2_ice,emis,vmr_co2_PCM,vmr_co2_PEM_phys,ps_timeseries,ps_avg_global_old,ps_avg_global_new) 973 deallocate(vmr_co2_PEM_phys) 978 do ig = 1,ngrid 979 do islope = 1,nslope 980 call recomp_tend_h2o(icetable_depth_old(ig,islope),icetable_depth(ig,islope),tsurf_avg(ig,islope),tsoil_PEM_timeseries_old(ig,:,islope,:),tsoil_PEM_timeseries(ig,:,islope,:),d_h2oice(ig,islope)) 981 enddo 982 enddo 983 deallocate(vmr_co2_PEM_phys,icetable_depth_old,tsoil_PEM_timeseries_old) 974 984 975 985 !------------------------
Note: See TracChangeset
for help on using the changeset viewer.