1 |
heimbach |
1.1 |
C $Header: /u/gcmpack/MITgcm/pkg/oasis/nest_parent_readparms.F,v 1.0 2006/05/22 20:35:31 gianmaria sannino Exp $ |
2 |
|
|
C $Name: $ |
3 |
|
|
#include "NEST_PARENT_OPTIONS.h" |
4 |
|
|
|
5 |
|
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
6 |
|
|
CBOP 0 |
7 |
|
|
C !ROUTINE: NEST_PARENT_READPARMS |
8 |
|
|
|
9 |
|
|
C !INTERFACE: |
10 |
|
|
SUBROUTINE NEST_PARENT_READPARMS( myThid ) |
11 |
|
|
|
12 |
|
|
C !DESCRIPTION: |
13 |
|
|
C Routine to read in file data.nest_parent |
14 |
|
|
|
15 |
|
|
C !USES: |
16 |
|
|
IMPLICIT NONE |
17 |
|
|
#include "SIZE.h" |
18 |
|
|
#include "EEPARAMS.h" |
19 |
|
|
#include "PARAMS.h" |
20 |
|
|
#include "GRID.h" |
21 |
|
|
#include "NEST_PARENT_PARAMS.h" |
22 |
|
|
#include "NEST_PARENT.h" |
23 |
|
|
|
24 |
|
|
CEOP |
25 |
|
|
|
26 |
|
|
C !INPUT PARAMETERS: |
27 |
|
|
INTEGER myThid |
28 |
|
|
|
29 |
|
|
C !LOCAL VARIABLES: |
30 |
|
|
|
31 |
|
|
#ifdef ALLOW_NEST_PARENT |
32 |
|
|
C msgBuf - Informational/error meesage buffer |
33 |
|
|
C errIO - IO error flag |
34 |
|
|
C iUnit - Work variable for IO unit number |
35 |
|
|
|
36 |
|
|
CHARACTER*(MAX_LEN_MBUF) msgBuf |
37 |
|
|
INTEGER errIO, iUnit |
38 |
|
|
|
39 |
|
|
C-- NEST_PARENT coupler parameters |
40 |
|
|
NAMELIST /NEST_PARENT_PARM01/ |
41 |
|
|
& LeftB, RightB, dirNEST_PARENT |
42 |
|
|
|
43 |
|
|
_BEGIN_MASTER(myThid) |
44 |
|
|
|
45 |
|
|
WRITE(msgBuf,'(A)') |
46 |
|
|
&' NEST_PARENT_READPARAMS: opening data.nest_parent' |
47 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
48 |
|
|
& SQUEEZE_RIGHT , 1) |
49 |
|
|
|
50 |
|
|
CALL OPEN_COPY_DATA_FILE( |
51 |
|
|
I 'data.nest_parent', 'NEST_PARENT_READPARAMS', |
52 |
|
|
O iUnit, |
53 |
|
|
I myThid ) |
54 |
|
|
|
55 |
|
|
C-- set default NEST_PARENT coupler parameters |
56 |
|
|
|
57 |
|
|
C-- Read settings from model parameter file "data.nest_parent". |
58 |
|
|
READ(UNIT=iUnit,NML=NEST_PARENT_PARM01,IOSTAT=errIO) |
59 |
|
|
IF ( errIO .LT. 0 ) THEN |
60 |
|
|
WRITE(msgBuf,'(A)') |
61 |
|
|
& 'S/R INI_PARMS' |
62 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
63 |
|
|
WRITE(msgBuf,'(A)') |
64 |
|
|
& 'Error reading numerical model ' |
65 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
66 |
|
|
WRITE(msgBuf,'(A)') |
67 |
|
|
& 'parameter file "data.nest_parent"' |
68 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
69 |
|
|
WRITE(msgBuf,'(A)') |
70 |
|
|
& 'Problem in namelist NEST_PARENT_PARM01' |
71 |
|
|
CALL PRINT_ERROR( msgBuf , 1) |
72 |
|
|
C CALL MODELDATA_EXAMPLE( myThid ) |
73 |
|
|
STOP 'ABNORMAL END: S/R NEST_PARENT_INIT' |
74 |
|
|
ENDIF |
75 |
|
|
|
76 |
|
|
CLOSE(iUnit) |
77 |
|
|
|
78 |
|
|
WRITE(msgBuf,'(A)') ' NEST_PARENT_INIT: finished |
79 |
|
|
& reading data.nest_parent' |
80 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
81 |
|
|
& SQUEEZE_RIGHT , 1) |
82 |
|
|
|
83 |
|
|
_END_MASTER(myThid) |
84 |
|
|
|
85 |
|
|
C-- Everyone else must wait for the parameters to be loaded |
86 |
|
|
_BARRIER |
87 |
|
|
|
88 |
|
|
#endif /* ALLOW_NEST_PARENT */ |
89 |
sannino |
1.2 |
print*,'LEFT',leftb,rightb |
90 |
|
|
|
91 |
heimbach |
1.1 |
|
92 |
|
|
return |
93 |
|
|
end |