kconnour / pyRT_DISORT

A Python package for helping to compute input arrays to DISORT.
https://kconnour.github.io/pyRT_DISORT/
BSD 3-Clause "New" or "Revised" License
15 stars 5 forks source link

0th moment of PMOM fails to reset to 1 #12

Closed kconnour closed 2 years ago

kconnour commented 3 years ago

Bug description

In short, the behavior of DISORT described in its documentation is wrong.

If TabularLegendreCoefficients is used as intended (i.e. where the 0th coefficient of the input Legendre decomposition is set to 1) then the 0th coefficients along this axis should always be unchanged and thus 1. If they are not initially set to 1, they won't be 1 after this class runs (which is expected). If they are not set to 1 when calling disort.disort(), DISORT does not set them to 1 like the documentation describes. Instead, it simply errors out.

Minimal working example

A small example cannot easily be created...

Expected behavior

DISORT says

The K = 0 coefficient should be unity (it will be reset to unity in any case)

so they should be reset. Instead I get this message:

 ****  Input variable  PMOM  in error  ****
 ****  Input variable  PMOM  in error  ****
 ****  Input variable  PMOM  in error  ****
 ****  Input variable  PMOM  in error  ****
 ****  Input variable  PMOM  in error  ****
 ****  Input variable  PMOM  in error  ****
 ****  Input variable  PMOM  in error  ****
 ****  Input variable  PMOM  in error  ****
 ****  Input variable  PMOM  in error  ****
 ****  Input variable  PMOM  in error  ****

So I guess I should include some sort of PMOM checker to ensure everything looks good before calling disort.disort(). In truth this variable is the trickiest to create, so it needs reworked anyway.

Screenshots

No response

Operating system

Ubuntu 20.10

Python version

3.9.6

Priority

Very low

Further information

No response

kconnour commented 2 years ago

Ultimately I will probably not be validating every input, but rather creating creating valid inputs. Therefore I think this is ultimately not my job to address.