Wrong LHFL_S calculation in the case of sublimation – in #9: CCLM

in #9: CCLM

<p> The calculation of lhfl_s in slow_tendencies.f90 and in src_slow_tendencies_rk.f90 is wrong in the case of sublimation. Since lhfl_s is only computed for the output of <span class="caps"> LHFL </span> _S and <span class="caps"> ALHFL </span> _S this does not affect any other variable. I suggest </p> lhfl_s(i,j) = lh_v*qvsflx(i,j) ! Account for lake ice (FLake is used AND lake point AND lake ice exists) IF (llake) THEN IF( (depth_lk(i,j) &gt; 0.0_ireals) .AND. &amp; (h_ice(i,j,nnow) &gt;= h_Ice_min_flk) ) THEN lhfl_s(i,j) = lhfl_s(i,j) + lh_f * qvsflx(i,j) ENDIF ENDIF ! Account for sea ice (sea ice scheme is used AND sea point AND sea ice exists) IF (lseaice) THEN IF( (lseamask(i,j)) .AND. &amp; (h_ice(i,j,nnow) &gt; 0.0_ireals) ) THEN lhfl_s(i,j) = lhfl_s(i,j) + lh_f * qvsflx(i,j) ENDIF ENDIF ! Account for frozen land surface (land point <span class="caps"> AND </span> frozen surface) IF( (llandmask(i,j)) .AND. &amp; (t_s(i,j,nnow) &lt; t0_melt) ) THEN lhfl_s(i,j) = lhfl_s(i,j) + lh_f * qvsflx(i,j) ENDIF <p> as a replacement of </p> lhfl_s(i,j) = lh_v*qvsflx(i,j) <p> in src_slow_tendencies_rk.f90 and of </p> lhfl_s(i,j) = lh_v*qvsflx(i,j) ! Account for lake ice (FLake is used AND lake point AND lake ice exists) IF (llake) THEN IF( (depth_lk(i,j) &gt; 0.0_ireals) .AND. &amp; (h_ice(i,j,nnow) &gt;= h_Ice_min_flk) ) THEN ! Add latent heat of fusion lhfl_s(i,j) = lhfl_s(i,j) + lh_f * qvsflx(i,j) ! No change otherwise, but is that true for sea ice? <span class="caps"> END </span> IF ENDIF <p> in slow_tendencies.f90 since this replacement would yield a calculation of lhfl_s that is consistent with the corresponding calculations in <span class="caps"> TERRA </span> , FLake, and the sea ice scheme. </p>

  @redc_migration in #4e7ecb7

<p> The calculation of lhfl_s in slow_tendencies.f90 and in src_slow_tendencies_rk.f90 is wrong in the case of sublimation. Since lhfl_s is only computed for the output of <span class="caps"> LHFL </span> _S and <span class="caps"> ALHFL </span> _S this does not affect any other variable. I suggest </p> lhfl_s(i,j) = lh_v*qvsflx(i,j) ! Account for lake ice (FLake is used AND lake point AND lake ice exists) IF (llake) THEN IF( (depth_lk(i,j) &gt; 0.0_ireals) .AND. &amp; (h_ice(i,j,nnow) &gt;= h_Ice_min_flk) ) THEN lhfl_s(i,j) = lhfl_s(i,j) + lh_f * qvsflx(i,j) ENDIF ENDIF ! Account for sea ice (sea ice scheme is used AND sea point AND sea ice exists) IF (lseaice) THEN IF( (lseamask(i,j)) .AND. &amp; (h_ice(i,j,nnow) &gt; 0.0_ireals) ) THEN lhfl_s(i,j) = lhfl_s(i,j) + lh_f * qvsflx(i,j) ENDIF ENDIF ! Account for frozen land surface (land point <span class="caps"> AND </span> frozen surface) IF( (llandmask(i,j)) .AND. &amp; (t_s(i,j,nnow) &lt; t0_melt) ) THEN lhfl_s(i,j) = lhfl_s(i,j) + lh_f * qvsflx(i,j) ENDIF <p> as a replacement of </p> lhfl_s(i,j) = lh_v*qvsflx(i,j) <p> in src_slow_tendencies_rk.f90 and of </p> lhfl_s(i,j) = lh_v*qvsflx(i,j) ! Account for lake ice (FLake is used AND lake point AND lake ice exists) IF (llake) THEN IF( (depth_lk(i,j) &gt; 0.0_ireals) .AND. &amp; (h_ice(i,j,nnow) &gt;= h_Ice_min_flk) ) THEN ! Add latent heat of fusion lhfl_s(i,j) = lhfl_s(i,j) + lh_f * qvsflx(i,j) ! No change otherwise, but is that true for sea ice? <span class="caps"> END </span> IF ENDIF <p> in slow_tendencies.f90 since this replacement would yield a calculation of lhfl_s that is consistent with the corresponding calculations in <span class="caps"> TERRA </span> , FLake, and the sea ice scheme. </p>

