/[MITgcm]/MITgcm/pkg/rw/write_myfield.F
ViewVC logotype

Contents of /MITgcm/pkg/rw/write_myfield.F

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


Revision 1.1 - (show annotations) (download)
Wed Nov 2 15:37:54 2005 UTC (19 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58r_post, checkpoint58l_post, checkpoint59q, checkpoint59p, checkpoint57y_post, checkpoint59r, checkpoint58k_post, checkpoint58c_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint57x_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint57y_pre, checkpoint59, checkpoint58, checkpoint58e_post, mitgcm_mapl_00, checkpoint58n_post, checkpoint58x_post, checkpoint58y_post, checkpoint58v_post, checkpoint58w_post, checkpoint58h_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint58f_post, checkpoint58t_post, checkpoint61h, checkpoint58b_post, checkpoint58m_post, checkpoint58q_post, checkpoint58j_post, checkpoint58d_post, checkpoint57w_post, checkpoint58a_post, checkpoint58i_post, checkpoint58u_post, checkpoint58g_post, checkpoint60, checkpoint61, checkpoint58o_post, checkpoint57z_post
move write_myfield.F & read_write_rec.F from model/src to pkg/rw

1 C $Header: /u/gcmpack/MITgcm/model/src/write_myfield.F,v 1.4 2005/05/15 03:02:08 jmc Exp $
2 C $Name: $
3
4 #include "RW_OPTIONS.h"
5
6 #undef MULTIPLE_RECORD_STATE_FILES
7
8 CBOP
9 C !ROUTINE: WRITE_MYFIELD
10 C !INTERFACE:
11 SUBROUTINE WRITE_MYFIELD (
12 & myField, myFile, myTime, myIter, myThid )
13 C !DESCRIPTION: \bv
14 C *==========================================================*
15 C | SUBROUTINE WRITE_MYFIELD
16 C | o Template routine for probing one array at dumpFreq rate
17 C | place call to this routine into code
18 C *==========================================================*
19 C | Write model state files for post-processing. This file
20 C | includes code for diagnosing W and RHO for output.
21 C | File write_state.F: Routines to handle mid-level I/O
22 C | interface.
23 C | Adapted from S/R WRITE_STATE
24 C *==========================================================*
25 C \ev
26
27 C !USES:
28 IMPLICIT NONE
29 C == Global variables ===
30 #include "SIZE.h"
31 #include "EEPARAMS.h"
32 #include "PARAMS.h"
33 LOGICAL DIFFERENT_MULTIPLE
34 EXTERNAL DIFFERENT_MULTIPLE
35 INTEGER IO_ERRCOUNT
36 EXTERNAL IO_ERRCOUNT
37
38 C !INPUT/OUTPUT PARAMETERS:
39 C == Routine arguments ==
40 C myThid - Thread number for this instance of the routine.
41 C myIter - Iteration number
42 C myTime - Current time of simulation ( s )
43 _RL myField(sNx,sNy,Nr,nSx,nSy)
44 _RL myTime
45 INTEGER myThid
46 INTEGER myIter
47 CHARACTER*(*) myFile
48
49 C !LOCAL VARIABLES:
50 C == Local variables ==
51 CHARACTER*(MAX_LEN_MBUF) suff
52 CHARACTER*(80) localfile
53 INTEGER iRec, il
54
55 c == external ==
56
57 integer ilnblnk
58 external ilnblnk
59
60 CEOP
61
62 IF (
63 & DIFFERENT_MULTIPLE(dumpFreq,myTime,deltaTClock)
64 & .OR. myTime.EQ.endTime
65 & .OR. myTime.EQ.startTime
66 & ) THEN
67 IF ( dumpFreq .EQ. 0.0 ) THEN
68 iRec = 1
69 ELSE
70 iRec = NINT ( (myTime-startTime) / dumpFreq + 1. )
71 ENDIF
72
73 C-- Going to really do some IO. Make everyone except master thread wait.
74 _BARRIER
75 _BEGIN_MASTER( myThid )
76
77 C-- Write model fields
78 il=ilnblnk( myFile )
79 write(localfile(1:80),'(80a)') ' '
80 write(localfile(1:80),'(2a)') myFile(1:il),'.'
81
82 #ifdef MULTIPLE_RECORD_STATE_FILES
83
84 C Write each snap-shot as a new record in one file per variable
85 C - creates relatively few files but these files can become huge
86 CALL WRITE_REC_XYZ_RL( localfile, myField,iRec,myIter,myThid)
87
88 #else /* MULTIPLE_RECORD_STATE_FILES */
89
90 C Write each snap-shot as a new file (original and default method)
91 C - creates many files but for large configurations is easier to
92 C transfer analyse a particular snap-shots
93 WRITE(suff,'(I10.10)') myIter
94 STOP 'WRITE_FLD_XYZ_RL CALL INCORRECT - CONTACT SUPPORT'
95 C CALL WRITE_FLD_XYZ_RL( localfile,suff,myField,myIter,myThid)
96
97 #endif /* MULTIPLE_RECORD_STATE_FILES */
98
99 _END_MASTER( myThid )
100 _BARRIER
101
102 ENDIF
103
104 RETURN
105 END

  ViewVC Help
Powered by ViewVC 1.1.22