RFM v4 Bugs

Report any bugs to anu.dudhia@physics.ox.ac.uk

Bug-Finder Hall of Fame (excluding myself since I have an unfair advantage)

  1. Victoria Jay (8)
  2. Jolyon Reburn (6)
  3. Sam Illingworth (5)
  4. Daniel Gerber (4)
  5. Tony Vincent (4)
  6. Richard Siddans (3)
  7. Giada Innocenti (3)
  8. Luis Millan-Valle (3)
  9. Alison Waterfall (3)
  10. Alastair Burgess (3)
  11. Alex Hoffmann (2)
  12. Bianca Dinelli (2)
  13. Harjinder Sembhi (2)
  14. Yuna Hattori (2)
  15. Miguel Lopez-Valverde (2)
  16. Chiara Piccolo (2)
  17. Vivienne Payne (2)
  18. Igor Ptashnik (2)
  19. Steve Bass (2)
  20. Niels Bormann (2)
  21. Javier Martin-Torres (2)
  22. Gonzalo Gonzalez-Abad (1)
  23. Aaron Wu (1)
  24. David Moore (1)
  25. Cat Hayer (1)
  26. Jorn Ungermann (1)
  27. Alan Vance (1)
  28. Damien Lafont (1)
  29. Elisa Carboni (1)
  30. Claire Waymark (1)
  31. Owen Embury (1)
  32. Damien Weidmann (1)
  33. Aleks Milyakov (1)
  34. Randall Skelton (1)
  35. Tim Nightingale (1)
  36. Clive Rodgers (1)
  37. James Watts (1)
  38. Joanna Haigh (1)
  39. Bob Wells (1)

Where the bug can be corrected by simply downloading a modified subroutine (or subroutines) and recompiling, the necessary modules are listed as Patch.

Bug#129
Reported: 29-AUG-17
Affects: RFM v4.35 - v4.36
Symptom: Some irregular grid points dropped when specifying grids via *SPC section
Reason: Some irregular grid points 'fall into cracks' between highest expected nominal highest regular grid point and upper edge of each widemesh interval.
Patch: [reaspc.for] [rfmgrd.for]
Fix:

Bug#128
Reported: 12-JUN-17
Affects: RFM versions up to v4.35
Symptom: Error in computing 'off-diagonal' elements for MTX outputs - spectra mis-labelled.
Reason: Combination of output/secondary levels in opening files was inconsistent with allocation of array elements.
Patch: [flxpth.for]
Fix: v4.36

Bug#127
Reported: 27-MAR-17
Affects: RFM versions v4.33- v4.35
Symptom: Array bound error if using 2D atmosphere (GRA flag) with just a single profile location, and compiled with array-bound checking.
Reason: Error in coding
Patch: [idxint.for]
Fix: v4.36

Bug#126
Reported: 23-MAR-17 (Daniel Gerber, RAL)
Affects: RFM version v4.35
Symptom: Error reading spectral grid input file, message of type
F-REAGRD: Unrecognised interpolation method=-71
Reason: The RFM accepts two different ways of specifying an irregular grid: either as a spectral file or as a (MIPAS-specific) .grd file. Its first guess depends on whether or not the filename has the string ".grd" in it: if it does it initially assumes it might be a .grd file. The problem was that if spectral file also contained the ".grd" character string the RFM could not always distinguish between the two. An extra check has now been added.
Patch: [spcrng.for]
Fix: v4.36

Bug#125
Reported: 10-MAR-17
Affects: RFM version v4.35
Symptom: Infinite loop or stops with read error
F-REASPC: I/O error reading file, IOSTAT= 5001
when using irregular spectral grid output
Reason: Coding errors in new routines for reading irregular spectral grid from files
Patch: [reaspc.for] [spcfil.for]
Fix: v4.36

Bug#124
Reported: 07-MAR-17
Affects: RFM versions v4.31- v4.35
Symptom: Stops with error
F-INPNAM: Logical Error - unrecognised TYP
when creating Cooling Rate spectra using the COO Flag.
Reason: 'COO' omitted from list of recognised output types in subroutine inpnam.for
Patch: [inpnam.for]
Fix: v4.36

Bug#123
Reported: 15-JAN-17
Affects: All versions from RFM v4.25- v4.35
Symptom: Array bound error when using LEV Flag with certain compilers (eg gfortran)
Reason: Attempt to access 0 element of array when testing value of first level against previously input levels (of which there are none).
Patch: [levchk.for]
Fix: v4.36

Bug#122
Reported: 15-JAN-17
Affects: RFM v4.35 (and possibly earlier versions)
Symptom: Array bound error or just incorrect results when using ZEN Flag with outputs calculated from levels other than the surface
Reason: Path segments only defined for required layers but CG calculations performed for all atmospheric layers.
Patch: [rfmnad.for]
Fix: v4.36

Bug#121
Reported: 05-JAN-17
Affects: RFM v4.33-v4.35
Symptom: Fatal error message
F-ATMCHK: PRE profile doesn't decrease monotonically
when LAY Flag enabled.
Reason: Incorrect assigment of altitudes when LAY flag is implemented, causing new altitude grid to have repeated altitudes so pressure profile ends up with identical values at consecutive profile levels.
Patch: [atmlay.for]
Fix: v4.36

Bug#120
Reported: 06-SEP-16 (Alex Hoffmann, RAL)
Affects: All versions up to RFM v4.35
Symptom: 'Nan' values in output spectra if using ILS Flag.
Reason: When the user-supplied Instrument Line Shape (ILS) is resampled to the internal fine grid, there was no check whether the sampled ILS points were all zero, which causes a divide-by-zero error when renormalising the ILS function on the fine grid.
Patch: [ilsint.for]
Fix: v4.36

Bug#119
Reported: 05-JUL-16 (Bianca Dinelli, ISAC)
Affects: RFM v4.34- v4.35
Symptom: Absorption spectra of COCl2 and C3H8 too small by a factor of order of 2
Reason: Module tpsdat.inc contains incorrectly calculated TIPS values for these molecules - these act as a temperature-dependent scaling factor for line-strengths
Patch: [tpsdat.inc]
Fix: v4.36

Bug#118
Reported: 06-JUN-16 (Aaron Wu)
Affects: RFM v4.31- v4.32
Symptom: Using NTE Flag, RFM stops with fatal error message
F-KEYCHK: *NTE section missing from Driver File
even though the *NTE section is present.
Reason: Subroutine KEYCHK failed to account properly for the fact the the *NTE section can sometimes be mandatory and sometimes optional.
Fix: v4.33

Bug#117
Reported: 03-JUN-16 (Alex Hoffmann, RAL)
Affects: RFM v4.34- v4.35
Symptom: RFM stops with fatal error message, eg
F-CHKLIM: Elev.Ang=60.0 [deg] has geom.tan.pt. < atmos., alt=-3.17E+03 [km]
when used in limb-viewing mode with line-of-sight specified as an upward (+ve) elevation angle
Reason: Rewrite of module CHKLIM accidentally introduced check that should have been omitted for upward viewing.
Patch: [chklim.for]
Fix: v4.36

Bug#116
Reported: 01-MAY-16
Affects: RFM v4.32- v4.34
Symptom: Discontinuity in radiance spectra using multiple x/s datasets
Reason: Array indexing error when exchanging datasets within memory
Patch: [rfmxsc.for]
Fix: v4.35

