#258 closed defect (fixed)
Error in GO amplitude calculation
Reported by: | Ian Culverwell | Owned by: | Ian Culverwell |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 |
Component: | ropp_pp | Version: | 5.0 |
Keywords: | ropp_pp, amplitude | Cc: |
Description
Michael Gorbunov (Russian Academy of Sciences, Russia) has reported an error in the calculation of refractive amplitude in ropp_pp/preprocess/ropp_pp_amplitude_go.f90:
snr_R(i) = SQRT(ABS( (1.0_wp/(dgns*dleo))* & (1.0_wp - (ps(i)/(rxgns(i)*dgns))*rvgns(i)/vtheta(i) & - (ps(i)/(rxgns(i)*dgns))*rvgns(i)/vtheta(i))* & pv(i)/vtheta(i)))
should be replaced by
snr_R(i) = SQRT(ABS( (1.0_wp/(dgns*dleo))* & (1.0_wp - (ps(i)/(rxgns(i)*dgns))*rvgns(i)/vtheta(i) & - (ps(i)/(rxleo(i)*dleo))*rvleo(i)/vtheta(i))* & pv(i)/vtheta(i)))
Kjartan Kinch (DMI) agrees.
Test this in ROPP6.0.
Attachments (4)
Change history (7)
comment:1 by , 13 years ago
by , 13 years ago
Attachment: | COSMIC.png added |
---|
by , 13 years ago
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
No problems in beta testing, so close ticket.
comment:3 by , 13 years ago
While merging ropp6.0 devts to trunk, I noticed that in fact I'd replaced
snr_R(i) = SQRT(ABS( (1.0_wp/(dgns*dleo))* & (1.0_wp - (ps(i)/(rxgns(i)*dgns))*rvgns(i)/vtheta(i) & - (ps(i)/(rxgns(i)*dgns))*rvgns(i)/vtheta(i))* & pv(i)/vtheta(i)))
by
snr_R(i) = SQRT(ABS( (1.0_wp/(dgns*dleo))* & (1.0_wp - (ps(i)/(rxgns(i)*dgns))*rvgns(i)/vtheta(i) & - (ps(i)/(rxleo(i)*dleo))*rxleo(i)/vtheta(i))* & pv(i)/vtheta(i)))
ie rxleo/vtheta, not rvleo/vtheta. (The former isn't even dimensionally consistent.)
It turns out that this error is a large component of the difference plotted above. When redone properly, we find differences resulting from the bugfix Michael Gorbunov originally wanted, to be:
COSMIC
GRAS
Even smaller differences than before, so safe to put in ROPP6.0 and trunk.
ropp_pp_amplitude_go is called by ropp_pp_preprocess, which is called by ropp_pp_occ_tool, so we should see a difference if we pass the before and after versions of the code through tests 2 (COSMIC) & 3 (GRAS) of t_ropp_pp.sh.
We do - but it's very small. |delta BA| < 1e-8 rad and |delta N| < 1e-5 N-units. (See attached for diff plots.) So it seems safe to commit to ropp6.0 devt branch.