RFM v5 Bugs

This is a list of bugs detected for the new RFM v5.0. See separate page for [RFM v4 bugs]

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

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

  1. Li Xiaoying (RADI, China) (8)
  2. Zongxm (IAP, China) (5)
  3. David Moore (U.Leicester) (2)
  4. Stefan Uttenthaler (U.Vienna) (1)
  5. Benjamin Esse (U.Manchester) (1)
  6. Alyn Lambert (JPL) (1)
  7. Robin Lacey (U.Bristol) (1)
  8. Olivier Auriacombe (RAL) (1)
  9. Lucy Ventress (AOPP, Oxford) (1)
Where the bug can be corrected by simply downloading a modified subroutine (or subroutines) and recompiling, the necessary modules are listed as Patch.
 

#36 Reported: 23MAY22 (Stefan Uttenthaler, U.Vienna)
Affects: v5.03–v5.12
Symptom: With OBS flag RFM simply exits with error message if unrecognised keyword used in *OBS section of driver file.
Cause: RFM subroutine drvobs exits (correctly) with fatal error flag if it encounters an unrecognised keyword, but doesn't provide any accompanying error message.
Patch: drvobs_sub.f90
Fix: RFM v5.13
 
#35 Reported: 22APR22 (Benjamin Esse, U.Manchester)
Affects: v5.03–v5.12
Symptom: Incorrect path scaling in .pth file output (PTH Flag) with plane parallel or homogeneous path cases
Cause: RFM v5.03 was changed to have path scale factors moved into a separate variable, which wasn't transferred through to the .pth file output
Patch: pthwrt_sub.f90
Fix: RFM v5.13
 
#34 Reported: 18APR22
Affects: v5.00–v5.12
Symptom: Array bound error in ILSGRD when combining AVG (or ILS) flag with Look-Up Table on an irregular grid
Cause: Possible for points contributing to convolved output to all lie beyond upper limit of irregular grid.
Patch:
Fix: RFM v5.13
 
#33 Reported: 18APR22
Affects: v5.00–v5.12
Symptom: Array bound error in IDXLFL when combining REX and LUT flags
Cause: Rayleigh extinction adds 'air' as an extra absorber, but this is after the driver section reading the LUTs assigns an error which depends on the number of absorbers, so a subsequent function IDXLFL attempts to access non-existent array element.
Patch: None - several changes required
Fix: RFM v5.13
 
#32 Reported: 28MAR22 (Li Xiaoying, RADI, China)
Affects: v5.00–v5.12
Symptom: Occasional incorrect spectra in limb-viewing mode combined with (FOV flag)
Reason: Probably due to questionably usage of a FORTRAN pointer array while the target array is re-sized.
Patch: chkfov_sub.f90
Fix: RFM v5.13
 
#31 Reported: 04MAR22 (Alyn Lambert, JPL, USA)
Affects: v5.00–v5.12
Symptom: Incorrect Cooling Rate spectra (COO flag) when calculated in combination with AVG or (less plausibly) ILS flags
Reason: Spectral averaging module omits Cooling rate spectra
Patch: spcils_sub.f90
Fix: RFM v5.13
 
#30 Reported: 23APR21 (Li Xiaoying, RADI, China)
Affects: v5.00–v5.10
Symptom: Combination of NAD and OBS flags has no atmospheric contribution
Reason: Bug in setting vertical start and end levels for radiative transfer integration.
Patch: obschk_sub.f90
Fix: RFM v5.11
 
#29 Reported: 23APR21 (Li Xiaoying, RADI, China)
Affects: v5.00–v5.10
Symptom: Incorrect results for limb-viewing calculation with very thin sub-layer, most likely to occur in near-vertical viewing.
Reason: Each atmospheric layer is split into sub-layers for the ray-tracing and calculation of Curtis-Godson integrals. Occasionally this can lead to a very thin sub-layer (< 1 metre path length) in which case code switches to use a different expression. A bug meant that this thin layer was then assigned the same absorber amount as a 1 km path.
Patch: raysum_sub.f90
Fix: RFM v5.11
 
#28 Reported: 29MAR21 (Robin Lacey, U.Bristol)
Affects: v5.00–v5.10
Symptom: Unpredictable or NaN results if surface level is redefined (eg using parameter HGTSFC in *SFC section) to match an existing profile level
Reason: Code always inserting extra level, which in this case results in a profile layer of zero thickness.
Patch: sfclev_sub.f90
Fix: RFM v5.11
 
