/[MITgcm]/MITgcm/pkg/mypackage/mypackage_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/mypackage/mypackage_readparms.F

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


Revision 1.4 - (show annotations) (download)
Sun Dec 27 23:40:03 2009 UTC (14 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64x, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint63, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x
Changes since 1.3: +7 -7 lines
fix typo in description (comments)

1 C $Header: /u/gcmpack/MITgcm/pkg/mypackage/mypackage_readparms.F,v 1.3 2008/01/27 20:52:11 jmc Exp $
2 C $Name: $
3
4 #include "MYPACKAGE_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 CBOP 0
8 C !ROUTINE: MYPACKAGE_READPARMS
9
10 C !INTERFACE:
11 SUBROUTINE MYPACKAGE_READPARMS( myThid )
12
13 C !DESCRIPTION:
14 C Initialize MYPACKAGE variables and constants.
15
16 C !USES:
17 IMPLICIT NONE
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "PARAMS.h"
21 #include "MYPACKAGE.h"
22
23 C !INPUT PARAMETERS:
24 INTEGER myThid
25 CEOP
26
27 #ifdef ALLOW_MYPACKAGE
28
29 C !LOCAL VARIABLES:
30 C msgBuf :: Informational/error message buffer
31 C iUnit :: Work variable for IO unit number
32 CHARACTER*(MAX_LEN_MBUF) msgBuf
33 INTEGER iUnit
34
35 NAMELIST /MYPACKAGE_PARM01/
36 & myPa_MNC,
37 & myPa_StaV_Cgrid, myPa_Tend_Cgrid,
38 & myPa_applyTendT, myPa_applyTendS,
39 & myPa_applyTendU, myPa_applyTendV,
40 & myPa_doSwitch1, myPa_doSwitch2,
41 & myPa_index1, myPa_index2,
42 & myPa_param1, myPa_param2,
43 & myPa_string1, myPa_string2,
44 & myPa_Scal1File, myPa_Scal2File,
45 & myPa_VelUFile, myPa_VelVFile,
46 & myPa_Surf1File, myPa_Surf2File
47
48 _BEGIN_MASTER(myThid)
49
50 C-- Default values for MYPACKAGE
51 myPa_MNC = useMNC
52 myPa_StaV_Cgrid = .TRUE.
53 myPa_Tend_Cgrid = .TRUE.
54 myPa_applyTendT = .FALSE.
55 myPa_applyTendS = .FALSE.
56 myPa_applyTendU = .FALSE.
57 myPa_applyTendV = .FALSE.
58 C- additional parameters:
59 myPa_doSwitch1 = .FALSE.
60 myPa_doSwitch2 = .FALSE.
61 myPa_index1 = 0
62 myPa_index2 = 0
63 myPa_param1 = 0. _d 0
64 myPa_param2 = 0. _d 0
65 myPa_string1 = ' '
66 myPa_string2 = ' '
67 C- file names for initial conditions:
68 myPa_Scal1File = ' '
69 myPa_Scal2File = ' '
70 myPa_VelUFile = ' '
71 myPa_VelVFile = ' '
72 myPa_Surf1File = ' '
73 myPa_Surf2File = ' '
74
75 WRITE(msgBuf,'(A)') 'MYPACKAGE_READPARMS: opening data.mypackage'
76 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
77 & SQUEEZE_RIGHT , 1)
78 CALL OPEN_COPY_DATA_FILE(
79 I 'data.mypackage', 'MYPACKAGE_READPARMS',
80 O iUnit,
81 I myThid )
82
83 C Read parameters from open data file
84 READ(UNIT=iUnit,NML=MYPACKAGE_PARM01)
85 WRITE(msgBuf,'(A)')
86 & 'MYPACKAGE_READPARMS: finished reading data.mypackage'
87 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
88 & SQUEEZE_RIGHT , 1)
89 C Close the open data file
90 CLOSE(iUnit)
91
92 C Make sure that we locally honor the global MNC on/off flag
93 myPa_MNC = myPa_MNC .AND. useMNC
94 #ifndef ALLOW_MNC
95 C Fix to avoid running without getting any output:
96 myPa_MNC = .FALSE.
97 #endif
98 myPa_MDSIO = (.NOT. myPa_MNC) .OR. outputTypesInclusive
99
100 _END_MASTER(myThid)
101
102 C-- Everyone else must wait for the parameters to be loaded
103 _BARRIER
104
105 #endif /* ALLOW_MYPACKAGE */
106
107 RETURN
108 END

  ViewVC Help
Powered by ViewVC 1.1.22