-
Notifications
You must be signed in to change notification settings - Fork 20
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
base: master
Are you sure you want to change the base?
Conversation
…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.
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.
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' |
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.
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, & |
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.
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 |
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.
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 |
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.
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?! |
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.
The units in the files agree with you here. I shall check what Don meant.
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.
Don says the values are not squared and so they need to be here.
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.