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

Annotation 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.9 - (hide annotations) (download)
Wed Sep 22 21:19:44 2004 UTC (19 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint57m_post, checkpoint55c_post, checkpoint57s_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint57b_post, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint55h_post, checkpoint58n_post, checkpoint57g_pre, checkpoint58h_post, checkpoint56c_post, checkpoint57y_pre, checkpoint57f_pre, checkpoint57a_post, checkpoint58q_post, checkpoint55g_post, checkpoint58j_post, checkpoint55f_post, checkpoint57r_post, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint58f_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint57c_post, checkpoint55e_post, checkpoint58k_post, checkpoint58p_post, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post, checkpoint55d_post
Changes since 1.8: +29 -29 lines
 o make the MNC_CW_ADD_VATTR_* subroutines all take scalar arguments
   which simplifies the calls and passes the ifc check-bounds test

1 edhill 1.9 C $Header: /u/gcmpack/MITgcm/pkg/mnc/mnc_cw_write_grid_info.F,v 1.8 2004/04/02 16:12:48 edhill Exp $
2 edhill 1.1 C $Name: $
3    
4     #include "MNC_OPTIONS.h"
5    
6     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 edhill 1.8 CBOP 1
8 edhill 1.7 C !ROUTINE: MNC_CW_WRITE_GRID_INFO
9 edhill 1.1
10 edhill 1.7 C !INTERFACE:
11 edhill 1.1 SUBROUTINE MNC_CW_WRITE_GRID_INFO(
12 edhill 1.3 I bfname,
13     I myThid )
14 edhill 1.1
15 edhill 1.7 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 !USES:
21 edhill 1.1 implicit none
22     #include "mnc_common.h"
23     #include "SIZE.h"
24     #include "EEPARAMS.h"
25     #include "EESUPPORT.h"
26     #include "PARAMS.h"
27     #include "GRID.h"
28    
29 edhill 1.7 C !INPUT PARAMETERS:
30 edhill 1.1 integer myThid
31     character*(*) bfname
32 edhill 1.8 CEOP
33 edhill 1.1
34 edhill 1.7 C !LOCAL VARIABLES:
35     integer nf,nl
36 edhill 1.8
37 edhill 1.1 C Functions
38     integer IFNBLNK, ILNBLNK
39    
40     nf = IFNBLNK(bfname)
41     nl = ILNBLNK(bfname)
42    
43     C Create MNC definitions for GRID.h variables
44 edhill 1.3 CALL MNC_CW_ADD_VNAME('rC', '-_-_--__C__-', 0,0, myThid)
45     CALL MNC_CW_ADD_VNAME('rF', '-_-_--__I__-', 0,0, myThid)
46     CALL MNC_CW_ADD_VNAME('drC', '-_-_--__C__-', 0,0, myThid)
47     CALL MNC_CW_ADD_VNAME('drF', '-_-_--__C__-', 0,0, myThid)
48     CALL MNC_CW_ADD_VNAME('saFac', '-_-_--__C__-', 0,0, myThid)
49    
50 edhill 1.4 CALL MNC_CW_ADD_VNAME('xC', 'Cen_xy_Hn__-__-', 3,4, myThid)
51     CALL MNC_CW_ADD_VNAME('yC', 'Cen_xy_Hn__-__-', 3,4, myThid)
52     CALL MNC_CW_ADD_VNAME('xG', 'Cor_xy_Hn__-__-', 3,4, myThid)
53     CALL MNC_CW_ADD_VNAME('yG', 'Cor_xy_Hn__-__-', 3,4, myThid)
54     CALL MNC_CW_ADD_VNAME('dxC', 'Cen_xy_Hn__-__-', 3,4, myThid)
55     CALL MNC_CW_ADD_VNAME('dyC', 'Cen_xy_Hn__-__-', 3,4, myThid)
56     CALL MNC_CW_ADD_VNAME('dxF', 'Cen_xy_Hn__-__-', 3,4, myThid)
57     CALL MNC_CW_ADD_VNAME('dyF', 'Cen_xy_Hn__-__-', 3,4, myThid)
58     CALL MNC_CW_ADD_VNAME('dxG', 'Cen_xy_Hn__-__-', 3,4, myThid)
59     CALL MNC_CW_ADD_VNAME('dyG', 'Cen_xy_Hn__-__-', 3,4, myThid)
60     CALL MNC_CW_ADD_VNAME('dxV', 'U_xy_Hn__-__-', 3,4, myThid)
61     CALL MNC_CW_ADD_VNAME('dyU', 'V_xy_Hn__-__-', 3,4, myThid)
62     CALL MNC_CW_ADD_VNAME('rA', 'Cen_xy_Hn__-__-', 3,4, myThid)
63     CALL MNC_CW_ADD_VNAME('rAw', 'Cen_xy_Hn__-__-', 3,4, myThid)
64     CALL MNC_CW_ADD_VNAME('rAs', 'Cen_xy_Hn__-__-', 3,4, myThid)
65     CALL MNC_CW_ADD_VNAME('rAz', 'Cen_xy_Hn__-__-', 3,4, myThid)
66     CALL MNC_CW_ADD_VNAME('fCori', 'Cen_xy_Hn__-__-', 3,4, myThid)
67     CALL MNC_CW_ADD_VNAME('fCoriG', 'Cen_xy_Hn__-__-', 3,4, myThid)
68     CALL MNC_CW_ADD_VNAME('R_low', 'Cen_xy_Hn__-__-', 3,4, myThid)
69     CALL MNC_CW_ADD_VNAME('Ro_surf', 'Cen_xy_Hn__-__-', 3,4, myThid)
70     CALL MNC_CW_ADD_VNAME('HFacC', 'Cen_xy_Hn__C__-', 4,5, myThid)
71     CALL MNC_CW_ADD_VNAME('HFacW', 'Cen_xy_Hn__C__-', 4,5, myThid)
72     CALL MNC_CW_ADD_VNAME('HFacS', 'Cen_xy_Hn__C__-', 4,5, myThid)
73 edhill 1.3
74 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('rC','description',
75 edhill 1.3 & 'r of cell center',myThid)
76 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('rF','description',
77 edhill 1.3 & 'r of cell face',myThid)
78 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('drC','description',
79 edhill 1.3 & 'r cell center separation',myThid)
80 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('drF','description',
81 edhill 1.3 & 'r cell face separation',myThid)
82 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('saFac','description',
83 edhill 1.3 & 'shallow atmosphere factor',myThid)
84 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('xC','description',
85 edhill 1.3 & 'x of cell center',myThid)
86 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('yC','description',
87 edhill 1.3 & 'y of cell center',myThid)
88 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('xG','description',
89 edhill 1.3 & 'x of cell corner',myThid)
90 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('yG','description',
91 edhill 1.3 & 'y of cell corner',myThid)
92 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('dxC','description',
93 edhill 1.3 & 'x cell center separation',myThid)
94 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('dyC','description',
95 edhill 1.3 & 'y cell center separation',myThid)
96 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('dxF','description',
97 edhill 1.3 & 'x cell face separation',myThid)
98 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('dyF','description',
99 edhill 1.3 & 'y cell face separation',myThid)
100 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('dxG','description',
101 edhill 1.3 & 'x cell face separation',myThid)
102 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('dyG','description',
103 edhill 1.3 & 'y cell face separation',myThid)
104 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('dxV','description',
105 edhill 1.3 & 'x v-velocity separation',myThid)
106 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('dyU','description',
107 edhill 1.3 & 'y u-velocity separation',myThid)
108 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('rA','description',
109 edhill 1.3 & 'r-face area',myThid)
110 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('rAw','description',
111 edhill 1.3 & '',myThid)
112 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('rAs','description',
113 edhill 1.3 & '',myThid)
114 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('rAz','description',
115 edhill 1.3 & '',myThid)
116 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('fCori','description',
117 edhill 1.3 & 'Coriolis f',myThid)
118 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('fCoriG','description',
119 edhill 1.3 & 'Coriolis f',myThid)
120 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('R_low','description',
121 edhill 1.3 & 'base of fluid in r-units',myThid)
122 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('Ro_surf','description',
123 edhill 1.3 & 'surface reference (at rest,myThid) position',myThid)
124 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('HFacC','description',
125 edhill 1.3 & 'C-facing vertical fraction of open cell',myThid)
126 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('HFacW','description',
127 edhill 1.3 & 'W-facing vertical fraction of open cell',myThid)
128 edhill 1.9 CALL MNC_CW_ADD_VATTR_TEXT('HFacS','description',
129 edhill 1.3 & 'S-facing vertical fraction of open cell',myThid)
130 edhill 1.1
131     C Write the GRID.h variables
132 edhill 1.5 CALL MNC_CW_SET_UDIM(bfname(nf:nl), 0, myThid)
133 edhill 1.6 CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'rC',rC,myThid)
134     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'rF',rF,myThid)
135     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'drC',drC,myThid)
136     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'drF',drF,myThid)
137     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'saFac',saFac,myThid)
138     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'xC',xC,myThid)
139     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'yC',yC,myThid)
140     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'xG',xG,myThid)
141     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'yG',yG,myThid)
142     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'dxC',dxC,myThid)
143     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'dyC',dyC,myThid)
144     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'dxF',dxF,myThid)
145     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'dyF',dyF,myThid)
146     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'dxG',dxG,myThid)
147     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'dyG',dyG,myThid)
148     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'dxV',dxV,myThid)
149     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'dyU',dyU,myThid)
150     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'rA',rA,myThid)
151     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'rAw',rAw,myThid)
152     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'rAs',rAs,myThid)
153     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'rAz',rAz,myThid)
154     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'fCori',fCori,myThid)
155     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'fCoriG',fCoriG,myThid)
156     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'R_low',R_low,myThid)
157     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'Ro_surf',Ro_surf,myThid)
158     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'HFacC',HFacC,myThid)
159     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'HFacW',HFacW,myThid)
160     CALL MNC_CW_RL_W('D',bfname(nf:nl),0,0,'HFacS',HFacS,myThid)
161 edhill 1.1
162    
163     RETURN
164     END
165    
166     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
167    

  ViewVC Help
Powered by ViewVC 1.1.22