#27 Reported: 25MAR21
Affects: v5.00–v5.10
Symptom: Attempting to define 2D calculation (GRA Flag) on pressure grid rather than altitude grid results in error message
STOP F-PRFGRA: Logical error
Reason: Code doesn't expect horizontal variation in altitude profile.
Patch: atmgrd_sub.f90
Fix: RFM v5.11
 
#26 Reported: 06MAR20 (David Moore, U.Leicester)
Affects: v5.00–v5.03
Symptom: When three (or more) user-defined .xsc molecule names are used (i.e. in addition the the standard internal list) RFM fails with runtime error caused by attempting to allocate an already-allocated array MOLNEW.
Reason: Bug in code checking allocation status of MOLNEW.
Patch: molidx_sub.f90
Fix: RFM v5.03, RFM v5.10
 
#25 Reported: 19FEB20 (Li Xiaoying, RADI, China)
Affects: v5.00–v5.03
Symptom: With a combination of TRA and FOV flags the RFM produces transmittance spectra which are 1 + correct value (ie transmittance values in the range 1–2)
Reason: Transmittance spectra are routinely initialised to a value 1. However when performing the FOV convolution the transmittance should have been set to zero before summing the weighted transmittances of the various pencil beam transmittances representing the FOV.
Patch: spcfov_sub.f90
Fix: RFM v5.03, RFM v5.10
 
#24Reported: 18FEB20
Affects: v5.00–v5.03
Symptom: Using .xsc files, RFM may fail with message
STOP 'F-TRIANG: logical error#1'
Reason: Under very peculiar circumstances (eg just three p,T tabulations all with same T values, in a particular order) the perimeter-finding part of the triangulation only finds 2 perimeter points.
Patch: triang_sub.f90
Fix: RFM v5.03, RFM v5.10
 
#23 Reported: 20SEP19
Affects: v5.00–v5.03
Symptom: Incorrect Aerosol Jacobian spectra
Reason: Aerosol perturbed by 1% (as with VMRs) rather than fixed Δextinction
Patch: ptbatm_sub.f90
Fix: RFM v5.03
 
#22 Reported: 01JUL19
Affects: v5.00–v5.02
Symptom: RFM fails to interpret 'hdo' and 'ch3d' in the *GAS section of the driver table.
Reason: Error in internal translation of, eg 'hdo' to 'h2o(4)'.
Patch: chkgas_sub.f90, gaschk_sub.f90
Fix: RFM v5.03
 
#21Reported: 06JUN19 (David Moore, U.Leicester)
Affects: v5.00–v5.02
Symptom: Using irregular grid (*GRD) with convolved output (*ILS) can create distorted output spectra, with 'flat' second part.
Reason: Where the .grd file is on a different basic resolution to the RFM internal grid, e.g. 0.001 cm-1 for the nadir-viewing IASI compared with the 0.0005 cm-1 RFM default fine grid, the irregular grid points were treated as if they were on the 0.0005 fine grid. The code has now been amended so that in this situation the RFM fine grid is adjusted (with a warning to the log file) to match the irreg.grd.
Patch: spcful_sub.f90
Fix: RFM v5.03
 
#20 Reported: 04APR19
Affects: v5.00–v5.02
Symptom: Using horizontal gradients (GRA flag), surface-grazing rays, coupled with FOV convolution) lead to fatal error message, e.g.
F-CHKLIM: Tangent Height=1.50 [km] >= Top of Atmosphere=0.00E+00 [km]
Reason: 2D ray-tracing module raygra_sub.f90 treating any ray starting at surface as intersecting surface, even though already established as a true limb path. This also has the secondary effect of resetting the height of the atmosphere to surface altitude.
Patch: raygra_sub.f90
Fix: RFM v5.03
 
#19 Reported: 28MAR19
Affects: v5.00–v5.02
Symptom: Using Look-up tables (LUT flag) up to their wavenumber boundaries, coupled with any spectral convolution ILS or AVG flags) causes a fatal error in the REALUT subroutine e.g.,
F-REALUT: Input failure on TAB file. IOSTAT= 5001
(or, with IFORT, may just cause the program to hang indefinitely)
Reason: LUTs are only accepted if they lie entirely within the chosen output spectral range, defined in the *SPC section. However, if any spectral convolution is applied, this caused the RFM to try and read beyond the end of the LUT file rather than simply assume zero absorption.
Patch: lutcom_dat.f90, luttab_sub.f90, realut_sub.f90
Fix: RFM v5.03
 
