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

Annotation of /MITgcm/pkg/ptracers/ptracers_write_checkpoint.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, 3 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint46b_post, checkpoint48f_post, checkpoint46k_post, checkpoint47j_post, checkpoint48d_pre, branch-exfmods-tag, checkpoint47e_post, checkpoint44h_pre, checkpoint47i_post, checkpoint48i_post, checkpoint46j_post, checkpoint47f_post, checkpoint48d_post, checkpoint47c_post, checkpoint50c_post, checkpoint47d_post, checkpoint45a_post, checkpoint47a_post, checkpoint46c_post, checkpoint46f_post, checkpoint46a_post, checkpoint48a_post, checkpoint46n_post, checkpoint46d_pre, checkpoint48e_post, checkpoint46e_post, checkpoint45b_post, checkpoint48h_post, checkpoint50c_pre, checkpoint44g_post, checkpoint46h_pre, checkpoint45c_post, checkpoint44h_post, checkpoint46l_post, checkpoint46e_pre, checkpoint50d_pre, checkpoint46j_pre, checkpoint46b_pre, checkpoint45d_post, checkpoint47h_post, checkpoint48c_post, checkpoint50b_pre, checkpoint46, checkpoint44f_post, checkpoint48, checkpoint49, checkpoint47b_post, checkpoint48g_post, checkpoint46l_pre, checkpoint50, checkpoint46m_post, checkpoint46g_pre, checkpoint47g_post, checkpoint46a_pre, checkpoint46d_post, checkpoint48b_post, checkpoint50b_post, checkpoint46g_post, checkpoint50a_post, checkpoint46c_pre, checkpoint47d_pre, checkpoint48c_pre, checkpoint46i_post, checkpoint47, checkpoint45, checkpoint46h_post
Branch point for: branch-exfmods-curt
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: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/ptracers/Attic/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
44     CHARACTER*(MAX_LEN_MBUF) fn
45     LOGICAL lgf
46     CEOP
47    
48     WRITE(fn,'(A,A)') 'pickup_ptracers.',suff
49     prec = precFloat64
50     lgf = globalFiles
51    
52     C Write fields as consecutive records
53     DO iTracer=1,PTRACERS_num
54     iRec = iTracer
55     CALL MDSWRITEFIELD(fn,prec,lgf,'RL',Nr,
56     & pTracer(1-Olx,1-Oly,1,1,1,iTracer),iRec,myIter,myThid)
57     ENDDO
58    
59     C Write historical tendancies as consecutive records
60     DO iTracer=1,PTRACERS_num
61     iRec = iTracer + PTRACERS_num
62     CALL MDSWRITEFIELD(fn,prec,lgf,'RL',Nr,
63     & gPtr(1-Olx,1-Oly,1,1,1,iTracer),iRec,myIter,myThid)
64     ENDDO
65     DO iTracer=1,PTRACERS_num
66     iRec = iTracer + PTRACERS_num*2
67     CALL MDSWRITEFIELD(fn,prec,lgf,'RL',Nr,
68     & gPtrNm1(1-Olx,1-Oly,1,1,1,iTracer),iRec,myIter,myThid)
69     ENDDO
70    
71     #endif /* ALLOW_PTRACERS */
72    
73     RETURN
74     END

  ViewVC Help
Powered by ViewVC 1.1.22