-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
Description
This is a minor issue that doesn't cause any problems in practice right now, but should probably be fixed to avoid creating problems in the future.
The logic for ctl%rof_from_glc is:
MOSART/src/cpl/nuopc/rof_import_export.F90
Lines 231 to 235 in bd5c270
| if (fldchk(importState, 'Fgrg_rofl') .and. fldchk(importState, 'Fgrg_rofl')) then | |
| ctl%rof_from_glc = .true. | |
| else | |
| ctl%rof_from_glc = .false. | |
| end if |
Note the duplication of Fgrg_rofl as opposed to Fgrg_rofi.
I think the right logic here is something like:
if (fldchk(importState, 'Fgrg_rofl') .and. fldchk(importState, 'Fgrg_rofi')) then
ctl%rof_from_glc = .true.
else if (fldchk(importState, 'Fgrg_rofl') .or. fldchk(importState, 'Fgrg_rofi')) then
! ABORT WITH AN ERROR: I think it should never be the case that one of these fields is present but not the other; I think if it could be the case, some other code may need to be generalized to allow for this possibility
else
ctl%rof_from_glc = .false.
end ifBut I'd like a second set of eyes on that to make sure it looks right.
Tagging @olyson who rediscovered this issue that I had mentioned as a side note in #103 (comment) but never followed up on. And tagging @ekluzek or @slevis-lmwg , who were involved in that earlier discussion.