Changeset 3261 for trunk/LMDZ.MARS
- Timestamp:
- Mar 12, 2024, 4:37:03 PM (8 months ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/changelog.txt
r3253 r3261 4545 4545 Following -r 3098; cleaning of vdfic for the management of subsurface water ice. 4546 4546 Fixing some errors (wrong interpolation to compute the water ice temperature, wrong boundary conditions to compute qvap(1)) 4547 4548 == 12/03/2024 == LL 4549 Reversing -r 3250 (the ""bug"" I fixed was not a bug but my mystake) 4550 -
trunk/LMDZ.MARS/libf/phymars/co2condens_mod.F
r3207 r3261 5 5 logical, save :: scavco2cond = .false. ! flag for using scavenging_by_co2 6 6 !$OMP THREADPRIVATE(scavco2cond) 7 real, save :: CO2cond_ps = 1. ! Coefficient to control the surface pressure change7 real, save :: CO2cond_ps = 0. ! Coefficient to control the surface pressure change 8 8 9 9 CONTAINS -
trunk/LMDZ.MARS/libf/phymars/comsoil_h.F90
r3230 r3261 31 31 ! Subsurface tracers: 32 32 logical, save :: adsorption_soil ! boolean to call adosrption (or not) 33 logical, save :: ads_const_D ! boolean to have constant diffusion coefficient 34 logical, save :: ads_massive_ice ! boolean to have massive subsurface ice 33 35 real, save :: choice_ads ! Choice for adsorption isotherm (3 means no adsorption, see soilwater.F90) 34 36 real, save, allocatable, dimension(:,:,:,:) :: qsoil ! subsurface tracers (kg/m^3 of regol) … … 39 41 REAL, parameter :: porosity_reg = 0.45 40 42 !$OMP THREADPRIVATE(adsorption_soil,qsoil,choice_ads) 43 !$OMP THREADPRIVATE(ads_const_D,ads_massive_ice) 41 44 42 45 !======================================================================= -
trunk/LMDZ.MARS/libf/phymars/conf_phys.F
r3230 r3261 40 40 & lag_layer 41 41 use microphys_h, only: mteta 42 use comsoil_h, only: adsorption_soil, choice_ads 42 use comsoil_h, only: adsorption_soil, choice_ads,ads_const_D, 43 & ads_massive_ice 43 44 use nonoro_gwd_mix_mod, only: calljliu_gwimix 44 45 … … 1042 1043 call getin_p("choice_ads",choice_ads) 1043 1044 1045 1046 ads_const_D = .false. 1047 call getin_p("ads_const_D",ads_const_D) 1048 1049 ads_massive_ice = .false. 1050 call getin_p("ads_massive_ice",ads_massive_ice) 1044 1051 poreice_tifeedback = .false. 1045 1052 call getin_p("poreice_tifeedback",poreice_tifeedback) -
trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90
r3253 r3261 22 22 use comsoil_h, only: volcapa, nsoilmx, inertiesoil, inertiedat, layer, mlayer, flux_geo, tsoil, & 23 23 adsorption_soil, qsoil, igcm_h2o_ice_soil, porosity_reg, & 24 ini_comsoil_h_slope_var, end_comsoil_h_slope_var 24 ini_comsoil_h_slope_var, end_comsoil_h_slope_var, ads_massive_ice 25 25 use comvert_mod, only: ap, bp, aps, bps, pa, preff, presnivs, pseudoalt, scaleheight 26 26 use dimradmars_mod, only: tauvis, totcloudfrac, albedo, ini_dimradmars_mod_slope_var, end_dimradmars_mod_slope_var … … 116 116 ! LL: Subsurface water ice 117 117 real :: rho_H2O_ice ! Density (kg/m^3) of water ice 118 logical :: ice_fb = .false. 118 119 119 120 !======================================================================= … … 669 670 if (.not. therestartfi) qsoil = 0. 670 671 672 call getin("ice_fb_test1D",ice_fb) 671 673 if (.not. therestartfi) then 672 674 ! Initialize depths … … 688 690 if(adsorption_soil) then 689 691 ! add subsurface ice in qsoil if one runs with adsorption 690 qsoil(1,1,igcm_h2o_ice_soil,:) = (ice_depth-layer(2))/(layer(1) - layer(2))*porosity_reg*rho_H2O_ice 691 qsoil(1,2:,igcm_h2o_ice_soil,:) = porosity_reg*rho_H2O_ice 692 if(ads_massive_ice) then 693 qsoil(1,1,igcm_h2o_ice_soil,:) = (ice_depth-layer(2))/(layer(1) - layer(2))*rho_H2O_ice ! assume no porosity in the ice 694 qsoil(1,2:,igcm_h2o_ice_soil,:) = rho_H2O_ice 695 else 696 qsoil(1,1,igcm_h2o_ice_soil,:) = (ice_depth-layer(2))/(layer(1) - layer(2))*porosity_reg*rho_H2O_ice 697 qsoil(1,2:,igcm_h2o_ice_soil,:) = porosity_reg*rho_H2O_ice 698 endif 692 699 endif 693 700 else ! searching for the ice/regolith boundary: 694 701 do isoil = 1,nsoil 695 702 if ((ice_depth >= layer(isoil)) .and. (ice_depth < layer(isoil + 1))) then 696 iref = isoil 703 iref = isoil +1 697 704 exit 698 705 endif … … 701 708 inertiedat(1,:iref - 1) = inertiedat(1,1) 702 709 ! We compute the transition in layer(iref) 703 inertiedat(1,iref) = sqrt((layer(iref+1) - layer(iref))/(((ice_depth - layer(iref))/inertiedat(1,1)**2) + ((layer(iref+1) - ice_depth)/inertieice**2)))710 inertiedat(1,iref) = sqrt((layer(iref) - layer(iref - 1))/(((ice_depth - layer(iref - 1))/inertiedat(1,1)**2) + ((layer(iref) - ice_depth)/inertieice**2))) 704 711 ! Finally, we compute the underlying ice: 705 712 inertiedat(1,iref + 1:) = inertieice … … 708 715 ! add subsurface ice in qsoil if one runs with adsorption 709 716 qsoil(1,:iref - 1,igcm_h2o_ice_soil,:) = 0. 710 qsoil(1,iref+1:,igcm_h2o_ice_soil,:) = porosity_reg*rho_H2O_ice 711 qsoil(1,iref,igcm_h2o_ice_soil,:) = (ice_depth-layer(iref+1))/(layer(iref) - layer(iref+1))*porosity_reg*rho_H2O_ice 717 if(ads_massive_ice) then 718 qsoil(1,iref+1:,igcm_h2o_ice_soil,:) = rho_H2O_ice 719 qsoil(1,iref,igcm_h2o_ice_soil,:) = (ice_depth-layer(iref))/(layer(iref-1) - layer(iref))*rho_H2O_ice 720 else 721 qsoil(1,iref+1:,igcm_h2o_ice_soil,:) = porosity_reg*rho_H2O_ice 722 qsoil(1,iref,igcm_h2o_ice_soil,:) = (ice_depth-layer(iref))/(layer(iref-1) - layer(iref))*porosity_reg*rho_H2O_ice 723 endif 712 724 endif 713 725 endif ! (ice_depth < layer(1)) … … 715 727 inertiedat(1,:) = inertiedat(1,1) ! soil thermal inertia 716 728 endif ! ice_depth > 0 717 729 730 if(.not.(ice_fb)) then 731 inertiedat(1,:) = inertiedat(1,1) 732 end if 718 733 do isoil = 1,nsoil 719 734 inertiesoil(1,isoil,:) = inertiedat(1,isoil) -
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90
r3231 r3261 257 257 ! Compute pressure for next time step 258 258 ! ----------------------------------- 259 psurf = psurf + dttestphys*dpsurf(1) ! Surface pressure change259 psurf = psurf! + dttestphys*dpsurf(1) ! Surface pressure change 260 260 plev = ap + psurf*bp 261 261 play = aps + psurf*bps -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r3230 r3261 82 82 USE comcstfi_h, only: r, cpp, mugaz, g, rcp, pi, rad 83 83 USE calldrag_noro_mod, ONLY: calldrag_noro 84 USE vdifc_mod, ONLY: vdifc 84 USE vdifc_mod, ONLY: vdifc, compute_Tice 85 85 use param_v4_h, only: nreact,n_avog, 86 86 & fill_data_thermos, allocate_param_thermos … … 124 124 use lmdz_atke_turbulence_ini, only : atke_ini 125 125 use waterice_tifeedback_mod, only : waterice_tifeedback 126 use paleoclimate_mod, only: d_coef,h2o_ice_depth,lag_layer 126 127 IMPLICIT NONE 127 128 c======================================================================= … … 542 543 ! Variable for ice table 543 544 REAL :: rhowater_surf(ngrid,nslope) ! Water density at the surface [kg/m^3] 545 REAL :: rhowater_surf_schorgo(ngrid,nslope) ! Water density at the surface, schorghofer way [kg/m^3] 544 546 REAL :: rhowater_surf_sat(ngrid,nslope) ! Water density at the surface at saturation [kg/m^3] 545 547 REAL :: rhowater_soil(ngrid,nsoilmx,nslope) ! Water density in soil layers [kg/m^3] 548 REAL :: rhowater_ice(ngrid,nslope) ! Water density at the subsurface ice depth[kg/m^3] 546 549 REAL,PARAMETER :: alpha_clap_h2o = 28.9074 ! Coeff for Clapeyron law [/] 547 550 REAL,PARAMETER :: beta_clap_h2o = -6143.7 ! Coeff for Clapeyron law [K] … … 551 554 REAL :: ztmp1,ztmp2 ! intermediate variables to compute the mean molar mass of the layer 552 555 REAL :: pore_icefraction(ngrid,nsoilmx,nslope) ! ice filling fraction in the pores 556 REAL :: Tice 553 557 ! Variable for the computation of the TKE with parameterization from ATKE working group 554 558 REAL :: viscom ! kinematic molecular viscosity for momentum … … 3939 3943 & * mmol(igcm_h2o_vap)/(mugaz*r) 3940 3944 endif 3945 ! schorghofer way 3946 rhowater_surf_schorgo(ig,islope) = min(pvap_surf(ig), 3947 & exp(beta_clap_h2o/tsurf(ig,islope)+alpha_clap_h2o) 3948 & / tsurf(ig,islope))/tsurf(ig,islope) 3949 & * mmol(igcm_h2o_vap)/(mugaz*r) 3941 3950 DO isoil = 1,nsoilmx 3942 3951 rhowater_soil(ig,isoil,islope) = … … 3945 3954 & * mmol(igcm_h2o_vap)/(mugaz*r) 3946 3955 ENDDO 3956 if(h2o_ice_depth(ig,islope).gt.0) then 3957 call compute_Tice(nsoilmx,tsoil(ig,:,islope), 3958 & tsurf(ig,islope),h2o_ice_depth(ig,islope), 3959 & Tice) 3960 rhowater_ice(ig,islope) = 3961 & exp(beta_clap_h2o/Tice+alpha_clap_h2o) 3962 & / Tice 3963 & * mmol(igcm_h2o_vap)/(mugaz*r) 3964 else 3965 rhowater_ice(ig,islope) = 0. 3966 endif 3967 3947 3968 ENDDO 3948 3969 ENDDO … … 3954 3975 & "rhowater_surface",'kg.m-3', 3955 3976 & rhowater_surf(:,iflat)) 3977 3978 CALL write_output("waterdensity_surface_schorgho", 3979 & "rhowater_surf_schorgo",'kg.m-3', 3980 & rhowater_surf_schorgo(:,iflat)) 3981 3982 CALL write_output("waterdensity_ssice", 3983 & "rhowater_ice",'kg.m-3', 3984 & rhowater_ice(:,iflat)) 3956 3985 DO islope = 1,nslope 3957 3986 write(str2(1:2),'(i2.2)') islope -
trunk/LMDZ.MARS/libf/phymars/soilwater.F90
r3248 r3261 1 1 subroutine soilwater(ngrid, nlayer, nq, nsoil, nqsoil, ptsrf, ptsoil, ptimestep, & 2 2 exchange, qsat_surf, pq, pa, pb, pc, pd, pdqsdifpot, pqsurf, & 3 pqsoil, pplev, rhoatmo, writeoutput, zdqsdifrego, zq1temp2, saturation_water_ice )4 5 6 use comsoil_h, only: igcm_h2o_vap_soil, igcm_h2o_ice_soil, igcm_h2o_vap_ads, layer, mlayer, choice_ads, porosity_reg 3 pqsoil, pplev, rhoatmo, writeoutput, zdqsdifrego, zq1temp2, saturation_water_ice,var_flux_soil) 4 5 6 use comsoil_h, only: igcm_h2o_vap_soil, igcm_h2o_ice_soil, igcm_h2o_vap_ads, layer, mlayer, choice_ads, porosity_reg,ads_const_D 7 7 use comcstfi_h 8 8 use tracer_mod … … 10 10 use geometry_mod, only: cell_area, latitude_deg 11 11 use write_output_mod, only: write_output 12 use paleoclimate_mod, only: d_coef 12 13 implicit none 13 14 … … 183 184 logical, allocatable, save :: close_top(:, :) ! closing diffusion at the top of a layer if ice rises over saturation 184 185 logical, allocatable, save :: close_bottom(:, :) ! closing diffusion at the bottom of a layer if ice risies over saturation 185 logical, parameter :: print_closure_warnings = . true.186 logical, parameter :: print_closure_warnings = .false. 186 187 187 188 ! Coefficients for the Diffusion calculations … … 269 270 real*8 :: diff(ngrid, nsoil) ! difference between total water content and ice + vapor content 270 271 ! (only used for output, inconstistent: should just be adswater) 271 real :: var_flux_soil(ngrid, nsoil)272 real,intent(out) :: var_flux_soil(ngrid, nsoil) 272 273 273 274 ! Loop variables and counters … … 568 569 ! calculate the midlayer diffusion coeff. (with dependence on saturation_water_ice from Meslin et al., 2010 - only exact for normal diffusion) 569 570 D_mid(ig, ik) = D0(ig, ik) * (1.D0 - saturation_water_ice(ig, ik)) ** 2.D0 * 1.D0 / (1.D0 / Dm(ig, ik) + 1.D0 / Dk(ig, ik)) 570 571 if(ads_const_D) D_mid(ig, ik) = d_coef(ig,1) 571 572 ! Midlayer diffusion coeff. (correlation by Rogers and Nielson, 1991) 572 573 ! D_mid(ig, ik) = D0(ig, ik) * (1. - saturation_water_ice(ig, ik)) * exp(-6. * saturation_water_ice(ig, ik) & … … 593 594 594 595 saturation_water_ice_inter(ig, ik) = min(saturation_water_ice(ig, ik + 1), saturation_water_ice(ig, ik)) ! new diffusion interaction 595 596 596 597 D_inter(ig, ik) = D0(ig, ik) * (1.D0 - saturation_water_ice_inter(ig, ik)) ** 2.D0 * 1.D0 / (1.D0 / Dm_inter(ig, ik) + 1.D0 / Dk_inter(ig, ik)) 598 599 if(ads_const_D) D_inter(ig, ik) = d_coef(ig,1) 600 597 601 598 602 ! D_inter(ig, ik) = ( (layer(ik) - mlayer(ik - 1)) * D_mid(ig, ik + 1) & ! old implementation with direct interpolation … … 1567 1571 ! call write_output("dztot1","change in dztot", "unknown",real(dztot1)) 1568 1572 1569 call write_output("flux_soillayer","flux of water between the soil layers", "kg m-2 s-1",var_flux_soil)1570 1573 1571 1574 ! call write_output("A_coef","A coefficient of dztot1", "unknown",real(B)) … … 1595 1598 call write_output("adswater","subsurface adsorbed water", "kg/m^3",real(adswater)) 1596 1599 1597 ! call write_output("subsurfice","subsurface ice", "kg/m^3",real(ice))1600 call write_output("subsurfice_mass_py","subsurface ice", "kg/m^3",real(ice)) 1598 1601 1599 1602 call write_output("flux_rego",'flux of water from the regolith','kg/m^2',zdqsdifrego) … … 1603 1606 ! call write_output("close",'close top, bottom, or none (1, -1, 0)','no unit',real(close_out)) 1604 1607 1605 ! call write_output("coeff_diffusion_soil",'interlayer diffusion coefficient','m^2/s',D_inter)1608 call write_output("coeff_diffusion_soil",'interlayer diffusion coefficient','m^2/s',D_mid) 1606 1609 1607 1610 !endif -
trunk/LMDZ.MARS/libf/phymars/vdifc_mod.F
r3253 r3261 35 35 use microphys_h, only: To 36 36 use paleoclimate_mod, only: d_coef,h2o_ice_depth,lag_layer 37 use comsoil_h, only: layer, mlayer,adsorption_soil 37 use comsoil_h, only: layer, mlayer,adsorption_soil, 38 & igcm_h2o_ice_soil 38 39 use vdif_cd_mod, only: vdif_cd 39 40 use lmdz_call_atke, only: call_atke … … 234 235 LOGICAL :: writeoutput ! boolean to say to soilexchange.F if we are at the last iteration and thus if he can write in the diagsoil 235 236 REAL, INTENT(out) :: pore_icefraction(ngrid,nsoil,nslope) ! ice filling fraction in the pores 237 238 REAL :: zdqsoildif_tot(ngrid,nsoil,nqsoil,nslope) 239 REAL :: zqsoil(ngrid,nsoil,nqsoil,nslope) 236 240 !! Water buyoncy 237 241 LOGICAL :: virtual … … 246 250 REAL zdqsdif_ssi_frost_tot(ngrid,nslope) ! SSI - frost flux (kg/m^2/s^-1) summed over all subtimestep 247 251 REAL zdqsdif_ssi_tot(ngrid,nslope) ! Total flux of the interactions with SSI kg/m^2/s^-1) 252 REAL zdqsdif_regolith_frost_tot(ngrid,nslope) 253 REAL zdqsdif_regolith_atm_tot(ngrid,nslope) 254 real flux_soil_py(ngrid,nsoil,nslope) 255 real flux_soil_py_tot(ngrid,nsoil,nslope) 256 257 real flux_schorgho(ngrid,nslope) 258 real flux_schorgho_vfrost(ngrid,nslope) 259 260 real flux_schorgho_tot(ngrid,nslope) 261 real flux_schorgho_vfrost_tot(ngrid,nslope) 248 262 249 263 REAL :: tol_frost = 1e-4 ! tolerence for frost thicnkess (kg/m^2) to avoid numerical noise effect … … 306 320 dwatercap_dif(1:ngrid,1:nslope)=0 307 321 zdqsdif_regolith(1:ngrid,1:nslope)=0 322 zdqsdif_regolith_frost_tot(1:ngrid,1:nslope)=0 323 zdqsdif_regolith_atm_tot(1:ngrid,1:nslope)=0 308 324 zq1temp_regolith(1:ngrid)=0 309 325 zdqsdif_tot(1:ngrid)=0 … … 315 331 zdqsdif_ssi_atm_tot(:,:) = 0. 316 332 zdqsdif_ssi_frost_tot(:,:) = 0. 317 318 333 zdqsoildif_tot(:,:,:,:) = 0. 334 zqsoil(:,:,:,:) = 0. 335 flux_soil_py(:,:,:) = 0. 336 flux_soil_py_tot(:,:,:) = 0. 337 flux_schorgho(:,:) = 0. 338 flux_schorgho_vfrost(:,:) = 0. 339 flux_schorgho_tot(:,:) = 0. 340 flux_schorgho_vfrost_tot(:,:) = 0. 341 342 319 343 c ** calcul de rho*dz et dt*rho/dz=dt*rho**2 g/dp 320 344 c avec rho=p/RT=p/ (R Theta) (p/ps)**kappa … … 1004 1028 watercap_tmp(ig) = watercap(ig,islope)/ 1005 1029 & cos(pi*def_slope_mean(islope)/180.) 1030 1031 zqsoil(ig,:,:,islope) = qsoil(ig,:,:,islope)/ 1032 & cos(pi*def_slope_mean(islope)/180.) 1033 1006 1034 ENDDO ! ig=1,ngrid 1007 1035 … … 1015 1043 saved_h2o_vap(:)= zq(:,1,igcm_h2o_vap) 1016 1044 DO ig=1,ngrid 1017 cnsubtimestep(ig)=1 !for debug1045 ! nsubtimestep(ig)=1 !for debug 1018 1046 subtimestep = ptimestep/nsubtimestep(ig) 1019 1047 call write_output('subtimestep', … … 1089 1117 & za(ig,:),zb(ig,:),zc(ig,:),zd(ig,:), 1090 1118 & zdqsdif_surf(ig), zqsurf(ig), 1091 & qsoil(ig,:,:,islope), pplev(ig,1), rho(ig),1119 & zqsoil(ig,:,:,islope), pplev(ig,1), rho(ig), 1092 1120 & writeoutput,zdqsdif_regolith(ig,islope), 1093 1121 & zq1temp_regolith(ig), 1094 & pore_icefraction(ig,:,islope)) 1095 1122 & pore_icefraction(ig,:,islope), 1123 & flux_soil_py(ig,:,islope)) 1124 flux_soil_py_tot(ig,:,islope) = 1125 & flux_soil_py_tot(ig,:,islope) + 1126 & flux_soil_py(ig,:,islope)*subtimestep 1096 1127 1097 1128 if(.not.watercaptag(ig)) then … … 1100 1131 zdqsdif_tot(ig)= 1101 1132 & -zqsurf(ig)/subtimestep 1133 zdqsdif_regolith_atm_tot(ig,islope) = 1134 & zdqsdif_regolith_atm_tot(ig,islope) 1135 & + zdqsdif_regolith(ig,islope)*subtimestep 1102 1136 else 1103 1137 zdqsdif_tot(ig) = zdqsdif_surf(ig) + 1104 1138 & zdqsdif_regolith(ig,islope) ! boundary condition = qsat, but pdqsdif is calculated to update qsurf (including loss of surface ice to the subsurface) 1139 zdqsdif_regolith_frost_tot(ig,islope) = 1140 & zdqsdif_regolith_frost_tot(ig,islope) + 1141 & zdqsdif_regolith(ig,islope)*subtimestep 1105 1142 endif ! of "if exchange = true" 1106 1143 endif ! of "if not.watercaptag" … … 1146 1183 qsat_ssi(ig,islope)=ztsrf(ig)/Tice(ig,islope) 1147 1184 & *qsat_ssi(ig,islope) 1185 1186 ! And now we solve correctly the system 1187 z1(ig)=1./(za(ig,1)+zb(ig,1)+ 1188 & zb(ig,2)*(1.-zd(ig,2))) 1189 zc(ig,1)=(za(ig,1)*zq_tmp_vap(ig,1,iq)+ 1190 & zb(ig,2)*zc(ig,2) + 1191 & (-zdqsdif_tot(ig)) *subtimestep) 1192 & * z1(ig) 1193 zd(ig,1)=zb(ig,1)*z1(ig) 1194 zq1temp(ig)=zc(ig,1)+ zd(ig,1) 1195 & *qsat_ssi(ig,islope) 1196 1148 1197 ! Flux from the subsurface 1149 1198 if(old_wsublimation_scheme) then … … 1158 1207 & *(zq1temp(ig)-qsat_ssi(ig,islope)) 1159 1208 endif 1160 ! And now we solve correctly the system1161 z1(ig)=1./(za(ig,1)+zb(ig,1)+1162 & zb(ig,2)*(1.-zd(ig,2)))1163 zc(ig,1)=(za(ig,1)*zq_tmp_vap(ig,1,iq)+1164 & zb(ig,2)*zc(ig,2) +1165 & (-zdqsdif_tot(ig)) *subtimestep)1166 & * z1(ig)1167 zd(ig,1)=zb(ig,1)*z1(ig)1168 zq1temp(ig)=zc(ig,1)+ zd(ig,1)1169 & *qsat_ssi(ig,islope)1170 1171 1172 1209 1173 1210 else … … 1179 1216 & zb(ig,2)*zc(ig,2) + 1180 1217 & (-zdqsdif_tot(ig)) *subtimestep) *z1(ig) 1181 1218 zq1temp(ig)=zc(ig,1) 1182 1219 endif ! Of subsurface <-> atmosphere exchange 1183 1220 endif ! sublimating more than available frost & surface - frost exchange … … 1214 1251 & *(qsat(ig)-qsat_ssi(ig,islope)) 1215 1252 1216 ! Line to comment for now since we don't have a mass of subsurface frost in our computation (otherwise, we would not conserve the H2O mass in the system) 1253 ! Line to comment for now since we don't have a mass of subsurface frost in our computation (otherwise, we would not conserve the H2O mass in the system) 1254 1255 if ((-zdqsdif_tot(ig)+zdqsdif_ssi_frost(ig,islope)) 1256 & *subtimestep.ge.(zqsurf(ig))) then 1257 1258 zdqsdif_ssi_frost(ig,islope) = 1259 & zqsurf(ig)/subtimestep 1260 & + zdqsdif_tot(ig) 1261 endif 1262 1217 1263 zdqsdif_tot(ig) = zdqsdif_tot(ig) - 1218 & zdqsdif_ssi_frost(ig,islope) 1264 & zdqsdif_ssi_frost(ig,islope) 1265 1219 1266 endif ! watercaptag or frost at the surface 1220 1267 endif ! interaction frost <-> subsurface ice 1221 1268 1222 1269 1270 ccc Special case : schorgho study 1271 1272 if (h2o_ice_depth(ig,islope).gt.0) then 1273 call watersat(1,Tice(ig,islope),pplev(ig,1), 1274 & qsat_ssi(ig,islope)) 1275 qsat_ssi(ig,islope)=ztsrf(ig)/Tice(ig,islope) 1276 & *qsat_ssi(ig,islope) 1277 flux_schorgho(ig,islope) = d_coef(ig,islope) 1278 & /h2o_ice_depth(ig,islope) 1279 & *rho(ig)*dryness(ig) 1280 & *(min(zq1temp(ig),qsat(ig)) 1281 & -qsat_ssi(ig,islope)) 1282 1283 if((zqsurf(ig).gt.tol_frost)) then 1284 flux_schorgho_vfrost(ig,islope) = d_coef(ig,islope) 1285 & /h2o_ice_depth(ig,islope) 1286 & *rho(ig)*dryness(ig) 1287 & *(qsat(ig) 1288 & -qsat_ssi(ig,islope)) 1289 else 1290 flux_schorgho_vfrost(ig,islope) = d_coef(ig,islope) 1291 & /h2o_ice_depth(ig,islope) 1292 & *rho(ig)*dryness(ig) 1293 & *(zq1temp(ig) 1294 & -qsat_ssi(ig,islope)) 1295 1296 endif 1297 1298 endif 1299 1300 ccc 1223 1301 c Starting upward calculations for water : 1224 1302 zq_tmp_vap(ig,1,igcm_h2o_vap)=zq1temp(ig) … … 1246 1324 & zdqsdif_ssi_atm_tot(ig,islope) 1247 1325 & + zdqsdif_ssi_atm(ig,islope) 1326 & * subtimestep 1248 1327 zdqsdif_ssi_frost_tot(ig,islope) = 1249 1328 & zdqsdif_ssi_frost_tot(ig,islope) 1250 1329 & + zdqsdif_ssi_frost(ig,islope) 1330 & * subtimestep 1331 1332 flux_schorgho_vfrost_tot(ig,islope) = 1333 & flux_schorgho_vfrost_tot(ig,islope) + 1334 & flux_schorgho_vfrost(ig,islope)* subtimestep 1335 1336 flux_schorgho_tot(ig,islope) = 1337 & flux_schorgho_tot(ig,islope) + 1338 & flux_schorgho(ig,islope)* subtimestep 1339 1340 1251 1341 c Monitoring instantaneous latent heat flux in W.m-2 : 1252 1342 zsurf_h2o_lh(ig,islope) = zsurf_h2o_lh(ig,islope)+ … … 1276 1366 & cos(pi*def_slope_mean(islope)/180.)) 1277 1367 & /ptimestep 1278 1368 1369 1370 zdqsoildif_tot(ig,:,:,islope) = (zqsoil(ig,:,:,islope) - 1371 & qsoil(ig,:,:,islope)/ 1372 & cos(pi*def_slope_mean(islope)/180.)) 1373 & /ptimestep 1374 qsoil(ig,:,:,islope) = zqsoil(ig,:,:,islope) 1279 1375 zdqsdif_ssi_tot(ig,islope) = 1280 1376 & zdqsdif_ssi_atm_tot(ig,islope) … … 1413 1509 & zdqsdif_ssi_tot(:,iflat)) 1414 1510 1415 1511 call write_output('zdqsdif_regolith_frost_tot', 1512 & '','',zdqsdif_regolith_frost_tot(:,iflat)) 1513 1514 call write_output('zdqsdif_regolith_atm_tot', 1515 & '','',zdqsdif_regolith_atm_tot(:,iflat)) 1516 1517 1518 call write_output('zdqsoildif_tot','','', 1519 & zdqsoildif_tot(:,:,igcm_h2o_ice_soil,iflat)) 1520 1521 call write_output('zdqsoildif_tot','','', 1522 & zdqsoildif_tot(:,:,igcm_h2o_ice_soil,iflat)) 1523 1524 1525 call write_output('flux_schorgho_vfrost_tot', 1526 & '','kg.m-2.s-1', 1527 & flux_schorgho_vfrost_tot(:,iflat)) 1528 1529 call write_output('flux_schorgho_tot', 1530 & '','kg.m-2.s-1', 1531 & flux_schorgho_tot(:,iflat)) 1416 1532 C Diagnostic output for HDO 1417 1533 ! if (hdo) then … … 1423 1539 ! & ' ',h2oflux(:)) 1424 1540 ! endif 1541 1542 call write_output("flux_soillayer","", 1543 & "",flux_soil_py_tot(:,:,iflat)) 1544 1425 1545 1426 1546 c-----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.