/[MITgcm]/MITgcm/pkg/regrid/regrid_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/regrid/regrid_readparms.F

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


Revision 1.2 - (show annotations) (download)
Wed May 28 00:13:16 2014 UTC (10 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64z, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e
Changes since 1.1: +15 -3 lines
add a call to S/R packages_unused_msg.F to print a weak warning
when parameter file "data.this_pkg" exist but  but useTHIS_PKG=F

1 C $Header: /u/gcmpack/MITgcm/pkg/regrid/regrid_readparms.F,v 1.1 2006/08/15 04:05:48 edhill Exp $
2 C $Name: $
3
4 #include "REGRID_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 CBOP 0
8 C !ROUTINE: REGRID_READPARMS
9
10 C !INTERFACE:
11 SUBROUTINE REGRID_READPARMS( myThid )
12
13 C !DESCRIPTION:
14 C Initialize REGRID variables and constants.
15
16 C !USES:
17 IMPLICIT NONE
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "PARAMS.h"
21 #include "GRID.h"
22 #include "REGRID_SIZE.h"
23 #include "REGRID.h"
24
25 C !INPUT PARAMETERS:
26 INTEGER myThid
27 CEOP
28
29 #ifdef ALLOW_REGRID
30
31 CHARACTER*(MAX_LEN_MBUF) msgBuf
32 CHARACTER*(MAX_LEN_FNAM) blank
33 INTEGER iUnit, i
34
35 NAMELIST /REGRID_PARM01/
36 & regrid_MNC, regrid_MDSIO,
37 & regrid_ngrids, regrid_fbname_in,
38 & regrid_nout
39
40 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
41
42 IF ( .NOT.useREGRID ) THEN
43 C- pkg REGRID is not used
44 _BEGIN_MASTER(myThid)
45 C- Track pkg activation status:
46 C print a (weak) warning if data.regrid is found
47 CALL PACKAGES_UNUSED_MSG( 'useREGRID', ' ', ' ' )
48 _END_MASTER(myThid)
49 RETURN
50 ENDIF
51
52 _BEGIN_MASTER(myThid)
53
54 DO i = 1,MAX_LEN_FNAM
55 blank(i:i) = ' '
56 ENDDO
57
58 C Default values for REGRID
59 REGRID_MNC = useMNC
60 REGRID_MDSIO = .FALSE.
61 regrid_ngrids = 0
62 DO i = 1,REGRID_NGRID_MAX
63 REGRID_fbname_in(i)(1:MAX_LEN_FNAM) = blank(1:MAX_LEN_FNAM)
64 REGRID_fbname_out(i)(1:MAX_LEN_FNAM) = blank(1:MAX_LEN_FNAM)
65 regrid_nout(i) = 0
66 ENDDO
67
68 WRITE(msgBuf,'(A)') 'REGRID_READPARMS: opening data.regrid'
69 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
70 & SQUEEZE_RIGHT , 1)
71 CALL OPEN_COPY_DATA_FILE(
72 I 'data.regrid', 'REGRID_READPARMS',
73 O iUnit,
74 I myThid )
75
76 C Read parameters from open data file
77 READ(UNIT=iUnit,NML=REGRID_PARM01)
78 WRITE(msgBuf,'(A)')
79 & 'REGRID_READPARMS: finished reading data.regrid'
80 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
81 & SQUEEZE_RIGHT , 1)
82 C Close the open data file
83 CLOSE(iUnit)
84
85 C Make sure that we locally honor the global MNC on/off flag
86 REGRID_MNC = REGRID_MNC .AND. useMNC
87 #ifndef ALLOW_MNC
88 C Fix to avoid running without getting any output:
89 REGRID_MNC = .FALSE.
90 #endif
91 REGRID_MDSIO = (.NOT. REGRID_MNC) .OR. outputTypesInclusive
92
93 _END_MASTER(myThid)
94
95 C-- Everyone else must wait for the parameters to be loaded
96 _BARRIER
97
98 #endif /* ALLOW_REGRID */
99
100 RETURN
101 END

  ViewVC Help
Powered by ViewVC 1.1.22