RRTMGP.jl icon indicating copy to clipboard operation
RRTMGP.jl copied to clipboard

Remove magic indexes

Open charleskawczynski opened this issue 5 years ago • 6 comments

Magic indexes are used for the dry component of gas_col (0 when using OffsetArrays, 1 with an offset for ordinary Arrays), which complicates the logic. This may be linked to #183, depending on the order things are fixed.

charleskawczynski avatar Dec 27 '19 16:12 charleskawczynski

This was not fixed by #185

charleskawczynski avatar Dec 27 '19 18:12 charleskawczynski

@charleskawczynski , @dennisYatunin , I believe this issue is no longer relevant. I would like to close this unless there are additional comments!

sriharshakandala avatar Sep 13 '21 22:09 sriharshakandala

Magic indices are still used, I wouldn't call this closed.

charleskawczynski avatar Sep 13 '21 22:09 charleskawczynski

We no longer use offset arrays. All indices start from 1.

sriharshakandala avatar Sep 13 '21 22:09 sriharshakandala

That's not the point, the point is that these indices refer to specific gases, and we have to keep track of where they are throughout the code.

charleskawczynski avatar Sep 13 '21 22:09 charleskawczynski

This is done through a dictionary.

sriharshakandala avatar Sep 13 '21 22:09 sriharshakandala