/[MITgcm]/MITgcm_contrib/sannino/OASIS_3.0_Coupler/pkg/oasis_readparms.F
ViewVC logotype

Annotation of /MITgcm_contrib/sannino/OASIS_3.0_Coupler/pkg/oasis_readparms.F

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


Revision 1.2 - (hide annotations) (download)
Thu Jul 20 21:35:41 2006 UTC (19 years ago) by sannino
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -7 lines
o Test change code.

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

  ViewVC Help
Powered by ViewVC 1.1.22