RFM Memory Size

22NOV17

The following is not applicable to RFM v5.0 which uses the dynamic array sizing available in FORTRAN 90 to set arrays during execution. However note that the amount of memory required is roughly proportional to (number of absorbers)*(number of atmospheric layers)*(number of tangent paths)*(spectral fine grid resolution) so you can still run into memory allocation issues if your machine's memory is too small.

The RFM checks all required calculations against available array space and, if insufficient, returns an error message indicating the limiting parameter (MAX...). It should not be possible for the user-inputs to cause an array bound overflow error (if this does happen, please report it as a bug).

Most of the parameters determining RFM array sizes are contained in the include file rfmsiz.inc, and can be increased as required without significantly affecting the total memory requirements. However the following (common block) arrays constitute most of the RFM memory space and increasing their dimensions may create problems:

(in file fincom.inc)
REAL ABSFIN(MAXFIN,MAXCLC) ! Fine mesh absorption
REAL CNTFIN(MAXFIN,MAXCLC) ! Fine mesh path non-LTE factor
(in file widcom.inc)
REAL ABSWID(3,MAXWID,MAXCLC) ! Widepass abs. by parabolic point
REAL CNTWID(3,MAXWID,MAXCLC) ! Widepass nonlte factor by parab.pt. The dimension 3 relates to storing parameters for quadratic interpolation and cannot be altered, but the other dimensions can be modified:
MAXCLC
Maximum number of calculated paths. Should be of the order of the (number of absorbers) x (number of atmospheric layers + number of tangent paths)
MAXWID
Maximum number of widemesh intervals. Since each interval is 1 cm-1 wide, this should be set to the maximum width, in cm-1 required for a single spectral range, plus 4 to allow for overlaps and ILS convolution.
MAXFIN
Maximum number of finemesh grid points per widemesh interval. A value of 2000 is normally required for accurate infrared limb-viewing calculations (ie 2000 pts/cm-1) but more like 30000 for microwave (set by the Doppler width of atmospheric lines)

While maximum values of MAXWID and MAXFIN can be predicted, MAXCLC can often prove too small, resulting in a fatal error message, e.g.

F-TANPTH: No.paths for line-by-line calc=       1625 >MAXCLC in RFMSIZ=   1260
In this case, the following measures are suggested (in order of preference)
  1. Increase the size of MAXCLC by a factor 2, say, and recompile the code, provided that this does not exceed the memory limit of the machine (in which case there will be a system error message when you attempt to run the code).
  2. Redefine the calculation to reduce the number of calculated paths by altering either the .fov or .atm file spacing (see RFM Optimisations), or reduce number of tangent points required in a single run.
  3. Increase MAXCLC while reducing MAXWID and/or MAXFIN to maintain total memory space, subject to caveats listed previously.