/[MITgcm]/MITgcm/pkg/bbl/bbl_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/bbl/bbl_readparms.F

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


Revision 1.4 - (show annotations) (download)
Wed Aug 9 15:23:39 2017 UTC (6 years, 10 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, HEAD
Changes since 1.3: +6 -2 lines
replace CLOSE(nmlfileUnit) with CLOSE(nmlfileUnit,STATUS='DELETE') to remove
scratchfiles after closing, except for SINGLE_DISK_IO, when everything
stays the same

1 C $Header: /u/gcmpack/MITgcm/pkg/bbl/bbl_readparms.F,v 1.3 2014/05/27 23:41:29 jmc Exp $
2 C $Name: BASE $
3
4 #include "BBL_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 CBOP 0
8 C !ROUTINE: BBL_READPARMS
9
10 C !INTERFACE:
11 SUBROUTINE BBL_READPARMS( myThid )
12
13 C !DESCRIPTION:
14 C Initialize BBL variables and constants.
15
16 C !USES:
17 IMPLICIT NONE
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "PARAMS.h"
21 #include "BBL.h"
22
23 C !INPUT PARAMETERS:
24 INTEGER myThid
25 CEOP
26
27 #ifdef ALLOW_BBL
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 /BBL_PARM01/
36 & bbl_wvel, bbl_hvel, bbl_initEta,
37 & bbl_thetaFile, bbl_saltFile, bbl_etaFile
38
39 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
40
41 IF ( .NOT.useBBL ) THEN
42 C- pkg BBL is not used
43 _BEGIN_MASTER(myThid)
44 C- Track pkg activation status:
45 C print a (weak) warning if data.bbl is found
46 CALL PACKAGES_UNUSED_MSG( 'useBBL', ' ', ' ' )
47 _END_MASTER(myThid)
48 RETURN
49 ENDIF
50
51 _BEGIN_MASTER(myThid)
52
53 C-- Default values for BBL
54 bbl_wvel = 1. _d -5
55 bbl_hvel = 1. _d 0
56 bbl_initEta = 20. _d 0
57
58 C- file names for initial conditions:
59 bbl_thetaFile = ' '
60 bbl_saltFile = ' '
61 bbl_etaFile = ' '
62
63 WRITE(msgBuf,'(A)') 'BBL_READPARMS: opening data.bbl'
64 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
65 & SQUEEZE_RIGHT , 1)
66 CALL OPEN_COPY_DATA_FILE(
67 I 'data.bbl', 'BBL_READPARMS',
68 O iUnit,
69 I myThid )
70
71 C Read parameters from open data file
72 READ(UNIT=iUnit,NML=BBL_PARM01)
73 WRITE(msgBuf,'(A)')
74 & 'BBL_READPARMS: finished reading data.bbl'
75 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
76 & SQUEEZE_RIGHT , 1)
77 C Close the open data file
78 #ifdef SINGLE_DISK_IO
79 CLOSE(iUnit)
80 #else
81 CLOSE(iUnit,STATUS='DELETE')
82 #endif /* SINGLE_DISK_IO */
83
84 _END_MASTER(myThid)
85
86 C-- Everyone else must wait for the parameters to be loaded
87 _BARRIER
88
89 #endif /* ALLOW_BBL */
90
91 RETURN
92 END

  ViewVC Help
Powered by ViewVC 1.1.22