/[MITgcm]/MITgcm_contrib/darwin2/pkg/darwin/darwin_write_pickup.F
ViewVC logotype

Annotation of /MITgcm_contrib/darwin2/pkg/darwin/darwin_write_pickup.F

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


Revision 1.2 - (hide annotations) (download)
Mon Jan 14 16:50:46 2013 UTC (12 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: ctrb_darwin2_ckpt64f_20130405, ctrb_darwin2_ckpt64e_20130305, ctrb_darwin2_ckpt64g_20130503, ctrb_darwin2_ckpt64c_20130120, ctrb_darwin2_ckpt64d_20130219
Changes since 1.1: +5 -3 lines
- add missing value argument to S/R MDS_WR_METAFILES argument list

1 jmc 1.2 C $Header: /u/gcmpack/MITgcm_contrib/darwin2/pkg/darwin/darwin_write_pickup.F,v 1.1 2011/04/13 18:56:24 jahn Exp $
2     C $Name: $
3 jahn 1.1
4     #include "DARWIN_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: DARWIN_WRITE_PICKUP
8    
9     C !INTERFACE: ==========================================================
10     SUBROUTINE DARWIN_WRITE_PICKUP( permPickup,
11     I suff, myTime, myIter, myThid )
12    
13     C !DESCRIPTION:
14     C Writes PAR_day array (needed for a restart) to a pickup file
15    
16     C !USES: ===============================================================
17     IMPLICIT NONE
18     C === Global variables ===
19     #include "SIZE.h"
20     #include "EEPARAMS.h"
21     #include "PARAMS.h"
22     #include "DARWIN_SIZE.h"
23     #include "DARWIN_IO.h"
24    
25     C !INPUT PARAMETERS: ===================================================
26     C permPickup :: write a permanent pickup
27     C suff :: suffix for pickup file (eg. ckptA or 0000000010)
28     C myTime :: Current time in simulation
29     C myIter :: Current iteration number in simulation
30     C myThid :: My Thread Id number
31     LOGICAL permPickup
32     CHARACTER*(*) suff
33     _RL myTime
34     INTEGER myIter
35     INTEGER myThid
36     CEOP
37    
38     #ifdef ALLOW_DARWIN
39     C add more ALLOWs here for other fields in pickup
40     #ifdef ALLOW_PAR_DAY
41    
42     C !LOCAL VARIABLES:
43     C == Local variables ==
44     CHARACTER*(MAX_LEN_FNAM) fn
45     LOGICAL glf
46 jmc 1.2 _RL timList(1)
47 jahn 1.1 INTEGER prec, irec, ifld
48     INTEGER listDim, nWrFlds
49     PARAMETER( listDim = 2 )
50     CHARACTER*(8) wrFldList(listDim)
51     CHARACTER*(MAX_LEN_MBUF) msgBuf
52    
53     c IF ( DARWIN_pickup_write_mdsio ) THEN
54     prec = precFloat64
55     WRITE(fn,'(A,A)') 'pickup_darwin.',suff
56    
57     ifld = 0
58     irec = 0
59    
60     #ifdef ALLOW_PAR_DAY
61     C record number < 0 : a hack not to write meta files now:
62     ifld = ifld + 1
63     irec = irec - 1
64     CALL WRITE_REC_3D_RL( fn, prec, nR,
65     & PARday(1-OLx,1-OLy,1,1,1,1),
66     & irec, myIter, myThid )
67     IF (ifld.LE.listDim) wrFldList(ifld) = 'PARday1 '
68     ifld = ifld + 1
69     irec = irec - 1
70     CALL WRITE_REC_3D_RL( fn, prec, nR,
71     & PARday(1-OLx,1-OLy,1,1,1,2),
72     & irec, myIter, myThid )
73     IF (ifld.LE.listDim) wrFldList(ifld) = 'PARday2 '
74     #endif
75    
76     C--------------------------
77     nWrFlds = ifld
78     IF ( nWrFlds.GT.listDim ) THEN
79     WRITE(msgBuf,'(2A,I5,A)') 'DARWIN_WRITE_PICKUP: ',
80     & 'trying to write ',nWrFlds,' fields'
81     CALL PRINT_ERROR( msgBuf, myThid )
82     WRITE(msgBuf,'(2A,I5,A)') 'DARWIN_WRITE_PICKUP: ',
83     & 'field-list dimension (listDim=',listDim,') too small'
84     CALL PRINT_ERROR( msgBuf, myThid )
85     STOP 'ABNORMAL END: S/R DARWIN_WRITE_PICKUP (list-size Pb)'
86     ENDIF
87    
88     #ifdef ALLOW_MDSIO
89     C uses this specific S/R to write (with more informations) only meta
90     C files
91     glf = globalFiles
92 jmc 1.2 timList(1) = myTime
93 jahn 1.1 irec = ABS(irec)
94     CALL MDS_WR_METAFILES( fn, prec, glf, .FALSE.,
95     & 0, 0, nR, ' ',
96     & nWrFlds, wrFldList,
97 jmc 1.2 & 1, timList, oneRL,
98 jahn 1.1 & irec, myIter, myThid )
99     #endif /* ALLOW_MDSIO */
100     C--------------------------
101    
102     c ENDIF /* DARWIN_pickup_write_mdsio */
103    
104     #endif /* ALLOW_PAR_DAY */
105     #endif /* ALLOW_DARWIN */
106    
107     RETURN
108     END

  ViewVC Help
Powered by ViewVC 1.1.22