Bug#115
Reported: 15-APR-16
Affects: RFM v4.32- v4.34
Symptom: Garbage in rfm.runlog file using x/s data following string
I-XSCFIL: Using x/s data:
Reason: No data string defined. Now replaced with spectral range from file.
Patch: [xscfil.for]
Fix: v4.35

Bug#114
Reported: 15-APR-16 (David Moore, U.Leicester)
Affects: RFM v4.33- v4.34
Symptom: Problems using '*' character in *GAS section of driver table
Reason: Uninitialised variable IQAL associated with wildcard.
Patch: [inpgas.for]
Fix: v4.35

Bug#113
Reported: 22-JAN-16 (Bianca Dinelli, ISAC)
Affects: RFM v4.30- v4.31
Symptom: Various fatal error reports with HCFC-21 and/or CFC-11 if using f21.xsc file containing old RFM index (55)
Reason: Function idgnew.for should have converted the old index (55) to the new index (121) but, due to a typing error, converted it to index 111 (the same as for CFC-11).
Patch: [idgnew.for]
Fix: v4.32

Bug#112
Reported: 11-AUG-15
Affects: all versions up to RFM v4.33
Symptom: 'NaN' values in output spectra when calculating spectra with NO and high altitude atmospheres, HITRAN2012 and subsequent.
Reason: Subroutine adjust.for converts line strengths including the Boltzmann factor
SB = exp ( c2 ELS [ 1/Tref - 1/T ] )
where c2 is the second radiation constant (1.44 K/cm-1). ELS is the lower state energy [cm-1] (taken from the HITRAN data), Tref is the reference temperature (296 K) and T is the local atmospheric temperature. Usually the ELS is a few hundred cm-1 but in HITRAN 2012 there are a number of very weak NO lines throughout the mid-IR with ELS > 20 000 cm-1. A local temperature T=220 K results in [ 1/Tref - 1/T ] ~ -0.001, which keeps the exponent argument a sensible size (~ -30) but in the upper thermosphere, temperatures of 1000 K are possible, giving a large positive argument (>+80) which means that SB cannot be expressed as single precision. The solution is to perform the calculation at double precision and include some other scaling terms before attempting to convert to single precision line strength.
Patch: [adjust.for]
Fix: v4.34

Bug#111
Reported: 30-JUL-15
Affects: all versions up to RFM v4.33
Symptom: 'HDO' and 'CH3D' specified in *GAS section or .atm file not equivalent to entries 'H2O(4)' or 'CH4(3)'.
Reason: Subroutine chkgas.for takes these entries as input and correctly assigns HITRAN molecule ID and isotopic ID, but failed to convert string containing molecule name, so RFM continued to use, eg 'HDO' as the molecule name.
Patch: [chkgas.for]
Fix: v4.34

Bug#110
Reported: 28-JUL-15
Affects: RFM v4.33
Symptom: RFM stops with message
F-RFMXSC: Logical error#1
when used with 2 or more .xsc files
Reason: Subroutine xscfil.for examines the header record from all the datasets specified .xsc files in then *XSC section and puts them in order of increasing wavenumber. However there was an error reassigning one of the indices, resulting in the program attempting to access the incorrect dataset. The logical error occurs when this non-existent dataset is larger than the number of datasets within a file.
Patch: [xscfil.for]
Fix: v4.34

Bug#109
Reported: 14-JUL-15 (Richard Siddans, RAL)
Affects: RFM v4.33
Symptom: RFM hangs during reading *ATM section of driver table if an .atm file is not properly terminated with an *END label.
Reason: Subroutine nxtlab.for reads records from .atm file until the next record starting with '*' character is found (a 'label'). It traps I/O errors during read but reaching the end of the file does not register as an I/O error ('ERR=' option in the FORTRAN READ statement), so gets stuck in an infinite DO ... WHILE loop.
Patch: [nxtlab.for]
Fix: v4.34

Bug#108
Reported: 13-JUL-15
Affects: all versions up to v4.33
Symptom: Warning messages about -ve temperatures printed to screen during run, eg
W-QTFCT: Extrap.beyond 70-1500K limits, T= -133.5273
when run in NAD/ZEN mode, probably with a finely spaced tropospheric grid and ozone profile. Also shows up as a -ve Curtis-Godson temperature in the PTH diagnostics.
Reason: Singularity in analytic expression for Curtis-Godson Temperature when VMR increases with altitude at almost exactly the same rate that pressure decreases (most likely to occur with tropospheric ozone). The subroutine rfmnad.for already tested for this but it seems that the test wasn't stringent enough.
Patch: [rfmnad.for]
Fix: v4.34

Bug#107
Reported: 13-JUL-15
Affects: RFM v4.33
Symptom: RFM stops with message
STOP F-LUTTAB: Logical error#1 statement executed
when run with LUT flag and isotopic Jacobians specified in the *JAC section and the *JAC appears before the *LUT section in the driver table.
Reason: If no isotopic profiles are specified in the *ATM section, the RFM reads the LUT files assuming that all molecules are undifferentiated isotopically, and assigns LUT files accordingly. If, in the subsequent *JAC section, a molecular isotopologue is specified, the RFM then relabels the molecule as being differentiated isotopically, but the previously assigned LUTs are no longer applicable, hence the error message.

There are a number of other issues associated with LUTs and isotopic profiles which will be sorted in the next release.

Patch: No simple patch, but the easiest fix with RFM v4.33 is to ensure that the *JAC section of the driver table comes before the *LUT section
Fix: v4.34

Bug#106
Reported: 10-JUL-15
Affects: RFM v4.33
Symptom: RFM crashes (with some compilers, but not ifort) if PTH flag selected (path diagnostics) before start of widemesh calculation.
Reason: Subroutine rfmpth.for uses character function c9flt.for directly in WRITE statement, e.g,
RVAL = 1.0
WRITE (*,*) C9FLT(RVAL)
This seems to cause a problem with some compilers, but writing it first into a separate character variable seems to get around the problem
RVAL = 1.0
CSTR = C9FLT(RVAL)
WRITE (*,*) CSTR
Similar problems affect the construction of error messages in chkprf.for and jacchk.for
Patch: [rfmpth.for] [chkprf.for] [jacchk.for]
Fix: v4.34

Bug#105
Reported: 30-JUN-15 (Cat Hayer)
Affects: RFM all versions up to v4.33
Symptom: RFM crashes (with some compilers, eg ifort) in ZEN or NAD mode (plane parallel atmospheres) during wide or fine mesh calculation. Also path diagnostics (created with NAD Flag) show 'NaN' for some entries.
Reason: Plane parallel atmospheres use analytical expressions to calculate the Curtis-Godson equivalent path temperatures and pressures. These can give 'NaN' values for small VMRs in subroutine rfmnad.for and not all cases were being checked.
Patch: [rfmnad.for]
Fix: v4.34

Bug#104
Reported: 24-JUN-15
Affects: RFM all versions up to v4.33
Symptom: RFM crashes (with some compilers, eg ifort) while *DIM section of driver table being read in.
Reason: Overflow beyond 80 characters in subroutine tabpth.for when constructing error message that MAXCLC array size is exceeded (on other compilers, the RFM stops with the fatal error message printed as normal, but the message itself is simply truncated to 80 characters).
Patch: [tabpth.for]
Fix: v4.34

