Appendix A - EFDC Internal Array Visualization Instructions
The only thing the user need to do to use EFDC_Explorer to plot and otherwise visualize arrays from within EFDC is to modify the EEXPORT subroutine in the section of code listed in the following textbox. To turn on the feature, use the following statement:
IF(.TRUE..AND.JSEXPLORER.EQ.0)THEN
To turn off the feature, use:
IF(.FALSE..AND.JSEXPLORER.EQ.0)THEN
There are basic two types of output, one for time static arrays and one for those that vary as the model progresses (the standard case). Depending on the temporal nature of the array, the user must code the loops inside the IF/THEN block for time static arrays and outside/below the IF/THEN block for time variable arrays. The basic code for outputting the arrays is very simple and examples for both are shown in the text box. The user must make sure the flags are set right in order for EFDC_Explorer to correctly handle the arrays. The EFDC_INT.OUT file is a binary file for efficient reads and disk storage. The following is the basic structure:
DimFlag, TimeFlagTwo Integer*4 flags
ArrayName One Character*8 name to identify the array
The array Loop over the appropriate dimensions and output the array.
Remember to recompile after any changes to the source code.
A section of code from the EEXPOUT subroutine in EFDC.
INTEGER*4 VER CHARACTER*8 ARRAYNAME C**********************************************************C C ! *** INTERNAL ARRAYS IF(.TRUE..AND.JSEXPLORER.EQ.0)THEN ! *** TIME STATIC ARRAYS IF(N.LT.(2*NTSPTC/NPSPH(8)))THEN OPEN(97,FILE='EFDC_INT.OUT',STATUS='UNKNOWN') CLOSE(97,STATUS='DELETE') OPEN(97,FILE='EFDC_INT.OUT',STATUS='UNKNOWN', & ACCESS='SEQUENTIAL',FORM='BINARY') WRITE(97)VER ! FILE FORMAT VERSION # WRITE(97)1 ! # OF TIME VARYING ARRAYS ! FLAGS: ARRAY TYPE, TIME VARIABLE ! ARRAY TYPE: 0 = L DIM'D ! 1 = L,KC DIM'D ! 2 = L,0:KC DIM'D ! 3 = L,KB DIM'D ! 4 = L,KC,NCLASS DIM'D ! TIME VARIABLE: 0 = NOT CHANGING ! 1 = TIME VARYING WRITE(97)0,0 ARRAYNAME='WVKHV' WRITE(97)ARRAYNAME DO L=2,LA WRITE(97)WVKHV(L) ENDDO ENDIF ! *** TIME VARYING ARRAYS WRITE(97)2,1 ARRAYNAME='QQ' WRITE(97)ARRAYNAME DO L=2,LA DO K=0,KC WRITE(97)QQ(L,K) ! Turbulent Intensity ( ENDDO ENDDO ENDIF C C*********************************************************C C RETURN END