/[MITgcm]/MITgcm/pkg/ptracers/ptracers_write_checkpoint.F
ViewVC logotype

Contents of /MITgcm/pkg/ptracers/ptracers_write_checkpoint.F

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


Revision 1.2 - (show annotations) (download)
Tue May 13 13:31:45 2003 UTC (20 years, 11 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint53f_post, checkpoint54a_pre, checkpoint53b_pre, checkpoint51l_post, checkpoint51j_post, checkpoint52l_pre, checkpoint52e_pre, hrcube4, checkpoint52n_post, checkpoint52j_post, checkpoint51o_pre, checkpoint50e_post, checkpoint52e_post, checkpoint51n_pre, checkpoint52d_pre, checkpoint53c_post, checkpoint53d_post, checkpoint51f_pre, branchpoint-genmake2, checkpoint52j_pre, checkpoint54a_post, checkpoint50h_post, branch-netcdf, checkpoint51r_post, checkpoint52b_pre, checkpoint51i_post, checkpoint51e_post, checkpoint51b_post, checkpoint51l_pre, checkpoint52m_post, checkpoint51c_post, checkpoint53a_post, hrcube5, checkpoint50i_post, checkpoint53b_post, checkpoint51o_post, checkpoint51q_post, checkpoint52l_post, checkpoint52k_post, checkpoint54, checkpoint51, checkpoint53, checkpoint52, checkpoint50d_post, checkpoint52d_post, checkpoint51b_pre, checkpoint52a_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint52c_post, checkpoint51h_pre, checkpoint50g_post, checkpoint51g_post, ecco_c52_e35, checkpoint51f_post, checkpoint50f_post, checkpoint50f_pre, checkpoint52a_pre, checkpoint51d_post, checkpoint51m_post, checkpoint51t_post, checkpoint53d_pre, checkpoint52i_post, checkpoint51a_post, checkpoint50e_pre, checkpoint51p_post, checkpoint51n_post, checkpoint51i_pre, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post
Branch point for: netcdf-sm0, branch-genmake2, branch-nonh, tg2-branch, ecco-branch, checkpoint51n_branch
Changes since 1.1: +10 -5 lines
o fix small problem with in ptracers_write_checkpoint.F: len(suff)=512, so that
  writing to internal file fn (with length 512) fails. (MAX_LEN_FNAME=521)

1 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_write_checkpoint.F,v 1.1 2002/03/04 19:01:29 adcroft Exp $
2 C $Name: $
3
4 #include "PTRACERS_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: PTRACERS_WRITE_CHECKPOINT
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE PTRACERS_WRITE_CHECKPOINT( suff,myIter,myTime,myThid )
11
12 C !DESCRIPTION:
13 C Writes current state of passive tracers to a pickup file
14
15 C !USES: ===============================================================
16 IMPLICIT NONE
17 #include "SIZE.h"
18 #include "EEPARAMS.h"
19 #include "PARAMS.h"
20 #include "PTRACERS.h"
21
22 C !INPUT PARAMETERS: ===================================================
23 C suff :: suffix for pickup file (eg. ckptA or 0000000010)
24 C myIter :: time-step number
25 C myTime :: model time
26 C myThid :: thread number
27 CHARACTER*(*) suff
28 INTEGER myIter
29 _RL myTime
30 INTEGER myThid
31
32 C !OUTPUT PARAMETERS: ==================================================
33 C none
34
35 #ifdef ALLOW_PTRACERS
36
37 C !LOCAL VARIABLES: ====================================================
38 C iTracer :: loop indices
39 C iRec :: record number
40 C fn :: character buffer for creating filename
41 C prec :: precision of pickup files
42 C lgf :: flag to write "global" files
43 INTEGER iTracer,prec,iRec,iChar,lChar
44 CHARACTER*(MAX_LEN_FNAM) fn
45 LOGICAL lgf
46 CEOP
47
48 lChar = 0
49 DO iChar = 1,len(suff)
50 IF ( suff(iChar:iChar) .NE. ' ') lChar=iChar
51 ENDDO
52 WRITE(fn,'(A,A)') 'pickup_ptracers.',suff(1:lChar)
53 prec = precFloat64
54 lgf = globalFiles
55
56 C Write fields as consecutive records
57 DO iTracer=1,PTRACERS_num
58 iRec = iTracer
59 CALL MDSWRITEFIELD(fn,prec,lgf,'RL',Nr,
60 & pTracer(1-Olx,1-Oly,1,1,1,iTracer),iRec,myIter,myThid)
61 ENDDO
62 print *, 'hallo 1'
63
64 C Write historical tendancies as consecutive records
65 DO iTracer=1,PTRACERS_num
66 iRec = iTracer + PTRACERS_num
67 CALL MDSWRITEFIELD(fn,prec,lgf,'RL',Nr,
68 & gPtr(1-Olx,1-Oly,1,1,1,iTracer),iRec,myIter,myThid)
69 ENDDO
70 DO iTracer=1,PTRACERS_num
71 iRec = iTracer + PTRACERS_num*2
72 CALL MDSWRITEFIELD(fn,prec,lgf,'RL',Nr,
73 & gPtrNm1(1-Olx,1-Oly,1,1,1,iTracer),iRec,myIter,myThid)
74 ENDDO
75
76 #endif /* ALLOW_PTRACERS */
77
78 RETURN
79 END

  ViewVC Help
Powered by ViewVC 1.1.22