/[MITgcm]/MITgcm/pkg/gchem/gchem_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/gchem/gchem_readparms.F

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


Revision 1.8 - (show annotations) (download)
Thu Aug 18 18:23:02 2005 UTC (18 years, 9 months ago) by stephd
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint58e_post, checkpoint57v_post, checkpoint58u_post, checkpoint58w_post, checkpoint57s_post, checkpoint58r_post, checkpoint57y_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58h_post, checkpoint57y_pre, checkpoint58q_post, checkpoint58j_post, checkpoint59a, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint58f_post, checkpoint57x_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpint57u_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post, checkpoint58b_post, checkpoint58m_post
Changes since 1.7: +11 -3 lines
o include additional filenames for reading in extra forcing etc data

1 C $Header: /u/gcmpack/MITgcm/pkg/gchem/gchem_readparms.F,v 1.7 2005/05/14 22:51:45 jmc Exp $
2 C $Name: $
3
4 #include "GCHEM_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: GCHEM_READPARMS
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE GCHEM_READPARMS( myThid )
11
12 C !DESCRIPTION:
13 C Initialize GCHEM parameters, read in data.gchem
14
15 C !USES: ===============================================================
16 IMPLICIT NONE
17 #include "SIZE.h"
18 #include "EEPARAMS.h"
19 #include "GCHEM.h"
20
21 C !INPUT PARAMETERS: ===================================================
22 C myThid :: thread number
23 INTEGER myThid
24
25 C !OUTPUT PARAMETERS: ==================================================
26 C none
27
28 #ifdef ALLOW_GCHEM
29
30 C !LOCAL VARIABLES: ====================================================
31 C tIter0 :: retired parameter
32 C iTracer :: loop indices
33 C iUnit :: unit number for I/O
34 C msgBuf :: message buffer
35 INTEGER tIter0, UNSET_I
36 INTEGER iTracer
37 INTEGER iUnit
38 CHARACTER*(MAX_LEN_MBUF) msgBuf
39 PARAMETER ( UNSET_I = 123456789 )
40 CEOP
41
42 NAMELIST /GCHEM_PARM01/
43 & tIter0,
44 & WindFile,
45 & IceFile,
46 & AtmospFile,
47 & IronFile,
48 & SilicaFile,
49 & Filename1,
50 & Filename2,
51 & Filename3,
52 & Filename4,
53 & Filename5,
54 & nsubtime
55
56 C Set defaults values for parameters in GCHEM.h
57 tIter0 = UNSET_I
58 nsubtime=1
59 windFile=' '
60 atmospFile=' '
61 IceFile=' '
62 IronFile=' '
63 SilicaFile=' '
64 Filename1=' '
65 Filename2=' '
66 Filename3=' '
67 Filename4=' '
68 Filename5=' '
69 C Open and read the data.gchem file
70 _BEGIN_MASTER(myThid)
71 WRITE(msgBuf,'(A)') ' GCHEM_READPARMS: opening data.gchem'
72 CALL PRINT_MESSAGE(msgBuf, standardMessageUnit,
73 & SQUEEZE_RIGHT , 1)
74 CALL OPEN_COPY_DATA_FILE(
75 I 'data.gchem', 'GCHEM_PARM01',
76 O iUnit,
77 I myThid )
78 READ(UNIT=iUnit,NML=GCHEM_PARM01)
79 WRITE(msgBuf,'(A)')
80 & ' GCHEM_READPARMS: finished reading data.gchem'
81 CALL PRINT_MESSAGE(msgBuf, standardMessageUnit,
82 & SQUEEZE_RIGHT , 1)
83
84 C Close the open data file
85 CLOSE(iUnit)
86
87 C- Check for retired parameters:
88 IF ( tIter0 .NE. UNSET_I ) THEN
89 c nRetired = nRetired+1
90 WRITE(msgBuf,'(A,A)')
91 & 'S/R GCHEM_READPARMS: Paramater "tIter0" is',
92 & ' no longer allowed in file "data.gchem"'
93 CALL PRINT_ERROR( msgBuf , myThid)
94 WRITE(msgBuf,'(A,A)')
95 & 'S/R GCHEM_READPARMS: "tIter0" has been moved to',
96 & ' PTRACERS_Iter0 in file "data.ptracers".'
97 CALL PRINT_ERROR( msgBuf , myThid)
98 STOP 'ABNORMAL END: S/R GCHEM_READPARMS'
99 ENDIF
100
101 _END_MASTER(myThid)
102
103 C Everyone else must wait for the parameters to be loaded
104 _BARRIER
105
106 #endif /* ALLOW_GCHEM */
107
108 RETURN
109 END

  ViewVC Help
Powered by ViewVC 1.1.22