Commit 6d93e62
authored
Merge pull request #628 from billsacks/handle_fields_with_ungridded_dims
A few refactorings to handle fields with ungridded dimensions, particularly for prep_rof_mod
### Description of changes
These are changes to support adding water tracers in CMEPS, which will be done using fields with ungridded dimensions. In particular, the changes here are needed to support adding ROF-related fields. I initially developed and tested these changes in the context of my branch for adding water tracers, but have split these off to their own PR to facilitate review of these changes, since they potentially impact things beyond just the addition of water tracers.
(1) Refactor med_field_info_mod and med_methods_mod to expose two methods that will be useful for the water tracer work: med_field_info_create_from_field (extracted from med_field_info_array_from_state) and med_field_info_esmf_fieldcreate (extracted from med_methods_FB_init)
(2) Change the mechanism for getting ungridded info from a Field: The previous mechanism - using ESMF/NUOPC attributes - doesn't work in a new context where I want to use this routine. So I have changed this to do a more direct querying of the Field. I added write statements to check whether there were any differences from this change, in `ERS_D_Ld3.ne30pg3_t232.B1850C_LTso.derecho_intel.allactive-defaultio`. At least in that configuration, the only difference was that, in various calls, `cpl_scalars` is now given an ungridded dimension of size 4, whereas previously it was not given an ungridded dimension. The new behavior seems probably correct, but I guess this didn't have any impact before. As noted below, this doesn't change answers, at least for the tests I ran.
(3) Generalize code in prep_rof to handle fields with ungridded dimensions. This will be needed for water tracers. The one piece that is *not* handled yet is the irrigation-specific mapping.
### Specific notes
Contributors other than yourself, if any:
CMEPS Issues Fixed (include github issue #):
Are changes expected to change answers? (specify if bfb, different at roundoff, more substantial) NO - bfb
Any User Interface Changes (namelist or namelist defaults changes)? NO
### Testing performed
Please describe the tests along with the target model and machine(s)
If possible, please also added hashes that were used in the testing
Tested in the context of cesm3_0_alpha08b, or something close to it (ESCOMP/CESM@622984f), with share updated to share1.1.18, and the changes here rebased onto cmeps1.1.32.
The following tests all passed and were bit-for-bit with baselines:
```
ERS_Ly7.f09_g17_gris4.T1850Gg.derecho_intel
SMS_Lm13.f10_f10_mg37.I1850Clm50SpG.derecho_intel
MULTINOAIS_Ly2.f10_f10_ais8gris4_mg37.I1850Clm50SpRsGag.derecho_intel.cism-change_params
SMS_D_Ld1.ne30pg3_t232.I1850Clm50BgcSpinup.derecho_intel.clm-cplhist
SMS_Ld40.TL319_t232.C_JRA.derecho_intel
ERS_D_Ld3.ne30pg3_t232.B1850C_LTso.derecho_intel.allactive-defaultio
ERI.ne30pg3_t232.B1850C_LTso.derecho_intel.allactive-defaultio
ERC_D_Ln9.ne30pg3_ne30pg3_mt232.FHISTC_LTso.derecho_intel.cam-outfrq9s
ERI.TL319_t232.G_JRA.derecho_intel.cice-default
SMS_D.TL319_t232.G_JRA_RYF.derecho_intel
```File tree
3 files changed
+192
-146
lines changed- mediator
3 files changed
+192
-146
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | | - | |
22 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
| |||
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
31 | 39 | | |
32 | 40 | | |
33 | 41 | | |
| |||
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
51 | | - | |
52 | | - | |
| 59 | + | |
| 60 | + | |
53 | 61 | | |
54 | 62 | | |
55 | 63 | | |
| |||
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
67 | | - | |
| 75 | + | |
68 | 76 | | |
69 | 77 | | |
70 | 78 | | |
| |||
95 | 103 | | |
96 | 104 | | |
97 | 105 | | |
98 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
99 | 161 | | |
100 | 162 | | |
101 | 163 | | |
| |||
134 | 196 | | |
135 | 197 | | |
136 | 198 | | |
137 | | - | |
| 199 | + | |
138 | 200 | | |
139 | 201 | | |
140 | 202 | | |
141 | 203 | | |
142 | 204 | | |
143 | 205 | | |
144 | 206 | | |
145 | | - | |
| 207 | + | |
146 | 208 | | |
147 | 209 | | |
148 | 210 | | |
| |||
168 | 230 | | |
169 | 231 | | |
170 | 232 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | 233 | | |
176 | 234 | | |
177 | 235 | | |
| |||
188 | 246 | | |
189 | 247 | | |
190 | 248 | | |
191 | | - | |
192 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
193 | 253 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | 254 | | |
222 | 255 | | |
223 | 256 | | |
224 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
225 | 293 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
| 369 | + | |
| 370 | + | |
383 | 371 | | |
384 | 372 | | |
385 | 373 | | |
| |||
720 | 708 | | |
721 | 709 | | |
722 | 710 | | |
723 | | - | |
| 711 | + | |
| 712 | + | |
724 | 713 | | |
725 | 714 | | |
726 | 715 | | |
| |||
1240 | 1229 | | |
1241 | 1230 | | |
1242 | 1231 | | |
1243 | | - | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
1244 | 1235 | | |
1245 | 1236 | | |
1246 | 1237 | | |
| |||
0 commit comments