Bug#103
Reported: 18-JUN-15
Affects: RFM all versions up to v4.33
Symptom: RFM crashes (with some compilers, eg ifort) after driver table read in but before Widemesh calculation when FIN flag is used to adjust fine grid spacing
Reason: Overflow beyond 80 characters in subroutine finchk.for when constructing error message that MAXFIN array size is exceeded (on other compilers, the RFM stops with the fatal error message printed as normal, but the message itself is simply truncated to 80 characters).
Patch: [finchk.for]
Fix: v4.34

Bug#102
Reported: 28-APR-15 (Tony Vincent)
Affects: RFM all versions up to v4.33
Symptom: Incorrect Curtis-Godson pressure (and therefore radiances etc) using NAD or ZEN flags for specific (and rare) case of a layer where the ratio of VMR values at adjacent profile levels is almost exactly equal to the inverse square of the ratio of pressure values (ie profile VMR increases with altitude as the square of the rate with which pressure decreases)
Reason: Subroutine rfmnad.for correctly identifies divide-by-zero risk in standard analytic expression for Curtis-Godson pressure, but there was an error in the implementation of the alternative expression (specifically: failing to divide by the absorber amount in the layer).
Patch: [rfmnad.for]
Fix: v4.34

Bug#101
Reported: 22-APR-15 (Tony Vincent)
Affects: RFM v4.32 - v4.33
Symptom: Incorrect radiances using LUT input files with a relative temperature axis (see Note 6 in *DIM section)
Reason: Subroutine lutpth.for applying incorrect interpolation in temperature axis when relative temperatures are used.
Patch: [lutpth.for]
Fix: v4.34

Bug#100
Reported: 09-APR-15 (Tony Vincent)
Affects: RFM v4.32 - v4.33
Symptom: Unpredictable results if using large LUT input files.
Reason: Subroutine lutfil.for checks if array dimension MAXLUX is exceeded, but fails to return error condition if this occurs.
Patch: [lutfil.for]
Fix: v4.34

Bug#99
Reported: 07-APR-15 (Giada Innocenti, U.Bologna)
Affects: RFM v4.33
Symptom: RFM stops with error message
F-VALATM: Logical error#1
when used with the FOV flag, or with the OBS flag and the Observer above the top of the atmosphere.
Reason: Subroutine tanchk.for uses tangent height above top-of-atmosphere to ensure initial refractive index = 0.0, but new version of routine valatm.for only allows for altitudes within range of atmospheric height profile.
Patch: [tanitr.for]
Fix: v4.34

Bug#98
Reported: 12-MAR-15 (Giada Innocenti, U.Bologna)
Affects: probably all versions up to v4.32
Symptom: Incorrect Jacobian spectra where both column Jacobians selected and LUN flag enabled
Reason: Subroutine inpjac.for incorrectly creating 2 Jacobian spectra instead of one for column perturbations, but only seems to cause a problem when using the LUN flag since the RFM gets confused with the output spectra.
Patch: [inpjac.for]
Fix: v4.33

Bug#97
Reported: 04-MAR-15 (Giada Innocenti, U.Bologna)
Affects: v4.31 and v4.32
Symptom: Segmentation fault after start of Fine Mesh calculation with output spectra calculated on grid finer than 0.0005 cm-1
Reason Subroutine finchk.for fails to correctly check whether number of fine grid points within widemesh interval is within array bound MAXFIN in rfmsiz.inc
Patch: [finchk.for]
Fix: v4.33

Bug#96
Reported: 11-DEC-14
Affects: all versions from v4.27 onwards
Symptom: Occasional error in spectra produced by a combination of ILS and GRD options with certain compilers (eg ifort).
Reason: Subroutine rfmspc.for introduces an offset WNDFIN to allow for any spectral offset (smaller than the fine grid spacing of nominally 0.0005cm-1) between the output grid and the internal fine grid which always starts at integer wavenumber values. Usually this is zero. However the offset is calculated using the MOD function so numerical errors can return a value just smaller than the fine grid spacing, effectively moving the fine grid one point right.
Patch: [rfmspc.for]
Fix: v4.33

Bug#95
Reported: 10-DEC-14
Affects: all previous versions
Symptom: Small error in calculation of Chi-Factor for CO2 lineshapes when using the SHP flag.
Reason: Chi-factors are tabulated in 0.5cm-1 increments. Code was using wrong interval but (correctly) extrapolating, rather than interpolating in correct interval. So the error is proportional to the (small) change in gradient of Chi-factor in 0.5cm-1 interval.
Patch: [chico2.for]
Fix: v4.33

Bug#94
Reported: 24-SEP-14
Affects: RFM v4.32
Symptom: Using TAB flag creates look-up files with (old, pre RFMv4.32) absorption coefficient k in units of m2/mole rather than m2/kmole. No error actually results if these files are used with the RFM since the input, using the LUT flag also assumes old units of moles/m2. However there is a factor 1000 difference in the tabulated values which could cause problems if read by any other program
Reason: Old conversion factor 1E7 used instead of correct value 1E4 when converting from RFM internal units [kmol/cm2] to TAB units [kmol/m2]
Patch: [tabpth.for] [rfmlut.for]
Fix: v4.33

Bug#93
Reported: 03-SEP-14
Affects: RFM v4.30-v4.32
Symptom: Using V42 flag does not result in reversion of N2O5 spectra to RFM v4.2
Reason: Incorrect index used when checking for N2O5 molecule in conjunction with V42 flag being enabled to call QTINT for temperature extrapolation beyond tabulated range.
Patch: [rfmxsc.for]
Fix: v4.33

Bug#92
Reported: 22-JUL-14 (Yuna Hattori)
Affects: RFM v4.30-v4.32
Symptom: Incomplete error message 'F-FILXFL: No.X/S data pts = ... > MAXXSP' or general error on internal I/O (depending on compiler)
Reason: When detecting that the number of spectral points in a .xsc file (molecular cross-section data) is larger than the MAXXSP parameter in rfmsiz.inc there is a code formatting error in constructing the error message.
Patch: [filxfl.for]
Fix: v4.33

Bug#91
Reported: 22-JUL-14 (Yuna Hattori)
Affects: All versions up to and including RFM v4.32
Symptom: Error message
'F-XFLHDR: Unexpected record in file, not RFM header'
Reason: When reading .xsc files (molecular cross-section data) with more than 106 spectral points (e.g. CH3CHO) header cannot be read with free-format since there is no longer any space between this field and the preceding.
Patch: [xflhdr.for]
Fix: v4.33

Bug#90
Reported: 31-JAN-14 (Sam Illingworth, Manchester)
Affects: RFM v4.30, v4.31
Symptom: Error message 'F-GASQAL' ... 'repeated isotope'
Reason: When adding isotopogue selection to molecule names in the *GAS section (eg CH4(1) ) subroutine gaschk adds the same isotopologue string again ( CH4(1)(1) ) causing the resulting error message when these contents are checked.
Fix: v4.32

Bug#89
Reported: 31-JAN-14 (Jorn Ungermann, FzJ)
Affects: RFM v4.30, v4.31
Symptom: Incorrect TIPS functions for C4H2 and SO3
Reason: Subroutine qtfct had incorrect index for identifying SO3 - used 43 (C4H2) instead of 47.
Fix: v4.32

