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

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

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


Revision 1.3 - (hide annotations) (download)
Wed Oct 9 17:14:37 2013 UTC (11 years, 9 months ago) by stephd
Branch: MAIN
CVS Tags: ctrb_darwin2_ckpt65w_20160512, ctrb_darwin2_ckpt65j_20150225, ctrb_darwin2_ckpt66g_20170424, ctrb_darwin2_ckpt66k_20171025, ctrb_darwin2_ckpt66n_20180118, ctrb_darwin2_ckpt65v_20160409, ctrb_darwin2_ckpt65s_20160114, ctrb_darwin2_ckpt65_20140718, 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_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_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_ckpt65f_20141014, ctrb_darwin2_ckpt66b_20161219, ctrb_darwin2_ckpt64u_20140308, 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: +6 -1 lines
o changes so that pH and pCO2 can be calculated for full water column
  by defining pH_3D in DARWIN_OPTIONS.h. Includes 3D diags and pickup

1 stephd 1.3 C $Header: /u/gcmpack/MITgcm_contrib/darwin2/pkg/darwin/dic_write_pickup.F,v 1.2 2013/01/14 16:50:46 jmc Exp $
2 jmc 1.2 C $Name: $
3    
4 jahn 1.1 #include "CPP_OPTIONS.h"
5     #include "PTRACERS_OPTIONS.h"
6     #include "DARWIN_OPTIONS.h"
7    
8     #ifdef ALLOW_PTRACERS
9     #ifdef ALLOW_DARWIN
10    
11     #ifdef ALLOW_CARBON
12    
13     CBOP
14     C !ROUTINE: DIC_WRITE_PICKUP
15    
16     C !INTERFACE: ==========================================================
17     SUBROUTINE DIC_WRITE_PICKUP( permPickup,
18     I suff, myTime, myIter, myThid )
19    
20     C !DESCRIPTION:
21     C Writes DIC arrays (needed for a restart) to a pickup file
22    
23     C !USES: ===============================================================
24     IMPLICIT NONE
25     C === Global variables ===
26     #include "SIZE.h"
27     #include "EEPARAMS.h"
28     #include "PARAMS.h"
29     #include "DARWIN_FLUX.h"
30    
31     C !INPUT PARAMETERS: ===================================================
32     C permPickup :: write a permanent pickup
33     C suff :: suffix for pickup file (eg. ckptA or 0000000010)
34     C myTime :: Current time in simulation
35     C myIter :: Current iteration number in simulation
36     C myThid :: My Thread Id number
37     LOGICAL permPickup
38     CHARACTER*(*) suff
39     _RL myTime
40     INTEGER myIter
41     INTEGER myThid
42     CEOP
43    
44     C !LOCAL VARIABLES:
45     C == Local variables ==
46     CHARACTER*(MAX_LEN_FNAM) fn
47     LOGICAL glf
48 jmc 1.2 _RL timList(1)
49 jahn 1.1 INTEGER prec, j, nj
50     INTEGER listDim, nWrFlds
51     PARAMETER( listDim = 2 )
52     CHARACTER*(8) wrFldList(listDim)
53     CHARACTER*(MAX_LEN_MBUF) msgBuf
54    
55     c IF ( DIC_pickup_write_mdsio ) THEN
56     prec = precFloat64
57     WRITE(fn,'(A,A)') 'pickup_dic.',suff
58     j = 0
59    
60     C Firstly, write 3-D fields as consecutive records,
61    
62     C- switch to 2-D fields:
63     nj = -j*Nr
64    
65     C record number < 0 : a hack not to write meta files now:
66     j = j + 1
67     nj = nj-1
68 stephd 1.3 #ifdef pH_3D
69     CALL WRITE_REC_3D_RL( fn, prec, Nr, pH, nj, myIter, myThid )
70     IF (j.LE.listDim) wrFldList(j) = 'DIC_pH3d'
71     #else
72 jahn 1.1 CALL WRITE_REC_3D_RL( fn, prec, 1, pH, nj, myIter, myThid )
73     IF (j.LE.listDim) wrFldList(j) = 'DIC_pH2d'
74 stephd 1.3 #endif
75 jahn 1.1
76     C--------------------------
77     nWrFlds = j
78     IF ( nWrFlds.GT.listDim ) THEN
79     WRITE(msgBuf,'(2A,I5,A)') 'DIC_WRITE_PICKUP: ',
80     & 'trying to write ',nWrFlds,' fields'
81     CALL PRINT_ERROR( msgBuf, myThid )
82     WRITE(msgBuf,'(2A,I5,A)') 'DIC_WRITE_PICKUP: ',
83     & 'field-list dimension (listDim=',listDim,') too small'
84     CALL PRINT_ERROR( msgBuf, myThid )
85     STOP 'ABNORMAL END: S/R DIC_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     j = 1
92     nj = ABS(nj)
93     IF ( nWrFlds*Nr .EQ. nj ) THEN
94     j = Nr
95     nj = nWrFlds
96     ENDIF
97     glf = globalFiles
98 jmc 1.2 timList(1) = myTime
99 jahn 1.1 CALL MDS_WR_METAFILES( fn, prec, glf, .FALSE.,
100     & 0, 0, j, ' ',
101     & nWrFlds, wrFldList,
102 jmc 1.2 & 1, timList, oneRL,
103 jahn 1.1 & nj, myIter, myThid )
104     #endif /* ALLOW_MDSIO */
105     C--------------------------
106    
107     c ENDIF /* DIC_pickup_write_mdsio */
108    
109    
110     RETURN
111     END
112     #endif /*ALLOW_CARBON*/
113    
114     #endif /*DARWIN*/
115     #endif /*ALLOW_PTRACERS*/
116     c ==================================================================

  ViewVC Help
Powered by ViewVC 1.1.22