SPLITTING_FACTOR | ratio of the max number of internal grid points to the number of base grid points |
NUM_SH_TERM_FACTOR | ratio of average number of spherical harmonic terms to total possible (NLM) |
CELL_TO_POINT_RATIO | ratio of number of cells to number of grid points |
The Fortran 77 version has all of the large arrays declared in the
main program (shdom.f). The input property grid arrays are in a common
block. The array sizes are governed by constants defined in parameter
statements. When using the tabulated phase function (or extinction
only) property files the large arrays are controlled by:
MAXPG | max number of property grid points |
MAXIG | max number of internal grid points |
MAXIC | max number of grid cells, between 1 and 2 times grid points |
MAXIV | max words for source function and radiance arrays; needed size is average spherical harmonic truncation times number of grid points. |
MAXIDO | max words for temporary discrete ordinate azimuthal array; needed size is max azimuths times number of grid points. |
MAXPGL | max words for the property grid phase function Legendre series. |
MAXIGL | max words for the internal grid phase function series. These are MAXLEG (number Legendre terms) times the number of grid points. |
The optimum use of memory requires knowledge of the particular problem you are running. For example, the factor relating MAXIV to MAXIG is the average number of spherical harmonic terms (which depends on the angular resolution chosen and how much benefit the adaptive truncation provides). At most, MAXIV=NLM*MAXIG, where NLM is the maximum number of spherical harmonic terms (NLM ~ Nmu*Nphi/2 for 3D, half that for 2D). If there is no cell splitting then MAXIC=MAXIG; at most MAXIC=2*MAXIG.
For tabulated phase functions the major memory use in 4 byte words is:
   MEMWORD = 16.5*MAXIC + 33*MAXIG + 3*MAXIV + MAXIDO
For Nmu=8 Nphi=16 the most space needed is
   MEMWORD = (33+33+192+16)*MAXIG = 274*MAXIG
Memory may be saved by setting unused arrays to a length of 1:
DELSOURCE | if ACCELFLAG=.FALSE. |
PLANCK | if not using a thermal source |
DIRFLUX | if not using a solar source |
SUMRADOUT | if not outputting radiance |
SUMFLUXDIV | if not outputting net flux convergence (heating rate) |
SUMSHTERMS | if not outputting SH terms (mean radiance/net flux) |
Other array sizes are generally not too large and have been set large
enough so that they seldom need to be changed:
shdom.f | |
---|---|
MAXNCMU | array size for associate Legendre coefficients in SH/DO transforms |
MAXNCPHI | array size for Fourier coefficients in SH/DO transforms |
MAXNBC | max number of grid points on either boundary (set to MAXIG/10) |
MAXBCRAD | array size for number of boundary radiances (for Lambertian surface MAXBCRAD<=2*MAXNBC, for general BRDF MAXBCRAD<=(2+NANG/2)*MAXNBC) |
MAXSFCPTS | max number of point in regular grid of variable surface parameters |
MAXSFCPARS | max number of surface parameters for variable sfc (includes temp) |
MAXNXY | max number of either X or Y points on base grid |
MAXNZ | max number of vertical levels for property & base grid and k-dist |
MAXRADOUT | max number of output radiances |
MAXOUT | max number of output files |
MAXPAR | max number of output parameters input for an output file |
MAXNG | max number of "k's" in a single k-distribution. |
MAXNMU | max number of zenith angles |
MAXNPHI | max number of azimuth angles |
shdomsub1.f | |
MAXNLM | max number of spherical harmonic terms |
MAXNMU | max number of zenith angles |
MAXNPHI | max number of azimuth angles |
MAXM | max Fourier azimuthal mode (M) |
shdomsub2.f | |
MAXNZ | |
MAXNPHI | |
MAXNLM | |
MAXLEG | max number of Legendre phase function terms |
MAXPHASE | max number of tabulated phase functions |
shdomsub3.f | |
MAXOUT | (for namelist subroutine) |
MAXPAR |