Bug#88
Reported: 30-JAN-14 (Dan Gerber, RAL)
Affects: RFM v4.31
Symptom: RFM ignores altitudes in file in *JAC section of driver table if file contains records longer than 80 characters
Reason: Subroutine inpjac fails to trap fatal error condition that occurs if characters beyond 80 are in file record.
Fix: v4.32

Bug#87
Reported: 13-JAN-14 (Dan Gerber, RAL)
Affects: RFM v4.30
Symptom: RFM stops with error message:
F-GASISO: No weight defined for gas,iso so2 , 5
when SO2 is selected as an absorber
Reason: Subroutine gasiso initialised with incorrect number of SO2 isotopologues in array NISHIT (was 9, should be 4).
Fix: v4.31

Bug#86
Reported: 24-OCT-13
Affects: All versions up to and including v4.30
Symptom: (compiler-dependent) RFM crashes with segmentation fault in cases where HITRAN data contains unrecognised isotopologue# for a particular molecule.
Reason: Subroutine reahit attempts to access undefined array element in SHPGAS corresponding to isotopologue#
Fix: v4.31

Bug#85
Reported: 24-OCT-13
Affects: All versions up to and including v4.30
Symptom: (compiler-dependent) RFM crashes with segmentation fault in cases where limb-viewing tangent height matches top level of atmospheric profile (eg 120km)
Reason: Floating zero-divide in ray-tracing rfmray.for leads to path segment temperature = NaN
Fix: v4.31

Bug#84
Reported: 07-OCT-13 (Sam Illingworth, Manchester)
Affects: Versions: v4.30
Symptom: Entering '*' in *GAS section can result in no absorbers being selected.
Reason: Failed to save IMIN variable in subroutine gasall.for so value gets randomised between calls.
Fix: v4.31

Bug#83
Reported: 06-OCT-13
Affects: Versions: all versions to date
Symptom: Sometimes filenames entered in *TAN, *LEV or *JAC sections interpreted as '0.0' rather than being opened and the internal values read.
Reason: Gnu F77 compiler reads strings starting with "./" as a legitimate '0.0' value, so filenames themselves can be interpreted as '0.0' rather than being identified as a filename and having their contents extracted.
Fix: v4.31

Bug#82
Reported: 05-SEP-13 (Sam Illingworth, Manchester)
Affects: Versions: all versions to date
Symptom: -ve values on input VMR profiles in user-supplied .atm files being rounded up to zero rather than reported as fatal error
Reason: -ve value test was only applied after profiles were interpolated to altitude grid, how interpolation module itself (for log(VMR)) rounded up all negative or zero values to a small positive number before interpolating.
Fix: v4.31

Bug#81
Reported: 28-NOV-12 (Sam Illingworth, Manchester)
Affects: Versions all versions to date
Symptom: Missing checks on profile values in user-supplied .atm files
Reason: Logical error in module atmchk.for
Fix: v4.29

Bug#80
Reported: 04-AUG-11 (Miguel Lopez-Valverde, IAA)
Affects: Versions all versions to date
Symptom: Possible run-time check failure (depending on compiler) due to using uninitialised variable NSEG2 in rfmpth.for when PTH Flag is enabled. nomenclature
Reason: NSEG2 is unitialised under certain conditions.
Fix: v4.29

Bug#79
Reported: 26-APR-11
Affects: Versions v4.25- v4.28
Symptom: Isotopic mixing ratio profiles output using PRF Flag have misleading nomenclature
Reason: Error in distinguishing 'default' profile (ie for unspecified isotopes) from others, eg correct profiles might be produced for '*H2O(1)' and '*H2O(4)' but the default profile for other isotopes could be listed as '*H2O(2)' rather than just '*H2O'
Fix: v4.29

Bug#78
Reported: 19-MAR-11 (Alan Vance, UKMO)
Affects: Versions v4.25- v4.28
Symptom: Aerosol extinction profile output using PRF Flag a factor 1E6 too small.
Reason: Internal conversion of 1E6 applied to all profiles (aerosol as well as VMR) from .atm files on input to convert from ppmv to ppv - the factor wasn't included when writing out aerosol profiles (although was with VMR).
Fix: v4.29

Bug#77
Reported: 07-JAN-11 (Damien Lafont, JPL)
Affects: All versions
Symptom: Warning message during run, eg.
W-QTFCT: Extrap.beyond 70-1500K limits, T= -297.1875
when running in with plane parallel modes (
NAD, ZEN, or FLX flags) and with thin (~1 metre) atmospheric layers
Reason: Analytic expressions for Curtis-Godson equivalent temperature and pressure in subroutine rfmnad.for are numerically unstable for very small pressure differences across a layer, which may result in a negative CG Temperature for path segment, prompting above warning message from subroutine calculating partition functions.
Fix: v4.29

