/[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.3 - (hide annotations) (download)
Wed May 15 14:42:54 2013 UTC (12 years, 2 months ago) by jahn
Branch: MAIN
CVS Tags: ctrb_darwin2_ckpt64k_20130723, ctrb_darwin2_ckpt65w_20160512, ctrb_darwin2_ckpt65j_20150225, ctrb_darwin2_ckpt66g_20170424, ctrb_darwin2_ckpt64h_20130528, ctrb_darwin2_ckpt66k_20171025, ctrb_darwin2_ckpt66n_20180118, ctrb_darwin2_ckpt65v_20160409, ctrb_darwin2_ckpt65s_20160114, ctrb_darwin2_ckpt65_20140718, ctrb_darwin2_ckpt64m_20130820, ctrb_darwin2_ckpt66d_20170214, ctrb_darwin2_ckpt64r_20131210, ctrb_darwin2_ckpt65m_20150615, ctrb_darwin2_ckpt65q_20151118, ctrb_darwin2_ckpt65o_20150914, ctrb_darwin2_ckpt65p_20151023, ctrb_darwin2_ckpt64n_20130826, ctrb_darwin2_ckpt65e_20140929, ctrb_darwin2_ckpt64o_20131024, ctrb_darwin2_ckpt64v_20140411, ctrb_darwin2_ckpt64z_20140711, ctrb_darwin2_ckpt65l_20150504, ctrb_darwin2_ckpt65z_20160929, ctrb_darwin2_ckpt65n_20150729, ctrb_darwin2_ckpt64y_20140622, ctrb_darwin2_ckpt65d_20140915, ctrb_darwin2_ckpt64t_20140202, ctrb_darwin2_ckpt66h_20170602, ctrb_darwin2_ckpt64i_20130622, ctrb_darwin2_ckpt64s_20140105, ctrb_darwin2_ckpt64x_20140524, ctrb_darwin2_ckpt65x_20160612, ctrb_darwin2_ckpt66f_20170407, ctrb_darwin2_ckpt65g_20141120, ctrb_darwin2_ckpt65k_20150402, ctrb_darwin2_ckpt64w_20140502, ctrb_darwin2_ckpt66a_20161020, ctrb_darwin2_ckpt64l_20130806, ctrb_darwin2_ckpt65f_20141014, ctrb_darwin2_ckpt66b_20161219, ctrb_darwin2_ckpt64u_20140308, ctrb_darwin2_ckpt64j_20130704, ctrb_darwin2_ckpt65i_20150123, ctrb_darwin2_ckpt66j_20170815, ctrb_darwin2_ckpt65y_20160801, ctrb_darwin2_ckpt66c_20170121, ctrb_darwin2_ckpt65a_20140728, ctrb_darwin2_ckpt65b_20140812, ctrb_darwin2_ckpt65t_20160221, ctrb_darwin2_ckpt64p_20131118, ctrb_darwin2_ckpt66o_20180209, ctrb_darwin2_ckpt66e_20170314, ctrb_darwin2_ckpt64q_20131118, ctrb_darwin2_ckpt64p_20131024, ctrb_darwin2_ckpt65u_20160315, ctrb_darwin2_ckpt65r_20151221, ctrb_darwin2_ckpt66i_20170718, ctrb_darwin2_ckpt65c_20140830, ctrb_darwin2_ckpt66l_20171025, ctrb_darwin2_ckpt65h_20141217, ctrb_darwin2_ckpt66m_20171213, HEAD
Changes since 1.2: +25 -4 lines
write non-dynamic chlorophyll to pickup

1 jahn 1.3 C $Header: /u/gcmpack/MITgcm_contrib/darwin2/pkg/darwin/darwin_write_pickup.F,v 1.2 2013/01/14 16:50:46 jmc Exp $
2 jmc 1.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 jahn 1.3 #include "PTRACERS_SIZE.h"
23     #include "PTRACERS_PARAMS.h"
24 jahn 1.1 #include "DARWIN_SIZE.h"
25     #include "DARWIN_IO.h"
26 jahn 1.3 #ifdef ALLOW_MONOD
27     #include "MONOD_FIELDS.h"
28     #endif
29 jahn 1.1
30     C !INPUT PARAMETERS: ===================================================
31     C permPickup :: write a permanent pickup
32     C suff :: suffix for pickup file (eg. ckptA or 0000000010)
33     C myTime :: Current time in simulation
34     C myIter :: Current iteration number in simulation
35     C myThid :: My Thread Id number
36     LOGICAL permPickup
37     CHARACTER*(*) suff
38     _RL myTime
39     INTEGER myIter
40     INTEGER myThid
41     CEOP
42    
43     #ifdef ALLOW_DARWIN
44     C add more ALLOWs here for other fields in pickup
45 jahn 1.3 #if defined(ALLOW_PAR_DAY) || (defined(ALLOW_MONOD) && defined(GEIDER) && !defined(DYNAMIC_CHL))
46 jahn 1.1
47     C !LOCAL VARIABLES:
48     C == Local variables ==
49     CHARACTER*(MAX_LEN_FNAM) fn
50     LOGICAL glf
51 jmc 1.2 _RL timList(1)
52 jahn 1.3 INTEGER prec, irec, ifld, np
53 jahn 1.1 INTEGER listDim, nWrFlds
54 jahn 1.3 PARAMETER( listDim = 2+npmax )
55 jahn 1.1 CHARACTER*(8) wrFldList(listDim)
56     CHARACTER*(MAX_LEN_MBUF) msgBuf
57    
58     c IF ( DARWIN_pickup_write_mdsio ) THEN
59     prec = precFloat64
60     WRITE(fn,'(A,A)') 'pickup_darwin.',suff
61    
62     ifld = 0
63     irec = 0
64    
65     #ifdef ALLOW_PAR_DAY
66     C record number < 0 : a hack not to write meta files now:
67     ifld = ifld + 1
68     irec = irec - 1
69     CALL WRITE_REC_3D_RL( fn, prec, nR,
70     & PARday(1-OLx,1-OLy,1,1,1,1),
71     & irec, myIter, myThid )
72     IF (ifld.LE.listDim) wrFldList(ifld) = 'PARday1 '
73     ifld = ifld + 1
74     irec = irec - 1
75     CALL WRITE_REC_3D_RL( fn, prec, nR,
76     & PARday(1-OLx,1-OLy,1,1,1,2),
77     & irec, myIter, myThid )
78     IF (ifld.LE.listDim) wrFldList(ifld) = 'PARday2 '
79     #endif
80    
81 jahn 1.3 #if defined(ALLOW_MONOD) && defined(GEIDER) && !defined(DYNAMIC_CHL)
82     DO np = 1, npmax
83     ifld = ifld + 1
84     irec = irec - 1
85     print*,'prec',np,prec
86     CALL WRITE_REC_3D_RL( fn, prec, nR,
87     & Chl_phy(1-OLx,1-OLy,1,1,1,np),
88     & irec, myIter, myThid )
89     IF (ifld.LE.listDim) THEN
90     wrFldList(ifld)(1:6) = 'ChlPhy'
91     wrFldList(ifld)(7:8) = PTRACERS_ioLabel(np)
92     ENDIF
93     ENDDO
94     #endif
95    
96 jahn 1.1 C--------------------------
97     nWrFlds = ifld
98     IF ( nWrFlds.GT.listDim ) THEN
99     WRITE(msgBuf,'(2A,I5,A)') 'DARWIN_WRITE_PICKUP: ',
100     & 'trying to write ',nWrFlds,' fields'
101     CALL PRINT_ERROR( msgBuf, myThid )
102     WRITE(msgBuf,'(2A,I5,A)') 'DARWIN_WRITE_PICKUP: ',
103     & 'field-list dimension (listDim=',listDim,') too small'
104     CALL PRINT_ERROR( msgBuf, myThid )
105     STOP 'ABNORMAL END: S/R DARWIN_WRITE_PICKUP (list-size Pb)'
106     ENDIF
107    
108     #ifdef ALLOW_MDSIO
109     C uses this specific S/R to write (with more informations) only meta
110     C files
111     glf = globalFiles
112 jmc 1.2 timList(1) = myTime
113 jahn 1.1 irec = ABS(irec)
114 jahn 1.3 print*,'prec',irec,prec
115 jahn 1.1 CALL MDS_WR_METAFILES( fn, prec, glf, .FALSE.,
116     & 0, 0, nR, ' ',
117     & nWrFlds, wrFldList,
118 jmc 1.2 & 1, timList, oneRL,
119 jahn 1.1 & irec, myIter, myThid )
120     #endif /* ALLOW_MDSIO */
121     C--------------------------
122    
123     c ENDIF /* DARWIN_pickup_write_mdsio */
124    
125     #endif /* ALLOW_PAR_DAY */
126     #endif /* ALLOW_DARWIN */
127    
128     RETURN
129     END

  ViewVC Help
Powered by ViewVC 1.1.22