The block-location indices (LB's) appropriate to the variables in a particular segment of the F-array have integer values which are always the same, whatever the size of the grid, ie regardless of the values of NX, NY, NZ and LSTEP. They therefore provide the most convenient means of referring to F-array variables and so of accessing or modifying the contents of the F-array. Thus:
LF=L0F(LB) + IY + NY*(IX-1) + NX*NY*(IZ-1) can be used for getting the values of the WSV's;
LF=L0F(LB) + IY + NY*(IX-1) can be used for getting the values of the other FFV's, and of the SWV's;
LF=L0F(LB) + IX can be used for getting the values of the XWV's;
LF=L0F(LB) + IY can be used for getting the values of the YWV's;
LF=L0F(LB) + IZ can be used for getting the values of the ZWV's;
LF=L0F(LB)+(IY-IYF+1)+(IYL-IYF+1)*(IX-IXF+1)+(IYL-IYF+1)* (IXL-IXF+1)*(IZ-IZF+1) can be used for getting the values of the PWV's.
Once the LB of a particular variable is known, that variable can be accessed. For example, if the LB of the pressure is called LBP1 and that of temperature is called LBTEMP, the following FORTRAN sequence could be employed for computing the density as a function o temperature and pressure to accord with the ideal-gas law:
The important question is therefore: how can the LB's be ascert- ained? A full answer to this question will now be given, by reference to the listing of the GRDLOC file (See POLIS/ PHOENICS-2/ Fortran).
wbs