/[MITgcm]/MITgcm/pkg/sbo/sbo_readparms.F
ViewVC logotype

Diff of /MITgcm/pkg/sbo/sbo_readparms.F

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

revision 1.1 by dimitri, Fri Jan 31 04:42:16 2003 UTC revision 1.2 by dimitri, Tue Feb 18 05:33:55 2003 UTC
# Line 0  Line 1 
1    C
2    
3    #include "SBO_OPTIONS.h"
4    
5          SUBROUTINE SBO_READPARMS( myThid )
6    C     /==========================================================\
7    C     | SUBROUTINE SBO_READPARMS                                 |
8    C     | o Routine to read in file data.sbo                       |
9    C     \==========================================================/
10          IMPLICIT NONE
11    
12    C     === Global variables ===
13    #include "SIZE.h"
14    #include "EEPARAMS.h"
15    #include "SBO.h"
16    
17    C     === Routine arguments ===
18    C     myThid - Number of this instance of SBO_READPARMS
19          INTEGER myThid
20    
21    #ifdef ALLOW_SBO
22    
23    C     === Local variables ===
24    C     msgBuf      - Informational/error meesage buffer
25    C     errIO       - IO error flag
26    C     iUnit       - Work variable for IO unit number
27    
28          CHARACTER*(MAX_LEN_MBUF) msgBuf
29          INTEGER errIO, iUnit
30    
31    C--   SBO parameters
32          NAMELIST /SBO_PARM01/ sbo_taveFreq
33    
34          _BEGIN_MASTER(myThid)
35    
36          WRITE(msgBuf,'(A)') ' SBO_INIT: opening data.sbo'
37          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
38         &                    SQUEEZE_RIGHT , 1)
39    
40          CALL OPEN_COPY_DATA_FILE(
41         I                          'data.sbo', 'SBO_INIT',
42         O                          iUnit,
43         I                          myThid )
44    
45    C--   set default SBO parameters
46          sbo_taveFreq  = 0.
47    
48    C-----------------------------------------------------------------------
49    
50    C--   Read settings from model parameter file "data.sbo".
51          READ(UNIT=iUnit,NML=SBO_PARM01,IOSTAT=errIO)
52          IF ( errIO .LT. 0 ) THEN
53           WRITE(msgBuf,'(A)')
54         &  'S/R INI_PARMS'
55           CALL PRINT_ERROR( msgBuf , 1)
56           WRITE(msgBuf,'(A)')
57         &  'Error reading SBO package'
58           CALL PRINT_ERROR( msgBuf , 1)
59           WRITE(msgBuf,'(A)')
60         &  'parameter file "data.sbo"'
61           CALL PRINT_ERROR( msgBuf , 1)
62           WRITE(msgBuf,'(A)')
63         &  'Problem in namelist SBO_PARM01'
64           CALL PRINT_ERROR( msgBuf , 1)
65    C      CALL MODELDATA_EXAMPLE( myThid )
66           STOP 'ABNORMAL END: S/R SBO_INIT'
67          ENDIF
68    
69          CLOSE(iUnit)
70    
71          WRITE(msgBuf,'(A)') ' SBO_INIT: finished reading data.sbo'
72          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
73         &                    SQUEEZE_RIGHT , 1)
74    
75          _END_MASTER(myThid)
76    
77    C--   Everyone else must wait for the parameters to be loaded
78          _BARRIER
79    
80    #endif ALLOW_SBO
81    
82          return
83          end

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22