Changeset 4170
- Timestamp:
- Apr 3, 2026, 4:34:51 PM (7 days ago)
- Location:
- trunk
- Files:
-
- 26 edited
-
LMDZ.COMMON/libf/evolution/allocation.F90 (modified) (3 diffs)
-
LMDZ.COMMON/libf/evolution/atmosphere.F90 (modified) (2 diffs)
-
LMDZ.COMMON/libf/evolution/backup.F90 (modified) (7 diffs)
-
LMDZ.COMMON/libf/evolution/changelog.txt (modified) (1 diff)
-
LMDZ.COMMON/libf/evolution/clim_state_init.F90 (modified) (7 diffs)
-
LMDZ.COMMON/libf/evolution/clim_state_rec.F90 (modified) (4 diffs)
-
LMDZ.COMMON/libf/evolution/config.F90 (modified) (2 diffs)
-
LMDZ.COMMON/libf/evolution/display.F90 (modified) (1 diff)
-
LMDZ.COMMON/libf/evolution/evolution.F90 (modified) (1 diff)
-
LMDZ.COMMON/libf/evolution/glaciers.F90 (modified) (1 diff)
-
LMDZ.COMMON/libf/evolution/ice_table.F90 (modified) (5 diffs)
-
LMDZ.COMMON/libf/evolution/layered_deposits.F90 (modified) (5 diffs)
-
LMDZ.COMMON/libf/evolution/orbit.F90 (modified) (1 diff)
-
LMDZ.COMMON/libf/evolution/output.F90 (modified) (1 diff)
-
LMDZ.COMMON/libf/evolution/pem.F90 (modified) (14 diffs)
-
LMDZ.COMMON/libf/evolution/planet.F90 (modified) (5 diffs)
-
LMDZ.COMMON/libf/evolution/soil.F90 (modified) (1 diff)
-
LMDZ.COMMON/libf/evolution/sorption.F90 (modified) (1 diff)
-
LMDZ.COMMON/libf/evolution/stopping_crit.F90 (modified) (1 diff)
-
LMDZ.COMMON/libf/evolution/surf_ice.F90 (modified) (4 diffs)
-
LMDZ.COMMON/libf/evolution/surface.F90 (modified) (1 diff)
-
LMDZ.COMMON/libf/evolution/tendencies.F90 (modified) (5 diffs)
-
LMDZ.COMMON/libf/evolution/workflow_status.F90 (modified) (1 diff)
-
LMDZ.COMMON/libf/evolution/xios_data.F90 (modified) (3 diffs)
-
LMDZ.MARS/libf/phymars/phyetat0_mod.F90 (modified) (4 diffs)
-
LMDZ.MARS/libf/phymars/phyredem.F90 (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/allocation.F90
r4157 r4170 28 28 use orbit, only: ini_orbit, end_orbit 29 29 use output, only: ini_output, end_output 30 use ice_table, only: ini_ice_table, end_ice_table 30 31 use planet, only: ini_planet, end_planet 31 32 … … 80 81 call ini_orbit() 81 82 call ini_output() 83 call ini_ice_table() 82 84 83 85 END SUBROUTINE ini_allocation … … 106 108 ! CODE 107 109 ! ---- 110 call end_ice_table() 108 111 call end_output() 109 112 call end_orbit() -
trunk/LMDZ.COMMON/libf/evolution/atmosphere.F90
r4157 r4170 118 118 ! 119 119 ! DESCRIPTION 120 ! Setter for 'atmosphere'configuration parameters.120 ! Setter for "atmosphere" configuration parameters. 121 121 ! 122 122 ! AUTHORS & DATE … … 155 155 ! 156 156 ! DESCRIPTION 157 ! Setter for ' set_CO2cond_ps_PCM' parameter.157 ! Setter for 'CO2cond_ps_PCM' parameter. 158 158 ! 159 159 ! AUTHORS & DATE -
trunk/LMDZ.COMMON/libf/evolution/backup.F90
r4157 r4170 36 36 ! 37 37 ! DESCRIPTION 38 ! Setter for backupconfiguration parameters.38 ! Setter for "backup" configuration parameters. 39 39 ! 40 40 ! AUTHORS & DATE … … 70 70 !======================================================================= 71 71 SUBROUTINE save_clim_state(h2o_ice,co2_ice,tsurf_avg,tsurf_dev,tsoil_avg,tsoil_dev,ps_avg,ps_dev,ps_avg_glob,ps_avg_glob_ini, & 72 icetable_depth,icetable_thickness,ice_porefilling,h2o _ads_reg,co2_ads_reg,layerings_map,backup_idt)72 icetable_depth,icetable_thickness,ice_porefilling,h2oice_depth,flux_ssice_avg,h2o_ads_reg,co2_ads_reg,layerings_map,backup_idt) 73 73 !----------------------------------------------------------------------- 74 74 ! NAME … … 95 95 use atmosphere, only: build4PCM_atmosphere 96 96 use tracers, only: build4PCM_tracers, nq 97 use ice_table, only: build4PCM_ssice 97 98 use clim_state_rec, only: write_restart, write_restartfi, write_restartevo 98 99 use layered_deposits, only: layering … … 104 105 ! ARGUMENTS 105 106 ! --------- 106 real(dp), dimension(:), intent(in) :: ps_avg, ps_dev107 real(dp), intent(in) :: ps_avg_glob, ps_avg_glob_ini108 real(dp), dimension(:,:), intent(in) :: tsurf_avg, tsurf_dev, icetable_depth, icetable_thickness109 real(dp), dimension(:,:,:), intent(in) :: tsoil_avg, tsoil_dev, ice_porefilling, h2o_ads_reg, co2_ads_reg110 type(layering), dimension(:,:), intent(in) :: layerings_map111 integer(di), optional, intent(in):: backup_idt107 real(dp), dimension(:), intent(in) :: ps_avg, ps_dev 108 real(dp), intent(in) :: ps_avg_glob, ps_avg_glob_ini 109 real(dp), dimension(:,:), intent(in) :: tsurf_avg, tsurf_dev, icetable_depth, icetable_thickness, h2oice_depth, flux_ssice_avg 110 real(dp), dimension(:,:,:), intent(in) :: tsoil_avg, tsoil_dev, ice_porefilling, h2o_ads_reg, co2_ads_reg 111 type(layering), dimension(:,:), intent(in) :: layerings_map 112 integer(di), intent(in), optional :: backup_idt 112 113 real(dp), dimension(:,:), intent(inout) :: h2o_ice, co2_ice 113 114 114 115 ! LOCAL VARIABLES 115 116 ! --------------- 116 real(dp), dimension(ngrid,nslope) :: h2o_ice4PCM, co2_ice4PCM, tsurf4PCM, flux_geo4PCM, albedo4PCM, emissivity4PCM 117 real(dp), dimension(ngrid,nslope) :: h2o_ice4PCM, co2_ice4PCM, tsurf4PCM, flux_geo4PCM, albedo4PCM, emissivity4PCM, flux_ssice4PCM, h2oice_depth4PCM 117 118 real(dp), dimension(ngrid,nlayer) :: teta4PCM, air_mass4PCM 118 119 real(dp), dimension(ngrid,nsoil_PCM,nslope) :: tsoil4PCM, inertiesoil4PCM … … 130 131 call build4PCM_tsurf(tsurf_avg,tsurf_dev,tsurf4PCM) 131 132 132 ! Build soil for the PCM 133 if (do_soil) call build4PCM_soil(tsoil_avg,tsoil_dev,inertiesoil4PCM,tsoil4PCM,flux_geo4PCM) 133 if (do_soil) then 134 ! Build soil for the PCM 135 call build4PCM_soil(tsoil_avg,tsoil_dev,inertiesoil4PCM,tsoil4PCM,flux_geo4PCM) 136 137 ! Build subsurface ice for the PCM 138 call build4PCM_ssice(icetable_depth,h2oice_depth,h2oice_depth4PCM) 139 end if 134 140 135 141 ! Build atmosphere for the PCM … … 144 150 ! Write restart files 145 151 call write_restartevo(h2o_ice,co2_ice,tsoil_avg,TI,icetable_depth,icetable_thickness,ice_porefilling,h2o_ads_reg,co2_ads_reg,layerings_map) 146 call write_restartfi(is_h2o_perice,h2o_ice4PCM,co2_ice4PCM,tsurf4PCM,tsoil4PCM,inertiesoil4PCM,albedo4PCM,emissivity4PCM,flux_geo4PCM )152 call write_restartfi(is_h2o_perice,h2o_ice4PCM,co2_ice4PCM,tsurf4PCM,tsoil4PCM,inertiesoil4PCM,albedo4PCM,emissivity4PCM,flux_geo4PCM,h2oice_depth4PCM) 147 153 call write_restart(ps4PCM,pa4PCM,preff4PCM,q4PCM,teta4PCM,air_mass4PCM) 148 154 … … 191 197 ! CODE 192 198 ! ---- 193 suffix = '' 194 suffix = suffix//'_ts'//int2str(backup_idt) 199 suffix = '_ts'//int2str(backup_idt) 195 200 196 201 call print_msg('> Backup of "restart" files at dt = '//int2str(backup_idt),LVL_NFO) -
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r4157 r4170 950 950 - Add lifecycle helpers for clear allocation/deallocation logic. 951 951 - Simplify string suffix for slopes variables. 952 953 == 03/04/2026 == JBC 954 - Deletion of 'flux_ssice' ('zqdsdif_tot') from the "startfi.nc" as it is not needed. 955 - Using the yearly average flux for the sublimating subsurface ice instead of the value at last timestep. 956 - Keeping a clear separation between the subsurface ice flux and the surface ice tendency. 957 - Making sure that subsurface ice depth is well given to the PCM at the end of the PEM (ice table VS layering). -
trunk/LMDZ.COMMON/libf/evolution/clim_state_init.F90
r4157 r4170 205 205 use surf_ice, only: set_is_h2o_perice_PCM, set_co2_perice_PCM 206 206 use soil, only: set_TI_PCM, set_inertiedat_PCM 207 use ice_table, only: set_coef_ssdif_PCM 207 208 use display, only: print_msg, LVL_NFO 208 209 … … 276 277 call set_tsoil_PCM(tmp3d) 277 278 279 call get_var_nc('coef_ssdif',tmp2d) 280 call set_coef_ssdif_PCM(tmp2d) 281 278 282 deallocate(tmp2d); allocate(tmp2d(ngrid,nsoil_PCM)) 279 283 call get_var_nc('inertiedat',tmp2d) … … 282 286 call get_var_nc('inertiesoil',tmp3d) 283 287 call set_TI_PCM(tmp3d) 284 285 ! To do?286 ! h2oice_depth287 ! d_coef288 ! lag_co2_ice289 288 290 289 ! Close/Deallocate … … 398 397 !!! transition 399 398 delta = depth_breccia 400 TI(i,index_breccia + 1,islope) = sqrt((layer(index_breccia + 1) - layer(index_breccia))/ &401 (((delta - layer(index_breccia))/(TI(i,index_breccia,islope)**2)) + &402 ((layer(index_breccia + 1) - delta)/(TI_breccia**2))))399 TI(i,index_breccia + 1,islope) = sqrt((layer(index_breccia + 1) - layer(index_breccia))/ & 400 (((delta - layer(index_breccia))/(TI(i,index_breccia,islope)**2)) + & 401 ((layer(index_breccia + 1) - delta)/(TI_breccia**2)))) 403 402 do k = index_breccia + 2,index_bedrock 404 403 TI(i,k,islope) = TI_breccia … … 411 410 !! transition 412 411 delta = depth_bedrock 413 TI(i,index_bedrock + 1,islope) = sqrt((layer(index_bedrock + 1) - layer(index_bedrock))/ &414 (((delta - layer(index_bedrock))/(TI(i,index_bedrock,islope)**2)) + &415 ((layer(index_bedrock + 1) - delta)/(TI_breccia**2))))412 TI(i,index_bedrock + 1,islope) = sqrt((layer(index_bedrock + 1) - layer(index_bedrock))/ & 413 (((delta - layer(index_bedrock))/(TI(i,index_bedrock,islope)**2)) + & 414 ((layer(index_bedrock + 1) - delta)/(TI_breccia**2)))) 416 415 do k = index_bedrock + 2,nsoil 417 416 TI(i,k,islope) = TI_bedrock … … 427 426 do i = 1,ngrid 428 427 if (inertiedat(i,index_breccia) < TI_breccia) then 429 inertiedat(i,index_breccia + 1) = sqrt((layer(index_breccia + 1) - layer(index_breccia))/ &430 (((delta - layer(index_breccia))/(inertiedat(i,index_breccia)**2)) + &431 ((layer(index_breccia + 1) - delta)/(TI_breccia**2))))428 inertiedat(i,index_breccia + 1) = sqrt((layer(index_breccia + 1) - layer(index_breccia))/ & 429 (((delta - layer(index_breccia))/(inertiedat(i,index_breccia)**2)) + & 430 ((layer(index_breccia + 1) - delta)/(TI_breccia**2)))) 432 431 do k = index_breccia + 2,index_bedrock 433 432 inertiedat(i,k) = TI_breccia … … 442 441 delta = depth_bedrock 443 442 do i = 1,ngrid 444 inertiedat(i,index_bedrock + 1) = sqrt((layer(index_bedrock + 1) - layer(index_bedrock))/ &445 (((delta - layer(index_bedrock))/(inertiedat(i,index_bedrock)**2)) + &446 ((layer(index_bedrock + 1) - delta)/(TI_bedrock**2))))443 inertiedat(i,index_bedrock + 1) = sqrt((layer(index_bedrock + 1) - layer(index_bedrock))/ & 444 (((delta - layer(index_bedrock))/(inertiedat(i,index_bedrock)**2)) + & 445 ((layer(index_bedrock + 1) - delta)/(TI_bedrock**2)))) 447 446 end do 448 447 -
trunk/LMDZ.COMMON/libf/evolution/clim_state_rec.F90
r4157 r4170 180 180 181 181 !======================================================================= 182 SUBROUTINE write_restartfi(is_h2o_perice,h2o_ice4PCM,co2_ice4PCM,tsurf4PCM,tsoil4PCM,inertiesoil4PCM,albedo4PCM,emissivity4PCM,flux_geo4PCM )182 SUBROUTINE write_restartfi(is_h2o_perice,h2o_ice4PCM,co2_ice4PCM,tsurf4PCM,tsoil4PCM,inertiesoil4PCM,albedo4PCM,emissivity4PCM,flux_geo4PCM,h2oice_depth4PCM) 183 183 !----------------------------------------------------------------------- 184 184 ! NAME … … 208 208 ! ARGUMENTS 209 209 ! --------- 210 real(dp), dimension(:,:), intent(in) :: h2o_ice4PCM, co2_ice4PCM, albedo4PCM, emissivity4PCM, tsurf4PCM, flux_geo4PCM 210 real(dp), dimension(:,:), intent(in) :: h2o_ice4PCM, co2_ice4PCM, albedo4PCM, emissivity4PCM, tsurf4PCM, flux_geo4PCM, h2oice_depth4PCM 211 211 real(dp), dimension(:,:,:), intent(in) :: tsoil4PCM, inertiesoil4PCM 212 212 logical(k4), dimension(:), intent(in) :: is_h2o_perice … … 240 240 241 241 ! Orbital parameters (controle) 242 controle(18) = obliquity ! Obliquity242 controle(18) = obliquity ! Obliquity 243 243 controle(15) = perihelion ! Perihelion 244 controle(16) = aphelion ! Aphelion245 controle(17) = date_peri ! Date of perihelion244 controle(16) = aphelion ! Aphelion 245 controle(17) = date_peri ! Date of perihelion 246 246 call put_var_nc('controle',controle) 247 247 deallocate(controle) … … 259 259 call put_var_nc('emis',emissivity4PCM,1) 260 260 call put_var_nc('flux_geo',flux_geo4PCM,1) 261 262 ! h2oice_depth 263 ! lag_co2_ice 264 ! zdqsdif_ssi_tot 265 ! d_coef 266 261 call put_var_nc('h2oice_depth',h2oice_depth4PCM) 262 263 ! Close 267 264 call close_nc('re'//startfi_name) 268 265 -
trunk/LMDZ.COMMON/libf/evolution/config.F90
r4152 r4170 172 172 call getin('h2oice_huge_ini',h2oice_huge_ini_l) 173 173 174 threshold_h2oice_cap_l = 460._dp ! kg .m-2 (= 0.5 m)174 threshold_h2oice_cap_l = 460._dp ! kg/m2 (= 0.5 m) 175 175 call getin('threshold_h2oice_cap',threshold_h2oice_cap_l) 176 176 … … 186 186 call getin('do_layering',do_layering_l) 187 187 188 d_dust_l = 5.78e-2_dp ! kg .m-2.y-1 (= 1.e-9 kg.m-2.s-1)188 d_dust_l = 5.78e-2_dp ! kg/m2/y (= 1.e-9 kg/m2/s) 189 189 call getin('d_dust',d_dust_l) 190 190 -
trunk/LMDZ.COMMON/libf/evolution/display.F90
r4117 r4170 50 50 ! 51 51 ! DESCRIPTION 52 ! Setter for 'display'configuration parameters.52 ! Setter for "display" configuration parameters. 53 53 ! 54 54 ! AUTHORS & DATE -
trunk/LMDZ.COMMON/libf/evolution/evolution.F90
r4147 r4170 77 77 ! 78 78 ! DESCRIPTION 79 ! Setter for 'evolution'configuration parameters.79 ! Setter for "evolution" configuration parameters. 80 80 ! 81 81 ! AUTHORS & DATE -
trunk/LMDZ.COMMON/libf/evolution/glaciers.F90
r4135 r4170 39 39 ! 40 40 ! DESCRIPTION 41 ! Setter for 'glaciers'configuration parameters.41 ! Setter for "glaciers" configuration parameters. 42 42 ! 43 43 ! AUTHORS & DATE -
trunk/LMDZ.COMMON/libf/evolution/ice_table.F90
r4138 r4170 25 25 ! PARAMETERS 26 26 ! ---------- 27 logical(k4), protected :: icetable_equilibrium ! Flag to compute the icetable depth according to equilibrium 28 logical(k4), protected :: icetable_dynamic ! Flag to compute the icetable depth according to the dynamic method 27 logical(k4), protected :: icetable_equilibrium ! Flag to compute the icetable depth according to equilibrium 28 logical(k4), protected :: icetable_dynamic ! Flag to compute the icetable depth according to the dynamic method 29 real(dp), dimension(:,:), allocatable, protected :: coef_ssdif_PCM ! Diffusion coefficient for subsurface water 29 30 30 31 contains … … 32 33 33 34 !======================================================================= 35 SUBROUTINE ini_ice_table() 36 !----------------------------------------------------------------------- 37 ! NAME 38 ! ini_ice_table 39 ! 40 ! DESCRIPTION 41 ! Initialize the parameters of module 'ice_table'. 42 ! 43 ! AUTHORS & DATE 44 ! JB Clement, 03/2026 45 ! 46 ! NOTES 47 ! 48 !----------------------------------------------------------------------- 49 50 ! DEPENDENCIES 51 ! ------------ 52 use geometry, only: ngrid, nslope 53 54 ! DECLARATION 55 ! ----------- 56 implicit none 57 58 ! CODE 59 ! ---- 60 allocate(coef_ssdif_PCM(ngrid,nslope)) 61 coef_ssdif_PCM(:,:) = 0._dp 62 63 END SUBROUTINE ini_ice_table 64 !======================================================================= 65 66 !======================================================================= 67 SUBROUTINE end_ice_table() 68 !----------------------------------------------------------------------- 69 ! NAME 70 ! end_ice_table 71 ! 72 ! DESCRIPTION 73 ! Deallocate ice_table arrays. 74 ! 75 ! AUTHORS & DATE 76 ! JB Clement, 03/2026 77 ! 78 ! NOTES 79 ! 80 !----------------------------------------------------------------------- 81 82 ! DECLARATION 83 ! ----------- 84 implicit none 85 86 ! CODE 87 ! ---- 88 if (allocated(coef_ssdif_PCM)) deallocate(coef_ssdif_PCM) 89 90 END SUBROUTINE end_ice_table 91 !======================================================================= 92 93 !======================================================================= 34 94 SUBROUTINE set_ice_table_config(icetable_equilibrium_in,icetable_dynamic_in) 35 95 !----------------------------------------------------------------------- … … 38 98 ! 39 99 ! DESCRIPTION 40 ! Setter for 'ice_table'configuration parameters.100 ! Setter for "ice_table" configuration parameters. 41 101 ! 42 102 ! AUTHORS & DATE … … 72 132 73 133 END SUBROUTINE set_ice_table_config 134 !======================================================================= 135 136 !======================================================================= 137 SUBROUTINE set_coef_ssdif_PCM(coef_ssdif_PCM_in) 138 !----------------------------------------------------------------------- 139 ! NAME 140 ! set_coef_ssdif_PCM 141 ! 142 ! DESCRIPTION 143 ! Setter for 'coef_ssdif_PCM' parameter. 144 ! 145 ! AUTHORS & DATE 146 ! JB Clement, 03/2026 147 ! 148 ! NOTES 149 ! 150 !----------------------------------------------------------------------- 151 152 ! DECLARATION 153 ! ----------- 154 implicit none 155 156 ! ARGUMENTS 157 ! --------- 158 real(dp), dimension(:,:), intent(in) :: coef_ssdif_PCM_in 159 160 ! CODE 161 ! ---- 162 coef_ssdif_PCM(:,:) = coef_ssdif_PCM_in(:,:) 163 164 END SUBROUTINE set_coef_ssdif_PCM 74 165 !======================================================================= 75 166 … … 609 700 !======================================================================= 610 701 702 !======================================================================= 703 SUBROUTINE build4PCM_ssice(icetable_depth,h2oice_depth,h2oice_depth4PCM) 704 !----------------------------------------------------------------------- 705 ! NAME 706 ! build4PCM_ssice 707 ! 708 ! DESCRIPTION 709 ! Reconstructs subsurface ice for the PCM. 710 ! 711 ! AUTHORS & DATE 712 ! JB Clement, 03/2026 713 ! 714 ! NOTES 715 ! 716 !----------------------------------------------------------------------- 717 718 ! DEPENDENCIES 719 ! ------------ 720 use layered_deposits, only: do_layering 721 use display, only: print_msg, LVL_NFO 722 723 ! DECLARATION 724 ! ----------- 725 implicit none 726 727 ! ARGUMENTS 728 ! --------- 729 real(dp), dimension(:,:), intent(in) :: icetable_depth, h2oice_depth 730 real(dp), dimension(:,:), intent(out) :: h2oice_depth4PCM 731 732 ! CODE 733 ! ---- 734 call print_msg('> Building subsurface ice for the PCM',LVL_NFO) 735 h2oice_depth4PCM(:,:) = -999. ! Default initialization (no subsurface ice) 736 if (do_layering) then 737 h2oice_depth4PCM(:,:) = h2oice_depth(:,:) 738 else if (icetable_equilibrium .or. icetable_dynamic) then 739 h2oice_depth4PCM(:,:) = icetable_depth(:,:) 740 end if 741 742 END SUBROUTINE build4PCM_ssice 743 !======================================================================= 744 611 745 END MODULE ice_table -
trunk/LMDZ.COMMON/libf/evolution/layered_deposits.F90
r4135 r4170 33 33 logical(k4), protected, private :: impose_dust_ratio ! Impose dust-to-ice ratio instead of dust tendency (see 'dust2ice_ratio') 34 34 real(dp), protected, private :: dust2ice_ratio ! Dust-to-ice ratio when ice condenses (10% by default) 35 real(dp), protected, private :: d_dust ! Tendency of dust [kg .m-2.y-1]35 real(dp), protected, private :: d_dust ! Tendency of dust [kg/m2/y] 36 36 real(dp), parameter, private :: dry_lag_porosity = 0.2_dp ! Porosity of dust lag 37 37 real(dp), parameter, private :: wet_lag_porosity = 0.15_dp ! Porosity of water ice lag … … 85 85 ! 86 86 ! DESCRIPTION 87 ! Setter for 'layered_deposits'configuration parameters.87 ! Setter for "layered_deposits" configuration parameters. 88 88 ! 89 89 ! AUTHORS & DATE … … 749 749 h2o_ice(ig,islope) = layerings_map(ig,islope)%top%h_h2oice*rho_h2oice 750 750 else 751 call subsurface_ice_layering(layerings_map(ig,islope),h2oice_depth(ig,islope),h2o_ice(ig,islope),co2_ice(ig,islope))751 call get_ssice_layering(layerings_map(ig,islope),h2oice_depth(ig,islope),h2o_ice(ig,islope),co2_ice(ig,islope)) 752 752 end if 753 753 end do … … 1034 1034 1035 1035 !======================================================================= 1036 SUBROUTINE subsurface_ice_layering(this,h_toplag,h2o_ice,co2_ice)1037 !----------------------------------------------------------------------- 1038 ! NAME 1039 ! subsurface_ice_layering1036 SUBROUTINE get_ssice_layering(this,h_toplag,h2o_ice,co2_ice) 1037 !----------------------------------------------------------------------- 1038 ! NAME 1039 ! get_ssice_layering 1040 1040 ! 1041 1041 ! DESCRIPTION … … 1095 1095 end if 1096 1096 1097 END SUBROUTINE subsurface_ice_layering1097 END SUBROUTINE get_ssice_layering 1098 1098 !======================================================================= 1099 1099 -
trunk/LMDZ.COMMON/libf/evolution/orbit.F90
r4138 r4170 59 59 ! 60 60 ! DESCRIPTION 61 ! Setter for 'orbit'configuration parameters.61 ! Setter for "orbit" configuration parameters. 62 62 ! 63 63 ! AUTHORS & DATE -
trunk/LMDZ.COMMON/libf/evolution/output.F90
r4152 r4170 100 100 ! 101 101 ! DESCRIPTION 102 ! Setter for 'output'configuration parameters.102 ! Setter for "output" configuration parameters. 103 103 ! 104 104 ! AUTHORS & DATE -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r4157 r4170 52 52 use surf_ice, only: evolve_co2ice, evolve_h2oice, balance_h2oice_reservoirs 53 53 use surf_temp, only: tsurf_PCM, adapt_tsurf2disappearedice 54 use tendencies, only: compute_tendice, evolve_tend_co2ice, evolve_ tend_h2oice54 use tendencies, only: compute_tendice, evolve_tend_co2ice, evolve_flux_ssice 55 55 use tracers, only: adapt_tracers2pressure 56 56 use utility, only: real2str … … 72 72 logical(k4), dimension(:,:), allocatable :: is_co2ice_flow ! Flag for location of CO2 glacier flow 73 73 logical(k4), dimension(:,:), allocatable :: is_h2oice_flow ! Flag for location of H2O glacier flow 74 real(dp), dimension(:,:,:), allocatable :: minPCM_h2operice ! Minimum of H2O perennial ice over the last PCM year [kg .m-2]75 real(dp), dimension(:,:,:), allocatable :: minPCM_co2perice ! Minimum of CO2 perennial ice over the last PCM year [kg .m-2]76 real(dp), dimension(:,:,:), allocatable :: minPCM_h2ofrost ! Minimum of H2O frost over the last PCM year [kg .m-2]77 real(dp), dimension(:,:,:), allocatable :: minPCM_co2frost ! Minimum of CO2 frost over the last PCM year [kg .m-2]74 real(dp), dimension(:,:,:), allocatable :: minPCM_h2operice ! Minimum of H2O perennial ice over the last PCM year [kg/m2] 75 real(dp), dimension(:,:,:), allocatable :: minPCM_co2perice ! Minimum of CO2 perennial ice over the last PCM year [kg/m2] 76 real(dp), dimension(:,:,:), allocatable :: minPCM_h2ofrost ! Minimum of H2O frost over the last PCM year [kg/m2] 77 real(dp), dimension(:,:,:), allocatable :: minPCM_co2frost ! Minimum of CO2 frost over the last PCM year [kg/m2] 78 78 ! Surface-related: 79 79 real(dp), dimension(:,:), allocatable :: tsurf_avg_yr1 ! Average surface temperature of the second to last PCM run [K] … … 141 141 142 142 call load_xios_data(ps_avg,ps_ts,tsurf_avg,tsurf_avg_yr1,tsoil_avg,tsoil_ts,h2o_surfdensity_avg,h2o_soildensity_avg, & 143 q_h2o_ts,q_co2_ts,minPCM_h2operice,minPCM_co2perice,minPCM_h2ofrost,minPCM_co2frost )143 q_h2o_ts,q_co2_ts,minPCM_h2operice,minPCM_co2perice,minPCM_h2ofrost,minPCM_co2frost,flux_ssice_avg) 144 144 145 145 ! Initiate soil settings and TI … … 169 169 call print_msg('> Computing surface ice tendencies',LVL_NFO) 170 170 call compute_tendice(minPCM_h2operice,minPCM_h2ofrost,h2o_ice,d_h2oice) 171 call print_msg('H2O ice tendencies [kg/m2/y r] (min|max): '//real2str(minval(d_h2oice))//' | '//real2str(maxval(d_h2oice)),LVL_NFO)171 call print_msg('H2O ice tendencies [kg/m2/y] (min|max): '//real2str(minval(d_h2oice))//' | '//real2str(maxval(d_h2oice)),LVL_NFO) 172 172 call compute_tendice(minPCM_co2perice,minPCM_co2frost,co2_ice,d_co2ice) 173 call print_msg('CO2 ice tendencies [kg/m2/y r] (min|max): '//real2str(minval(d_co2ice))//' | '//real2str(maxval(d_co2ice)),LVL_NFO)173 call print_msg('CO2 ice tendencies [kg/m2/y] (min|max): '//real2str(minval(d_co2ice))//' | '//real2str(maxval(d_co2ice)),LVL_NFO) 174 174 deallocate(minPCM_h2operice,minPCM_co2perice,minPCM_h2ofrost,minPCM_co2frost) 175 175 … … 220 220 ! Conversion to surface ice 221 221 call layering2surfice(layerings_map,h2o_ice,co2_ice,h2oice_depth) 222 ! We put the sublimating tendency coming from subsurface ice into the overall tendency223 !where (h2oice_depth > 0. .and. zdqsdif_ssi_tot < -minieps) d_h2oice = zdqsdif_ssi_tot224 222 end if 225 223 call allocate_loop_state() … … 227 225 idt = 0 228 226 do while (n_yr_run < min(nmax_yr_runorb,nmax_yr_run) .and. n_yr_sim < ntot_yr_sim) 229 call print_msg('**** Iteration of the PEM run [plnt y r]: '//real2str(n_yr_run + dt),LVL_NFO)227 call print_msg('**** Iteration of the PEM run [plnt y]: '//real2str(n_yr_run + dt),LVL_NFO) 230 228 ! Evolve global surface pressure 231 229 call evolve_pressure(d_co2ice,delta_co2_ads,do_sorption,ps_avg_glob_old,ps_avg_glob,ps_avg) … … 237 235 allocate(zshift_surf(ngrid,nslope),zlag(ngrid,nslope)) 238 236 if (do_layering) then 237 allocate(d_h2oice_new(ngrid,nslope)) 239 238 h2oice_depth_old(:,:) = h2oice_depth(:,:) 239 ! The sublimating tendency coming from subsurface ice is given through the surface ice tendency 240 where (h2oice_depth(:,:) > 0. .and. flux_ssice_avg(:,:) < 0._dp) d_h2oice(:,:) = flux_ssice_avg(:,:) 240 241 do islope = 1,nslope 241 242 do i = 1,ngrid … … 247 248 call layering2surfice(layerings_map,h2o_ice,co2_ice,h2oice_depth) 248 249 ! Balance H2O ice reservoirs 249 allocate(d_h2oice_new(ngrid,nslope))250 250 call stopping_crit_h2o(delta_h2o_ads,delta_icetable,h2o_ice,d_h2oice,S_atm_2_h2o,S_h2o_2_atm,S_atm_2_h2oice,S_h2oice_2_atm,stopcrit) 251 251 call balance_h2oice_reservoirs(S_atm_2_h2o,S_h2o_2_atm,S_atm_2_h2oice,S_h2oice_2_atm,h2o_ice,d_h2oice,d_h2oice_new) … … 253 253 else 254 254 zlag(:,:) = 0._dp 255 zshift_surf(:,:) = 0._dp 255 256 call evolve_h2oice(delta_h2o_ads,delta_icetable,h2o_ice,d_h2oice,zshift_surf,stopcrit) 256 257 call evolve_co2ice(co2_ice,d_co2ice,zshift_surf) … … 306 307 write(num,'("_slope",i2.2)') islope 307 308 end if 308 call write_diagevo('h2oice'//trim(num),'H2O ice','kg .m-2',h2o_ice(:,islope),(/dim_ngrid/))309 call write_diagevo('co2ice'//trim(num),'CO2 ice','kg .m-2',co2_ice(:,islope),(/dim_ngrid/))310 call write_diagevo('d_h2oice'//trim(num),'H2O ice tendency','kg .m-2.yr-1',d_h2oice(:,islope),(/dim_ngrid/))311 call write_diagevo('d_co2ice'//trim(num),'CO2 ice tendency','kg .m-2.yr-1',d_co2ice(:,islope),(/dim_ngrid/))309 call write_diagevo('h2oice'//trim(num),'H2O ice','kg/m2',h2o_ice(:,islope),(/dim_ngrid/)) 310 call write_diagevo('co2ice'//trim(num),'CO2 ice','kg/m2',co2_ice(:,islope),(/dim_ngrid/)) 311 call write_diagevo('d_h2oice'//trim(num),'H2O ice tendency','kg/m2/y',d_h2oice(:,islope),(/dim_ngrid/)) 312 call write_diagevo('d_co2ice'//trim(num),'CO2 ice tendency','kg/m2/y',d_co2ice(:,islope),(/dim_ngrid/)) 312 313 if (co2ice_flow) then 313 314 call write_diagevo('Flow_co2ice'//trim(num),'CO2 ice flow location','T/F',merge(1._dp,0._dp,is_co2ice_flow(:,islope)),(/dim_ngrid/)) … … 328 329 call write_diagevo('inertiesoil'//trim(num),'Thermal inertia','SI',TI(:,:,islope),(/dim_ngrid,dim_nsoil/)) 329 330 if (do_sorption) then 330 call write_diagevo('co2_ads_reg'//trim(num),'CO2 adsorbed in regolith','kg .m-2',co2_ads_reg(:,:,islope),(/dim_ngrid,dim_nsoil/))331 call write_diagevo('h2o_ads_reg'//trim(num),'H2O adsorbed in regolith','kg .m-2',h2o_ads_reg(:,:,islope),(/dim_ngrid,dim_nsoil/))331 call write_diagevo('co2_ads_reg'//trim(num),'CO2 adsorbed in regolith','kg/m2',co2_ads_reg(:,:,islope),(/dim_ngrid,dim_nsoil/)) 332 call write_diagevo('h2o_ads_reg'//trim(num),'H2O adsorbed in regolith','kg/m2',h2o_ads_reg(:,:,islope),(/dim_ngrid,dim_nsoil/)) 332 333 end if 333 334 end if … … 361 362 ! Evolve the tendencies 362 363 call evolve_tend_co2ice(d_co2ice_ini,co2_ice,emissivity_PCM,q_co2_ts_ini,q_co2_ts,ps_ts,ps_avg_glob_ini,ps_avg_glob,d_co2ice) 363 !~ if (do_layering) then 364 !~ do i = 1,ngrid 365 !~ do islope = 1,nslope 366 !~ if (is_h2oice_sublim_ini(i,islope) .and. h2oice_depth(i,islope) > 0._dp) call evolve_tend_h2oice(h2oice_depth_old(i,islope),h2oice_depth(i,islope),tsurf_avg(i,islope),tsoil_ts_old(i,:,islope,:),tsoil_ts(i,:,islope,:),d_h2oice(i,islope)) 367 !~ end do 368 !~ end do 369 ! else 370 ! do i = 1,ngrid 371 ! do islope = 1,nslope 372 ! call evolve_tend_h2oice(icetable_depth_old(i,islope),icetable_depth(i,islope),tsurf_avg(i,islope),tsoil_ts_old(i,:,islope,:),tsoil_ts(i,:,islope,:),d_h2oice(i,islope)) 373 ! end do 374 ! end do 375 !~ end if 364 if (do_layering) then 365 call evolve_flux_ssice(h2oice_depth_old,h2oice_depth,tsurf_avg,tsoil_ts_old,tsoil_ts,flux_ssice_avg) 366 else if (icetable_equilibrium .or. icetable_dynamic) then 367 call evolve_flux_ssice(icetable_depth_old,icetable_depth,tsurf_avg,tsoil_ts_old,tsoil_ts,flux_ssice_avg) 368 end if 376 369 377 370 ! Increment time … … 383 376 if (backup_rate > 0) then 384 377 if (mod(idt,backup_rate) == 0) call save_clim_state(h2o_ice,co2_ice,tsurf_avg,tsurf_dev,tsoil_avg,tsoil_dev,ps_avg,ps_dev,ps_avg_glob,ps_avg_glob_ini, & 385 icetable_depth,icetable_thickness,ice_porefilling,h2o _ads_reg,co2_ads_reg,layerings_map,idt)378 icetable_depth,icetable_thickness,ice_porefilling,h2oice_depth,flux_ssice_avg,h2o_ads_reg,co2_ads_reg,layerings_map,idt) 386 379 end if 387 380 … … 415 408 416 409 call save_clim_state(h2o_ice,co2_ice,tsurf_avg,tsurf_dev,tsoil_avg,tsoil_dev,ps_avg,ps_dev,ps_avg_glob,ps_avg_glob_ini, & 417 icetable_depth,icetable_thickness,ice_porefilling,h2o _ads_reg,co2_ads_reg,layerings_map)410 icetable_depth,icetable_thickness,ice_porefilling,h2oice_depth,flux_ssice_avg,h2o_ads_reg,co2_ads_reg,layerings_map) 418 411 419 412 ! Update the duration information of the workflow -
trunk/LMDZ.COMMON/libf/evolution/planet.F90
r4157 r4170 38 38 39 39 ! Ice-related: 40 real(dp), dimension(:,:), allocatable :: h2o_ice ! H2O ice [kg .m-2]41 real(dp), dimension(:,:), allocatable :: co2_ice ! CO2 ice [kg .m-2]40 real(dp), dimension(:,:), allocatable :: h2o_ice ! H2O ice [kg/m2] 41 real(dp), dimension(:,:), allocatable :: co2_ice ! CO2 ice [kg/m2] 42 42 real(dp) :: h2oice_sublim_coverage_ini ! Initial surface area of sublimating H2O ice [m2] 43 43 real(dp) :: co2ice_sublim_coverage_ini ! Initial surface area of sublimating CO2 ice [m2] … … 73 73 real(dp), dimension(:,:), allocatable :: icetable_depth_old ! Old depth of the ice table [m] 74 74 real(dp), dimension(:), allocatable :: delta_icetable ! Total mass of the H2O exchanged with the ice table [kg] 75 real(dp), dimension(:,:), allocatable :: flux_ssice_avg ! Average of total flux exchanged with subsurface ice [kg/m2/y] 75 76 76 77 ! Tracer-related: … … 153 154 allocate(q_h2o_ts(ngrid,nday)) 154 155 allocate(q_co2_ts(ngrid,nday)) 156 allocate(flux_ssice_avg(ngrid,nslope)) 155 157 156 158 ps_avg(:) = 0._dp … … 163 165 q_h2o_ts(:,:) = 0._dp 164 166 q_co2_ts(:,:) = 0._dp 167 flux_ssice_avg(:,:) = 0._dp 165 168 166 169 END SUBROUTINE allocate_xios_state … … 422 425 if (allocated(d_h2oice)) deallocate(d_h2oice) 423 426 if (allocated(layerings_map)) deallocate(layerings_map) 427 if (allocated(flux_ssice_avg)) deallocate(flux_ssice_avg) 424 428 425 429 END SUBROUTINE end_planet -
trunk/LMDZ.COMMON/libf/evolution/soil.F90
r4136 r4170 148 148 ! 149 149 ! DESCRIPTION 150 ! Setter for 'soil'configuration parameters.150 ! Setter for "soil" configuration parameters. 151 151 ! 152 152 ! AUTHORS & DATE -
trunk/LMDZ.COMMON/libf/evolution/sorption.F90
r4135 r4170 38 38 ! 39 39 ! DESCRIPTION 40 ! Setter for 'sorption'configuration parameters.40 ! Setter for "sorption" configuration parameters. 41 41 ! 42 42 ! AUTHORS & DATE -
trunk/LMDZ.COMMON/libf/evolution/stopping_crit.F90
r4152 r4170 55 55 ! 56 56 ! DESCRIPTION 57 ! Setter for 'stopping_crit'configuration parameters.57 ! Setter for "stopping_crit" configuration parameters. 58 58 ! 59 59 ! AUTHORS & DATE -
trunk/LMDZ.COMMON/libf/evolution/surf_ice.F90
r4152 r4170 26 26 real(dp), parameter :: rho_co2ice = 1650._dp ! Density of CO2 ice [kg.m-3] 27 27 real(dp), parameter :: rho_h2oice = 920._dp ! Density of H2O ice [kg.m-3] 28 real(dp), protected :: threshold_h2oice_cap ! Threshold to consider H2O ice as infinite reservoir [kg .m-2]28 real(dp), protected :: threshold_h2oice_cap ! Threshold to consider H2O ice as infinite reservoir [kg/m2] 29 29 real(dp), protected :: h2oice_huge_ini ! Initial value for huge reservoirs of H2O ice [kg/m^2] 30 logical(k4), dimension(:), allocatable, protected :: is_h2o_perice_PCM ! Flag for the presence of perennial H2O ice in the PCM at the beginning [kg .m-2]31 real(dp), dimension(:,:), allocatable, protected :: co2_perice_PCM ! Perennial CO2 ice in the PCM at the beginning [kg .m-2]30 logical(k4), dimension(:), allocatable, protected :: is_h2o_perice_PCM ! Flag for the presence of perennial H2O ice in the PCM at the beginning [kg/m2] 31 real(dp), dimension(:,:), allocatable, protected :: co2_perice_PCM ! Perennial CO2 ice in the PCM at the beginning [kg/m2] 32 32 33 33 contains … … 103 103 ! 104 104 ! DESCRIPTION 105 ! Setter for 'surf_ice'configuration parameters.105 ! Setter for "surf_ice" configuration parameters. 106 106 ! 107 107 ! AUTHORS & DATE … … 306 306 call print_msg('> Evolution of CO2 ice',LVL_NFO) 307 307 308 co2_ice_old = co2_ice309 co2_ice = co2_ice + d_co2ice*dt308 co2_ice_old(:,:) = co2_ice(:,:) 309 co2_ice(:,:) = co2_ice(:,:) + d_co2ice(:,:)*dt 310 310 where (co2_ice < 0._dp) 311 co2_ice = 0._dp312 d_co2ice = -co2_ice_old/dt311 co2_ice(:,:) = 0._dp 312 d_co2ice(:,:) = -co2_ice_old(:,:)/dt 313 313 end where 314 314 315 zshift_surf = d_co2ice*dt/rho_co2ice315 zshift_surf(:,:) = zshift_surf(:,:) + d_co2ice(:,:)*dt/rho_co2ice 316 316 317 317 END SUBROUTINE evolve_co2ice … … 379 379 380 380 h2o_ice(:,:) = h2o_ice(:,:) + d_h2oice_new(:,:)*dt 381 zshift_surf(:,:) = d_h2oice_new(:,:)*dt/rho_h2oice381 zshift_surf(:,:) = zshift_surf(:,:) + d_h2oice_new(:,:)*dt/rho_h2oice 382 382 383 383 END SUBROUTINE evolve_h2oice -
trunk/LMDZ.COMMON/libf/evolution/surface.F90
r4145 r4170 91 91 if (allocated(albedo_PCM)) deallocate(albedo_PCM) 92 92 if (allocated(albedodat_PCM)) deallocate(albedodat_PCM) 93 if (allocated(emissivity_PCM)) deallocate(emissivity_PCM )93 if (allocated(emissivity_PCM)) deallocate(emissivity_PCM) 94 94 95 95 END SUBROUTINE end_surface -
trunk/LMDZ.COMMON/libf/evolution/tendencies.F90
r4152 r4170 114 114 ! ---- 115 115 call print_msg("> Evolving the CO2 ice tendency according to the new pressure",LVL_NFO) 116 call print_msg('Old CO2 ice tendencies [kg/m2/y r] (min|max): '//real2str(minval(d_co2ice))//' | '//real2str(maxval(d_co2ice)),LVL_NFO)116 call print_msg('Old CO2 ice tendencies [kg/m2/y] (min|max): '//real2str(minval(d_co2ice))//' | '//real2str(maxval(d_co2ice)),LVL_NFO) 117 117 118 118 ! Compute volume mixing ratio … … 135 135 end do 136 136 end do 137 call print_msg('New CO2 ice tendencies [kg/m2/y r] (min|max): '//real2str( minval(d_co2ice))//' | '//real2str(maxval(d_co2ice)),LVL_NFO)137 call print_msg('New CO2 ice tendencies [kg/m2/y] (min|max): '//real2str( minval(d_co2ice))//' | '//real2str(maxval(d_co2ice)),LVL_NFO) 138 138 139 139 END SUBROUTINE evolve_tend_co2ice … … 141 141 142 142 !======================================================================= 143 SUBROUTINE evolve_ tend_h2oice(h2oice_depth_old,h2oice_depth_new,tsurf,tsoil_ts_old,tsoil_ts_new,d_h2oice)144 !----------------------------------------------------------------------- 145 ! NAME 146 ! evolve_ tend_h2oice143 SUBROUTINE evolve_flux_ssice(h2oice_depth_old,h2oice_depth_new,tsurf,tsoil_ts_old,tsoil_ts_new,flux_ssice_avg) 144 !----------------------------------------------------------------------- 145 ! NAME 146 ! evolve_flux_ssice 147 147 ! 148 148 ! DESCRIPTION … … 158 158 ! DEPENDENCIES 159 159 ! ------------ 160 use geometry, only: ngrid, nslope 160 161 use soil_temp, only: itp_tsoil 161 162 use subsurface_ice, only: psv 163 use ice_table, only: coef_ssdif_PCM 162 164 use display, only: print_msg, LVL_NFO 163 165 … … 168 170 ! ARGUMENTS 169 171 ! --------- 170 real(dp), intent(in):: h2oice_depth_old ! Old H2O ice depth171 real(dp), intent(in):: h2oice_depth_new ! New H2O ice depth172 real(dp), intent(in):: tsurf ! Surface temperature173 real(dp), dimension(:,: ), intent(in):: tsoil_ts_old ! Old soil temperature time series174 real(dp), dimension(:,: ), intent(in):: tsoil_ts_new ! New soil temperature time series175 real(dp), intent(inout) :: d_h2oice ! Evolution of perennialice172 real(dp), dimension(:,:), intent(in) :: h2oice_depth_old ! Old H2O ice depth 173 real(dp), dimension(:,:), intent(in) :: h2oice_depth_new ! New H2O ice depth 174 real(dp), dimension(:,:), intent(in) :: tsurf ! Surface temperature 175 real(dp), dimension(:,:,:,:), intent(in) :: tsoil_ts_old ! Old soil temperature time series 176 real(dp), dimension(:,:,:,:), intent(in) :: tsoil_ts_new ! New soil temperature time series 177 real(dp), dimension(:,:), intent(inout) :: flux_ssice_avg ! Tendency of sub-surface ice 176 178 177 179 ! LOCAL VARIABLES 178 180 ! --------------- 181 real(dp), parameter :: zcdv = 0.0325_dp ! Drag coefficient 179 182 real(dp) :: Rz_old, Rz_new, R_dec, hum_dec, psv_max_old, psv_max_new 180 integer(di) :: iday 181 real(dp), parameter :: coef_diff = 4.e-4_dp ! Diffusion coefficient 182 real(dp), parameter :: zcdv = 0.0325_dp ! Drag coefficient 183 integer(di) :: i, islope, iday 183 184 184 185 ! CODE 185 186 ! ---- 186 call print_msg("> Updating the H2O sub-surface ice tendency due to lag layer",LVL_NFO) 187 188 ! Higher resistance due to growing lag layer (higher depth) 189 Rz_old = h2oice_depth_old*zcdv/coef_diff ! Old resistance from PCM 190 Rz_new = h2oice_depth_new*zcdv/coef_diff ! New resistance based on new depth 191 R_dec = Rz_old/Rz_new ! Decrease because of resistance 192 193 ! The maxmimum of the daily averages over one year for the saturation vapor pressure at the ice table location 194 psv_max_old = 0._dp 195 psv_max_new = 0._dp 196 do iday = 1,size(tsoil_ts_old,2) 197 psv_max_old = max(psv_max_old,psv(itp_tsoil(tsoil_ts_old(:,iday),tsurf,h2oice_depth_old))) 198 psv_max_new = max(psv_max_new,psv(itp_tsoil(tsoil_ts_new(:,iday),tsurf,h2oice_depth_new))) 199 end do 200 201 ! Lower humidity due to growing lag layer (higher depth) 202 if (abs(psv_max_old) < tol) then 203 hum_dec = 1._dp 204 else 205 hum_dec = psv_max_new/psv_max_old ! Decrease because of lower water vapor pressure at the new depth 206 end if 207 208 ! Flux correction (decrease) 209 d_h2oice = d_h2oice*R_dec*hum_dec 210 211 END SUBROUTINE evolve_tend_h2oice 187 call print_msg("> Updating the H2O sub-surface ice tendency due to dust lag layer thickness",LVL_NFO) 188 189 do i = 1,ngrid 190 do islope = 1,nslope 191 ! Higher resistance due to growing lag layer (higher depth) 192 Rz_old = h2oice_depth_old(i,islope)*zcdv/coef_ssdif_PCM(i,islope) ! Old resistance from PCM 193 Rz_new = h2oice_depth_new(i,islope)*zcdv/coef_ssdif_PCM(i,islope) ! New resistance based on new depth 194 R_dec = Rz_old/Rz_new ! Decrease because of resistance 195 196 ! The maxmimum of the daily averages over one year for the saturation vapor pressure at the ice table location 197 psv_max_old = 0._dp 198 psv_max_new = 0._dp 199 do iday = 1,size(tsoil_ts_old,2) 200 psv_max_old = max(psv_max_old,psv(itp_tsoil(tsoil_ts_old(i,:,islope,iday),tsurf(i,islope),h2oice_depth_old(i,islope)))) 201 psv_max_new = max(psv_max_new,psv(itp_tsoil(tsoil_ts_new(i,:,islope,iday),tsurf(i,islope),h2oice_depth_new(i,islope)))) 202 end do 203 204 ! Lower humidity due to growing lag layer (higher depth) 205 if (abs(psv_max_old) < tol) then 206 hum_dec = 1._dp 207 else 208 hum_dec = psv_max_new/psv_max_old ! Decrease because of lower water vapor pressure at the new depth 209 end if 210 211 ! Flux correction (decrease) 212 flux_ssice_avg(i,islope) = flux_ssice_avg(i,islope)*R_dec*hum_dec 213 enddo 214 enddo 215 216 END SUBROUTINE evolve_flux_ssice 212 217 !======================================================================= 213 218 -
trunk/LMDZ.COMMON/libf/evolution/workflow_status.F90
r4157 r4170 152 152 n_id_PCM = n_pcm_runs 153 153 end if 154 headline = '' 155 headline = headline//'cycle=PCM('//int2str(id_PCM_1) 154 headline = 'cycle=PCM('//int2str(id_PCM_1) 156 155 do i = 1,n_id_PCM - 1 157 156 headline = headline//'+'//int2str(id_PCM_1 + i) -
trunk/LMDZ.COMMON/libf/evolution/xios_data.F90
r4157 r4170 27 27 !======================================================================= 28 28 SUBROUTINE load_xios_data(ps_avg,ps_ts,tsurf_avg,tsurf_avg_yr1,tsoil_avg,tsoil_ts,h2o_surfdensity_avg,h2o_soildensity_avg, & 29 q_h2o_ts,q_co2_ts,minPCM_h2operice,minPCM_co2perice,minPCM_h2ofrost,minPCM_co2frost )29 q_h2o_ts,q_co2_ts,minPCM_h2operice,minPCM_co2perice,minPCM_h2ofrost,minPCM_co2frost,flux_ssice_avg) 30 30 !----------------------------------------------------------------------- 31 31 ! NAME … … 59 59 ! --------- 60 60 real(dp), dimension(:), intent(out) :: ps_avg 61 real(dp), dimension(:,:), intent(out) :: tsurf_avg, tsurf_avg_yr1, h2o_surfdensity_avg, ps_ts, q_h2o_ts, q_co2_ts 61 real(dp), dimension(:,:), intent(out) :: tsurf_avg, tsurf_avg_yr1, h2o_surfdensity_avg, ps_ts, q_h2o_ts, q_co2_ts, flux_ssice_avg 62 62 real(dp), dimension(:,:,:), intent(out) :: tsoil_avg, h2o_soildensity_avg 63 63 real(dp), dimension(:,:,:,:), intent(out) :: tsoil_ts … … 130 130 call get_var_nc('perennial_co2ice'//trim(num),var_read_2d); call lonlat2vect(var_read_2d,minPCM_co2perice(:,islope,2)) 131 131 if (do_soil) then 132 call get_var_nc('flux_ssice'//trim(num),var_read_2d); call lonlat2vect(var_read_2d,flux_ssice_avg(:,islope)) 132 133 call get_var_nc('soiltemp'//trim(num),var_read_3d) 133 134 do isoil = 1,nsoil_PCM -
trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90
r4166 r4170 37 37 use comsoil_h, only: flux_geo 38 38 use comslope_mod, only: nslope, major_slope 39 use paleoclimate_mod, only: paleoclimate, h2oice_depth, co2ice_depth, coef_ssdif , zdqsdif_ssi_tot39 use paleoclimate_mod, only: paleoclimate, h2oice_depth, co2ice_depth, coef_ssdif 40 40 use comcstfi_h, only: pi 41 41 use geometry_mod, only: latitude … … 914 914 h2oice_depth(:,:) = -999. 915 915 endif 916 917 ! Total flux with SSI918 call get_field("flux_ssice",zdqsdif_ssi_tot,found,indextime)919 if (.not.found) then920 write(*,*) "phyetat0: Failed loading <flux_ssice> : ", &921 "<flux_ssice> is set as 0 (no subsurface ice)"922 zdqsdif_ssi_tot(:,:) = 0.923 endif924 916 925 917 ! Diffusion coeficent … … 950 942 h2oice_depth(:,:) = -999. 951 943 co2ice_depth(:,:) = -999. 952 zdqsdif_ssi_tot(:,:) = 0.953 944 coef_ssdif(:,:) = 4.e-4 954 945 perennial_co2ice(:,:) = 0. … … 958 949 h2oice_depth(:,:) = -999. 959 950 co2ice_depth(:,:) = -999. 960 zdqsdif_ssi_tot(:,:) = 0.961 951 coef_ssdif(:,:) = 4.e-4 962 952 perennial_co2ice(:,:) = 0. -
trunk/LMDZ.MARS/libf/phymars/phyredem.F90
r4160 r4170 210 210 use callkeys_mod, only: calltherm, dustinjection, calllott_nonoro 211 211 use callkeys_mod, only: CLFvarying 212 use paleoclimate_mod, only: paleoclimate, h2oice_depth, co2ice_depth, coef_ssdif , zdqsdif_ssi_tot212 use paleoclimate_mod, only: paleoclimate, h2oice_depth, co2ice_depth, coef_ssdif 213 213 214 214 implicit none … … 390 390 call put_field("h2oice_depth","Depth of the shallowest H2O ice layer",h2oice_depth) 391 391 call put_field("co2ice_depth","Depth of the shallowest CO2 ice layer",co2ice_depth) 392 call put_field("flux_ssice","Total flux exchanged with subsurface water ice",zdqsdif_ssi_tot)393 392 call put_field("coef_ssdif","Diffusion coefficent for subsurface water",coef_ssdif) 394 393 endif
Note: See TracChangeset
for help on using the changeset viewer.
