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

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

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


Revision 1.1 - (hide annotations) (download)
Mon Mar 4 19:01:29 2002 UTC (22 years, 2 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, checkpoint50c_post, checkpoint46f_post, checkpoint48e_post, checkpoint50c_pre, checkpoint44f_post, checkpoint46b_post, checkpoint48i_post, checkpoint46l_pre, checkpoint50d_pre, checkpoint51, checkpoint50, checkpoint50d_post, checkpoint50b_pre, checkpoint48b_post, checkpoint51d_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint47a_post, checkpoint48d_pre, checkpoint47i_post, checkpoint47d_post, checkpoint46d_pre, checkpoint48d_post, checkpoint48f_post, checkpoint45d_post, checkpoint46j_pre, checkpoint44h_pre, checkpoint48h_post, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, checkpoint46j_post, checkpoint46k_post, checkpoint46b_pre, checkpoint48a_post, checkpoint45a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint47j_post, branch-exfmods-tag, checkpoint44g_post, checkpoint46e_pre, checkpoint48c_post, checkpoint45b_post, checkpoint51b_post, checkpoint51c_post, checkpoint46c_pre, checkpoint46, checkpoint47b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint50g_post, checkpoint45c_post, checkpoint44h_post, checkpoint46g_post, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint47f_post, checkpoint50e_post, checkpoint46i_post, checkpoint46c_post, checkpoint46e_post, checkpoint51e_post, checkpoint47, checkpoint45, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint51f_pre, checkpoint48g_post, checkpoint47h_post, checkpoint46d_post, checkpoint50b_post, checkpoint51a_post
Branch point for: branch-exfmods-curt, ecco-branch
Added PTRACERS package

This allows an arbitrary number of passive tracers to be integrated
forward simultaneously with the dynamicaly model.
 + Implemented so far:
    - basic forward algorithm (time-stepping, advection, diffusion, convection)
    - I/O and checkpointing
    - GM/Redi  *but*  using the GM/Redi coefficient of Salt
 + Not implemented so far:
    - KPP
    - OBCS
 + No specific example supplied (yet) but global_ocean.90x40x15 has the
   necessary data.ptracer file. Simply use -enable=ptracers and uncomment
   line in data.pkg. PTRACER01 then reproduces Salt exactly.
 + This package is disabled by default since it increases storage.

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

  ViewVC Help
Powered by ViewVC 1.1.22