Wrong LHFL_S calculation in the case of sublimation

The calculation of lhfl_s in slow_tendencies.f90 and in src_slow_tendencies_rk.f90 is wrong in the case of sublimation. Since lhfl_s is only computed for the output of LHFL _S and ALHFL _S this does not affect any other variable. I suggest

lhfl_s(i,j) = lh_v*qvsflx(i,j) ! Account for lake ice (FLake is used AND lake point AND lake ice exists) IF (llake) THEN IF( (depth_lk(i,j) > 0.0_ireals) .AND. & (h_ice(i,j,nnow) >= h_Ice_min_flk) ) THEN lhfl_s(i,j) = lhfl_s(i,j) + lh_f * qvsflx(i,j) ENDIF ENDIF ! Account for sea ice (sea ice scheme is used AND sea point AND sea ice exists) IF (lseaice) THEN IF( (lseamask(i,j)) .AND. & (h_ice(i,j,nnow) > 0.0_ireals) ) THEN lhfl_s(i,j) = lhfl_s(i,j) + lh_f * qvsflx(i,j) ENDIF ENDIF ! Account for frozen land surface (land point AND frozen surface) IF( (llandmask(i,j)) .AND. & (t_s(i,j,nnow) < t0_melt) ) THEN lhfl_s(i,j) = lhfl_s(i,j) + lh_f * qvsflx(i,j) ENDIF

as a replacement of

lhfl_s(i,j) = lh_v*qvsflx(i,j)

in src_slow_tendencies_rk.f90 and of

lhfl_s(i,j) = lh_v*qvsflx(i,j) ! Account for lake ice (FLake is used AND lake point AND lake ice exists) IF (llake) THEN IF( (depth_lk(i,j) > 0.0_ireals) .AND. & (h_ice(i,j,nnow) >= h_Ice_min_flk) ) THEN ! Add latent heat of fusion lhfl_s(i,j) = lhfl_s(i,j) + lh_f * qvsflx(i,j) ! No change otherwise, but is that true for sea ice? END IF ENDIF

in slow_tendencies.f90 since this replacement would yield a calculation of lhfl_s that is consistent with the corresponding calculations in TERRA , FLake, and the sea ice scheme.

View in channel
<p> Hi Stefan, </p> <p> sounds, at a first quick glance, reasonable, especially if one realizes that the case of “frozen lakes” had already been <br/> taken into account in slow_tendencies.f90, but not in src_slow_tendencies_rk.f90. </p> <p> Did you already perform calculations with the changed version and check how large the effect on the <br/> results for latent heat fluxes for “frozen” conditions is? <br/> Did you discuss it already with the responsible persons at <span class="caps"> DWD </span> ? </p> <p> Hans-Jürgen </p>

  @hans-jürgenpanitz in #8bb98d1

<p> Hi Stefan, </p> <p> sounds, at a first quick glance, reasonable, especially if one realizes that the case of “frozen lakes” had already been <br/> taken into account in slow_tendencies.f90, but not in src_slow_tendencies_rk.f90. </p> <p> Did you already perform calculations with the changed version and check how large the effect on the <br/> results for latent heat fluxes for “frozen” conditions is? <br/> Did you discuss it already with the responsible persons at <span class="caps"> DWD </span> ? </p> <p> Hans-Jürgen </p>

Hi Stefan,

sounds, at a first quick glance, reasonable, especially if one realizes that the case of “frozen lakes” had already been
taken into account in slow_tendencies.f90, but not in src_slow_tendencies_rk.f90.

Did you already perform calculations with the changed version and check how large the effect on the
results for latent heat fluxes for “frozen” conditions is?
Did you discuss it already with the responsible persons at DWD ?

Hans-Jürgen

<p> If I am not completely wrong the effect should be an increase of the latent heat flux over the “frozen/icy” surfaces <br/> by about 13% (0.13 =lh_f/lh_v= 0.33E6/2.5E6). Correct? </p> <p> Hans-Jürgen </p>

  @hans-jürgenpanitz in #4e5d713

<p> If I am not completely wrong the effect should be an increase of the latent heat flux over the “frozen/icy” surfaces <br/> by about 13% (0.13 =lh_f/lh_v= 0.33E6/2.5E6). Correct? </p> <p> Hans-Jürgen </p>

If I am not completely wrong the effect should be an increase of the latent heat flux over the “frozen/icy” surfaces
by about 13% (0.13 =lh_f/lh_v= 0.33E6/2.5E6). Correct?

Hans-Jürgen

<p> Hi Stefan, </p> <p> thanks for this info, since I am using a separate sea-ice module, I haven’t noticed this error in the code. But you are absolutely right. </p> <p> But I think in case of lake/sea-ice the latent heat of vapourisation and of fusion needs to be added (if I am not missing the fact that lh_v is somewhere integrated in qvsflx or lhfl_s already, then ignore this comment): </p> <p> <code> lhfl_s(i,j) = lhfl_s(i,j) + (lh_f+lh_v) * qvsflx(i,j) </code> </p> <p> at least this is what I am using in the separate sea-ice module. </p>

  @redc_migration in #9cb404e

