Changeset 4724 for LMDZ6/trunk/libf
- Timestamp:
- Oct 11, 2023, 9:27:08 AM (15 months ago)
- Location:
- LMDZ6/trunk/libf
- Files:
-
- 6 edited
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/lmdz_blowing_snow_ini.F90
r4723 r4724 1 module blowing_snow_ini_mod1 module lmdz_blowing_snow_ini 2 2 3 3 implicit none … … 15 15 !$OMP THREADPRIVATE(pbst_bs, prt_bs, qbst_bs) 16 16 !$OMP THREADPRIVATE(iflag_saltation_bs) 17 18 real tbsmelt ! parameter to calculate melting fraction of BS sedimentation 19 parameter (tbsmelt=278.15) 20 21 real taumeltbs0 ! Melting time scale of blowing snow at 273.15K 22 parameter (taumeltbs0=1800.0) 23 24 real qbsmin ! Minimum blowing snow specific content 25 parameter (qbsmin=1.E-10) 26 17 27 18 28 contains … … 70 80 end subroutine blowing_snow_ini 71 81 72 end module blowing_snow_ini_mod82 end module lmdz_blowing_snow_ini -
LMDZ6/trunk/libf/phylmd/lmdz_blowing_snow_sublim_sedim.F90
r4723 r4724 1 subroutine blowing_snow_sublim_sedim(ngrid,nlay,dtime,temp,q,qbs,pplay,paprs,dtemp_bs,dq_bs,dqbs_bs,bsfl,precip_bs) 1 module lmdz_blowing_snow_sublim_sedim 2 3 contains 4 subroutine blowing_snow_sublim_sedim(ngrid,nlay,dtime,temp,qv,qbs,pplay,paprs,dtemp_bs,dq_bs,dqbs_bs,bsfl,precip_bs) 2 5 3 6 !============================================================================== … … 8 11 9 12 10 use blowing_snow_ini_mod, only : coef_eva_bs,RTT,RD,RG,expo_eva_bs, fallv_bs11 use blowing_snow_ini_mod, only : RCPD, RLSTT, RLMLT, RLVTT, RVTMP213 use lmdz_blowing_snow_ini, only : coef_eva_bs,RTT,RD,RG,expo_eva_bs, fallv_bs, qbsmin 14 use lmdz_blowing_snow_ini, only : RCPD, RLSTT, RLMLT, RLVTT, RVTMP2, tbsmelt, taumeltbs0 12 15 USE lmdz_lscp_tools, only : calc_qsat_ecmwf 13 16 … … 25 28 real, intent(in) :: dtime 26 29 real, intent(in), dimension(ngrid,nlay) :: temp 27 real, intent(in), dimension(ngrid,nlay) :: q 30 real, intent(in), dimension(ngrid,nlay) :: qv 28 31 real, intent(in), dimension(ngrid,nlay) :: qbs 29 32 real, intent(in), dimension(ngrid,nlay) :: pplay … … 49 52 integer :: k,i,n 50 53 real :: zqev0, zqevi, zqevti, zcpair, zcpeau, dqbsmelt 51 real :: dqsedim,precbs 54 real :: dqsedim,precbs, deltaqchaud, zmelt, taumeltbs 55 real :: maxdeltaqchaud 52 56 real, dimension(ngrid) :: zt,zq,zqbs,qsi,dqsi,qsl, dqsl,qzero,sedim,sedimn 53 57 real, dimension(ngrid) :: zqbsi,zmqc, zmair, zdz … … 73 77 DO i=1,ngrid 74 78 zt(i)=temp(i,k) 75 zq(i)=q (i,k)79 zq(i)=qv(i,k) 76 80 zqbs(i)=qbs(i,k) 77 81 ENDDO … … 111 115 112 116 DO i = 1, ngrid 113 ! if sedimentation: 114 IF (sedim(i) .GT. 0.) THEN 117 118 zrho(i,k) = pplay(i,k) / zt(i) / RD 119 zdz(i) = (paprs(i,k)-paprs(i,k+1)) / (zrho(i,k)*RG) 120 ! BS fall velocity 121 velo(i,k) = fallv_bs 122 115 123 116 124 IF (zt(i) .GT. RTT) THEN 125 117 126 ! if positive celcius temperature, we assume 118 ! that all the blowing snow melt and evaporate 119 zqevti=sedim(i)*(paprs(i,k)-paprs(i,k+1))/pplay(i,k)*zt(i)*RD/RG 120 ! we ensure that the whole mesh does not exceed saturation wrt liquid 121 zqev0 = MAX(0.0, qsl(i)-zq(i)) 122 zqevi = MIN(zqev0,zqevti) 123 ! New solid precipitation fluxes 124 sedimn(i) = Max(0.,sedim(i) - zqevi*(paprs(i,k)-paprs(i,k+1))/RG/dtime) 125 ! vapor, temperature, precip fluxes update 126 zq(i) = zq(i) - (sedimn(i)-sedim(i))*(RG/(paprs(i,k)-paprs(i,k+1)))*dtime 127 zq(i) = max(0., zq(i)) 128 !zqbs(i) = zqbs(i) + (sedimn(i)-sedim(i)) * (RG/(paprs(i,k)-paprs(i,k+1)))*dtime 129 !zqbs(i) = max(0., zqbs(i)) 130 ! melting 131 zt(i) = zt(i) & 132 + (sedimn(i)-sedim(i)) & 133 * (RG/(paprs(i,k)-paprs(i,k+1)))*dtime & 134 * RLMLT/RCPD/(1.0+RVTMP2*(zq(i)+zqbs(i))) 135 ! evaporation 136 zt(i) = zt(i) & 137 + (sedimn(i)-sedim(i)) & 138 * (RG/(paprs(i,k)-paprs(i,k+1)))*dtime & 139 * RLVTT/RCPD/(1.0+RVTMP2*(zq(i)+zqbs(i))) 127 ! that part of the the blowing snow flux melts and evaporates 128 129 ! vapor, bs, temperature, precip fluxes update 130 zmelt = ((zt(i)-RTT)/(tbsmelt-RTT)) 131 zmelt = MIN(MAX(zmelt,0.),1.) 132 sedimn(i)=sedim(i)*zmelt 133 deltaqchaud=-(sedimn(i)-sedim(i))*(RG/(paprs(i,k)-paprs(i,k+1)))*dtime 134 ! max evap such as celcius temperature cannot become negative 135 maxdeltaqchaud= max(RCPD*(1.0+RVTMP2*(zq(i)+zqbs(i)))*(zt(i)-RTT)/(RLMLT+RLVTT),0.) 136 137 deltaqchaud=min(max(deltaqchaud,0.),maxdeltaqchaud) 138 zq(i) = zq(i) + deltaqchaud 139 140 ! melting + evaporation 141 zt(i) = zt(i) - deltaqchaud * (RLMLT+RLVTT)/RCPD/(1.0+RVTMP2*(zq(i)+zqbs(i))) 142 143 sedim(i)=sedimn(i) 144 145 ! if temperature still positive, we assume that part of the blowing snow 146 ! already present in the mesh melts and evaporates with a typical time 147 ! constant between taumeltbs0 and 0 148 149 IF ( zt(i) .GT. RTT ) THEN 150 taumeltbs=taumeltbs0*exp(-max(0.,(zt(i)-RTT)/(tbsmelt-RTT))) 151 deltaqchaud=min(zqbs(i),zqbs(i)/taumeltbs*dtime) 152 maxdeltaqchaud= max(RCPD*(1.0+RVTMP2*(zq(i)+zqbs(i)))*(zt(i)-RTT)/(RLMLT+RLVTT),0.) 153 deltaqchaud=min(max(deltaqchaud,0.),maxdeltaqchaud) 154 zq(i) = zq(i) + deltaqchaud 155 156 ! melting + evaporation 157 zt(i) = zt(i) - deltaqchaud * (RLMLT+RLVTT)/RCPD/(1.0+RVTMP2*(zq(i)+zqbs(i))) 158 ! qbs update 159 zqbs(i)=max(zqbs(i)-deltaqchaud,0.) 160 ENDIF 161 162 ! now sedimentation scheme with an exact numerical resolution 163 ! (correct if fall velocity is constant) 164 zqbsi(i)=zqbs(i) 165 zqbs(i) = zqbsi(i)*exp(-velo(i,k)/zdz(i)*dtime)+sedim(i)/zrho(i,k)/velo(i,k) 166 zqbs(i) = max(zqbs(i),0.) 167 168 ! flux update 169 sedim(i) = sedim(i) + zrho(i,k)*zdz(i)/dtime*(zqbsi(i)-zqbs(i)) 170 sedim(i) = max(0.,sedim(i)) 140 171 141 142 ELSE 172 ELSE 173 ! negative celcius temperature 174 ! Sublimation scheme 175 143 176 zqevti = coef_eva_bs*(1.0-zq(i)/qsi(i))*(sedim(i)**expo_eva_bs) & 144 177 *(paprs(i,k)-paprs(i,k+1))/pplay(i,k)*zt(i)*RD/RG … … 156 189 zq(i) = zq(i) - (sedimn(i)-sedim(i))*(RG/(paprs(i,k)-paprs(i,k+1)))*dtime 157 190 zq(i) = max(0., zq(i)) 158 !zqbs(i) = zqbs(i) + (sedimn(i)-sedim(i)) * (RG/(paprs(i,k)-paprs(i,k+1)))*dtime159 !zqbs(i) = max(0., zqbs(i))160 191 zt(i) = zt(i) & 161 192 + (sedimn(i)-sedim(i)) & 162 193 * (RG/(paprs(i,k)-paprs(i,k+1)))*dtime & 163 194 * RLSTT/RCPD/(1.0+RVTMP2*(zq(i)+zqbs(i))) 195 196 sedim(i)=sedimn(i) 197 zqbsi(i)=zqbs(i) 198 199 ! now sedimentation scheme with an exact numerical resolution 200 ! (correct if fall velocity is constant) 201 202 zqbs(i) = zqbsi(i)*exp(-velo(i,k)/zdz(i)*dtime)+sedim(i)/zrho(i,k)/velo(i,k) 203 zqbs(i) = max(zqbs(i),0.) 204 205 ! flux update 206 sedim(i) = sedim(i) + zrho(i,k)*zdz(i)/dtime*(zqbsi(i)-zqbs(i)) 207 sedim(i) = max(0.,sedim(i)) 208 209 164 210 ENDIF 165 211 166 212 167 ! sedim update 168 sedim(i)=sedimn(i) 169 170 171 ELSE 172 sedim(i)=0. 173 ENDIF ! if sedim > 0 174 175 zqbsi(i)=zqbs(i) 213 ! if qbs<qbsmin, sublimate or melt and evaporate qbs 214 ! see Gerber et al. 2023, JGR Atmos for the choice of qbsmin 215 IF (zqbs(i) .LT. qbsmin) THEN 216 zq(i) = zq(i)+zqbs(i) 217 IF (zt(i) .LT. RTT) THEN 218 zt(i) = zt(i) - zqbs(i) * RLSTT/RCPD/(1.0+RVTMP2*(zq(i)+zqbs(i))) 219 ELSE 220 zt(i) = zt(i) - zqbs(i) * (RLVTT+RLMLT)/RCPD/(1.0+RVTMP2*(zq(i)+zqbs(i))) 221 ENDIF 222 zqbs(i)=0. 223 ENDIF 224 176 225 177 226 ENDDO ! loop on ngrid 178 227 179 ! Now sedimention scheme180 181 ! exact resolution of the conservation equation for qbs with the updated flux from the top (after evap)182 ! valid only if the fall velocity is constant183 184 DO i = 1, ngrid185 186 zrho(i,k) = pplay(i,k) / zt(i) / RD187 zdz(i) = (paprs(i,k)-paprs(i,k+1)) / (zrho(i,k)*RG)188 velo(i,k) = fallv_bs189 zqbs(i) = zqbsi(i)*exp(-velo(i,k)/zdz(i)*dtime)+sedim(i)/zrho(i,k)/velo(i,k)190 zqbs(i) = max(zqbs(i),0.)191 ! flux update192 sedim(i) = sedim(i) + zrho(i,k)*zdz(i)/dtime*(zqbsi(i)-zqbs(i))193 sedim(i) = max(0.,sedim(i))194 195 ENDDO196 197 ! old version with bugs198 ! DO n = 1, niter_bs199 ! DO i = 1, ngrid200 ! zrho(i,k) = pplay(i,k) / zt(i) / RD201 ! zdz(i) = (paprs(i,k)-paprs(i,k+1)) / (zrho(i,k)*RG)202 ! velo(i,k) = fallv_bs203 ! dqsedim = dtime/REAL(niter_bs)/zdz(i)*zqbs(i)*velo(i,k) ! dqice/dt=1/rho*d(rho*wice*qice)/dz204 ! precbs = MIN(MAX(dqsedim,0.0),zqbs(i))205 ! zqbs(i) = MAX(zqbs(i)-1.*precbs , 0.0)206 ! ENDDO !loop on ngrid207 ! ENDDO ! loop on niter_bs208 ! ! add to non sublimated precip209 ! DO i=1,ngrid210 ! sedim(i) = sedim(i)+max(0.,zqbsi(i)-zqbs(i))*(paprs(i,k)-paprs(i,k+1))/(RG*dtime)211 ! ENDDO212 !213 228 214 229 … … 218 233 bsfl(i,k)=sedim(i) 219 234 dqbs_bs(i,k) = zqbs(i)-qbs(i,k) 220 dq_bs(i,k) = zq(i) - q (i,k)235 dq_bs(i,k) = zq(i) - qv(i,k) 221 236 dtemp_bs(i,k) = zt(i) - temp(i,k) 222 237 ENDDO … … 235 250 236 251 end subroutine blowing_snow_sublim_sedim 252 end module lmdz_blowing_snow_sublim_sedim -
LMDZ6/trunk/libf/phylmd/lmdz_call_blowing_snow.F90
r4723 r4724 1 module lmdz_call_blowing_snow 2 3 contains 4 1 5 subroutine call_blowing_snow_sublim_sedim(ngrid,nlay,dtime,temp,q,qbs,pplay,paprs, & 2 6 dtemp_bs,dq_bs,dqbs_bs,bsfl,precip_bs) 3 7 8 use lmdz_blowing_snow_sublim_sedim, only : blowing_snow_sublim_sedim 4 9 implicit none 5 10 … … 37 42 38 43 end subroutine call_blowing_snow_sublim_sedim 44 45 end module lmdz_call_blowing_snow -
LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90
r4722 r4724 318 318 dser, dt_ds, zsig, zmea 319 319 use phys_output_var_mod, only: tkt, tks, taur, sss 320 use blowing_snow_ini_mod, only : zeta_bs320 use lmdz_blowing_snow_ini, only : zeta_bs 321 321 USE wxios, ONLY: missing_val_xios => missing_val, using_xios 322 322 USE netcdf, only: missing_val_netcdf => nf90_fill_real -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r4722 r4724 80 80 USE lmdz_call_cloud_optics_prop, ONLY : call_cloud_optics_prop 81 81 USE lmdz_lscp_old, ONLY : fisrtilp 82 USE lmdz_call_blowing_snow, ONLY : call_blowing_snow_sublim_sedim 82 83 USE lmdz_wake_ini, ONLY : wake_ini 83 84 USE yamada_ini_mod, ONLY : yamada_ini … … 85 86 USE lmdz_thermcell_ini, ONLY : thermcell_ini, iflag_thermals_tenv 86 87 USE lmdz_thermcell_dtke, ONLY : thermcell_dtke 87 USE blowing_snow_ini_mod, ONLY : blowing_snow_ini , qbst_bs88 USE lmdz_blowing_snow_ini, ONLY : blowing_snow_ini , qbst_bs 88 89 USE lmdz_lscp_ini, ONLY : lscp_ini 89 90 USE lmdz_ratqs_main, ONLY : ratqs_main -
LMDZ6/trunk/libf/phylmd/surf_landice_mod.F90
r4673 r4724 35 35 !FC 36 36 USE ioipsl_getin_p_mod, ONLY : getin_p 37 USE blowing_snow_ini_mod, ONLY : zeta_bs, pbst_bs, prt_bs, iflag_saltation_bs37 USE lmdz_blowing_snow_ini, ONLY : zeta_bs, pbst_bs, prt_bs, iflag_saltation_bs 38 38 39 39 #ifdef CPP_INLANDSIS -
LMDZ6/trunk/libf/phylmdiso/lmdz_blowing_snow_ini.F90
r4723 r4724 1 link ../phylmd/ blowing_snow_ini_mod.F901 link ../phylmd/lmdz_blowing_snow_ini.F90 -
LMDZ6/trunk/libf/phylmdiso/lmdz_blowing_snow_sublim_sedim.F90
r4723 r4724 1 link ../phylmd/ blowing_snow_sublim_sedim.F901 link ../phylmd/lmdz_blowing_snow_sublim_sedim.F90 -
LMDZ6/trunk/libf/phylmdiso/lmdz_call_blowing_snow.F90
r4723 r4724 1 link ../phylmd/ call_blowing_snow_sublim_sedim.F901 link ../phylmd/lmdz_call_blowing_snow.F90 -
LMDZ6/trunk/libf/phylmdiso/pbl_surface_mod.F90
r4723 r4724 411 411 dser, dt_ds, zsig, zmea 412 412 use phys_output_var_mod, only: tkt, tks, taur, sss 413 use blowing_snow_ini_mod, only : zeta_bs413 use lmdz_blowing_snow_ini, only : zeta_bs 414 414 USE wxios, ONLY: missing_val_xios => missing_val, using_xios 415 415 use netcdf, only: nf90_fill_real -
LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90
r4723 r4724 80 80 USE lmdz_call_cloud_optics_prop, ONLY : call_cloud_optics_prop 81 81 USE lmdz_lscp_old, ONLY : fisrtilp 82 USE lmdz_call_blowing_snow, ONLY : call_blowing_snow_sublim_sedim 82 83 USE lmdz_wake_ini, ONLY : wake_ini 83 84 USE yamada_ini_mod, ONLY : yamada_ini … … 85 86 USE lmdz_thermcell_ini, ONLY : thermcell_ini, iflag_thermals_tenv 86 87 USE lmdz_thermcell_dtke, ONLY : thermcell_dtke 87 USE blowing_snow_ini_mod, ONLY : blowing_snow_ini , qbst_bs88 USE lmdz_blowing_snow_ini, ONLY : blowing_snow_ini , qbst_bs 88 89 USE lmdz_lscp_ini, ONLY : lscp_ini 89 90 USE lmdz_ratqs_main, ONLY : ratqs_main -
LMDZ6/trunk/libf/phylmdiso/surf_landice_mod.F90
r4673 r4724 50 50 !FC 51 51 USE ioipsl_getin_p_mod, ONLY : getin_p 52 USE blowing_snow_ini_mod, ONLY : zeta_bs, pbst_bs, prt_bs, iflag_saltation_bs52 USE lmdz_blowing_snow_ini, ONLY : zeta_bs, pbst_bs, prt_bs, iflag_saltation_bs 53 53 54 54 #ifdef CPP_INLANDSIS
Note: See TracChangeset
for help on using the changeset viewer.