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

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

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


Revision 1.5 - (show annotations) (download)
Sun Jan 3 19:35:34 2010 UTC (14 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62c, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint64, checkpoint63, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint62b, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f
Changes since 1.4: +19 -16 lines
- change default sbo_taveFreq (=taveFreq, was previously =0);
- fix printed message.

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

  ViewVC Help
Powered by ViewVC 1.1.22