<p> Hi Stefan, </p> <p> thanks for this info, since I am using a separate sea-ice module, I haven’t noticed this error in the code. But you are absolutely right. </p> <p> But I think in case of lake/sea-ice the latent heat of vapourisation and of fusion needs to be added (if I am not missing the fact that lh_v is somewhere integrated in qvsflx or lhfl_s already, then ignore this comment): </p> <p> <code> lhfl_s(i,j) = lhfl_s(i,j) + (lh_f+lh_v) * qvsflx(i,j) </code> </p> <p> at least this is what I am using in the separate sea-ice module. </p>

Hi Stefan,

thanks for this info, since I am using a separate sea-ice module, I haven’t noticed this error in the code. But you are absolutely right.

But I think in case of lake/sea-ice the latent heat of vapourisation and of fusion needs to be added (if I am not missing the fact that lh_v is somewhere integrated in qvsflx or lhfl_s already, then ignore this comment):

lhfl_s(i,j) = lhfl_s(i,j) + (lh_f+lh_v) * qvsflx(i,j)

at least this is what I am using in the separate sea-ice module.

<p> Hi All, </p> <p> @ Hans-Jürgen: I shortly discussed the issue with Ekaterina Machulskaya and I will speak to her again. I agree with your discussion of the effect in the case of sublimation. </p> <p> @ Oliver: The addition of lh_f and lh_v in the case of sublimation is just what the suggested code does. (I guess you overlooked its first line?!) </p> <p> Cheers, <br/> Stefan </p>

  @redc_migration in #4dfc1a4

<p> Hi All, </p> <p> @ Hans-Jürgen: I shortly discussed the issue with Ekaterina Machulskaya and I will speak to her again. I agree with your discussion of the effect in the case of sublimation. </p> <p> @ Oliver: The addition of lh_f and lh_v in the case of sublimation is just what the suggested code does. (I guess you overlooked its first line?!) </p> <p> Cheers, <br/> Stefan </p>

Hi All,

@ Hans-Jürgen: I shortly discussed the issue with Ekaterina Machulskaya and I will speak to her again. I agree with your discussion of the effect in the case of sublimation.

@ Oliver: The addition of lh_f and lh_v in the case of sublimation is just what the suggested code does. (I guess you overlooked its first line?!)

Cheers,
Stefan

<p> On the behalf of Uli Blahak: </p> <p> Hi all, </p> <p> I forwarded the code correction to Jürgen Helmert, Bodo Ritter and Jan-Peter Schulz <br/> and wait for their response. <br/> Personally I also think that this should be fixed in the proposed way. Jürgen, your <br/> 13 % estimate for the difference is correct. </p> <p> I just think that the correction parts for sea ice and frozen land points should <br/> also be integrated in slow_tendencies.f90 (Leapfrog) for consistency with RK <br/> (src_slow_tendencies_rk.f90) </p> <p> Best regards, </p> <p> Uli </p> <p> Hi Uli, </p> <p> Stefan proposed the changes for both modules, src_slow_tendencies_rk.f90 and slow_tendencies.f90 </p> <p> Hans-Jürgen </p>

  @hans-jürgenpanitz in #3e1d8d4

<p> On the behalf of Uli Blahak: </p> <p> Hi all, </p> <p> I forwarded the code correction to Jürgen Helmert, Bodo Ritter and Jan-Peter Schulz <br/> and wait for their response. <br/> Personally I also think that this should be fixed in the proposed way. Jürgen, your <br/> 13 % estimate for the difference is correct. </p> <p> I just think that the correction parts for sea ice and frozen land points should <br/> also be integrated in slow_tendencies.f90 (Leapfrog) for consistency with RK <br/> (src_slow_tendencies_rk.f90) </p> <p> Best regards, </p> <p> Uli </p> <p> Hi Uli, </p> <p> Stefan proposed the changes for both modules, src_slow_tendencies_rk.f90 and slow_tendencies.f90 </p> <p> Hans-Jürgen </p>

On the behalf of Uli Blahak:

Hi all,

I forwarded the code correction to Jürgen Helmert, Bodo Ritter and Jan-Peter Schulz
and wait for their response.
Personally I also think that this should be fixed in the proposed way. Jürgen, your
13 % estimate for the difference is correct.

I just think that the correction parts for sea ice and frozen land points should
also be integrated in slow_tendencies.f90 (Leapfrog) for consistency with RK
(src_slow_tendencies_rk.f90)

Best regards,

Uli

Hi Uli,

Stefan proposed the changes for both modules, src_slow_tendencies_rk.f90 and slow_tendencies.f90

Hans-Jürgen