#18 Reported: 12MAR19
Affects: v5.00–v5.02
Symptom: Using *PHY section to adjust GRAVTY or WGTAIR not having the desired effect
Reason: Profiles of density and refractivity are established (using GRAVTY and WGTAIR) immediately after the *ATM section contents are read (using subroutine atmaux_sub.f90) and not subsequently recalculated when these parameters are modified by the later *PHY section.
Patch: drvphy_sub.f90
Fix: RFM v5.03
 
#17 Reported: 27FEB19 (Zongxm, IAP, China)
Affects: v5.00–v5.02
Symptom: Fatal array bound error in subroutine spcgrd_sub when using sparse irregular output spectral grid.
Reason: For an irregular output grid, for each widemesh (1cm-1) interval the RFM determines the lower and upper spectral grid points within the interval. However, for a sparse grid, it is possible that there are no points within the interval, so the interval should be skipped. The RFM did not allow for this.
Patch: rfmspc_sub.f90, spcgrd_sub.f90,
Fix: RFM v5.03
 
#16 Reported: 06FEB19 (Zongxm, IAP, China)
Affects: v5.00, v5.01 and v5.02 pre-release versions up to 04FEB19
Symptom: Anomalous results using cross-section molecules (eg CFC-12)
Reason: The RFM uses triangulation in the (p,T) domain to perform the interpolation of .xsc data to path conditions. However there was an error in limiting the number of triangles created, so that the interpolation was unreliable (the difference only really shows up in calculation Jacobian spectra).
Patch: xsccom_dat.f90, reaxsc_sub.f90, triang_sub.f90, triint_sub.f90, spcxsc_sub.f90
Fix: RFM v5.03
 
#15 Reported: 30JAN19 (Zongxm, IAP, China)
Affects: v5.02 pre-release versions from 02NOV18
Symptom: Unpredictable results using H2O continuum
Reason: Implementation of new MT_CKD v3.2 subroutine leads to incorrect indexing of internal path segments
Patch: ctmh2o_sub.f90
Fix: RFM v5.02
 
#14 Reported: 30JAN19 (Zongxm, IAP, China)
Affects: v5.00, v5.01, v5.02 pre-release versions
Symptom: Creating (incorrect) 'off-diagonal' Jacobian spectral files even when JTP Flag enabled.
Reason: Output routine continues to assume all Jacobian combinations are used
Patch: spcout_sub.f90
Fix: RFM v5.02
 
#13 Reported: 13JAN19 (Zongxm, IAP, China)
Affects: v5.00, v5.01
Symptom: Fatal error indexing array in intrinsic MATMUL function if using LOS Flag with 3 or more tangent heights.
Reason: Error assigning array indices to highest/lowest tangent heights when determining gradients from quadratic fit.
Patch: spclos_sub.f90
Fix: RFM v5.02
 
#12 Reported: 30NOV18
Affects: v5.00, v5.01
Symptom: RFM produces irregular-style output (ie two column format) when combining irregular grid (GRD Flag) with convolution (ILS or AVG Flags).
Reason: Internal spectral grid flagged as irregular for calculations but, after convolution, should then have been reset to regular before output.
Patch: spcils_sub.f90
Fix: RFM v5.02
 
#11 Reported: 21NOV18
Affects: v5.00, v5.01
Symptom: Error reading .grd irregular grid file when using combination of GRD and ILS flags AND the *GRD section is specified before the *ILS section in the driver table.
Reason: Until the width of the ILS function is known, the RFM assumes a ±1 cm-1 margin for the ILS convolution when test-loading the irregular grid data. However if the actual grid data is smaller than this, it attempts to read beyond the end of the irregular grid file.
Patch: reagrd_sub.f90
Fix: RFM v5.02
 
#10 Reported: 12OCT18
Affects: v5.00, v5.01
Symptom: Overflow characters in output filenames where viewing geometry information should be inserted, eg
rad_*****.asc
Reason: Mismatch between 5 character format field and 6 characters required to hold negative numbers, eg elevation angle -80.0, which becomes '-80000'
Patch: hgtstr_fnc.f90
Fix: RFM v5.02
 
