Closed sunt05 closed 7 months ago
- I see that you multiplied k with 1.5. Any logical reason for that?
That's just some testing - removing the modification of k
should produce similar results.
- I updated with same values as used in Lindberg et al. 2020. The model becomes unstable and gives NaN for Qs. I updated the repo (master) for you to have a look.
Will do - that's exactly what I'd like for the testing - thanks!
- I will hunt down Frans to get the correct observed values for us to compare with also, as well as the correct settings used in the old original ESTM scheme.
Great!
Ok, I checked with Frans and the correct values are now in the notebook on the master branch. It is taken from code 807 in ESTMcoefficients using 4 layers:
Code Surf_thick1 Surf_k1 Surf_rhoCp1 Surf_thick2 Surf_k2 Surf_rhoCp2 Surf_thick3 Surf_k3 Surf_rhoCp3 Surf_thick4 Surf_k4 Surf_rhoCp4 Surf_thick5 Surf_k5 Surf_rhoCp5 807 0.05 0.759 1860000 0.3 0.759 1860000 0.5 0.63 1200000 0.7 0.63 1200000 -999 -999 -999
I tried with different settings but no luck on producing reasonable values in ECH. Only NaN after a few timesteps.
Observationdata are now also included (/SUEWS_DB_Typology_test/data/saveairport_base/Saeve_asphalt_QGmeasured.csv)
Your turn @sunt05
Hi @biglimp, please follow the README to install a dev version of supy I just created for this - also check out the test-save.ipynb notebook.
Installed new version of supy (2014.3.14.dev0) and used settings as in Lindberg et al. 2020. ECH still unstable.
Can I ask you what you tried in order to fix this?
Did you use the test-save.ipynb notebook? My tweaks are included there.
but those number does not match up with lindberg et al. 2020
The only change made was the layer depths, not specified in L20 and too thin for pavement - all other thermal properties remain unchanged.
There are the values used in L20 for the airport:
807 0.05 0.759 1860000 0.3 0.759 1860000 0.5 0.63 1200000 0.7 0.63 1200000 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 -999 ! Other roads London GLA
I cannot see that k_surf and cp_surf in your notebook is coming from these numbers. is roads first seven values or 8 to 14?
I am not sure how to add the fifth layer but I just copied the 4th and made it different thickness, Didnt work, no matter what I tried.
Got it - I thought these were part of the config files already and hence only modified the depth values, which clearly seemed unreasonable to me.
I'll explicitly set them in the Säve notebook and update you later and leaving some instructions there on configuration of ECH.
Here is what I used. Please double-ckeck:
# Setting correct ground layer parameters (807 from ESTM coefficients, used in Lindberg et al. 2020)
# EHC as heat storage scheme
df_state_ehc = df_state_init_a2.copy()
df_state_ehc.storageheatmethod = 5
# modify the depth of the vertical layers
ar_depth = np.repeat(np.array([[0.05, 0.3, 0.5, 0.7, 0.01]]), 7, axis=0).flatten()
df_state_ehc.loc[:, "dz_surf"] = ar_depth
# modify the heat capacity of the vertical layers
ar_cp = np.repeat(np.array([[1.86, 1.86, 1.2, 1.2, 1.2]])*1e6, 7, axis=0).flatten()
df_state_ehc.loc[:, "cp_surf"] = ar_cp
# modify the thermal conductivity of the vertical layers
ar_k = np.repeat(np.array([[0.759, 0.759, 0.63, 0.63, 0.63]]) , 7, axis=0).flatten()
df_state_ehc.loc[:, "k_surf"] = ar_k
The only thing I'd like to change is the first layer depth (0.05 --> 0.1):
# modify the depth of the vertical layers
ar_depth = np.repeat(np.array([[0.1, 0.3, 0.5, 0.7, 0.01]]), 7, axis=0).flatten()
df_state_ehc.loc[:, "dz_surf"] = ar_depth
With this change, things seems to work - please give it a go.
A thin layer closer to the imposed forcing could cause instability, a common issue with underlying heat conduction solvers; however, I believe this change is reasonable.
Ok. Now we are getting close. I set frist layer thickness as close as possible to 0.05 to create a better 1:1 fit. The values gets a bit more scattered. Why do you think that is?
On anther note. I am trying to put in regression line, equation and r2 but my old code does not work if you have nodata values. Du you have any suggestion/Code?
The increased scattering from thinner first layers is likely tied to the numerical stability of the heat equation solver, a known limitation of similar algorithms.
This could be partially improved with some nontrivial tweaks; however, if adjusting the layer depth can bypass this issue, I suggest not putting excessive effort into the numerical solver.
I had a closer look at the data and there is some time adjustments needed to be made in the observation datasets. It could be done more in detail but I think we have proven that the ECH is working fine. Suggest we close this issue and now move over to the coupling itself in SUEWS/SS.
Brilliant!
The EHC's modelled results could align closely with those from OHM after increasing the layer depths.