/[MITgcm]/MITgcm_contrib/nesting_sannino/nest_child/nest_child_readparms.F
ViewVC logotype

Annotation of /MITgcm_contrib/nesting_sannino/nest_child/nest_child_readparms.F

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


Revision 1.2 - (hide annotations) (download)
Fri Oct 23 19:44:02 2009 UTC (15 years, 9 months ago) by sannino
Branch: MAIN
Changes since 1.1: +2 -2 lines
commit updated files (bug-fixes plus clean-ups)

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

  ViewVC Help
Powered by ViewVC 1.1.22