ORAC-CC / orac

Optimal Retrieval of Aerosol and Cloud
GNU General Public License v3.0
30 stars 19 forks source link

Update new LUT netcdf reader and add functionality for varying NEBT/NEFR uncertainty with measurements #61

Closed andyprata closed 2 years ago

andyprata commented 2 years ago

This PR essentially fixes a few bugs in the netcdf LUT reader and adds functionality for varying NEBT/NEFR uncertainty with the measurements. The following should also be noted:

  1. Homog and Coreg are not provided in the newluts and so are hard-coded when newluts are selected - this is a step toward separating forward model uncertainty and measurement uncertainty. When using the old LUTs they are read in from the SAD files as before.
  2. Gains are currently hard-coded (see L177-L181 in get_measurements.F90). The gains should be read in from the level 1 headers, but this requires some discussion before implementing.
  3. Don's new approximation for F0 variation is used when using newluts because F1 is not supplied in the newluts for solar channels (this is done in read_msi.F90).
  4. I have not added the ability to select old LUT sad values from new LUT netcdfs, but we can do this for backward compatibility.
  5. Bug in locate.F90 is not fixed in this PR, but will be taken care of when we merge to master as Adam has already fixed it on master.
simonrp84 commented 2 years ago

Have tested and this PR does indeed sit on top of @adamcpovey's PR without needing to pull that one individually. Therefore, I suggest merging this with Adam's PR now and then working from that. Do you agree, @adamcpovey and @andyprata? If so, please do the merge. We can then work on Adam's pull request alone to iron out any bugs before we merge it into master.