Opened 11 years ago
Closed 11 years ago
#363 closed defect (fixed)
Why is azimuth changed by ropp_1dvar_bangle_add_error?
Reported by: | Ian Culverwell | Owned by: | Ian Culverwell |
---|---|---|---|
Priority: | normal | Milestone: | 8.0 |
Component: | ropp_1dvar | Version: | 7.1 |
Keywords: | Cc: |
Description
ropp_1dvar_add_bangle_error -Omod EC temp1.nc -o temp2.nc
produces
ncks -H -vazimuth temp1.nc dim_unlim[0] azimuth[0]=206.688 idculv@eld037:> ncks -H -vazimuth temp2.nc dim_unlim[0] azimuth[0]=3.60738 idculv@eld037:> ncdump -h temp1.nc |grep azimu float azimuth(dim_unlim) ; azimuth:long_name = "GNSS->LEO line of sight angle (from True North) for the reference coordinate" ; azimuth:units = "degrees_T" ; azimuth:valid_range = 0., 360. ; float azimuth_tp(dim_unlim, dim_lev1b) ; azimuth_tp:long_name = "GNSS->LEO line of sight angles (from True North) for tangent points" ; azimuth_tp:units = "degrees" ; azimuth_tp:valid_range = 0., 360. ; idculv@eld037:> ncdump -h temp2.nc |grep azimu float azimuth(dim_unlim) ; azimuth:long_name = "GNSS->LEO line of sight angle (from True North) for the reference coordinate" ; azimuth:units = "degrees_T" ; azimuth:valid_range = 0., 6.28318530717959 ; float azimuth_tp(dim_unlim, dim_lev1b) ; azimuth_tp:long_name = "GNSS->LEO line of sight angles (from True North) for tangent points" ; azimuth_tp:units = "degrees" ; azimuth_tp:valid_range = 0., 360. ;
So it's changed the units from deg to rad, but kept the units attribute as "degrees_T".
Range-checking is off by default.
(Azimuth_tp is - correctly - unchanged, however.)
Attachments (5)
Change history (18)
comment:1 by , 11 years ago
by , 11 years ago
by , 11 years ago
by , 11 years ago
comment:2 by , 11 years ago
Note that the same thing happens with ropp_1dvar_add_refrac_error, so that
ropp_1dvar_add_refrac_error -Omod 3% temp2.nc -o temp3.nc
results in
idculv@eld037:> ncks -H -vazimuth temp3.nc dim_unlim[0] azimuth[0]=0.0629606 idculv@eld037:> ncdump -h temp3.nc |grep azi float azimuth(dim_unlim) ; azimuth:long_name = "GNSS->LEO line of sight angle (from True North) for the reference coordinate" ; azimuth:units = "degrees_T" ; azimuth:valid_range = 0., 0.109662271123215 ; float azimuth_tp(dim_unlim, dim_lev1b) ; azimuth_tp:long_name = "GNSS->LEO line of sight angles (from True North) for tangent points" ; azimuth_tp:units = "degrees" ; azimuth_tp:valid_range = 0., 360. ;
Note that the "valid_range" has also been multiplied by 2pi/360.
(Azimuth_tp is again OK.)
comment:3 by , 11 years ago
ropp_1dvar_add_bangle_error also says, erroneously,
INFO (from ropp_1dvar_add_bangle_error): Writing updated ob errors to ropp_add_bangle.nc
if you're overwriting the input file.
Similarly for ropp_1dvar_add_refrac_error.f90 and ropp_1dvar_add_bgr_error.f90.
comment:4 by , 11 years ago
And ropp_1dvar_bangle_add_error -Omod MO fails completely:
idculv@eld037:> ../exec/ropp_1dvar_add_bangle_error -Omod MO temp1.nc -o temp2.nc --------------------------------------------------------------------- ROPP 1DVar: Add bending angle observation errors - v7.1 31-Dec-2013 --------------------------------------------------------------------- INFO (from ropp_1dvar_add_bangle_error): Reading observation file temp1.nc INFO (from ropp_1dvar_add_bangle_error): Processing profile 1 of 1 INFO (from ropp_1dvar_add_bangle_error): (OC_20121001000031_C001_G028_UCAR) INFO (from ropp_1dvar_add_bangle_error): Writing updated ob errors to temp2.nc Remaining memory: 24 bytes at 000000000165cfc8 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001652b98 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001652288 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001651888 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 00000000016513d8 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001650618 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 00000000016505c8 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 00000000016504c8 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 000000000164fb68 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 000000000164fb18 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001650428 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 000000000164fbb8 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001650478 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001650ac8 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 00000000016506b8 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001650668 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 00000000016508e8 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001650708 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001650898 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 00000000016507f8 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001650758 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 00000000016507a8 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001650848 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001650a78 allocated at line 42 of ../arrays/where.f90 Remaining memory: 24 bytes at 0000000001650a28 allocated at line 42 of ../arrays/where.f90 ... More segments remain
The resulting bangle_sigmas are 10 rad, or 6 murad where bangle=ropp_MDFV.
comment:5 by , 11 years ago
Might have to postpone this one - I can't see why azimuth and azimuth_tp are being handled differently. And I don't know why the units are being reset to "degrees_T" after the value and range have been rescaled.
comment:6 by , 11 years ago
The first two points are addressed by changing
CASE('deg','degree','degrees')
to
CASE('deg','degree','degrees', 'degree_t', 'degrees_t')
at line 309 of ropp_unit_conversion.f90, as in r4187.
comment:7 by , 11 years ago
Doing this results in:
ncks -H -vazimuth temp1.nc dim_unlim[0] azimuth[0]=206.688 ncks -H -vazimuth temp2.nc dim_unlim[0] azimuth[0]=206.688 ncks -H -vazimuth temp3.nc dim_unlim[0] azimuth[0]=206.688 ncks -H -ddim_lev1b,49 -vazimuth_tp temp1.nc dim_unlim[0] dim_lev1b[49] azimuth_tp[49]=208.762 ncks -H -ddim_lev1b,49 -vazimuth_tp temp2.nc dim_unlim[0] dim_lev1b[49] azimuth_tp[49]=208.762 ncks -H -ddim_lev1b,49 -vazimuth_tp temp3.nc dim_unlim[0] dim_lev1b[49] azimuth_tp[49]=208.762 ncdump -h temp1.nc |grep azi float azimuth(dim_unlim) ; azimuth:long_name = "GNSS->LEO line of sight angle (from True North) for the reference coordinate" ; azimuth:units = "degrees" ; azimuth:valid_range = 0., 360. ; float azimuth_tp(dim_unlim, dim_lev1b) ; azimuth_tp:long_name = "GNSS->LEO line of sight angles (from True North) for tangent points" ; azimuth_tp:units = "degrees" ; azimuth_tp:valid_range = 0., 360. ; :history = "Tue May 13 15:27:09 2014: /project/ukmo/rhel6/nco/bin/ncatted -aunits,azimuth,o,c,degrees temp1.nc" ; ncdump -h temp2.nc |grep azi float azimuth(dim_unlim) ; azimuth:long_name = "GNSS->LEO line of sight angle (from True North) for the reference coordinate" ; azimuth:units = "degrees_T" ; azimuth:valid_range = 0., 360. ; float azimuth_tp(dim_unlim, dim_lev1b) ; azimuth_tp:long_name = "GNSS->LEO line of sight angles (from True North) for tangent points" ; azimuth_tp:units = "degrees" ; azimuth_tp:valid_range = 0., 360. ; ncdump -h temp3.nc |grep azi float azimuth(dim_unlim) ; azimuth:long_name = "GNSS->LEO line of sight angle (from True North) for the reference coordinate" ; azimuth:units = "degrees_T" ; azimuth:valid_range = 0., 360. ; float azimuth_tp(dim_unlim, dim_lev1b) ; azimuth_tp:long_name = "GNSS->LEO line of sight angles (from True North) for tangent points" ; azimuth_tp:units = "degrees" ; azimuth_tp:valid_range = 0., 360. ;
comment:9 by , 11 years ago
comment:10 by , 11 years ago
Also take the opportunity to clean up the other algorithms, by use of the
idx => WHERE((ro_data%lev1b%bangle > ropp_MDTV) .AND. & (ro_data%lev1b%impact > ropp_MDTV), nidx) IF (nidx <= 0) & CALL message (msg_fatal, 'No non-missing (bangle, impact) pairs')
construction, to handle missing data better.
Tidy up ropp_1dvar_add_refrac_error and (mariginally) ropp_1dvar_add_bgr_error while we're about it.
comment:11 by , 11 years ago
Note that, serendipitously, the same point about impact height vs impact params was raised by Joe on behalf of Bai at the ROM SAF PT 14 meeting in May 2014.
(I don't know how it ever worked with this bug. I suppose the algorithm only generates fractional errors, between 0 and 1, and these are multiplied by the bending angles, and are then top'n'tailed, so perhaps the resulting sigmas didn't look too bad.)
Note that the same thing happens with ropp_1dvar_add_refrac_error, so that
results in
Note that the "valid_range" has also been multiplied by 2pi/360.
(Azimuth_tp is again OK.)