/[MITgcm]/MITgcm/pkg/generic_advdiff/gad_write_pickup.F
ViewVC logotype

Annotation of /MITgcm/pkg/generic_advdiff/gad_write_pickup.F

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


Revision 1.3 - (hide annotations) (download)
Fri May 9 21:43:16 2008 UTC (16 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint59r, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y, HEAD
Changes since 1.2: +3 -3 lines
change option: GAD_ALLOW_SOM_ADVECT to GAD_ALLOW_TS_SOM_ADV which only
applies to files where Temperature & salinity 2nd Order moments are used

1 jmc 1.3 C $Header: /u/gcmpack/MITgcm/pkg/generic_advdiff/gad_write_pickup.F,v 1.2 2008/02/12 20:29:25 jmc Exp $
2 jmc 1.1 C $Name: $
3    
4     #include "GAD_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: GAD_WRITE_PICKUP
8    
9     C !INTERFACE: ==========================================================
10     SUBROUTINE GAD_WRITE_PICKUP( suff,
11     I myTime, myIter, myThid )
12    
13     C !DESCRIPTION:
14     C Writes current state of 2nd.Order moments to a pickup file
15    
16     C !USES: ===============================================================
17     IMPLICIT NONE
18     #include "SIZE.h"
19     #include "EEPARAMS.h"
20     #include "PARAMS.h"
21     #include "GAD.h"
22     #include "GAD_SOM_VARS.h"
23     #ifdef ALLOW_MNC
24     #include "MNC_PARAMS.h"
25     #endif
26    
27     C !INPUT PARAMETERS: ===================================================
28     C suff :: suffix for pickup file (eg. ckptA or 0000000010)
29     C myTime :: model time
30     C myIter :: time-step number
31     C myThid :: thread number
32     CHARACTER*(*) suff
33     _RL myTime
34     INTEGER myIter
35     INTEGER myThid
36    
37     C !OUTPUT PARAMETERS: ==================================================
38     C none
39    
40 jmc 1.3 #ifdef GAD_ALLOW_TS_SOM_ADV
41 jmc 1.1 C === Functions ====
42     INTEGER ILNBLNK
43     EXTERNAL ILNBLNK
44    
45     C !LOCAL VARIABLES: ====================================================
46     C n :: 2nd.O. moment loop index
47     C iRec :: record number
48     C fn :: character buffer for creating filename
49     C prec :: precision of pickup files
50     C msgBuf :: Informational/error meesage buffer
51     INTEGER n,prec,iRec,lChar
52     CHARACTER*(MAX_LEN_FNAM) fn
53 jmc 1.2 #ifdef ALLOW_MNC
54 jmc 1.1 CHARACTER*(MAX_LEN_MBUF) msgBuf
55 jmc 1.2 #endif
56 jmc 1.1 CEOP
57    
58     #ifdef ALLOW_MNC
59     IF ( useMNC .AND. pickup_write_mnc ) THEN
60     IF ( tempSOM_Advection .OR. saltSOM_Advection ) THEN
61     WRITE(msgBuf,'(A)') 'GAD_WRITE_PICKUP: MNC not yet coded',
62     & ' => write bin file instead'
63     CALL PRINT_MESSAGE( msgBuf, errorMessageUnit,
64     & SQUEEZE_RIGHT, myThid)
65     ENDIF
66     ENDIF
67     #endif /* ALLOW_MNC */
68    
69     c IF ( pickup_write_mdsio ) THEN
70     IF ( .TRUE. ) THEN
71     lChar = ILNBLNK(suff)
72    
73     IF ( tempSOM_Advection ) THEN
74     C-- Pot. Temp. 2nd.Order moments
75     IF ( lChar.EQ.0 ) THEN
76     WRITE(fn,'(2A)') 'pickup_somT'
77     ELSE
78     WRITE(fn,'(2A)') 'pickup_somT.',suff(1:lChar)
79     ENDIF
80     prec = precFloat64
81     C Write 2nd Order moments as consecutive records
82     DO n=1,nSOM
83     iRec = n
84     CALL WRITE_REC_3D_RL( fn, prec, Nr,
85     I som_T(1-Olx,1-Oly,1,1,1,n),
86     I iRec, myIter, myThid )
87     ENDDO
88     ENDIF
89    
90     IF ( saltSOM_Advection ) THEN
91     C-- Salinity 2nd.Order moments
92     IF ( lChar.EQ.0 ) THEN
93     WRITE(fn,'(2A)') 'pickup_somS'
94     ELSE
95     WRITE(fn,'(2A)') 'pickup_somS.',suff(1:lChar)
96     ENDIF
97     prec = precFloat64
98     C Write 2nd Order moments as consecutive records
99     DO n=1,nSOM
100     iRec = n
101     CALL WRITE_REC_3D_RL( fn, prec, Nr,
102     I som_S(1-Olx,1-Oly,1,1,1,n),
103     I iRec, myIter, myThid )
104     ENDDO
105     ENDIF
106    
107     ENDIF
108    
109 jmc 1.3 #endif /* GAD_ALLOW_TS_SOM_ADV */
110 jmc 1.1
111     RETURN
112     END

  ViewVC Help
Powered by ViewVC 1.1.22