/[MITgcm]/MITgcm/pkg/longstep/longstep_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/longstep/longstep_readparms.F

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


Revision 1.4 - (show annotations) (download)
Tue May 27 23:41:28 2014 UTC (9 years, 11 months 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.3: +14 -1 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/longstep/longstep_readparms.F,v 1.3 2010/01/18 01:04:18 jmc Exp $
2 C $Name: $
3
4 #include "LONGSTEP_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 CBOP
8 C !ROUTINE: LONGSTEP_READPARMS
9
10 C !INTERFACE:
11 SUBROUTINE LONGSTEP_READPARMS( myThid )
12
13 C !DESCRIPTION:
14 C Initialize longstep parameters, read in data.longstep
15
16 C !USES:
17 IMPLICIT NONE
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "LONGSTEP_PARAMS.h"
21 #include "PARAMS.h"
22
23 C !INPUT PARAMETERS:
24 INTEGER myThid
25 CEOP
26
27 #ifdef ALLOW_LONGSTEP
28
29 C !LOCAL VARIABLES:
30 C iUnit :: unit number for I/O
31 C msgBuf :: message buffer
32 INTEGER iUnit
33 CHARACTER*(MAX_LEN_MBUF) msgBuf
34
35 C LS_nIter :: number of dynamics time steps between ptracer steps
36 C LS_whenToSample :: when to sample dynamical fields for the longstep average
37 C 0 - at beginning of timestep (reproduces offline results)
38 C 1 - after first THERMODYNAMICS but before DYNAMICS
39 C (use use old U,V,W for advection, but new T,S for GCHEM if
40 C staggerTimeStep=.FALSE.; reproduces online with
41 C staggerTimeStep=.FALSE. for LS_nIter=1)
42 C 2 - after DYNAMICS and second THERMODYNAMICS
43 C (use new U,V,W and T,S; reproduces online with
44 C staggerTimeStep=.TRUE. for LS_nIter=1)
45 NAMELIST /LONGSTEP_PARM01/
46 & LS_nIter, LS_whenToSample
47
48 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
49
50 IF ( .NOT.usePTRACERS ) THEN
51 C- pkg LONGSTEP is not used
52 _BEGIN_MASTER(myThid)
53 C- Track pkg activation status:
54 C print a (weak) warning if data.longstep is found
55 CALL PACKAGES_UNUSED_MSG(
56 & 'usePTRACERS', 'LONGSTEP_READPARMS', 'longstep' )
57 _END_MASTER(myThid)
58 RETURN
59 ENDIF
60
61 _BEGIN_MASTER(myThid)
62
63 C Set defaults values for parameters in LONGSTEP_PARAMS.h
64 LS_nIter = 1
65 LS_whenToSample = 0
66
67 C Open and read the data.longstep file
68 WRITE(msgBuf,'(A)') ' LONGSTEP_READPARMS: opening data.longstep'
69 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
70 & SQUEEZE_RIGHT , myThid )
71 CALL OPEN_COPY_DATA_FILE(
72 I 'data.longstep', 'LONGSTEP_READPARMS',
73 O iUnit,
74 I myThid )
75 READ(UNIT=iUnit,NML=LONGSTEP_PARM01)
76 WRITE(msgBuf,'(A)')
77 & ' LONGSTEP_READPARMS: finished reading data.longstep'
78 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
79 & SQUEEZE_RIGHT , myThid )
80
81 C Close the open data file
82 CLOSE(iUnit)
83
84 C Now set-up any remaining parameters that result from the input
85 C parameters
86
87 C-- Print a summary of longstep parameter values:
88 iUnit = standardMessageUnit
89 WRITE(msgBuf,'(A)') '// ==================================='
90 CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , myThid )
91 WRITE(msgBuf,'(A)') '// longstep parameters '
92 CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , myThid )
93 WRITE(msgBuf,'(A)') '// ==================================='
94 CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , myThid )
95 CALL WRITE_0D_I( LS_nIter, INDEX_NONE,
96 & 'LS_nIter =',
97 & ' /* number of dynamics steps between ptracer steps */')
98 CALL WRITE_0D_I( LS_whenToSample, INDEX_NONE,
99 & 'LS_whenToSample =',
100 & ' /* 0: before; 1: after TD, before DYN; 2: after */')
101 WRITE(msgBuf,'(A)') ' -----------------------------------'
102 CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT, myThid )
103
104 _END_MASTER(myThid)
105 C Everyone else must wait for the parameters to be loaded
106 _BARRIER
107
108 #endif /* ALLOW_LONGSTEP */
109
110 RETURN
111 END
112

  ViewVC Help
Powered by ViewVC 1.1.22