/[MITgcm]/MITgcm/eesupp/src/eeset_parms.F
ViewVC logotype

Diff of /MITgcm/eesupp/src/eeset_parms.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.24 by heimbach, Wed Apr 16 20:48:06 2008 UTC revision 1.25 by jmc, Tue Apr 21 16:01:31 2009 UTC
# Line 4  C $Name$ Line 4  C $Name$
4  #include "CPP_EEOPTIONS.h"  #include "CPP_EEOPTIONS.h"
5    
6  CBOP  CBOP
7  C     !ROUTINE: EESET_PARMS  C     !ROUTINE: EESET_PARMS
8    
9  C     !INTERFACE:  C     !INTERFACE:
10        SUBROUTINE EESET_PARMS        SUBROUTINE EESET_PARMS
# Line 12  C     !INTERFACE: Line 12  C     !INTERFACE:
12    
13  C     !DESCRIPTION:  C     !DESCRIPTION:
14  C     *==========================================================*  C     *==========================================================*
15  C     | SUBROUTINE EESET\_PARMS                                      C     | SUBROUTINE EESET\_PARMS
16  C     | o Routine to set model "parameters"                        C     | o Routine to set model "parameters"
17  C     *==========================================================*  C     *==========================================================*
18  C     | This routine is called from the high-level wrapper          C     | This routine is called from the high-level wrapper
19  C     | after multi-process paralle processing has started but      C     | after multi-process paralle processing has started but
20  C     | before multi-threaded parallelism. THe routine reads an    C     | before multi-threaded parallelism. THe routine reads an
21  C     | an "execution environment" input parameter file holding    C     | an "execution environment" input parameter file holding
22  C     | information about the number of threads at run-time.        C     | information about the number of threads at run-time.
23  C     *==========================================================*  C     *==========================================================*
24    
25  C     !USES:  C     !USES:
# Line 46  C     record :: Temp. for textual I/O Line 46  C     record :: Temp. for textual I/O
46        CHARACTER*(MAX_LEN_PREC) record        CHARACTER*(MAX_LEN_PREC) record
47        NAMELIST /EEPARMS/        NAMELIST /EEPARMS/
48       & nTx, nTy, usingMPI, useCoupler, useCubedSphereExchange,       & nTx, nTy, usingMPI, useCoupler, useCubedSphereExchange,
49       & printMapIncludesZeros, useSETRLSTK, useSIGREG       & useSETRLSTK, useSIGREG,
50         & printMapIncludesZeros, maxLengthPrt1D
51  CEOP  CEOP
52    
53    
# Line 55  C     not fully support features for ove Line 56  C     not fully support features for ove
56  C     and computation.  C     and computation.
57        usingSyncMessages          = .TRUE.        usingSyncMessages          = .TRUE.
58    
 C--   Text map plots of fields ignore exact zero values  
       printMapIncludesZeros = .FALSE.  
   
