/[MITgcm]/MITgcm/pkg/mnc/mnc_cw_write_grid_info.F
ViewVC logotype

Contents of /MITgcm/pkg/mnc/mnc_cw_write_grid_info.F

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


Revision 1.15 - (show annotations) (download)
Fri Jul 26 14:23:53 2013 UTC (10 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint65, 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, HEAD
Changes since 1.14: +10 -1 lines
add a "STOP" in S/R MNC_CW_WRITE_GRID_INFO : not not maintained since
 it is never called

1 C $Header: /u/gcmpack/MITgcm/pkg/mnc/mnc_cw_write_grid_info.F,v 1.14 2011/05/23 01:08:22 jmc Exp $
2 C $Name: $
3
4 #include "MNC_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 CBOP 1
8 C !ROUTINE: MNC_CW_WRITE_GRID_INFO
9
10 C !INTERFACE:
11 SUBROUTINE MNC_CW_WRITE_GRID_INFO(
12 I bfname,
13 I myThid )
14
15 C !DESCRIPTION:
16 C This subroutine writes all the grid information (\textit{eg.}
17 C locations, spacings, areas, \textit{etc.}) to one grid file
18 C (\texttt{grid.xxxxx.nc}) per tile.
19
20 C===================================================================
21 C WARNING: This routine is not maintained since it is never called
22 C===================================================================
23
24 C !USES:
25 implicit none
26 #include "MNC_COMMON.h"
27 #include "SIZE.h"
28 #include "EEPARAMS.h"
29 #include "PARAMS.h"
30 #include "GRID.h"
31
32 C !INPUT PARAMETERS:
33 integer myThid
34 character*(*) bfname
35 CEOP
36
37 C !LOCAL VARIABLES:
38 integer nf,nl
39
40 C Functions
41 integer IFNBLNK, ILNBLNK
42
43 nf = IFNBLNK(bfname)
44 nl = ILNBLNK(bfname)
45
46 C===================================================================
47 C WARNING: This routine is not maintained since it is never called
48 C===================================================================
49 STOP 'MNC_CW_WRITE_GRID_INFO is not maintained'
50
51 C Create MNC definitions for GRID.h variables
52 CALL MNC_CW_ADD_VNAME('rC', '-_-_--__C__-', 0,0, myThid)
53 CALL MNC_CW_ADD_VNAME('rF', '-_-_--__I__-', 0,0, myThid)
54 CALL MNC_CW_ADD_VNAME('drC', '-_-_--__C__-', 0,0, myThid)
55 CALL MNC_CW_ADD_VNAME('drF', '-_-_--__C__-', 0,0, myThid)
56
57 CALL MNC_CW_ADD_VNAME('xC', 'Cen_xy_Hn__-__-', 3,4, myThid)
58 CALL MNC_CW_ADD_VNAME('yC', 'Cen_xy_Hn__-__-', 3,4, myThid)
59 CALL MNC_CW_ADD_VNAME('xG', 'Cor_xy_Hn__-__-', 3,4, myThid)
60 CALL MNC_CW_ADD_VNAME('yG', 'Cor_xy_Hn__-__-', 3,4, myThid)
61 CALL MNC_CW_ADD_VNAME('dxC', 'Cen_xy_Hn__-__-', 3,4, myThid)
62 CALL MNC_CW_ADD_VNAME('dyC', 'Cen_xy_Hn__-__-', 3,4, myThid)
63 CALL MNC_CW_ADD_VNAME('dxF', 'Cen_xy_Hn__-__-', 3,4, myThid)
64 CALL MNC_CW_ADD_VNAME('dyF', 'Cen_xy_Hn__-__-', 3,4, myThid)
65 CALL MNC_CW_ADD_VNAME('dxG', 'Cen_xy_Hn__-__-', 3,4, myThid)
66 CALL MNC_CW_ADD_VNAME('dyG', 'Cen_xy_Hn__-__-', 3,4, myThid)
67 CALL MNC_CW_ADD_VNAME('dxV', 'U_xy_Hn__-__-', 3,4, myThid)
68 CALL MNC_CW_ADD_VNAME('dyU', 'V_xy_Hn__-__-', 3,4, myThid)
69 CALL MNC_CW_ADD_VNAME('rA', 'Cen_xy_Hn__-__-', 3,4, myThid)
70 CALL MNC_CW_ADD_VNAME('rAw', 'Cen_xy_Hn__-__-', 3,4, myThid)
71 CALL MNC_CW_ADD_VNAME('rAs', 'Cen_xy_Hn__-__-', 3,4, myThid)
72 CALL MNC_CW_ADD_VNAME('rAz', 'Cen_xy_Hn__-__-', 3,4, myThid)
73 CALL MNC_CW_ADD_VNAME('fCori', 'Cen_xy_Hn__-__-', 3,4, myThid)
74 CALL MNC_CW_ADD_VNAME('fCoriG', 'Cen_xy_Hn__-__-', 3,4, myThid)
75 CALL MNC_CW_ADD_VNAME('R_low', 'Cen_xy_Hn__-__-', 3,4, myThid)
76 CALL MNC_CW_ADD_VNAME('Ro_surf', 'Cen_xy_Hn__-__-', 3,4, myThid)
77 CALL MNC_CW_ADD_VNAME('HFacC', 'Cen_xy_Hn__C__-', 4,5, myThid)
78 CALL MNC_CW_ADD_VNAME('HFacW', 'Cen_xy_Hn__C__-', 4,5, myThid)
79 CALL MNC_CW_ADD_VNAME('HFacS', 'Cen_xy_Hn__C__-', 4,5, myThid)
80
81 CALL MNC_CW_ADD_VATTR_TEXT('rC','description',
82 & 'r of cell center',myThid)
83 CALL MNC_CW_ADD_VATTR_TEXT('rF','description',
84 & 'r of cell face',myThid)
85 CALL MNC_CW_ADD_VATTR_TEXT('drC','description',
86 & 'r cell center separation',myThid)
87 CALL MNC_CW_ADD_VATTR_TEXT('drF','description',
88 & 'r cell face separation',myThid)
89 CALL MNC_CW_ADD_VATTR_TEXT('xC','description',
90 & 'x of cell center',myThid)
91 CALL MNC_CW_ADD_VATTR_TEXT('yC','description',
92 & 'y of cell center',myThid)
93 CALL MNC_CW_ADD_VATTR_TEXT('xG','description',
94 & 'x of cell corner',myThid)
95 CALL MNC_CW_ADD_VATTR_TEXT('yG','description',
96 & 'y of cell corner',myThid)
97 CALL MNC_CW_ADD_VATTR_TEXT('dxC','description',
98 & 'x cell center separation',myThid)
99 CALL MNC_CW_ADD_VATTR_TEXT('dyC','description',
100 & 'y cell center separation',myThid)
101 CALL MNC_CW_ADD_VATTR_TEXT('dxF','description',
102 & 'x cell face separation',myThid)
103 CALL MNC_CW_ADD_VATTR_TEXT('dyF','description',
104 & 'y cell face separation',myThid)
105 CALL MNC_CW_ADD_VATTR_TEXT('dxG','description',
106 & 'x cell face separation',myThid)
107 CALL MNC_CW_ADD_VATTR_TEXT('dyG','description',
108 & 'y cell face separation',myThid)
109 CALL MNC_CW_ADD_VATTR_TEXT('dxV','description',
110 & 'x v-velocity separation',myThid)
111 CALL MNC_CW_ADD_VATTR_TEXT('dyU','description',
112 & 'y u-velocity separation',myThid)
113 CALL MNC_CW_ADD_VATTR_TEXT('rA','description',
114 & 'r-face area',myThid)
115 CALL MNC_CW_ADD_VATTR_TEXT('rAw','description',
116 & '',myThid)
117 CALL MNC_CW_ADD_VATTR_TEXT('rAs','description',
118 & '',myThid)
119 CALL MNC_CW_ADD_VATTR_TEXT('rAz','description',
120 & '',myThid)
121 CALL MNC_CW_ADD_VATTR_TEXT('fCori','description',
122 & 'Coriolis f',myThid)
123 CALL MNC_CW_ADD_VATTR_TEXT('fCoriG','description',
124 & 'Coriolis f',myThid)
125 CALL MNC_CW_ADD_VATTR_TEXT('R_low','description',
126 & 'base of fluid in r-units',myThid)
127 CALL MNC_CW_ADD_VATTR_TEXT('Ro_surf','description',
128 & 'surface reference (at rest,myThid) position',myThid)
129 CALL MNC_CW_ADD_VATTR_TEXT('HFacC','description',
130 & 'C-facing vertical fraction of open cell',myThid)
131 CALL MNC_CW_ADD_VATTR_TEXT('HFacW','description',
132 & 'W-facing vertical fraction of open cell',myThid)
133 CALL MNC_CW_ADD_VATTR_TEXT('HFacS','description',
134 & 'S-facing vertical fraction of open cell',myThid)
135
136 C Write the GRID.h variables
137 CALL MNC_CW_SET_UDIM(bfname(nf:nl), 0, myThid)
138 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'rC',rC,myThid)
139 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'rF',rF,myThid)
140 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'drC',drC,myThid)
141 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'drF',drF,myThid)
142 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'xC',xC,myThid)
143 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'yC',yC,myThid)
144 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'xG',xG,myThid)
145 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'yG',yG,myThid)
146 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'dxC',dxC,myThid)
147 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'dyC',dyC,myThid)
148 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'dxF',dxF,myThid)
149 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'dyF',dyF,myThid)
150 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'dxG',dxG,myThid)
151 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'dyG',dyG,myThid)
152 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'dxV',dxV,myThid)
153 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'dyU',dyU,myThid)
154 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'rA',rA,myThid)
155 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'rAw',rAw,myThid)
156 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'rAs',rAs,myThid)
157 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'rAz',rAz,myThid)
158 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'fCori',fCori,myThid)
159 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'fCoriG',fCoriG,myThid)
160 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'R_low',R_low,myThid)
161 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'Ro_surf',Ro_surf,myThid)
162 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'HFacC',HFacC,myThid)
163 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'HFacW',HFacW,myThid)
164 CALL MNC_CW_RS_W('D',bfname(nf:nl),0,0,'HFacS',HFacS,myThid)
165
166 RETURN
167 END
168
169 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
170
171 CBOP
172 C !ROUTINE: MNC_CW_WRITE_GRID_COORD
173
174 C !INTERFACE:
175 SUBROUTINE MNC_CW_WRITE_GRID_COORD(
176 I fname,
177 I myThid )
178
179 C !DESCRIPTION:
180 C This subroutine writes coordinates to one netcdf file
181 C (\texttt{fname.xxxxx.nc}) per tile.
182
183 C !USES:
184 implicit none
185 #include "SIZE.h"
186 #include "GRID.h"
187
188 C !INPUT PARAMETERS:
189 integer myThid
190 character*(*) fname
191 CEOP
192 C Write coordinates to file "fname"
193 _BEGIN_MASTER( myThid )
194
195 CALL MNC_CW_SET_UDIM(fname, 0, myThid)
196 CALL MNC_CW_RS_W('R',fname,0,0,'XC',xC, myThid)
197 CALL MNC_CW_RS_W('R',fname,0,0,'YC',yC, myThid)
198 CALL MNC_CW_RS_W('R',fname,0,0,'XG',xG, myThid)
199 CALL MNC_CW_RS_W('R',fname,0,0,'YG',yG, myThid)
200 C-- Here we can add as much grid information as we like, but this
201 C-- will increase the size of each of the affected files. It is
202 C-- a matter of taste, but here are some candidates:
203 C-- Probably it is enough to write the coordinates of the
204 C-- center points and the corners.
205 C CALL MNC_CW_RS_W('R',fname,0,0,'XU',xG, myThid)
206 C CALL MNC_CW_RS_W('R',fname,0,0,'YU',yC, myThid)
207 C CALL MNC_CW_RS_W('R',fname,0,0,'XV',xC, myThid)
208 C CALL MNC_CW_RS_W('R',fname,0,0,'YV',yG, myThid)
209 C-- Only required for diagnostics files, but unclear what the vertical
210 C-- coordinate means in this case, so do not write anything for now
211 C CALL MNC_CW_RS_W('R',fname,0,0,'RC',rC, myThid)
212 C CALL MNC_CW_RS_W('R',fname,0,0,'RF',rF, myThid)
213 C-- If required write mask information.
214 C CALL MNC_CW_RS_W('R',fname,0,0,'HFacC',HFacC,myThid)
215
216 _END_MASTER(myThid)
217
218 RETURN
219 END
220
221 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|

  ViewVC Help
Powered by ViewVC 1.1.22