Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output Radiation Field updates #35

Merged
merged 8 commits into from
May 13, 2024
Merged

Output Radiation Field updates #35

merged 8 commits into from
May 13, 2024

Conversation

karllark
Copy link
Owner

@karllark karllark commented May 3, 2024

Updating the output radiation field information.

Adding subgrid mapping to radiation field and uncertainties.

Fixing radiation field uncertainties to be correct using Camps & Baes (2018). Empirical testing with the slab geometry shows the uncertainties correctly scale with number of photons and slightly overestimate the real uncertainties. This overestimate may be "correct" as variations inside the cell will be included in the unc calculation. This effect discussed in Gordon et al. (2001).

Outputting radiation field density U instead of internally used the mean intensity of the radiation field J. Conversion is U = (4*pi/c)J

@karllark
Copy link
Owner Author

karllark commented May 3, 2024

For models with few grid cells and lots of photons, the use of short ints is an issue as the values then roll and become negative. May need to go back to long ints.

@karllark
Copy link
Owner Author

karllark commented May 13, 2024

Empirical tests show good scaling with N, but low by a factor of 2 for the slab benchmark.

Fixed! To get 1-1 scaling between ave and empirical use the total number of photons instead of number of photons in each cell. I do not understand this, but this is formally what Camps & Baes (2018) use. When discussed with Peter and Maarten, it was indicated this is because that was in the reference they used. None of us fully understood the reasons, need to get back to that reference and read more carefully.

@karllark
Copy link
Owner Author

karllark commented May 13, 2024

Plot showing correspondence between empirical unc from 200 runs and eqn based unc. Three different runs included with 1e4, 1e5, and 1e6 photons.

Clearly Camps & Baes (2018) result in a slight overestimate of the radiation field uncertainty. This may be reflecting the inclusion of the variation in the radiation field inside a cell in the unc calculation. This effect discussed in Gordon et al. (2001).

unctest_cb18

@karllark karllark merged commit b37c8d5 into master May 13, 2024
1 check passed
@karllark
Copy link
Owner Author

Note that adding the contribution to the sum of x2 at each interaction instead of the total for each photon (summed over each interaction before squaring) leads to a slight under prediction of the unc. Noting this for completeness.

All the testing has been done for a slab tau = 1 (z dir). Might be different for higher taus.

@karllark
Copy link
Owner Author

Testing for tau=5 shows a larger under-prediction for the x2 summing every interaction while the x2 summing every photon does not. Good evidence for summing every photon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant