source: trunk/LMDZ.COMMON/libf/evolution/tendencies.F90 @ 4170

Last change on this file since 4170 was 4170, checked in by jbclement, 2 weeks ago

PEM:

  • Deletion of 'flux_ssice' ('zqdsdif_tot') from the "startfi.nc" as it is not needed.
  • Using the yearly average flux for the sublimating subsurface ice instead of the value at last timestep.
  • Keeping a clear separation between the subsurface ice flux and the surface ice tendency.
  • Making sure that subsurface ice depth is well given to the PCM at the end of the PEM (ice table VS layering).

JBC

File size: 7.5 KB
RevLine 
[3989]1MODULE tendencies
[3991]2!-----------------------------------------------------------------------
3! NAME
4!     tendencies
5!
6! DESCRIPTION
7!     Computation and update of PEM ice evolution tendencies.
8!
9! AUTHORS & DATE
10!     R. Vandemeulebrouck
11!     L. Lange
12!     JB Clement, 2023-2025
13!
14! NOTES
15!
16!-----------------------------------------------------------------------
[3076]17
[4065]18! DEPENDENCIES
19! ------------
[4071]20use numerics, only: dp, di, k4, minieps, tol
[4065]21
[3991]22! DECLARATION
23! -----------
[3076]24implicit none
25
26contains
[3991]27!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[3076]28
[3989]29!=======================================================================
[4140]30SUBROUTINE compute_tendice(min_perice,min_frost,perice,d_ice)
[3991]31!-----------------------------------------------------------------------
32! NAME
[4071]33!     compute_tendice
[3991]34!
35! DESCRIPTION
36!     Compute initial ice evolution tendencies from PCM data.
37!
38! AUTHORS & DATE
39!     R. Vandemeulebrouck
40!     L. Lange
41!     JB Clement, 2023-2025
42!
43! NOTES
44!     Based on minima of ice at each point for the PCM years.
45!-----------------------------------------------------------------------
[2779]46
[3991]47! DECLARATION
48! -----------
[3070]49implicit none
[2779]50
[3991]51! ARGUMENTS
[3977]52! ---------
[4140]53real(dp), dimension(:,:,:), intent(in)  :: min_perice
54real(dp), dimension(:,:,:), intent(in)  :: min_frost
55real(dp), dimension(:,:),   intent(in)  :: perice
56real(dp), dimension(:,:),   intent(out) :: d_ice
[2779]57
[3991]58! CODE
[3977]59! ----
[4071]60! We compute the difference to get the tendency
[4140]61d_ice(:,:) = min_perice(:,:,2) + min_frost(:,:,2) - (min_perice(:,:,1) + min_frost(:,:,1))
[2779]62
[3149]63! If the difference is too small, then there is no evolution
[4065]64where (abs(d_ice) < minieps) d_ice = 0._dp
[2779]65
[4071]66! If the tendency is negative but there is no ice reservoir for the PEM
[4152]67where (d_ice(:,:) < 0._dp .and. abs(perice(:,:)) < minieps) d_ice(:,:) = 0._dp
[3367]68
[4071]69END SUBROUTINE compute_tendice
[3989]70!=======================================================================
[2779]71
[3989]72!=======================================================================
[4071]73SUBROUTINE evolve_tend_co2ice(d_co2ice_ini,co2ice,emissivity,q_co2_ts_ini,q_co2_ts,ps_PCM,ps_avg_glob_ini,ps_avg_global,d_co2ice)
[3991]74!-----------------------------------------------------------------------
75! NAME
[4071]76!     evolve_tend_co2ice
[3991]77!
78! DESCRIPTION
79!     Recompute CO2 ice tendency based on pressure and atmospheric changes.
80!
81! AUTHORS & DATE
82!     L. Lange
83!     JB Clement, 2023-2025
84!
85! NOTES
86!     Adjusts CO2 ice evolution based on Clausius-Clapeyron changes.
87!-----------------------------------------------------------------------
[3989]88
[3991]89! DEPENDENCIES
90! ------------
[4152]91use geometry, only: ngrid, nslope, nday
92use physics,  only: sigmaB, alpha_clap_co2, beta_clap_co2, Lco2, m_co2, A, B
93use orbit,    only: yr_len_sol, sol_len_s
94use display,  only: print_msg, LVL_NFO
95use utility,  only: real2str
[3989]96
[3991]97! DECLARATION
98! -----------
[3989]99implicit none
100
[3991]101! ARGUMENTS
[3989]102! ---------
[4065]103real(dp), dimension(:,:), intent(in)    :: q_co2_ts, q_co2_ts_ini, ps_PCM, d_co2ice_ini, co2ice, emissivity
104real(dp),                 intent(in)    :: ps_avg_global, ps_avg_glob_ini
105real(dp), dimension(:,:), intent(inout) :: d_co2ice
[3989]106
[3991]107! LOCAL VARIABLES
[3989]108! ---------------
[4065]109integer(di)                     :: i, iday, islope
110real(dp)                        :: coef, avg
111real(dp), dimension(ngrid,nday) :: vmr_co2_ts, vmr_co2_ts_ini
[3989]112
[3991]113! CODE
[3989]114! ----
[4110]115call print_msg("> Evolving the CO2 ice tendency according to the new pressure",LVL_NFO)
[4170]116call print_msg('Old CO2 ice tendencies [kg/m2/y] (min|max): '//real2str(minval(d_co2ice))//' | '//real2str(maxval(d_co2ice)),LVL_NFO)
[3989]117
[4065]118! Compute volume mixing ratio
119vmr_co2_ts(:,:) = q_co2_ts(:,:)/(A*q_co2_ts(:,:) + B)/m_co2
120vmr_co2_ts_ini(:,:) = q_co2_ts_ini(:,:)/(A*q_co2_ts_ini(:,:) + B)/m_co2
121
122! Recompute the tendency
[3989]123do i = 1,ngrid
124    do islope = 1,nslope
[4065]125        coef = yr_len_sol*sol_len_s*emissivity(i,islope)*sigmaB/Lco2
126        avg = 0._dp
127        if (co2ice(i,islope) > 1.e-4_dp .and. abs(d_co2ice(i,islope)) > 1.e-5_dp) then
128            do iday = 1,nday
129                avg = avg + (beta_clap_co2/(alpha_clap_co2 - log(q_co2_ts_ini(i,iday)*ps_PCM(i,iday)/100._dp)))**4 &
130                      - (beta_clap_co2/(alpha_clap_co2 - log(vmr_co2_ts(i,iday)*ps_PCM(i,iday)*(ps_avg_global/ps_avg_glob_ini)/100._dp)))**4
131            end do
132            if (avg < 1.e-4_dp) avg = 0._dp
133            d_co2ice(i,islope) = d_co2ice_ini(i,islope) - coef*avg/nday
134        end if
135    end do
136end do
[4170]137call print_msg('New CO2 ice tendencies [kg/m2/y] (min|max): '//real2str( minval(d_co2ice))//' | '//real2str(maxval(d_co2ice)),LVL_NFO)
[3989]138
[4071]139END SUBROUTINE evolve_tend_co2ice
[3989]140!=======================================================================
141
142!=======================================================================
[4170]143SUBROUTINE evolve_flux_ssice(h2oice_depth_old,h2oice_depth_new,tsurf,tsoil_ts_old,tsoil_ts_new,flux_ssice_avg)
[3991]144!-----------------------------------------------------------------------
145! NAME
[4170]146!     evolve_flux_ssice
[3991]147!
148! DESCRIPTION
149!     Recompute H2O ice tendency based on soil depth and temperature changes.
150!
151! AUTHORS & DATE
152!     JB Clement, 2025 (following E. Vos's work)
153!
154! NOTES
155!
156!-----------------------------------------------------------------------
[3989]157
[3991]158! DEPENDENCIES
159! ------------
[4170]160use geometry,       only: ngrid, nslope
[3989]161use soil_temp,      only: itp_tsoil
162use subsurface_ice, only: psv
[4170]163use ice_table,      only: coef_ssdif_PCM
[4110]164use display,        only: print_msg, LVL_NFO
[3989]165
[3991]166! DECLARATION
167! -----------
[3989]168implicit none
169
[3991]170! ARGUMENTS
[3989]171! ---------
[4170]172real(dp), dimension(:,:),     intent(in) :: h2oice_depth_old ! Old H2O ice depth
173real(dp), dimension(:,:),     intent(in) :: h2oice_depth_new ! New H2O ice depth
174real(dp), dimension(:,:),     intent(in) :: tsurf            ! Surface temperature
175real(dp), dimension(:,:,:,:), intent(in) :: tsoil_ts_old     ! Old soil temperature time series
176real(dp), dimension(:,:,:,:), intent(in) :: tsoil_ts_new     ! New soil temperature time series
177real(dp), dimension(:,:),     intent(inout) :: flux_ssice_avg       ! Tendency of sub-surface ice
[3989]178
[3991]179! LOCAL VARIABLES
[3989]180! ---------------
[4170]181real(dp), parameter :: zcdv = 0.0325_dp ! Drag coefficient
[4065]182real(dp)            :: Rz_old, Rz_new, R_dec, hum_dec, psv_max_old, psv_max_new
[4170]183integer(di)         :: i, islope, iday
[3989]184
[3991]185! CODE
[3989]186! ----
[4170]187call print_msg("> Updating the H2O sub-surface ice tendency due to dust lag layer thickness",LVL_NFO)
[4071]188
[4170]189do 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
[3989]195
[4170]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
[3989]203
[4170]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
[3989]210
[4170]211        ! Flux correction (decrease)
212        flux_ssice_avg(i,islope) = flux_ssice_avg(i,islope)*R_dec*hum_dec
213    enddo
214enddo
[3989]215
[4170]216END SUBROUTINE evolve_flux_ssice
[3989]217!=======================================================================
218
219END MODULE tendencies
Note: See TracBrowser for help on using the repository browser.