Skip to content

Conversation

@jomey
Copy link
Member

@jomey jomey commented Nov 3, 2025

Adds the first version of the toposplit #25 using the math presented in the recently submitted paper.

Note that the following models have not been implemented:

  • DSW1
  • DSW2
  • DSW3H (flat model)

Other difference to the paper:

  • Uses the SMRF custom implementation of sun angle, to get solar zenith and azimuth
  • Uses the assumption of a 0.54 VIS and 0.46 IR to caclulate broadband albedo from the split calculation of time decay albedo.

Important

Needs the recently upgraded version of Topocalc

Other things to note

The paper used skyfield to calculate the sun position.
A follow up issue to get that added to SMRF is logged #41

jomey added 11 commits November 3, 2025 16:26
Simplify the statement on which thermal distribution to use (standard vs HRRR).
Update the config to only allow one parallel run per PR and stop any previous one on a new
push. Also remove the caching of GCC since it did not work and you can't cache OS level
dependencies.
Centralize the file comparison to one method across all tests.
The check for a timeseries against a single date is flawed. More importantly, full WRF
testing is yet to be done.
Logging the start and end date for SMRF seems unnecessary, given that we log each
processed time step.
Also avoid using `setattr` when we can just straight assign to `self.` and update some
docstrings.
Update the reference from topocalc that called `shade` to the recently renamed
`illumination_angles` since that is the actual calculated property.
Will be reused soon in Toposplit. Also lints code and updates docstrings.
jomey added 3 commits November 3, 2025 17:05
When configuring to only output net solar, the albedo needs precipitation, which requires
air temperature and vapor pressure.
This is one of the most involved logic and needed by quite a few other variables.
@jomey jomey requested review from a team and mattols November 5, 2025 18:58
@jomey jomey marked this pull request as ready for review November 5, 2025 18:58
@jomey jomey force-pushed the toposplit branch 3 times, most recently from 9449b07 to 276c3f7 Compare November 7, 2025 16:03
Copy link
Contributor

@arobledano arobledano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me, I'll let @mattols double-check the math involved for the Toposplit calculation. Hats off, @jomey !

@jomey
Copy link
Member Author

jomey commented Nov 7, 2025

Thanks for checking @arobledano
Definitely waiting for @mattols and also for a couple of test runs to see some results.

jomey and others added 7 commits November 13, 2025 10:07
This implements the logic presented in Olson et al. to topographically downscale DSWRF
from HRRR and calculate net solar.
The method previously returned the calculated horizon angles to save compute time on
subsequent calls. This fix restores that.
Output and calculation variables were not reset when the sun was down, causing non-zero
values from the last hour before sunset to be carried over.
This class was never executed with the missing __init__.py in the folder. Tests were also
not passing, which are fixed with this as well.
The combination was not possible due to only checking albedo with standard solar.
Had a typo for GHI vis and the init of the class was also not setting
up the correct names.
Identical to AWSM and eases troubleshooting.
And delete the existing ones.
Now that all variables get the fully parsed .ini dict passed, the value for threads can be
read from there instead of copying it over.
Should speed up any topo domain of larger than 1000x1000
Copy link

@mattols mattols left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Contributor

@arobledano arobledano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3Cups seal of approval as well

Now that we rely on Cython to build the C files for us, we no longer need the conditional
logic in setup.py that looks for them.
@jomey jomey merged commit ab9a6e4 into main Nov 14, 2025
1 check passed
@jomey jomey deleted the toposplit branch November 14, 2025 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants