/[MITgcm]/MITgcm/pkg/land/land_write_pickup.F
ViewVC logotype

Contents of /MITgcm/pkg/land/land_write_pickup.F

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


Revision 1.3 - (show annotations) (download)
Sat Sep 10 20:40:27 2005 UTC (18 years, 9 months ago) by edhill
Branch: MAIN
Changes since 1.2: +48 -3 lines
 o mnc-ify pkg/land as requested by Daniel

1 C $Header: /u/gcmpack/MITgcm/pkg/land/land_write_pickup.F,v 1.2 2004/03/11 14:42:00 jmc Exp $
2 C $Name: $
3
4 #include "LAND_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: LAND_WRITE_PICKUP
8 C !INTERFACE:
9 SUBROUTINE LAND_WRITE_PICKUP( isperm, suff,
10 & myTime, myIter, myThid )
11
12 C !DESCRIPTION: \bv
13 C *==========================================================*
14 C | S/R LAND_WRITE_PICKUP
15 C | o Writes current state of land package to a pickup file
16 C *==========================================================*
17 C \ev
18
19 C !USES:
20 IMPLICIT NONE
21
22 C == Global variables ===
23 #include "LAND_SIZE.h"
24 #include "EEPARAMS.h"
25 #include "PARAMS.h"
26 #include "LAND_PARAMS.h"
27 #include "LAND_VARS.h"
28
29 C !INPUT/OUTPUT PARAMETERS:
30 C == Routine Arguments ==
31 C isperm :: flag for permanent or rolling checkpoint
32 C suff :: suffix for pickup file (eg. ckptA or 0000000010)
33 C myTime :: current time
34 C myIter :: time-step number
35 C myThid :: Number of this instance
36 LOGICAL isperm
37 CHARACTER*(*) suff
38 _RL myTime
39 INTEGER myIter
40 INTEGER myThid
41
42 #ifdef ALLOW_LAND
43
44 C !LOCAL VARIABLES:
45 C fn :: character buffer for creating filename
46 C prec :: precision of pickup files
47 C lgf :: flag to write "global" files
48 c INTEGER prec, iChar, lChar, k
49 INTEGER prec, lChar, k
50 CHARACTER*(MAX_LEN_FNAM) fn
51 LOGICAL lgf
52
53 INTEGER ILNBLNK
54 EXTERNAL ILNBLNK
55
56 CEOP
57
58 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
59
60 lChar = ILNBLNK(suff)
61
62 IF ( land_pickup_write_mdsio ) THEN
63
64 C-- Write fields as consecutive records
65 WRITE(fn,'(A,A)') 'pickup_land.',suff(1:lChar)
66 prec = precFloat64
67 lgf = globalFiles
68
69 CALL MDSWRITEFIELD(fn,prec,lgf,'RL',land_nLev,
70 & land_enthalp,1,myIter,myThid)
71 CALL MDSWRITEFIELD(fn,prec,lgf,'RL',land_nLev,
72 & land_groundW,2,myIter,myThid)
73 k=2*land_nLev
74 CALL MDSWRITEFIELD(fn,prec,lgf,'RL',1,
75 & land_skinT, k+1,myIter,myThid)
76 CALL MDSWRITEFIELD(fn,prec,lgf,'RL',1,
77 & land_hSnow, k+2,myIter,myThid)
78 CALL MDSWRITEFIELD(fn,prec,lgf,'RL',1,
79 & land_snowAge,k+3,myIter,myThid)
80
81 ENDIF
82
83 #ifdef ALLOW_MNC
84 IF ( land_pickup_write_mnc ) THEN
85
86 DO k = 1,MAX_LEN_FNAM
87 fn(k:k) = ' '
88 ENDDO
89 IF ( isperm ) THEN
90 WRITE(fn,'(A)') 'pickup_land'
91 ELSE
92 WRITE(fn,'(A,A)') 'pickup_land.',suff(1:lChar)
93 ENDIF
94 CALL MNC_FILE_CLOSE_ALL_MATCHING(fn, myThid)
95 CALL MNC_CW_SET_UDIM(fn, 1, myThid)
96 IF ( isperm ) THEN
97 CALL MNC_CW_SET_CITER(fn, 3, 3, myIter, 0, myThid)
98 ELSE
99 CALL MNC_CW_SET_CITER(fn, 2, -1, -1, -1, myThid)
100 ENDIF
101
102 CALL MNC_CW_RL_W_S('D',fn,0,0,'T', myTime, myThid)
103 CALL MNC_CW_I_W_S('I',fn,0,0,'iter', myIter, myThid)
104
105 CALL MNC_CW_RL_W('D',fn,0,0,
106 & 'land_enthalp', land_enthalp, myThid)
107 CALL MNC_CW_RL_W('D',fn,0,0,
108 & 'land_groundW', land_groundW, myThid)
109
110 CALL MNC_CW_RL_W('D',fn,0,0,
111 & 'land_skinT', land_skinT, myThid)
112 CALL MNC_CW_RL_W('D',fn,0,0,
113 & 'land_hSnow', land_hSnow, myThid)
114 CALL MNC_CW_RL_W('D',fn,0,0,
115 & 'land_snAge', land_snowAge, myThid)
116
117 ENDIF
118 #endif /* ALLOW_MNC */
119
120 #endif /* ALLOW_LAND */
121
122 RETURN
123 END

  ViewVC Help
Powered by ViewVC 1.1.22