Bug#76
Reported: 03-SEP-09 (Javier Martin-Torres, JPL)
Affects: v4.20 onwards
Symptom: HDO lines may be ignored if 'HDO' specified in *GAS section of the driver table rather than 'H2O(4)'
Reason: Attempting to treat HDO internally as a separate gas with internal ID=39 proves to be a bit of a can of worms! Suggest just using the standard H2O(4) nomenclature until new RFM v4.3 is released (which will have a much simpler, and hopefully more robust, interpretation of 'HDO' (and 'CH3D')
Fix: v4.3

Bug#75
Reported: 08-JUL-09 (Sam Illingworth, U.Leicester)
Affects: v4.28 onwards
Symptom: Program crashes if unexpected fields added to records in the *JAC section (although depends on compiler)
Reason: Overflows 80 characters when trying to write error message explaining that there are unexpected extra fields (this particular bug is a consequence of the fix of Bug#64)
Fix: v4.29

Bug#74
Reported: 08-JUL-09
Affects: all versions
Symptom: JAC flag: aerosol Jacobians could give unpredictable results
Reason: Subroutine PTBATM did not initialise or save aerosol extinction profile between calls.
Fix: v4.29

Bug#73
Reported: 17-MAR-09
Affects: all versions
Symptom: JAC flag: perturbations not associated with a particular altitude (ie column, SFCTEM, SFCEMS) have random text in header of output file
Reason: Subroutine JACNAM attempts to read altitude from non-existent array element when constructing header.
Fix: v4.29

Bug#72
Reported: 25-SEP-08 (Javier Martin-Torres, JPL)
Affects: all versions
Symptom: COO flag (Cooling rates): Unpredictable results (eg "segmentation fault")
Reason: Arrays ITNATM, WGTATM in subroutine rfmflx.for associated with COO are initialised for first wavenumber interval but not explicitly SAVEd between calls, so different machines/compilers can end up replacing original values with random numbers.
Basically same problem as Bug#67 but with variables specific to Cooling Rate calculations.
Fix: v4.29

Bug#71
Reported: 25-SEP-08 (Elisa Carboni)
Affects: all versions
Symptom: JAC flag: Unpredictable results (eg unexpected filenames) or array bound error for particular number of Jacobian spectra
Reason: Logic in subroutine jacchk.for to check if array dimension MAXJAC is exceeded was out by 1, so if MAXJAC +1 jacobian outputs are required no error message was generated and array bounds would have been exceeded (however MAXJAC+2 or more would have been correctly detected).
Fix: v4.29

Bug#70
Reported: 01-APR-08 (Jolyon Reburn, RAL)
Affects: all versions
Symptom: May produce fatal error message when trying to specify spectral ranges in *SPC section with a file rather than explicit numbers
Reason: In subroutine inpspc.for the record containing the filename is passed directly to the opnfil.for subroutine to be opened. If there are leading spaces this can cause a fatal error. New version strips off any leading/trailing spaces before opening.
Fix: v4.29

Bug#69
Reported: 12-DEC-07 (Jolyon Reburn, RAL)
Affects: all versions
Symptom: Produces output filenames with a blank space when dealing with tangent heights/elevations represented by small negative values
Reason: In subroutine tanchk.for the user-supplied set of tangent heights/angles are rounded to an integer value and converted to a C*6 character string. For small negative values this comes out as ' 00000' with an empty space instead of a minus sign as the first character.
Fix: v4.28

Bug#68
Reported: 11-DEC-07 (Jolyon Reburn, RAL)
Affects: all versions
Symptom: Stops with unreadable fatal error message while reading *OBS section of driver table when observer above top of atmosphere
Reason: Subroutine obschk.for was incorrectly returning a fatal error condition with no error message defined.
Fix: v4.28

Bug#67
Reported: 21-NOV-07 (Miguel Lopez-Valverde, IAA Granada)
Affects: all versions
Symptom: Unreliable results when using FLX flag for ranges spanning more than one wavenumber interval.
Reason: Some variables in subroutine rfmflx.for are evaluated on the first call (for first 1cm-1 interval) but not saved between calls, so outcome depends on what machine does to unsaved variables.
Fix: v4.28

Bug#66
Reported: 15-NOV-07 (Harjinder Sembhi, U.Leicester)
Affects: all versions
Symptom: Fails to spot some fatal errors in entries in *JAC section
Reason: A number of fatal error checks in subroutine jacchk.for cause a RETURN to be executed but the FAIL flag is set FALSE, so the external routine ignores it.
Fix: v4.28

Bug#65
Reported: 05-JUL-07 (and several times previously)
Affects: all versions
Symptom: Obscure fatal error message about duplicate driver table sections, eg
F-INPILS: Duplicate *ILS section in Driver Table
where driver table (
rfm.drv) file is not properly terminated with *END<CR> record (usually because the <CR> has been omitted)
Reason: No special handling for 'end-of-file' when reading driver table section headers, so the record containing the last valid section header (*ILS in the example above) is effectively read again. (New versions of the RFM will simply print a warning message to the rfm.runlog file, then assume that the driver file is now terminated and carry on as normal)
Fix: v4.28

Bug#64
Reported: 25-JUN-07 (Luis Millan-Valle)
Affects: v4.26-v.27
Symptom: Fatal error message
F-JACIGQ: Unable to parse IGQSTR: (...
when calculating vibrational temperature Jacobians where combined '(gas)(i)(v)' string in
*JAC section exceeds 8 characters.
Reason: Subroutine inpjac.for truncates all Jacobian targets to C*8, failing to allow for additional characters '(v)' to identify VT level.
Fix: v4.28

Bug#63
Reported: 20-JUN-07 (Claire Waymark)
Affects: v4.25-v.27
Symptom: Combining PRF Flag with cross-section molecules (ID 50 or higher) results in fatal error message:
F-RFMPRF: Logical error
Reason: Subroutine rfmprf.for fails to check for cross-section molecules before checking for isotopic profiles
Fix: v4.28

Bug#62
Reported: 28-MAR-07 (Luis Millan-Valle)
Affects: All versions up to and including v4.27
Symptom: Fails to skip empty record in *JAC section of driver table (and probably other sections as well) - resulting in a fatal error message
Reason: Under Linux, subroutine nxtrec.for, which should skip blank records, interprets <CR> as a non-blank character, hence assumes that there is something readable in the record
Fix: v4.28

Bug#61
Reported: 03-APR-06 (Owen Embury, Edinburgh)
Affects: Versions v4.25 & v4.26
Symptom: Unpredictable results when using LEV flag with F77 compilations which do not automatically save variables inside subroutines.
Reason: Variables IJAC1, IJAC2 in subroutine levupd.for sometimes assume previous values are saved.
Fix: v4.27

Bug#60
Reported: 12-OCT-05 (Damien Weidmann, RAL)
Affects: All versions up to and including v4.25
Symptom: Incorrect Brightness Temperature Jacobians (combination of BBT and JAC flags.
Reason: RFM was calculating brightness temperature of difference in radiance between perturbed and unperturbed atmospheres, instead of the difference in the brightness temperatures.
Fix: v4.26

Bug#59
Reported: 19-JUL-05 (Alison Waterfall, RAL)
Affects: All versions up to and including v4.25
Symptom: Unpredictable results in regions of line-mixing when using MIX flag and gases in addition to CO2.
Reason: Line-mixing lineshape routine (MIXSHP) called for all gases although one of the line-mixing parameters (YMXADJ) is only set for CO2, so other gases inherit last set value of YMXADJ instead of 0.
Fix: v4.26

Bug#58
Reported: 10-JUN-05 (Alison Waterfall, RAL)
Affects: All versions up to and including v4.25
Symptom: Failure to read ASCII LUT files created with TAB option where number of wavenumber points is GE 1E6.
Reason: Format field in output (opntab.for) only allows I6 so, when read free-format on input, field becomes indistinguishable from previous field (which is "0").
Fix: v4.26

Bug#57
Reported: 05-MAY-05 (Alastair Burgess)
Affects: All versions up to and including v4.25
Symptom: Use of wildcard "*" in *GAS section produces no absorbers
Reason: Variable IMIN in subroutine GASALL not SAVEd (this is the threshold level for deciding which absorbers to use which should be 0 by default).
Fix: v4.26

Bug#56
Reported: 03-MAY-05 (Alastair Burgess)
Affects: All versions up to and including v4.25
Symptom: Fails with "Segmentation Fault" when using heavy molecule cross-section (.xsc) files
Reason: Variable NTRI in subroutine TRIANG not SAVEd (this is the triangulation of the cross-section data in (p,T) coordinates).
Fix: v4.26

Bug#55
Reported: 08-MAR-05
Affects: All versions up to and including v4.25
Symptom: `Not a Number' or similar error message
Reason: Ray tracing for cases where tangent point is very close to the top of a layer can occasionally result in a negative absorber amount
Fix: v4.26

Bug#54
Reported: 04-FEB-05
Affects: RFM v4.23-v4.25
Symptom: Occasional failure in ray-tracing with `floating point invalid' type message (taking square root of negative number) during Jacobian calculations (JAC flag) for temperature or pressure.
Reason: density scale height was being calculated from refractivity scale height before refractivity profile was updated (subroutine atmaux.for)
Fix: v4.26

Bug#53
Reported: 11-JAN-05
Affects: All versions of the RFM up to and including v4.25
Symptom: MIX (line mixing) flag has no effect when using special versions of HITRAN-format file developed for MIPAS.
Reason: Additional rotational quantum numbers inserted into the HITRAN records where blank characters are expected (subroutine ymix.for searches for matches of these fields with its list of transitions for which line mixing effects are included).
Fix: v4.26

Bug#52
Reported: 01-JUN-04
Affects: RFM v4.22-v4.24
Symptom: occasionally incorrect spectral calculations when using combination of ILS and GRD flags.
Reason: The direct interpolation from irregular grid to ILS-convolved output grid introduced in v4.22 can lead to uninitialised array elements being included in the summation.
Fix: v4.25

Bug#51
Reported: 22-MAR-04
Affects: RFM v4.23, v4.24
Symptom: rfm.runlog file contains incorrect spectral range information in message
I-SPCCHK: Label= ...
and may lead to array bound error.
Reason: Incorrect spectral range index (true value - 1) used in constructing message text
Fix: v4.25

Bug#50
Reported: 12-MAR-04 (Vivienne Payne)
Affects: All versions of the RFM using combination of CTM flag and different H2O isotopic profiles
Symptom: Incorrect handling of subtraction of 25cm-1 offset for combination with continuum for isotopic profiles
Reason: Variable isotopes handled as separate species but continuum flag only set for default profile
Fix: v4.25

Bug#49
Reported: 25-OCT-03 (Anu Dudhia)
Affects: All versions of the RFM using combination of OBS and JAC flags
Symptom: Jacobians incorrect if *JAC section specified in driver table before the *OBS AND the observer altitude is not an internal profile level AND jacobians are defined for levels at or above the observer height
Reason: Subroutine OBSATM which inserts extra atmospheric level for the observer height does not allow for change in level numbering in definition of perturbed levels for Jacobians.
Fix: v4.24

Bug#48
Reported: 21-OCT-03 (Vivienne Payne, Oxford)
Affects: RFM v4.22,4.23 using combination of OBS and JAC flags
Symptom: Jacobians sometimes incorrect
Reason: Ray-tracing RFMRAY contains a short cut to prevent repeated calculations for Jacobians through atmospheric layers which are unchanged, but this short cut is only valid for observervations outside the atmosphere.
Fix: v4.24

Bug#47
Reported: 30-APR-03 (Aleks Milyakov, Russia)
Affects: All versions of the RFM
Symptom: Lines falling exactly on upper boundary of widemesh interval N are counted twice in interval N-2:N-1 (eg a line exactly at 1000cm-1 is counted as two lines in the interval 998-999cm-1).
Reason: Test on lines in finemesh calculation uses .LE. instead of .LT. when deciding whether the upper boundary should be included
Fix: v4.23

Bug#46
Reported: 30-APR-03 (Chiara Piccolo, Oxford)
Affects: All versions of the RFM using some Linux systems
Symptom: Carriage return character appears at end of 2nd header record of output spectra (the user-supplied comment record entered in the *HDR section of the driver table)
Reason: Carriage Return characters handled differently in Linux and Unix (see also Bug#40)
Fix: v4.23

Bug#45
Reported: 28-APR-03 (Anu Dudhia)
Affects: RFM v4.10 onwards using PTH flag (path diagnostics) plus OBS flag (observer within atmosphere) plus
Symptom: Extra atmospheric layer included in path diagnostics
Reason: Starting integration at layer above observer
Fix: v4.23

Bug#44
Reported: 10-MAR-03 (Anu Dudhia)
Affects: RFM v4.12 onwards using FLX flag, flux calculations.
Symptom: floating zero divide in second widemesh interval
Reason: Resetting pi factor=0.0 in rfmflx.for after first widemesh interval - should be either be 3.14...etc or 1.0 (using VRT flag)
Fix: v4.22

Bug#43
Reported: 20-FEB-03 (Niels Bormann, ECMWF)
Affects: RFM using a combination of GRD and TAB flags, generating direct look-up tables on an irregular grid
Symptom: generated grid files displaced by one or two spectral points
Reason: Not allowing for RFM adding internal grid points at wide mesh boundaries
Fix: v4.22

Bug#42
Reported: 13-FEB-03 (Niels Bormann, ECMWF)
Affects: RFM using a combination of GRA and JAC flags, ie creating Jacobians from a two-dimensional atmosphere
Symptom: Program stops with error message printed to terminal
STOP F-RFMPTB: Logical Error#3
Reason: Unforeseen error when deciding which Jacobian path segments can be derived from simple mass-scaling of other path segments.
Fix: v4.22

Bug#41
Reported: 18-JAN-03 (Anu Dudhia)
Affects: All versions of the RFM using a combination of spectral ranges some with valid LUTs and some without
Symptom: no fine mesh calculation for spectral ranges without LUTs
Reason: When a spectral range is calculated using a Look-Up Table this flags the HITRAN database reading routine REACYC as having reached the end of the database file, so subsequent spectral ranges which may require HITRAN data if no LUT data available do not read any line information.
Fix: v4.22

Bug#40
Reported: 13-JAN-03 (Anu Dudhia)
Affects: All versions of the RFM using some Linux systems
Symptom: Garbled rfm.runlog files and occasionally unable to read driver table entries
Reason: Carriage Return character not handled properly
Fix: v4.22

Bug#39
Reported: 13-JAN-03 (Anu Dudhia)
Affects: All versions of the RFM using GRD flag but with no valid files in the *GRD section
Symptom: Fatal error message:
 F-FINCHK: fine mesh resolution inconsistent with irregular grid resolution
Reason: FINCHK checks that the internal fine mesh resolution (e.g. 0.0005cm-1) is compatible with the resolution of the irregular grid data supplied in the *GRD section, however if no valid GRD files have been found (ie not overlapping any required output spectral range) the grid file resolution is not set (so, for example, may be zero), so the two numbers being compared will not agree.
Fix: v4.22

Bug#38
Reported: 01-DEC-02 (Anu Dudhia)
Affects: v4.21 using molecules with HITRAN index > 14 at wavenumbers near zero
Symptom: Fatal error message:
 F-INIHFL: Failed to read HITRAN file, rec#:          0. IOSTAT=         25
(number 25 is machine dependent)
Reason: failing to set forward pointers for molecules ID#15 onwards when winding back from initial wavenumber if within 25cm-1 of start of HITRAN file so attempts to access record#0 of the HITRAN file instead.
Fix: v4.22

Bug#37
Reported: 18-JUL-02 (Randall Skelton, Oxford)
Affects: v3.90 onwards using LUN flag (re-use LUNs for output spectra) with different types of spectra, e.g. output both radiance (RAD flag) and transmittance (TRA flag) spectra.
Symptom: All files correctly opened but all types of spectra written to only one type of file.
Reason: Incorrect logic in subroutine opnout.for/wrtout.for
Fix: v4.21

Bug#36
Reported: 29-MAY-02 (Anu Dudhia)
Affects: v4.10 onwards using PTH flag (path diagnostics) plus GRA flag (2D atmosphere) with more than one absorber
Symptom: Only writes path diagnostics for upward path for second and subsequent absorbers
Reason: Incorrect logic in subroutine rfmpth.for
Fix: v4.21

Bug#35
Reported: 23-JAN-02 (Tim Nightingale, RAL)
Affects: v4.10 onwards using COO flag (cooling rates)
Symptom: Cooling rates too high by a factor of about 1000
Reason: Incorrect value of molar heat capacity of air CPMOL in phycon.inc (1005/28.964 was used, should have been 1005*28.964).
Fix: v4.12

Bug#34
Reported: 04-JAN-02 (Victoria Jay, RAL)
Affects: v4.10 onwards using JAC flag (Jacobians)
Symptom: Occasional array bound error, or incorrect Jacobian element
Reason: When looking for similar CG paths to save additional computations for Jacobian elements, RFMPTB fail to account for the (rare) situation when the similar path used is itself scaled to another similar path (don't worry - I understand what that means).
Fix: v4.12

Bug#33
Reported: 17-DEC-01 (Anu Dudhia)
Affects: v4.10 onwards using combination of TAB + GRD (creating look-up tables with irregularly spaced wavenumber axes) for more than one absorber.
Symptom: Irregular grid data only written into table of the last absorber
Reason: Failure to write irregular grid data to all absorber tables.
Fix: v4.12

Bug#32
Reported: 13-DEC-01 (Anu Dudhia)
Affects: all previous versions calculating Pressure and Temperature Jacobians
Symptom: Small discrepancy between independently differenced spectra
Reason: Failure to allow for perturbed refractive index when perturbing pressure or temperature.
Fix: v4.12

Bug#31
Reported: 13-DEC-01 (Victoria Jay, Oxford/RAL)
Affects: all previous versions calculating Pressure and Temperature Jacobians with non-zero aerosol extinction
Symptom: Discrepancy between independently differenced spectra
Reason: Code kept original value of (extinction/density) when multiplying by perturbed density, effectively treating extinction/density as the conserved quantity. Correct approach is to maintain extinction constant so that for pure aerosol absorption, density variations have no Jacobian signal.
Fix: v4.12

Bug#29
Reported: 12-DEC-01 (Anu Dudhia)
Affects: all previous versions run under certain compilers (eg Linux g77)
Symptom: Various discrepancies in results
Reason: Failure to save variables in subroutines (With most compilers all subroutine variables are automatically saved between calls, but not with g77). NB: there are probably several more bugs of this type which haven't yet been iedentified - users of the g77 compiler be warned
Fix: v4.12

Bug#28
Reported: 04-DEC-01 (Clive Rodgers, Oxford)
Affects: all previous versions run under certain compilers (eg Linux g77) when using spectral convolutions (either the ILS or AVG flags)
Symptom: Output spectra severely distorted
Reason: Failure to save variable IDXBUF in subroutine RFMILS.FOR (With most compilers all subroutine variables are automatically saved between calls, but not with g77).
Fix: v4.12

Bug#27
Reported: 28-NOV-01 (Alison Waterfall, Oxford)
Affects: all previous versions when using line-mixing (MIX flag)
Symptom: Output spectra sometimes displaced by 1 or 2 complete wavenumbers
Reason: When including line mixing it is necessary to include complete CO2 bands within the +/-25cm margins for the widemesh calculation. Where the -25cm-1 lower limit intersected a band (12 bands, 2-3cm-1 wide - see SPCWID.FOR), instead of just stretching the margins for the widemesh calculation the RFM was also adding a 1 or 2cm-1 offset to the output spectrum.
Fix: v4.12

Bug#26
Reported: 28-NOV-01 (Igor Ptashnik, Reading)
Affects: all previous versions when using limb viewing paths
Symptom: Floating zero divide (or large error)
Reason: When performing the ray-tracing each atmospheric layer is subdivided into 10 or more path segments for the Curtis-Godson integrations. There is a small probability that the final segment within a layer is large enough to be non-zero but too small to evaluate the Curtis-Godson integrations reliably.
Fix: v4.12

Bug#25
Reported: 04-NOV-01 (Anu Dudhia)
Affects: v4.10 and v4.11 when using FLX flags without ZEN flag or SFC flag
Symptom: If SFC flag not enabled, the surface treated as zero emission/reflection in flux calculations
Reason: No check that the user has enabled SFC flag if FLX is enabled without ZEN flag.
Fix: v4.12

Bug#24
Reported: 31-OCT-01 (Igor Ptashnik, Reading)
Affects: All previous versions using ZEN flag
Symptom: Slow calculation compared to using limb-type calculations with elevation angle (*ELE) set to 90deg.
Reason: Line-by-line calculations performed for entire atmosphere not just layers above the observer
Fix: v4.12

Bug#23
Reported: 31-OCT-01 (Anu Dudhia)
Affects: v4.10 and v4.11 when using FLX flag (flux calculations) with NAD flag (downward-looking hemisphere only) above a reflecting surface
Symptom: Incorrect radiance fluxes and cooling rates
Reason: Downward path contribution to net flux is not removed (so NAD flag has no effect)
Fix: v4.12

Bug#22
Reported: 15-AUG-01 (Anu Dudhia)
Affects: All versions when using LIN flag (Linear interpolation of VMR with height) with anything other than limb-viewing.
Symptom: Identical to LIN flag disabled (ie log(VMR) interpolation)
Reason: No special treatment for linear interpolation when calculating Curtis-Godson parameters for plane parallel atmosphere
Fix: v4.11

Bug#21
Reported: 23-MAY-01 (James Watts, Oxford)
Affects: v4.10 onwards when using GRA flag (Horizontal gradients) with psi angles less than minimum value used for profiles (ie raypaths extending beyond specified profiles on the side away from the observer)
Symptom: Incorrect atmospheric paths
Reason: Atmosphere beyond low-psi limit is being extrapolated from last two specified profiles rather than assumed constant (as for the high-psi case)
Fix: v4.11

Bug#20
Reported: 04-MAY-01 (Victoria Jay, Oxford)
Affects: v3.82 onwards when using JAC flag (Jacobians) in combination with GRD (irregular grids).
Symptom: Incorrect Jacobians calculated with irregular grids.
Reason: Interpolation from irregular to fine grid only looping over nominal tangent paths, not additional paths required for Jacobians.
Fix: v4.11

Bug#19
Reported: 22-MAR-01 (Jolyon Reburn, RAL)
Affects: v4.10 when using GRA flag (horizontal gradients).
Symptom: Program sometimes hangs during ray-tracing (after driver table read in, but before start of line-by-line calculations)
Reason: 2D ray-tracing numerical integration doesn't converge in situations where zero path length is required
Fix: v4.11

Bug#18
Reported: 20-MAR-01 (Anu Dudhia)
Affects: versions v3.50-v4.10 when using an Irregular Grid (GRD flag) which is not on the same resolution as the fine mesh calculation.
Symptom: Incorrect fine grid interpolation
Reason: Irregular grids can only be used for one particular fine grid spacing, no checks were performed to ensure this was the case.
Fix: v4.11

Bug#17
Reported: 20-MAR-01 (Victoria Jay, Oxford)
Affects: all versions up to v4.10 using combination of different spectral ranges (multiple records in the *SPC section) plus range-specific ILS functions (ILS flag) where one of the ranges has no defined ILS function plus no default ILS function (bit of an obscure combination, really).
Symptom: Unpredictable.
Reason: RFM checks that each spectral range has a defined ILS function, but fails to exit and report error in the case when it doesn't.
Fix: v4.11

Bug#16
Reported: 16-MAR-01 (Richard Siddans, RAL)
Affects: all versions up to v4.10 when using combination of CRV flag and FOV or geometric tangent heights (specified using *GEO or *ELE marker for the *TAN section).
Symptom: User-specified radius of curvature not used in calculating refracted (actual) tangent heights.
Reason: Refracted tangent heights are calculated with the default radius of curvature (REARTH in phycon.inc), but ray-tracing, using these tangent heights is performed with the user-specified radius.
Fix: v4.11

Bug#15
Reported: 26-FEB-01 (Jolyon Reburn, RAL)
Affects: all versions up to v4.10 when `unusual` spectral resolutions are specified in the *SPC section (e.g., '0.0001999999' )
Symptom: Discrepancy between number of spectral points indicated in header of output spectra and number of points actually written
Reason: Algorithm for calculating number of widemesh intervals occasionally underestimates number required to cover full output spectrum due to truncation errors.
Fix: v4.11

Bug#14
Reported: 26-JAN-01 (Jolyon Reburn, RAL)
Affects: all versions up to v4.10 when no gases are specified in the *GAS section (e.g. by using *(20) with the wild-card parameter set too high)
Symptom: Floating zero divide
Reason: Diagnostic message produced by RFMSCA.FOR doesn't allow for zero paths when calculating fraction of paths that will be scaled.
Fix: v4.11

Bug#13
Reported: 26-JAN-01 (Richard Siddans, RAL)
Affects: v4.10 using both GRA and GEO flags together.
Symptom: Floating zero divide
Reason: Setting Refractive Index=0 rather than 1 in subroutine GRADVS.FOR when performing 2-dimensional ray-trace with refraction switched off.
Fix: v4.11

Bug#12
Reported: 26-JAN-01 (Victoria Jay, Oxford)
Affects: all versions up to v4.10 with ILS or AVG flags and at an output resolution finer than 0.0005 cm-1.
Symptom: Floating zero divide
Reason: ILS/AVG convolutions had assumed that the output resolution would always be coarser than the default internal fine grid (0.0005cm-1).
Fix: v4.11

Bug#11
Reported: 20-DEC-00 (Steve Bass, Oxford)
Affects: all versions up to v4.09 with HOM flag and at least two files describing homogeneous path in the *ATM section, and with a replacement pressure value in the second or subsequent file
Symptom: Floating overflow
Reason: Replacement pressure profiles are usually extrapolated (as log(pressure)) to fit original altitude grid, but with only one "altitude", the extrapolation routine breaks down. Other species, and temperature, are not extrapolated so should be OK anyway.
Fix: v4.10

Bug#10
Reported: 07-NOV-00 (Anu Dudhia)
Affects: v4.04 - v4.09 with SFC flag and reflective surfaces
Symptom: Floating overflow or logarithm of 0
Reason: At surface, transmittance is scaled by surface reflectivity r as tau*r, and optical depth is reevaluated as -log(tau). However, if the atmospheric transmittance is already zero at the surface, this leads to an error. Solution is to evaluate increase in optical depth directly as -ln(r).
Fix: v4.10

Bug#9
Reported: 20-SEP-00 (Victoria Jay, Oxford)
Affects: All previous versions with FOV plus CLC flags both enabled and multiple tangent paths.
Symptom: Slight variations in radiance according to number of different tangent heights calculated in single run
Reason: CLC flag only forced separate paths to be used for each tangent ray constituting the FOV, but did not prevent closely spaced tangent paths from overlapping FOVs to be regarded as the same if the spearation was less than 10% of the FOV spacing. This tolerance has now been reduced to 1%, and 0% if CLC flag is enabled.
Fix: v4.10

Bug#8
Reported: 06-AUG-00 (Steve Bass, Oxford)
Affects: v3.82 onwards with JAC plus HOM flags both enabled.
Symptom: Creates zero Jacobian spectra for homogeneous path case
Reason: HOMPTH resetting number of paths so perturbed paths are ignored
Fix: v4.10

Bug#7
Reported: 26-APR-00 (Anu Dudhia)
Affects: All versions up to v4.04 using wavenumbers near 0.0
Symptom: Program crashes with floating overflow in subroutine VOISHP
Reason: VOISHP doesn't allow for v.small Doppler widths associated with O2 line at 1e-5 cm-1.
Fix: v4.10

Bug#6
Reported: 14-APR-00 (Joanna Haigh, Imperial)
Affects: v3.82 - v4.03 using SFC flag AND surface emissivities < 1.
Symptom: Incorrect reflected radiance contribution.
Reason: Transmittance term for contributions of reflected ray failed to allow for reduction in transmittance upon surface reflection, so reflected atmospheric contribution to radiances is overestimated.
Fix: v4.04

Bug#5
Reported: 13-APR-00 (Anu Dudhia)
Affects: All versions up to and including v4.03 when using WID flag (widemesh diagnostics) AND more than one spectral range in *SPC section.
Symptom: Incorrect line counts for second and subsequent spectral ranges in widemesh diagnostic output.
Reason: Failing to reinitialise line counts at start of each new spectral range.
Fix: v4.04

Bug#4
Reported: 08-DEC-99 (Victoria Jay, Oxford)
Affects: All versions up to and including v4.02 when compiled with the Fujitsu Linux compiler with switch -Xf7 (and probably some other compilers too).
Symptom: Slightly random output filenames (confusing, but not fatal).
Reason: Filenames were constructed from templates by inserting tangent height etc information using a non-standard FORTRAN77 construction of the typical form
FILNAM = FILNAM(1:10)//TANHGT(1:5)//FILNAM(11:20)
On most machines this is interpreted as intended, i.e., with the TANHGT substring inserted at character positions 11 in FILNAM, and the remaining FILNAM characters appended. However, the Fujitsu compiler appears to assign TANHGT to FILNAM(11:15) before determining FILNAM(11:20). In `correct' FORTRAN77 usage the same part of a character string should not appear on both the left and right sides of an assignment statement, as it does above. (NB The above assignment is valid under FORTRAN 95).
Fix: v4.03

Bug#3
Reported: 04-NOV-99 (Bob Wells, Oxford)
Affects: v3.43 onwards, when using CTM flag and NOCTM qualifier with H2O
Symptom: Incorrectly calculated H2O lines
Reason: CTM flag should switch on continuum calculations for all species (ie CO2, H2O, O2 and N2), but NOCTM qualifier after species name should switch it off again for a particular species. However, for water vapour, the NOCTM only switched off part of the continuum calculation: the application of the continuum itself, it did not switch off the truncation of the H2O lines at their +/- 25cm-1 values.
Fix: v4.02

Bug#2
Reported: 04-NOV-99 (Victoria Jay, Oxford)
Affects: v3.7 onwards, when tangent heights (*TAN section) are expressed as ELEvation angles or GEOmetric heights
Symptom: Very occasionally, a fatal error condition arises with the message: F-TANCNV: Failed to converge
Reason: For a given geometric tangent height, the actual refracted tangent height is determined by an iterative procedure which usually converges to 1m accuracy within 3 iterations. However, occasionally the solution appears to oscillate, in which case the maximum allowed number of iterations (10) was exceeded and a fatal error condition was set. Now when this happens, it is assumed that the refracted tangent height can be taken as the mean of the last two iterative values, although a warning message is still printed to the terminal: W-TANCNV: Failed to converge
Fix: v4.02

Bug#1
Reported: 12-OCT-99 (Anu Dudhia)
Affects: SFC Flag used with limb-viewing
Symptom: If SFC flag is switched on, all limb viewing tangent heights are treated as intersecting the surface, even if the tangent height is above the surface.
Reason: Routine RFMRAD.FOR only checked status of SFC before deciding whether or not to insert the surface calculation at the lowest point on the ray path, it didn't check to see if ray actually intersected the surface
Fix: v4.01