-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add radiator from NetCDF file #7
Conversation
There are no check boxes for Clouds or Aerosols. This means that the HTML values will always be passed into the Fortran executable. There is no option to use the default configuration. I imagine that the new JSON entry should look like this: |
Hi @carl-drews - I'm not quite sure I follow what you're asking for, but if it helps, here's a few comments and examples.
For some examples, if you're only including aerosols, you could do:
or you could use the new "from netcdf file" type for aerosols if you want to specify the optical properties at each vertical level and wavelength band explicitly:
You can even include brand-new radiators; e.g., if you want to include clouds and aerosols and hot-air balloons:
Hope this helps! Let me know if you want to meet to discuss this further. |
No Check Box: The Calculator user will always end up with a Cloud radiator. There is no way to "not include clouds." |
The Fortran executable is giving me a segfault for the new radiator clouds.nc: cmd = export LD_LIBRARY_PATH="/opt/local/lib64:/opt/local/lib:$LD_LIBRARY_PATH"; /home/drews/TUV-x/tuvx-build/tuv-x/build/tuv-x tuvx_config.json Backtrace for this error: Here is a look at the clouds.nc file: Here are the files in case I cannot attach them |
From: Carl Drews [email protected] Matt - Your solution works for clouds.nc. Array dimensions vertical_level and wavelength need to be one element shorter because they refer to levels between the reference markers. Thanks! I will calculate a new height array for clouds.nc, where the values will be the average of the adjacent heights. That new array will be reference array for Top and Base. Carl On Mon, Oct 16, 2023 at 2:44 PM Matthew Dawson <[email protected]> wrote: Yeah, I think I'll try to run in debug mode and with valgrind, if necessary. Hopefully, later today or tomorrow. Yes, we aim for meaningful error messages, but TUV-x is still pretty new so there are probably a lot of corner-case configuration cases that we don't pick up on yet. We can at least make sure this case gets covered when we figure it out. Best, |
Hi @carl-drews - I believe the problem was a bug in musica-core that prevented TUV-x from returning an error message when the array dimensions in the NetCDF file were incorrect. I think if you rebuild TUV-x, and try to run this configuration again you should get an error related to the array dimensions. |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7 +/- ##
=======================================
Coverage ? 77.65%
=======================================
Files ? 109
Lines ? 8638
Branches ? 0
=======================================
Hits ? 6708
Misses ? 1930
Partials ? 0 ☔ View full report in Codecov by Sentry. |
From: Carl Drews [email protected] Matt - Got it! Modify air profile with density 1.1222e+19 at height 7.77 ground 3.66. |
And when the arrays are the correct size, we get TUV-x output: Moving to stage directory /data/TUV-x/stage/20231018-184608--755188/ 0 altitude 7.77000e+00 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error message appears when array sizes are incorrect, and radiation output changes when cloud parameters change.
Adds a radiator type
radiator_from_netcdf_file_t
that loads optical properties for the radiator from a NetCDF file.The updated documentation can be found here: https://ncar.github.io/tuv-x/branch/develop-3-initial-optics/
It includes a new sub-section of Radiator for the new radiator type's configuration.
closes #3