#9 Reported: 28JUN18 (Olivier Auriacombe, RAL)
Affects: v5.00, v5.01
Symptom: Fatal error message
F-ATMPRF: Atmospheric profile levels not yet established
If using HOM flag in combination with atmospheric parameters in *ATM specified by PARAM=VALUE pairs rather than by .atm files.
Reason: Code branch for PARAM=VALUE inputs missed the profile initialisation step used for the file inputs. Now added
Patch: atmpar_sub.f90, atmcom_dat.f90
Fix: RFM v5.02
 
#8 Reported: 23MAY18 (Lucy Ventress, AOPP, Oxford)
Affects: v5.00
Symptom: Fatal error message
F-SHPGAS: Two different line shapes specified for gas= co2
If using MIX flag in combination with CHI shape specified for CO2 in *SHP section (although OK if CHI shape specified by CHI flag, which is the simpler/recommended method)
Reason: Code for handling different lineshapes assumes CO2 lineshapes already specified by MIX (line-mixing) flag so regards Chi-factor as a conflict. In fact the Chi-shape can be used with or without line-mixing.
Patch: shpgas_sub.f90
Fix: RFM v5.01
 
#7 Reported: 23MAY18 (Li Xiaoying, RADI, China)
Affects: v5.00
Symptom: Array bound error if using FOV + JAC flag, and tangent paths above the perturbed region
Reason: Coding error in handling assignment of tangent rays with FOV and Jacobian combination.
Patch: None - Requires a bit of a rewrite of several modules.
Fix: RFM v5.01
 
#6 Reported: 05MAY18
Affects: v5.00
Symptom: Array bound error if using spectral upper range 980cm-1 with O3 as an absorber
Reason: There is an ozone line in HITRAN2012 (and 2016) at exactly 1006cm-1 which the RFM attempts to include within the ±25cm-1 range of the upper limit of 980cm-1 (which means any line within the 1005–1006cm-1 interval) , which causes the array bound error. Subroutine SPCWID now altered so that any line exactly at the upper limit is not included in the interval.
Patch: spcwid_sub.f90
Fix: RFM v5.01
 
#5 Reported: 04MAY18 (Li Xiaoying, RADI, China)
Affects: v5.00
Symptom: Array bound error reading HITRAN .par file directly (as opposed to reading converted binary version)
Reason: HITRAN uses '0' in the isotope field to indicated isotope#10, but the subroutine REAPAR was reading this as 0, which then translates to an invalid array element in the list of isotopic weights.
Patch: reapar_sub.f90
Fix: RFM v5.01
 
#4Reported: 04MAY18 (Li Xiaoying, RADI, China)
Affects: v5.00
Symptom: Error with FOV flag if the RFM is compiled with
ifort -traceback -check all
Reason: The function FOVFIL reads in the FOV altitudes directly into part of a structure (=derived data type) FOV%ALT. I assume this is not strictly allowed, and reading the data into a local array first seems to fix the problem (no other compilers, switches seem to register this as problematic). I assume there will be other similar occurrences elsewhere in the code if this particular compilation option is used ...
Patch: fovfil_sub.f90
Fix: RFM v5.01
 
#3 Reported: 03MAY18 (Li Xiaoying, RADI, China)
Affects: v5.00
Symptom: Either crashes or multiple warnings in log file when running with HITRAN2016 data.
Reason: The function VALISO tries issue warning of an unrecognised isotope but local array noting previous warnings (to avoid repetition) was not SAVEd between calls. (This also highlights an additional problem that the RFM is not yet up-to-date with all the new molecules & isotopologues introduced with HITRAN 2016)
Patch: valiso_fnc.f90
Fix: RFM v5.01
 
#2 Reported: 02MAY18
Affects: v5.00
Symptom: Incorrect calculation for plane-parallel atmospheres (NAD or ZEN flag) with viewing direction specified by elevation angle *ELE section)
Reason: The subroutine VRTPTH assumed all scaling for plane-parallel atmospheres was using sec(zenith) (*SEC section)
Patch: vrtpth_sub.f90
Fix: RFM v5.01
 
#1 Reported: 02MAY18
Affects: v5.00
Symptom: Array bound errors when calculating more than one spectral range with FOV flag
Reason: The subroutine SPCFOV, which performs the FOV convolution, re-sizes the data structures used to contain tangent paths required to store FOV paths so they cannot be reused for subsequent spectral ranges
Patch: jacpth_sub.f90, jacfov_sub.f90, spcfov_sub.f90
(jacfov_sub.f90 is a new module so you will need to compile it first before running the v5.00 makefile)
Fix: RFM v5.01