59  C--   The remaining parameters here are set to default values.  C--   The remaining parameters here are set to default values.
60  C--   and then any different values are read from an input  C--   and then any different values are read from an input
61  C--   file called "eedata".  C--   file called "eedata".
62  C     The defaults set here are for serial execution.  C     The defaults set here are for serial execution.
63  C  C
64  C     nTx and nTy are the number of threads in the X and Y  C     nTx and nTy are the number of threads in the X and Y
65  C     directions.  C     directions.
66  C     nSx/nTx and nSy/nTy be whole numbers at present.  C     nSx/nTx and nSy/nTy be whole numbers at present.
67  C  C
68  C     notUsingXPeriodicity and notUsingYPeriodicity affect  C     notUsingXPeriodicity and notUsingYPeriodicity affect
69  C     the identifying of neighbor processes in a multi-process  C     the identifying of neighbor processes in a multi-process
70  C     mode. On the whole the numerical model code should not  C     mode. On the whole the numerical model code should not
71  C     customise itself based on these numbers as they may be  C     customise itself based on these numbers as they may be
72  C     removed if they do not prove useful.  C     removed if they do not prove useful.
73  C  C
74  C     usingMPI is a flag which controls whether MPI message  C     usingMPI is a flag which controls whether MPI message
75  C     passing library calls are actually made. Note that under  C     passing library calls are actually made. Note that under
76  C     MPI it is necessary to start a program a special way -  C     MPI it is necessary to start a program a special way -
77  C     normally using a command of the form  C     normally using a command of the form
78  C     % mpirun program_name  C     % mpirun program_name
79  C     If usingMPI is set to TRUE but % mpirun .... was not  C     If usingMPI is set to TRUE but % mpirun .... was not
# Line 86  C Line 84  C
84  C     useCoupler is a flag which controls communications with other  C     useCoupler is a flag which controls communications with other
85  C     model components through a coupler interface.  C     model components through a coupler interface.
86  C  C
87  C     useSETRLSTK is a flag which toggles calling a small C routine  C     useSETRLSTK is a flag which toggles calling a small C routine
88  C     which sets the stack size to "unlimited" using setrlimit()  C     which sets the stack size to "unlimited" using setrlimit()
89    
90        notUsingXPeriodicity       = .FALSE.        notUsingXPeriodicity       = .FALSE.
# Line 99  C     which sets the stack size to "unli Line 97  C     which sets the stack size to "unli
97        useSETRLSTK                = .FALSE.        useSETRLSTK                = .FALSE.
98        useSIGREG                  = .FALSE.        useSIGREG                  = .FALSE.
99    
100    C--   Parameter for printing (ascii) to Std-Oupt:
101    C     Text map plots of fields ignore exact zero values
102          printMapIncludesZeros = .FALSE.
103    C     Maximum length for printing (to Std-Msg-Unit) 1-D array
104          maxLengthPrt1D = 65
105    
106  C--   Read in data from eedata file  C--   Read in data from eedata file
107  C     We really ought to be using our environment file reading  C     We really ought to be using our environment file reading
108  C     package - but we have not written it yet.  C     package - but we have not written it yet.
# Line 115  C     Make scratch copies of input data Line 119  C     Make scratch copies of input data
119       &     err=1,IOSTAT=errIO)       &     err=1,IOSTAT=errIO)
120        IF ( errIO .GE. 0 ) GOTO 2        IF ( errIO .GE. 0 ) GOTO 2
121      1 CONTINUE      1 CONTINUE
122         WRITE(msgBuf,'(A)')         WRITE(msgBuf,'(A)')
123       &  'S/R EESET_PARMS'       &  'S/R EESET_PARMS'
124         CALL PRINT_ERROR( msgBuf , 1)         CALL PRINT_ERROR( msgBuf , 1)
125         WRITE(msgBuf,'(A)')         WRITE(msgBuf,'(A)')
126       &  'Unable to open execution environment'       &  'Unable to open execution environment'
127         CALL PRINT_ERROR( msgBuf , 1)         CALL PRINT_ERROR( msgBuf , 1)
128         WRITE(msgBuf,'(A)')         WRITE(msgBuf,'(A)')
129       &  'parameter file "eedata"'       &  'parameter file "eedata"'
130         CALL PRINT_ERROR( msgBuf , 1)         CALL PRINT_ERROR( msgBuf , 1)
131         CALL EEDATA_EXAMPLE         CALL EEDATA_EXAMPLE
# Line 139  C     Make scratch copies of input data Line 143  C     Make scratch copies of input data
143   1001 CONTINUE   1001 CONTINUE
144        CLOSE(eeDataUnit)        CLOSE(eeDataUnit)
145  C--   Report contents of parameter file  C--   Report contents of parameter file
146        WRITE(msgBuf,'(A)')        WRITE(msgBuf,'(A)')
147       & '// ======================================================='       & '// ======================================================='
148        CALL PRINT_MESSAGE(msgBuf, standardMessageUnit, SQUEEZE_RIGHT , 1)        CALL PRINT_MESSAGE(msgBuf, standardMessageUnit, SQUEEZE_RIGHT , 1)
149        WRITE(msgBuf,'(A)')        WRITE(msgBuf,'(A)')
150       & '// Execution Environment parameter file "eedata"'       & '// Execution Environment parameter file "eedata"'
151        CALL PRINT_MESSAGE(msgBuf, standardMessageUnit, SQUEEZE_RIGHT , 1)        CALL PRINT_MESSAGE(msgBuf, standardMessageUnit, SQUEEZE_RIGHT , 1)
152        WRITE(msgBuf,'(A)')        WRITE(msgBuf,'(A)')
153       & '// ======================================================='       & '// ======================================================='
154        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,        CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
155       &  SQUEEZE_RIGHT , 1)       &  SQUEEZE_RIGHT , 1)
# Line 171  C--   Report contents of parameter file Line 175  C--   Report contents of parameter file
175        IF ( errIO .GE. 0 ) GOTO 4        IF ( errIO .GE. 0 ) GOTO 4
176      3 CONTINUE      3 CONTINUE
177  #ifndef TARGET_PWR3  #ifndef TARGET_PWR3
178         WRITE(msgBuf,'(A)')         WRITE(msgBuf,'(A)')
179       &  'S/R EESET_PARMS'       &  'S/R EESET_PARMS'
180         CALL PRINT_ERROR( msgBuf , 1)         CALL PRINT_ERROR( msgBuf , 1)
181         WRITE(msgBuf,'(A)')         WRITE(msgBuf,'(A)')
182       &  'Error reading execution environment '       &  'Error reading execution environment '
183         CALL PRINT_ERROR( msgBuf , 1)         CALL PRINT_ERROR( msgBuf , 1)
184         WRITE(msgBuf,'(A)')         WRITE(msgBuf,'(A)')
185       &  'parameter file "eedata"'       &  'parameter file "eedata"'
186         CALL PRINT_ERROR( msgBuf , 1)         CALL PRINT_ERROR( msgBuf , 1)
187         CALL EEDATA_EXAMPLE         CALL EEDATA_EXAMPLE
# Line 194  Cdbg  IF ( errIO .LT. 0 ) GOTO 11 Line 198  Cdbg  IF ( errIO .LT. 0 ) GOTO 11
198  Cdbg  DO K=1, 10  Cdbg  DO K=1, 10
199  Cdbg   READ(eedataUnit,IOSTAT=errIO)  Cdbg   READ(eedataUnit,IOSTAT=errIO)
200  Cdbg   IF ( errIO .LT. 0 ) GOTO 11  Cdbg   IF ( errIO .LT. 0 ) GOTO 11
201  Cdbg  ENDDO  Cdbg  ENDDO
202  Cdbg  READ(eedataUnit,FMT='(30X,1X,L23)',IOSTAT=errIO) notUsingXPeriodicity  Cdbg  READ(eedataUnit,FMT='(30X,1X,L23)',IOSTAT=errIO) notUsingXPeriodicity
203  Cdbg  IF ( errIO .LT. 0 ) GOTO 11  Cdbg  IF ( errIO .LT. 0 ) GOTO 11
204  Cdbg  READ(eedataUnit,FMT='(30X,1X,L23)',IOSTAT=errIO) notUsingYPeriodicity  Cdbg  READ(eedataUnit,FMT='(30X,1X,L23)',IOSTAT=errIO) notUsingYPeriodicity
205  Cdbg  IF ( errIO .LT. 0 ) GOTO 11  Cdbg  IF ( errIO .LT. 0 ) GOTO 11
206  Cdbg  READ(eedataUnit,FMT='(30X,1X,L23)',IOSTAT=errIO) usingMPI  Cdbg  READ(eedataUnit,FMT='(30X,1X,L23)',IOSTAT=errIO) usingMPI
207  Cdbg  IF ( errIO .LT. 0 ) GOTO 11  Cdbg  IF ( errIO .LT. 0 ) GOTO 11
208  Cdbg  READ(eedataUnit,FMT='(30X,1X,I3)',IOSTAT=errIO) nTx        Cdbg  READ(eedataUnit,FMT='(30X,1X,I3)',IOSTAT=errIO) nTx
209  Cdbg  IF ( errIO .LT. 0 ) GOTO 11  Cdbg  IF ( errIO .LT. 0 ) GOTO 11
210  Cdbg  READ(eedataUnit,FMT='(30X,1X,I3)',IOSTAT=errIO) nTy        Cdbg  READ(eedataUnit,FMT='(30X,1X,I3)',IOSTAT=errIO) nTy
211    
212    
213  Cdbg  IF (errIO .LT. 0 ) eeBootError = .TRUE.  Cdbg  IF (errIO .LT. 0 ) eeBootError = .TRUE.
# Line 211  Cdbg  CLOSE(eeDataUnit,IOSTAT=errIO) Line 215  Cdbg  CLOSE(eeDataUnit,IOSTAT=errIO)
215  Cdbg  IF ( eeBootError .OR. errIO .LT. 0 ) THEN  Cdbg  IF ( eeBootError .OR. errIO .LT. 0 ) THEN
216  C--    Report that an error occured  C--    Report that an error occured
217  Cdbg   eeBootError = .TRUE.  Cdbg   eeBootError = .TRUE.
218  Cdbg   WRITE(msgBuf,'(A)' )  Cdbg   WRITE(msgBuf,'(A)' )
219  Cdbg &  'S/R EESET_PARMS: Error reading "eedata" execution environment file'  Cdbg &  'S/R EESET_PARMS: Error reading "eedata" execution environment file'
220  Cdbg   CALL PRINT_ERROR( msgBuf , 1)  Cdbg   CALL PRINT_ERROR( msgBuf , 1)
221  Cdbg  ELSE  Cdbg  ELSE

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.22