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

New uncertainty characterisation updates #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

garethethomas
Copy link
Collaborator

Added a Ctrl variable for switching between the new measurement uncertainty characterisation (if using the NetCDF LUTs) and the old approach.
Also added deallocation of Sy output arrays, and removed unnecessary scale_factor and offset attributes from integer NetCDF variables.

…erisation (if using the NetCDF LUTs) and the old approach. Also added deallocation of Sy output arrays and removed uncessary scale_factor and offset attributes from integer NetCDF variables.
@garethethomas garethethomas self-assigned this Apr 19, 2024
Copy link
Collaborator

@adamcpovey adamcpovey left a comment

Choose a reason for hiding this comment

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

This compiles and runs without regression on old tables. (I'll check new tables next.) A few notes for our future selves would be helpful.

trim(adjustl(input_num))
input_dummy2='measurement uncertainty in channel no '// &
trim(adjustl(input_num))
input_dummy3='kelvin'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't these just repeat the block immediately before the if?

@@ -1582,8 +1582,6 @@ subroutine def_output_primary(ncid, dim3d_var, output_data, indexing, &
long_name = 'number of retrieval iterations', &
standard_name = '', &
fill_value = byte_fill_value, &
scale_factor = output_data%niter_scale, &
add_offset = output_data%niter_offset, &
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good idea. Should also delete them from the output_data structure.

chan_tmp_real(solar_indices(i)) !** 2
! Ensure SNR is explicitly set to 0 (used to determine if ru2
! should be used in get_measurments)
SAD_Chan(Ctrl%Ind%YSolar(i))%Solar%SNR = 0.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this done on line 1198?

SAD_Chan(ii)%Solar%F0) / Pi
!Lx = (SPixel%Ym(i) * cos(SPixel%Geom%SolZen(j) * d2r) * &
! SAD_Chan(ii)%Solar%F0) / Pi
Lx = (100.0 * SPixel%Ym(i) * SAD_Chan(ii)%Solar%F0) / Pi
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add a comment explaining why we're removing the \cos\theta. We won't remember next time we go to war with The Angles.

@@ -1225,8 +1228,12 @@ subroutine Read_NCDF_SAD_LUT(Ctrl, LUTFilename, SAD_Chan, SAD_LUT)
! Uncertainty = a**2 L**2 + b**2 L + c**2
call ncdf_read_array(fid, "ru"//char(j+96), chan_tmp_real)
do i = 1, Ctrl%Ind%NSolar
! ru values stored in LUT already squared?!
Copy link
Collaborator

Choose a reason for hiding this comment

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

The units in the files agree with you here. I shall check what Don meant.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Don says the values are not squared and so they need to be here.

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.

2 participants