Unexpected results from gendaymtx

Hi Community,

first of all thank you for creating and maintaining this great package and the corresponding documentation!

I’m working with gendaymtx.exe on Windows to get the total solar radiation for sky patches.

gendaymtx -m 1 -O1 south.wea > south.mtx

The resulting mtx file has the following header:

gendaymtx -m 1 -O1 south.wea
LATLONG= -54.50000000 158.94000000

0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
4 4 4
8.9 8.9 8.9
14.9 14.9 14.9
23.3 23.3 23.3
31.1 31.1 31.1
36.8 36.8 36.8
39.6 39.6 39.6
41.5 41.5 41.5
45.1 45.1 45.1
46.4 46.4 46.4

I’d expect 146 * 8760 = 1.278.960 rows with data in this file, but there are 1.279.105 entries.

What do the additional 145 (1.279.105 - 1.278.96) entries correspond to?

If you are just counting lines in the file, there are some blank lines in between rows. Is it possible you are counting those as well?

Otherwise, please upload your .wea file somewhere, so I can figure out what is going on.


1 Like

Thanks for a prompt response @Greg_Ward!

I did count the lines in the output file indeed. Following your tip, I inspected further in Notepad++ and every 8760 entries, there is an empty line which I assume separates values between individual patches.

Thanks again for clarifying this!

A follow-up question on how to convert these values to W/m2. I dug up your old conversation with Mustafa on solid angle values per patch and am trying to get solid angle values per each Tregenza patch.

In Ladybug’s code I can see a reference to solid angles per row but I’d like to understand how these were obtained with rcalc and the tregenza.cal file.

Ah, passing 1 subdivision to the command generates individual values for the default Tregenza sky patches:

cnt 145 | rcalc -e MF:1 -f reinsrc.cal -e Rbin=recno;$1=Romega > rh_sang.txt
1 Like

My apologies for spamming this topic but I have one more question:
@Mostapha is applying the following weights to each of the RGB bands:

w_val = 0.265074126 * float(R) + 0.670114631 * float(G) + 0.064811243 * float(B)

Where do these values come from?
Here is more context:

Having done more research, I found this:

For anyone who was wondering like me: these are the default coefficients to convert from RGB in the CIE color space to a single greyscale value representing radiation.

1 Like