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

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

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


Revision 1.2 - (show annotations) (download)
Thu Sep 25 03:01:59 2003 UTC (20 years, 7 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint52d_pre, checkpoint52j_pre, checkpoint51o_pre, checkpoint51l_post, checkpoint52k_post, checkpoint54, checkpoint53, checkpoint52, checkpoint52f_post, checkpoint51f_post, checkpoint51t_post, checkpoint51n_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint51j_post, checkpoint52e_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint53d_post, checkpoint52b_pre, checkpoint54b_post, checkpoint51l_pre, checkpoint52m_post, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint51h_pre, checkpoint52f_pre, checkpoint54a_pre, checkpoint53c_post, branchpoint-genmake2, checkpoint54a_post, checkpoint51r_post, checkpoint51i_post, checkpoint53a_post, checkpoint52d_post, checkpoint53g_post, checkpoint52a_pre, checkpoint52i_post, checkpoint51i_pre, checkpoint52h_pre, checkpoint53f_post, checkpoint52j_post, branch-netcdf, checkpoint52l_post, checkpoint52n_post, checkpoint53b_pre, checkpoint51o_post, checkpoint53b_post, checkpoint52a_post, checkpoint51g_post, ecco_c52_e35, checkpoint51m_post, checkpoint53d_pre, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-genmake2, branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.1: +2 -3 lines
o Mods and bug fixes to pkg/cal, pkg/exf, etc., needed for computation
  of tracer Green's fucntions for ocean inversion project.

1 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_write_state.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_STATE
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE PTRACERS_WRITE_STATE( myIter,myTime,myThid )
11
12 C !DESCRIPTION:
13 C Calculates tendancy for passive tracers and integrates forward
14 C in time.
15
16 C !USES: ===============================================================
17 IMPLICIT NONE
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "PTRACERS.h"
21
22 C !INPUT PARAMETERS: ===================================================
23 C myIter :: time-step number
24 C myTime :: model time
25 C myThid :: thread number
26 INTEGER myIter
27 _RL myTime
28 INTEGER myThid
29
30 C !OUTPUT PARAMETERS: ==================================================
31 C none
32
33 #ifdef ALLOW_PTRACERS
34
35 C !LOCAL VARIABLES: ====================================================
36 C iTracer :: loop indices
37 C suff :: character buffer for creating suffix in filename
38 C iRec :: record number
39 INTEGER iTracer
40 CHARACTER*(MAX_LEN_MBUF) suff
41 INTEGER iRec
42 CEOP
43
44 C Loop over tracers
45 DO iTracer=1,PTRACERS_numInUse
46
47 #ifdef MULTIPLE_RECORD_STATE_FILES
48 C Write each snap-shot as a record in a time-history file
49 IF (PTRACERS_useRecords) THEN
50 C Write each passive tracer as a record
51 WRITE(suff,'(A)') 'PTRACERS'
52 iRec = int ( (myCurrentTime-startTime) / dumpFreq +1.5 )
53 iRec = (iRec-1)*PTRACERS_num + iTracer + 1
54 ELSE
55 C Write each passive tracer in its own file
56 WRITE(pref,'(A7,I2.2)') 'PTRACER',iTracer
57 iRec = int ( (myCurrentTime-startTime) / dumpFreq +1.5 )
58 ENDIF
59 #else
60 C Write each snap-shot as a new file with a 10-digit suffix to
61 C indicate time-step number
62 IF (PTRACERS_useRecords) THEN
63 C Write each passive tracer as a record
64 WRITE(suff,'(A,I10.10)') 'PTRACERS',myIter
65 iRec=iTracer
66 ELSE
67 C Write each passive tracer in its own file
68 WRITE(suff,'(A7,I2.2,A1,I10.10)') 'PTRACER',iTracer,'.',myIter
69 iRec=1
70 ENDIF
71 #endif /* MULTIPLE_RECORD_STATE_FILES */
72
73 CALL WRITE_REC_XYZ_RL(suff,
74 & pTracer(1-Olx,1-Oly,1,1,1,iTracer),iRec,myIter,myThid)
75
76 C End of tracer loop
77 ENDDO
78
79 #endif /* ALLOW_PTRACERS */
80
81 RETURN
82 END

  ViewVC Help
Powered by ViewVC 1.1.22