1 | ! |
---|
2 | ! $Id: put_global_atts.F,v 1.7 2005/10/10 13:40:18 pmarches Exp $ |
---|
3 | ! |
---|
4 | #include "cppdefs.h" |
---|
5 | |
---|
6 | subroutine put_global_atts (ncid, ierr) |
---|
7 | implicit none |
---|
8 | integer ncid, ierr, nf_ftype, lvar,lenstr |
---|
9 | #include "param.h" |
---|
10 | #include "scalars.h" |
---|
11 | #include "ncscrum.h" |
---|
12 | #include "strings.h" |
---|
13 | |
---|
14 | #ifdef FLOATS |
---|
15 | # include "init_floats.h" |
---|
16 | # include "ncscrum_floats.h" |
---|
17 | real tempreal(i_floats) |
---|
18 | integer tempint(i_floats),i |
---|
19 | #endif /* FLOATS */ |
---|
20 | #ifdef STATIONS |
---|
21 | # include "sta.h" |
---|
22 | # include "nc_sta.h" |
---|
23 | #endif |
---|
24 | #include "netcdf.inc" |
---|
25 | #if defined MPI && defined PARALLEL_FILES |
---|
26 | integer*4 ibuff(4) |
---|
27 | ! |
---|
28 | ! Put global attribute 'partition' which identifies subdomain |
---|
29 | ! within the processor grid individually for each file. |
---|
30 | ! |
---|
31 | ibuff(1)=ii |
---|
32 | ibuff(2)=jj |
---|
33 | ibuff(3)=NP_XI |
---|
34 | ibuff(4)=NP_ETA |
---|
35 | ierr=nf_put_att_int (ncid, nf_global, 'partition', |
---|
36 | & nf_int, 4, ibuff) |
---|
37 | #endif |
---|
38 | |
---|
39 | ! |
---|
40 | ! Decide about output file type and precision for floating point |
---|
41 | ! variables (restart file always has the same precision as in the |
---|
42 | ! code, typically double precision, while all others can be made |
---|
43 | ! single precision. |
---|
44 | ! |
---|
45 | if (ncid.eq.ncidrst) then |
---|
46 | nf_ftype=NF_FTYPE |
---|
47 | else |
---|
48 | nf_ftype=NF_FOUT |
---|
49 | endif |
---|
50 | |
---|
51 | if (ncid.eq.ncidrst) then |
---|
52 | ierr=nf_put_att_text (ncid, nf_global, 'type', 17, |
---|
53 | & 'ROMS restart file') |
---|
54 | elseif (ncid.eq.ncidhis) then |
---|
55 | ierr=nf_put_att_text (ncid, nf_global, 'type', 17, |
---|
56 | & 'ROMS history file') |
---|
57 | #ifdef AVERAGES |
---|
58 | elseif (ncid.eq.ncidavg) then |
---|
59 | ierr=nf_put_att_text (ncid, nf_global, 'type', 18, |
---|
60 | & 'ROMS averages file') |
---|
61 | #endif |
---|
62 | #ifdef STATIONS |
---|
63 | elseif (ncid.eq.ncidsta) then |
---|
64 | ierr=nf_put_att_text(ncid, nf_global, 'type', 18, |
---|
65 | & 'ROMS stations file') |
---|
66 | #endif |
---|
67 | #ifdef FLOATS |
---|
68 | elseif (ncid.eq.ncidflt) then |
---|
69 | ierr=nf_put_att_text(ncid, nf_global, 'type', 24, |
---|
70 | & 'ROMS floats history file') |
---|
71 | #endif |
---|
72 | endif |
---|
73 | |
---|
74 | |
---|
75 | lvar=lenstr(title) |
---|
76 | ierr=nf_put_att_text(ncid, nf_global, 'title', lvar, |
---|
77 | & title(1:lvar)) |
---|
78 | lvar=lenstr(date_str) |
---|
79 | ierr=nf_put_att_text(ncid, nf_global, 'date', lvar, |
---|
80 | & date_str(1:lvar)) |
---|
81 | lvar=lenstr(rstname) |
---|
82 | ierr=nf_put_att_text(ncid, nf_global, 'rst_file',lvar, |
---|
83 | & rstname(1:lvar)) |
---|
84 | lvar=lenstr(hisname) |
---|
85 | ierr=nf_put_att_text(ncid, nf_global, 'his_file',lvar, |
---|
86 | & hisname(1:lvar)) |
---|
87 | #ifdef AVERAGES |
---|
88 | lvar=lenstr(avgname) |
---|
89 | ierr=nf_put_att_text(ncid, nf_global, 'avg_file',lvar, |
---|
90 | & avgname(1:lvar)) |
---|
91 | #endif |
---|
92 | #ifdef STATIONS |
---|
93 | lvar=lenstr(staname) |
---|
94 | ierr=nf_put_att_text(ncid, nf_global, 'sta_file',lvar, |
---|
95 | & staname(1:lvar)) |
---|
96 | lvar=lenstr(staposname) |
---|
97 | ierr=nf_put_att_text(ncid, nf_global, 'spos_file',lvar, |
---|
98 | & staposname(1:lvar)) |
---|
99 | #endif |
---|
100 | |
---|
101 | #ifdef FLOATS |
---|
102 | lvar=lenstr(fltname) |
---|
103 | ierr=nf_put_att_text(ncid, nf_global, 'flt_file',lvar, |
---|
104 | & fltname(1:lvar)) |
---|
105 | lvar=lenstr(fposnam) |
---|
106 | ierr=nf_put_att_text(ncid, nf_global, 'fpos_file',lvar, |
---|
107 | & fposnam(1:lvar)) |
---|
108 | |
---|
109 | if (ncid.eq.ncidflt) then |
---|
110 | # ifdef FLOATS_GLOBAL_ATTRIBUTES |
---|
111 | do i=1,i_floats |
---|
112 | tempreal(i)=Ft0(i) |
---|
113 | enddo |
---|
114 | ierr=nf_put_att_FTYPE(ncid, nf_global, 'Ft0',nf_ftype, |
---|
115 | & i_floats, tempreal) |
---|
116 | do i=1,i_floats |
---|
117 | tempreal(i)=Fx0(i) |
---|
118 | enddo |
---|
119 | ierr=nf_put_att_FTYPE(ncid, nf_global, 'Fx0',nf_ftype, |
---|
120 | & i_floats, tempreal) |
---|
121 | do i=1,i_floats |
---|
122 | tempreal(i)=Fy0(i) |
---|
123 | enddo |
---|
124 | ierr=nf_put_att_FTYPE(ncid, nf_global, 'Fy0',nf_ftype, |
---|
125 | & i_floats, tempreal) |
---|
126 | do i=1,i_floats |
---|
127 | tempreal(i)=Fz0(i) |
---|
128 | enddo |
---|
129 | ierr=nf_put_att_FTYPE(ncid, nf_global, 'Fz0',nf_ftype, |
---|
130 | & i_floats, tempreal) |
---|
131 | do i=1,i_floats |
---|
132 | tempint(i)=Fgrd(i) |
---|
133 | enddo |
---|
134 | ierr=nf_put_att_int(ncid, nf_global, 'Fgrd',nf_int, |
---|
135 | & i_floats, tempint) |
---|
136 | do i=1,i_floats |
---|
137 | tempint(i)=Fcoor(i) |
---|
138 | enddo |
---|
139 | ierr=nf_put_att_int(ncid, nf_global, 'Fcoor',nf_int, |
---|
140 | & i_floats, tempint) |
---|
141 | do i=1,i_floats |
---|
142 | tempint(i)=Ftype(i) |
---|
143 | enddo |
---|
144 | ierr=nf_put_att_int(ncid, nf_global, 'Ftype',nf_int, |
---|
145 | & i_floats, tempint) |
---|
146 | do i=1,i_floats |
---|
147 | tempint(i)=Fcount(i) |
---|
148 | enddo |
---|
149 | ierr=nf_put_att_int(ncid, nf_global, 'Fcount',nf_int, |
---|
150 | & i_floats, tempint) |
---|
151 | do i=1,i_floats |
---|
152 | tempreal(i)=Fdt(i) |
---|
153 | enddo |
---|
154 | ierr=nf_put_att_FTYPE(ncid, nf_global, 'Fdt',nf_ftype, |
---|
155 | & i_floats, tempreal) |
---|
156 | do i=1,i_floats |
---|
157 | tempreal(i)=Fdx(i) |
---|
158 | enddo |
---|
159 | ierr=nf_put_att_FTYPE(ncid, nf_global, 'Fdx',nf_ftype, |
---|
160 | & i_floats, tempreal) |
---|
161 | do i=1,i_floats |
---|
162 | tempreal(i)=Fdy(i) |
---|
163 | enddo |
---|
164 | ierr=nf_put_att_FTYPE(ncid, nf_global, 'Fdy',nf_ftype, |
---|
165 | & i_floats, tempreal) |
---|
166 | do i=1,i_floats |
---|
167 | tempreal(i)=Fdz(i) |
---|
168 | enddo |
---|
169 | ierr=nf_put_att_FTYPE(ncid, nf_global, 'Fdz',nf_ftype, |
---|
170 | & i_floats, tempreal) |
---|
171 | # endif |
---|
172 | endif |
---|
173 | #endif /* FLOATS */ |
---|
174 | |
---|
175 | #ifndef ANA_GRID |
---|
176 | lvar=lenstr(grdname) |
---|
177 | ierr=nf_put_att_text(ncid, nf_global, 'grd_file',lvar, |
---|
178 | & grdname(1:lvar)) |
---|
179 | #endif |
---|
180 | #ifndef ANA_INITIAL |
---|
181 | lvar=lenstr(ininame) |
---|
182 | ierr=nf_put_att_text(ncid, nf_global, 'ini_file',lvar, |
---|
183 | & ininame(1:lvar)) |
---|
184 | #endif |
---|
185 | #if !defined ANA_SMFLUX || !defined ANA_STFLUX \ |
---|
186 | || !defined ANA_BTFLUX \ |
---|
187 | || (defined BBL && !defined ANA_BSEDIM) \ |
---|
188 | || (defined BBL && !defined ANA_WWAVE) \ |
---|
189 | || (defined SALINITY && !defined ANA_SSFLUX) \ |
---|
190 | || ((defined LMD_SKPP || defined LMD_BKPP) && !defined ANA_SRFLUX) |
---|
191 | lvar=lenstr(frcname) |
---|
192 | ierr=nf_put_att_text(ncid, nf_global,'frc_file', lvar, |
---|
193 | & frcname(1:lvar)) |
---|
194 | #endif |
---|
195 | #ifdef ASSIMILATION |
---|
196 | lvar=lenstr(assname) |
---|
197 | ierr=nf_put_att_text(ncid, nf_global,'ass_file', lvar, |
---|
198 | & assname(1:lvar)) |
---|
199 | lvar=lenstr(aparnam) |
---|
200 | ierr=nf_put_att_text(ncid, nf_global,'apar_file',lvar, |
---|
201 | & aparnam(1:lvar)) |
---|
202 | #endif |
---|
203 | #ifdef SOLVE3D |
---|
204 | ! |
---|
205 | ! S-coordinate control parameters "theta_s", "theta_b", "Tcline" |
---|
206 | ! and "hc" (written as as global attributes). |
---|
207 | ! |
---|
208 | ierr=nf_put_att_FTYPE(ncid, nf_global,'theta_s',nf_ftype, |
---|
209 | & 1, theta_s) |
---|
210 | ierr=nf_put_att_text (ncid, nf_global,'theta_s_expl',38, |
---|
211 | & 'S-coordinate surface control parameter') |
---|
212 | |
---|
213 | ierr=nf_put_att_FTYPE(ncid,nf_global,'theta_b',nf_ftype, 1, |
---|
214 | & theta_b) |
---|
215 | ierr=nf_put_att_text (ncid,nf_global,'theta_b_expl',37, |
---|
216 | & 'S-coordinate bottom control parameter') |
---|
217 | |
---|
218 | ierr=nf_put_att_FTYPE(ncid,nf_global,'Tcline', nf_ftype, 1, |
---|
219 | & Tcline) |
---|
220 | ierr=nf_put_att_text (ncid,nf_global,'Tcline_expl',39, |
---|
221 | & 'S-coordinate surface/bottom layer width') |
---|
222 | ierr=nf_put_att_text (ncid, nf_global,'Tcline_units',5,'meter') |
---|
223 | |
---|
224 | ierr=nf_put_att_FTYPE(ncid, nf_global, 'hc',nf_ftype, 1, hc) |
---|
225 | ierr=nf_put_att_text (ncid, nf_global, 'hc_expl',38, |
---|
226 | & 'S-coordinate parameter, critical depth') |
---|
227 | ierr=nf_put_att_text (ncid, nf_global, 'hc_units', 5, 'meter') |
---|
228 | ! |
---|
229 | ! S-coordinate independent variables "sc_w", "sc_r" and stretching |
---|
230 | ! curves "Cs_w", "Cs_r" at W- and RHO-points. |
---|
231 | ! |
---|
232 | ierr=nf_put_att_FTYPE(ncid, nf_global,'sc_w',nf_ftype, N+1, |
---|
233 | & sc_w) |
---|
234 | ierr=nf_put_att_text (ncid, nf_global,'sc_w_expl', 24, |
---|
235 | & 'S-coordinate at W-points') |
---|
236 | ierr=nf_put_att_FTYPE(ncid, nf_global,'Cs_w',nf_ftype, N+1, |
---|
237 | & Cs_w) |
---|
238 | ierr=nf_put_att_text (ncid, nf_global,'Cs_w_expl',42, |
---|
239 | & 'S-coordinate stretching curves at W-points') |
---|
240 | ierr=nf_put_att_FTYPE(ncid,nf_global,'sc_r',nf_ftype,N,sc_r) |
---|
241 | ierr=nf_put_att_text (ncid, nf_global,'sc_r_expl', 24, |
---|
242 | & 'S-coordinate at W-points') |
---|
243 | ierr=nf_put_att_FTYPE(ncid,nf_global,'Cs_r',nf_ftype,N,Cs_r) |
---|
244 | ierr=nf_put_att_text (ncid, nf_global,'Cs_r_expl',44, |
---|
245 | & 'S-coordinate stretching curves at RHO-points') |
---|
246 | #endif |
---|
247 | ! |
---|
248 | ! Time stepping parameters. |
---|
249 | ! |
---|
250 | ierr=nf_put_att_int(ncid,nf_global,'ntimes', nf_int,1,ntimes) |
---|
251 | ierr=nf_put_att_int(ncid,nf_global,'ndtfast', nf_int,1,ndtfast) |
---|
252 | ierr=nf_put_att_FTYPE(ncid,nf_global,'dt', nf_ftype, 1, dt) |
---|
253 | ierr=nf_put_att_FTYPE(ncid,nf_global,'dtfast',nf_ftype, 1, |
---|
254 | & dtfast) |
---|
255 | ierr=nf_put_att_int (ncid,nf_global,'nwrt', nf_int, 1, nwrt) |
---|
256 | #ifdef AVERAGES |
---|
257 | ierr=nf_put_att_int (ncid,nf_global,'ntsavg',nf_int, 1,ntsavg) |
---|
258 | ierr=nf_put_att_text (ncid,nf_global,'ntsavg_expl',59, |
---|
259 | & 'starting time-step for accumulation of time-averaged fields') |
---|
260 | |
---|
261 | ierr=nf_put_att_int (ncid,nf_global,'navg', nf_int, 1, navg) |
---|
262 | ierr=nf_put_att_text (ncid,nf_global,'navg_expl',50, |
---|
263 | & 'number of time-steps between time-averaged records') |
---|
264 | #endif |
---|
265 | #ifdef STATIONS |
---|
266 | ierr=nf_put_att_int (ncid,nf_global,'nsta', nf_int, 1, nsta) |
---|
267 | ierr=nf_put_att_text (ncid,nf_global,'nsta_expl', 45, |
---|
268 | & 'number of time-steps between stations records') |
---|
269 | #endif |
---|
270 | ! |
---|
271 | ! Horizontal viscosity and mixing coefficients. |
---|
272 | ! |
---|
273 | #ifdef UV_VIS2 |
---|
274 | ierr=nf_put_att_FTYPE(ncid,nf_global,'visc2',nf_ftype,1,visc2) |
---|
275 | ierr=nf_put_att_text (ncid,nf_global,'visc2_expl',41, |
---|
276 | & 'Laplacian mixing coefficient for momentum') |
---|
277 | ierr=nf_put_att_text (ncid,nf_global,'visc2_units',15, |
---|
278 | & 'meter2 second-1') |
---|
279 | #endif |
---|
280 | #ifdef UV_VIS4 |
---|
281 | ierr=nf_put_att_FTYPE(ncid,nf_global,'visc4',nf_ftype, 1,visc4) |
---|
282 | ierr=nf_put_att_text (ncid,nf_global,'visc4_expl', 42, |
---|
283 | & 'biharmonic mixing coefficient for momentum') |
---|
284 | ierr=nf_put_att_text (ncid,nf_global,'visc4_units', 15, |
---|
285 | & 'meter4 second-1') |
---|
286 | #endif |
---|
287 | #ifdef SOLVE3D |
---|
288 | # ifdef TS_DIF2 |
---|
289 | ierr=nf_put_att_FTYPE(ncid,nf_global,'tnu2',nf_ftype, 1,tnu2) |
---|
290 | ierr=nf_put_att_text (ncid,nf_global,'tnu2_expl',40, |
---|
291 | & 'Laplacian mixing coefficient for tracers') |
---|
292 | ierr=nf_put_att_text (ncid,nf_global,'tnu2_units',15, |
---|
293 | & 'meter2 second-1') |
---|
294 | # endif |
---|
295 | # ifdef TS_DIF4 |
---|
296 | ierr=nf_put_att_FTYPE(ncid,nf_global,'tnu4', nf_ftype, 1,tnu4) |
---|
297 | ierr=nf_put_att_text (ncid,nf_global,'tnu4_expl',41, |
---|
298 | & 'biharmonic mixing coefficient for tracers') |
---|
299 | ierr=nf_put_att_text (ncid,nf_global,'units',15, |
---|
300 | & 'meter4 second-1') |
---|
301 | # endif |
---|
302 | # ifdef MY25_MIXING |
---|
303 | # ifdef Q2_DIF2 |
---|
304 | ierr=nf_put_att_FTYPE(ncid,nf_global,'q2nu2',nf_ftype, 1,q2nu2) |
---|
305 | ierr=nf_put_att_text (ncid,nf_global,'q2nu2_expl',49, |
---|
306 | & 'Laplacian mixing coefficient for turbulent energy') |
---|
307 | ierr=nf_put_att_text (ncid,nf_global,'q2nu2_units',15, |
---|
308 | & 'meter2 second-1') |
---|
309 | # endif |
---|
310 | # ifdef Q2_DIF4 |
---|
311 | ierr=nf_put_att_FTYPE(ncid,nf_global,'q2nu4',nf_ftype, 1,q2nu4) |
---|
312 | ierr=nf_put_att_text (ncid,nf_global,'q2nu4_expl',50, |
---|
313 | & 'Biharmonic mixing coefficient for turbulent energy') |
---|
314 | ierr=nf_put_att_text (ncid,nf_global,'q2nu4_units',15, |
---|
315 | & 'meter4 second-1') |
---|
316 | # endif |
---|
317 | # endif |
---|
318 | # if !defined LMD_MIXING && !defined BVF_MIXING\ |
---|
319 | && !defined MY2_MIXING && !defined MY25_MIXING |
---|
320 | ! |
---|
321 | ! Background vertical viscosity and tracer mixing coefficients. |
---|
322 | ! |
---|
323 | ierr=nf_put_att_FTYPE(ncid,nf_global,'Akv_bak',nf_ftype, 1, |
---|
324 | & Akv_bak) |
---|
325 | ierr=nf_put_att_text (ncid,nf_global,'Akv_bak_expl',51, |
---|
326 | & 'background vertical mixing coefficient for momentum') |
---|
327 | ierr=nf_put_att_text (ncid,nf_global,'Akv_bak_units',15, |
---|
328 | & 'meter2 second-1') |
---|
329 | |
---|
330 | ierr=nf_put_att_FTYPE(ncid,nf_global,'Akt_bak',nf_ftype, NT, |
---|
331 | & Akt_bak) |
---|
332 | ierr=nf_put_att_text (ncid,nf_global,'Akt_bak_expl', 50, |
---|
333 | & 'background vertical mixing coefficient for tracers') |
---|
334 | ierr=nf_put_att_text (ncid,nf_global,'Akt_bak_units', 15, |
---|
335 | & 'meter2 second-1') |
---|
336 | # endif |
---|
337 | # ifdef MY25_MIXING |
---|
338 | ierr=nf_put_att_FTYPE(ncid,nf_global,'Akq_bak',nf_ftype, |
---|
339 | & 1,Akq_bak) |
---|
340 | ierr=nf_put_att_text (ncid,nf_global,'Akq_bak_expl',59, |
---|
341 | & 'background vertical mixing coefficient for turbulent energy') |
---|
342 | ierr=nf_put_att_text (ncid,nf_global,'Akq_bak_units',15, |
---|
343 | & 'meter2 second-1') |
---|
344 | # endif |
---|
345 | #endif |
---|
346 | ! |
---|
347 | ! Bottom drag coefficients. |
---|
348 | ! |
---|
349 | if (Zob.ne.0.) then |
---|
350 | ierr=nf_put_att_FTYPE(ncid,nf_global,'Zob',nf_ftype,1,Zob) |
---|
351 | ierr=nf_put_att_text (ncid,nf_global,'Zob_expl',46, |
---|
352 | & 'VonKarman/Prandtl log layer : roughness scale') |
---|
353 | ierr=nf_put_att_text (ncid,nf_global,'Zob_units',5, |
---|
354 | & 'meter') |
---|
355 | ierr=nf_put_att_FTYPE(ncid,nf_global,'Cdb_max',nf_ftype,1, |
---|
356 | & Cdb_max) |
---|
357 | ierr=nf_put_att_FTYPE(ncid,nf_global,'Cdb_min',nf_ftype,1, |
---|
358 | & Cdb_min) |
---|
359 | ierr=nf_put_att_text (ncid,nf_global,'Cdb_expl',37, |
---|
360 | & 'Range of quadratic drag coefficient') |
---|
361 | elseif (rdrg2.gt.0.) then |
---|
362 | ierr=nf_put_att_FTYPE(ncid,nf_global,'rdrg2',nf_ftype,1,rdrg2) |
---|
363 | ierr=nf_put_att_text (ncid,nf_global,'rdrg2_expl',26, |
---|
364 | & 'quadratic drag coefficient') |
---|
365 | ierr=nf_put_att_text (ncid,nf_global,'rdrg2_units',14, |
---|
366 | & 'nondimensional') |
---|
367 | elseif (rdrg.ne.0) then |
---|
368 | ierr=nf_put_att_FTYPE(ncid,nf_global,'rdrg',nf_ftype,1,rdrg) |
---|
369 | ierr=nf_put_att_text (ncid,nf_global,'rdrg_expl',23, |
---|
370 | & 'linear drag coefficient') |
---|
371 | ierr=nf_put_att_text (ncid,nf_global,'rdrg_units',14, |
---|
372 | & 'meter second-1') |
---|
373 | endif |
---|
374 | ! |
---|
375 | #ifdef SOLVE3D |
---|
376 | ! |
---|
377 | ! Equation of State parameters. |
---|
378 | ! |
---|
379 | ierr=nf_put_att_FTYPE(ncid,nf_global,'rho0',nf_ftype, 1,rho0) |
---|
380 | ierr=nf_put_att_text (ncid,nf_global,'rho0_expl', 45, |
---|
381 | & 'Mean density used in Boussinesq approximation') |
---|
382 | ierr=nf_put_att_text (ncid,nf_global,'rho0_units', 16, |
---|
383 | & 'kilogram meter-3') |
---|
384 | ! |
---|
385 | # ifndef NONLIN_EOS |
---|
386 | ierr=nf_put_att_FTYPE(ncid,nf_global,'R0', nf_ftype, 1, R0) |
---|
387 | ierr=nf_put_att_text (ncid,nf_global,'R0_expl', 51, |
---|
388 | & 'Background density used in linear equation of state') |
---|
389 | ierr=nf_put_att_text (ncid,nf_global,'R0_units', 16, |
---|
390 | & 'kilogram meter-3') |
---|
391 | ! |
---|
392 | ierr=nf_put_att_FTYPE(ncid,nf_global,'Tcoef',nf_ftype, 1,Tcoef) |
---|
393 | ierr=nf_put_att_text (ncid,nf_global,'Tcoef_expl',29, |
---|
394 | & 'thermal expansion coefficient') |
---|
395 | ierr=nf_put_att_text (ncid,nf_global,'Tcoef_units',11, |
---|
396 | & 'kg.m-3.°C-1') |
---|
397 | ! |
---|
398 | ierr=nf_put_att_FTYPE(ncid,nf_global,'Scoef',nf_ftype, 1,Scoef) |
---|
399 | ierr=nf_put_att_text (ncid,nf_global,'Scoef_expl', 30, |
---|
400 | & 'Saline contraction coefficient') |
---|
401 | ierr=nf_put_att_text (ncid,nf_global,'Scoef_units', 12, |
---|
402 | & 'kg.m-3.psu-1') |
---|
403 | # endif |
---|
404 | ! |
---|
405 | ! Various parameters. |
---|
406 | ! |
---|
407 | # ifdef BODYFORCE |
---|
408 | ierr=nf_put_att_int (ncid,nf_global,'levsfrc',nf_int,1,levsfrc) |
---|
409 | ierr=nf_put_att_text(ncid,nf_global, 'levsfrc_expl', 38, |
---|
410 | & 'Shallowest level for body-force stress') |
---|
411 | ierr=nf_put_att_int (ncid,nf_global,'levbfrc',nf_int,1,levbfrc) |
---|
412 | ierr=nf_put_att_text(ncid,nf_global,'levbfrc_expl', 35, |
---|
413 | & 'Deepest level for body-force stress') |
---|
414 | # endif |
---|
415 | #endif /* SOLVE3D */ |
---|
416 | ! |
---|
417 | ! Slipperiness parameters. |
---|
418 | ! |
---|
419 | ierr=nf_put_att_FTYPE(ncid,nf_global,'gamma2',nf_ftype, 1, |
---|
420 | & gamma2) |
---|
421 | ierr=nf_put_att_text (ncid,nf_global,'gamma2_expl', 22, |
---|
422 | & 'Slipperiness parameter') |
---|
423 | ! |
---|
424 | ! Sponge parameters |
---|
425 | ! |
---|
426 | # ifdef SPONGE |
---|
427 | ierr=nf_put_att_FTYPE(ncid,nf_global,'x_sponge',nf_ftype, 1, |
---|
428 | & x_sponge) |
---|
429 | ierr=nf_put_att_FTYPE(ncid,nf_global,'v_sponge',nf_ftype, 1, |
---|
430 | & v_sponge) |
---|
431 | ierr=nf_put_att_text (ncid,nf_global,'sponge_expl', 51, |
---|
432 | & 'Sponge parameters : extent (m) & viscosity (m2.s-1)') |
---|
433 | # endif |
---|
434 | ! |
---|
435 | ! List of Source Codes and Activated CPP-switches |
---|
436 | ! |
---|
437 | lvar=lenstr(srcs) |
---|
438 | ierr=nf_put_att_text (ncid,nf_global, 'SRCS', lvar, |
---|
439 | & srcs(1:lvar)) |
---|
440 | ! |
---|
441 | lvar=lenstr(Coptions) |
---|
442 | ierr=nf_put_att_text(ncid,nf_global, 'CPP-options', |
---|
443 | & lvar, Coptions(1:lvar)) |
---|
444 | return |
---|
445 | end |
---|