/[MITgcm]/MITgcm/model/src/ini_model_io.F
ViewVC logotype

Annotation of /MITgcm/model/src/ini_model_io.F

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


Revision 1.21 - (hide annotations) (download)
Thu Nov 3 16:26:35 2005 UTC (18 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint58e_post, checkpoint57y_post, checkpoint58h_post, checkpoint57y_pre, checkpoint58j_post, checkpoint58, checkpoint58f_post, checkpoint57x_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint58a_post, checkpoint58i_post, checkpoint58g_post, checkpoint57z_post, checkpoint58k_post, checkpoint58b_post, checkpoint58m_post
Changes since 1.20: +58 -7 lines
put a "WARNING" (before turning it to a "STOP") if globalFiles & multi-proc.

1 jmc 1.21 C $Header: /u/gcmpack/MITgcm/model/src/ini_model_io.F,v 1.20 2005/09/06 02:16:09 edhill Exp $
2 jmc 1.2 C $Name: $
3 adcroft 1.1
4     #include "PACKAGES_CONFIG.h"
5     #include "CPP_OPTIONS.h"
6    
7     CBOP
8     C !ROUTINE: INI_MODEL_IO
9 edhill 1.9
10 adcroft 1.1 C !INTERFACE:
11     SUBROUTINE INI_MODEL_IO( myThid )
12    
13 edhill 1.9 C !DESCRIPTION:
14 edhill 1.20 C Pass specific setup data for mdsio/rw.
15 adcroft 1.1
16 edhill 1.9 C !USES:
17 adcroft 1.1 IMPLICIT NONE
18     #include "SIZE.h"
19     #include "EEPARAMS.h"
20     #include "PARAMS.h"
21    
22     C !INPUT/OUTPUT PARAMETERS:
23 jmc 1.21 C myThid :: my Thread Id number
24 adcroft 1.1 INTEGER myThid
25 jmc 1.21
26     C !LOCAL VARIABLES:
27     C msgBuf :: Informational/error meesage buffer
28     CHARACTER*(MAX_LEN_MBUF) msgBuf
29 adcroft 1.1 CEOP
30    
31 jmc 1.21 C- Safety check:
32     IF ( nPx*nPy.NE.1 .AND. globalFiles ) THEN
33     c WRITE(msgBuf,'(2A)')
34     c & 'INI_MODEL_IO: globalFiles=TRUE is not safe',
35     c & ' in Multi-processors (MPI) run'
36     c CALL PRINT_ERROR( msgBuf , myThid)
37     c WRITE(msgBuf,'(2A)')
38     c & 'INI_MODEL_IO: use instead "useSingleCpuIO=.TRUE."'
39     c CALL PRINT_ERROR( msgBuf , myThid)
40     c STOP 'ABNORMAL END: S/R INI_MODEL_IO'
41     C------
42     C GlobalFiles option with Multi-processors execution (with MPI) is not
43     C safe: dependending on the platform & compiler, it may produce:
44     C - incomplete output files (wrong size)
45     C - wrong isolated values in some output files
46     C - missing tiles (all zeros) in some output files.
47     C A safe alternative is to set "useSingleCpuIO=.TRUE." in file "data",
48     C namelist PARAM01 (and to keep the default value of globalFiles=FALSE)
49     C or if you are really sure that the globalFile works well on our platform
50     C & compiler, comment out the above "stop"
51     C-----
52     WRITE(msgBuf,'(2A)')
53     & '** WARNING ** INI_MODEL_IO: globalFiles=TRUE is not safe',
54     & ' in Multi-processors (MPI) run'
55     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
56     & SQUEEZE_RIGHT , myThid)
57     WRITE(msgBuf,'(2A)') '** WARNING ** INI_MODEL_IO:',
58     & ' use instead "useSingleCpuIO=.TRUE."'
59     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
60     & SQUEEZE_RIGHT , myThid)
61     ENDIF
62    
63     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
64    
65     C- Flags specific to RW and MDSIO
66 adcroft 1.1
67     C Set globalFiles flag for READ_WRITE_FLD package
68     CALL SET_WRITE_GLOBAL_FLD( globalFiles )
69     C Set globalFiles flag for READ_WRITE_REC package
70     CALL SET_WRITE_GLOBAL_REC( globalFiles )
71 jmc 1.21 C Set globalFiles flag for READ_WRITE_PICKUP
72 adcroft 1.1 CALL SET_WRITE_GLOBAL_PICKUP( globalFiles )
73    
74    
75 jmc 1.21 C- MNC model-io initialisation
76    
77     #ifdef ALLOW_MNC
78     IF (useMNC) THEN
79    
80     C Write units/set precision/etc for I/O of variables/arrays
81     C belonging to the core dynamical model
82     CALL INI_MNC_VARS( myThid )
83    
84     #ifdef ALLOW_AUTODIFF_MONITOR
85     CALL AUTODIFF_INI_MODEL_IO( myThid )
86     #endif
87    
88     ENDIF
89     #endif /* ALLOW_MNC */
90    
91 adcroft 1.1 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
92    
93     RETURN
94     END

  ViewVC Help
Powered by ViewVC 1.1.22