Skip to content

Commit c546898

Browse files
Merge pull request #21 from BrodiePearson/ocean/addADCMixing
Adds commenting for the tendency terms
2 parents a28ed58 + 287e603 commit c546898

File tree

3 files changed

+395
-141
lines changed

3 files changed

+395
-141
lines changed

src/core_ocean/adc_mixing/Registry_adc_mixing_fields_opts.xml

Lines changed: 55 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -275,142 +275,142 @@
275275
</var_struct>
276276
<var_struct name="adcTendArrays" time_levs="1" packages="adcMixingPKG">
277277
<var name="w2tend1" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
278-
description="entrainment production term -- similar to dissipation"
278+
description="entrainment/detrainment term -- similar to dissipation"
279279
/>
280280
<var name="w2tend2" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
281-
description="third order moment term (d / dz w^3)"
281+
description="turbulent transport of w2 [ -d(www)/dz ]"
282282
/>
283283
<var name="w2tend3" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
284-
description="return to isotropy term"
284+
description="parameterized pressure-strain terms (Rotta, rapid, buoyancy, Stokes)"
285285
/>
286286
<var name="w2tend4" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
287287
description="buoyancy production term"
288288
/>
289289
<var name="w2tend5" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
290-
description="shear production term"
290+
description="sub-plume scale tendency term for w2"
291291
/>
292292
<var name="w2tend6" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
293-
description="conversion of w2 due to splat effects"
293+
description="conversion of w2 to u2/v2 due to splat effects"
294294
/>
295295
<var name="w3tend1" type="real" dimensions="nVertLevels nCells Time" units="m^2/s^3"
296-
description="entrainment production term -- similar to dissipation"
296+
description="entrainment/detrainment term -- similar to dissipation"
297297
/>
298298
<var name="w3tend2" type="real" dimensions="nVertLevels nCells Time" units="m^2/s^3"
299-
description="fourth order moment term (d / dz w^4)"
299+
description="turbulent transport of w3 [ -d(w^4)/dz ]"
300300
/>
301301
<var name="w3tend3" type="real" dimensions="nVertLevels nCells Time" units="m^2/s^3"
302-
description="w2 d/dz w2"
302+
description="gradient production of w3 [ (3/2)*d( [w2]^2 )/dz ]"
303303
/>
304304
<var name="w3tend4" type="real" dimensions="nVertLevels nCells Time" units="m^2/s^3"
305-
description="subplume terms + return to isotropy, latter dominates"
305+
description="parameterized pressure terms (Rotta, buoyancy)"
306306
/>
307307
<var name="w3tend5" type="real" dimensions="nVertLevels nCells Time" units="m^2/s^3"
308-
description="third order moment of buoyancy, turb transport of buoyancy fluxes"
308+
description="buoyancy production and sub-plume scale effects"
309309
/>
310310
<var name="w3tend6" type="real" dimensions="nVertLevels nCells Time" units="m^2/s^3"
311311
description="destruction due to splat effects"
312312
/>
313-
<var name="wttend1" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
314-
description="divergence of turbulent transport of flux"
313+
<var name="wttend1" type="real" dimensions="nVertLevelsP1 nCells Time" units="m C/s^2"
314+
description="entrainment/detrainment term -- similar to dissipation"
315315
/>
316-
<var name="wttend2" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
317-
description="gradient production w^2 dTdz"
316+
<var name="wttend2" type="real" dimensions="nVertLevelsP1 nCells Time" units="m C/s^2"
317+
description="turbulent transport of wt [ -d(wtw)/dz ]"
318318
/>
319-
<var name="wttend3" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
320-
description="buoyancy term"
319+
<var name="wttend3" type="real" dimensions="nVertLevelsP1 nCells Time" units="m C/s^2"
320+
description="parameterized pressure-scalar terms (Rotta, rapid, buoyancy, Stokes)"
321321
/>
322-
<var name="wttend4" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
323-
description="return to isotropy"
322+
<var name="wttend4" type="real" dimensions="nVertLevelsP1 nCells Time" units="m C/s^2"
323+
description="gradient and buoyancy production term [ -w2*dT/dz + t*buoyancy]"
324324
/>
325-
<var name="wttend5" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
326-
description="shear production term"
325+
<var name="wttend5" type="real" dimensions="nVertLevelsP1 nCells Time" units="m C/s^2"
326+
description="dissipation of wt [ -kappa_FL*[d(wt)/dz]^2 ]"
327327
/>
328-
<var name="wttend6" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
328+
<var name="wttend6" type="real" dimensions="nVertLevelsP1 nCells Time" units="m C/s^2"
329329
description="subplume scale production term"
330330
/>
331-
<var name="wstend1" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
332-
description="divergence of turbulent transport of flux"
331+
<var name="wstend1" type="real" dimensions="nVertLevelsP1 nCells Time" units="m PSU/s^2"
332+
description="entrainment/detrainment term -- similar to dissipation"
333333
/>
334-
<var name="wstend2" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
335-
description="gradient production w^2 dTdz"
334+
<var name="wstend2" type="real" dimensions="nVertLevelsP1 nCells Time" units="m PSU/s^2"
335+
description="turbulent transport of ws [ -d(wsw)/dz ]"
336336
/>
337-
<var name="wstend3" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
338-
description="buoyancy term"
337+
<var name="wstend3" type="real" dimensions="nVertLevelsP1 nCells Time" units="m PSU/s^2"
338+
description="parameterized pressure-scalar terms (Rotta, rapid, buoyancy, Stokes)"
339339
/>
340-
<var name="wstend4" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
341-
description="return to isotropy"
340+
<var name="wstend4" type="real" dimensions="nVertLevelsP1 nCells Time" units="m PSU/s^2"
341+
description="gradient and buoyancy production term [ -w2*dS/dz + s*buoyancy]"
342342
/>
343-
<var name="wstend5" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
344-
description="shear production term"
343+
<var name="wstend5" type="real" dimensions="nVertLevelsP1 nCells Time" units="m PSU/s^2"
344+
description="dissipation of ws [ -kappa_FL*[d(ws)/dz]^2 ]"
345345
/>
346-
<var name="wstend6" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
346+
<var name="wstend6" type="real" dimensions="nVertLevelsP1 nCells Time" units="m PSU/s^2"
347347
description="subplume scale production term"
348348
/>
349349
<var name="uwtend1" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
350-
description="divergence of turbulent transport of flux"
350+
description="turbulent transport of uw [ -d(uww)/dz ]"
351351
/>
352352
<var name="uwtend2" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
353-
description="gradient production "
353+
description="parameterized pressure-strain terms (Rotta, rapid, buoyancy, Stokes)"
354354
/>
355355
<var name="uwtend3" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
356-
description="uv covariance"
356+
description="shear production of uw [-w2*dU/dz]"
357357
/>
358358
<var name="uwtend4" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
359-
description="horizontal buoyancy flux term"
359+
description="buoyancy production of uw (u*buoyancy)"
360360
/>
361361
<var name="uwtend5" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
362-
description="return to isotropy"
362+
description="dissipation of uw [-kappa_FL*[d(uw)/dz]^2] "
363363
/>
364364
<var name="vwtend1" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
365-
description="divergence of turbulent transport of flux"
365+
description="turbulent transport of vw [ -d(vww)/dz ]"
366366
/>
367367
<var name="vwtend2" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
368-
description="gradient production "
368+
description="parameterized pressure-strain terms (Rotta, rapid, buoyancy, Stokes)"
369369
/>
370370
<var name="vwtend3" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
371-
description="uv covariance"
371+
description="shear production of vw [-w2*dV/dz]"
372372
/>
373373
<var name="vwtend4" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
374-
description="horizontal buoyancy flux term"
374+
description="buoyancy production of vw (v*buoyancy)"
375375
/>
376376
<var name="vwtend5" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
377-
description="return to isotropy"
377+
description="dissipation of uw [-kappa_FL*[d(uw)/dz]^2]"
378378
/>
379379
<var name="u2tend1" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
380-
description="divergence of turbulent transport of flux"
380+
description="turbulent transport of u2 [ -d(uuw)/dz ]"
381381
/>
382382
<var name="u2tend2" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
383-
description="gradient production proportional to dUdz"
383+
description="parameterized pressure-strain terms (Rotta, rapid, buoyancy, Stokes)"
384384
/>
385385
<var name="u2tend3" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
386-
description="gradient production proportional to dVdz"
386+
description="shear production of u2 [-2*uw*dU/dz]"
387387
/>
388388
<var name="u2tend4" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
389-
description="buoyancy production"
389+
description="dummy variable (should be zero)"
390390
/>
391391
<var name="u2tend5" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
392-
description="return to isotropy"
392+
description="dissipation of u2 [-(2/3)*dissipation]"
393393
/>
394394
<var name="u2tend6" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
395-
description="production due to splatting of w'2"
395+
description="production due to splatting of w2"
396396
/>
397397
<var name="v2tend1" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
398-
description="divergence of turbulent transport of flux"
398+
description="turbulent transport of v2 [ -d(vvw)/dz ]"
399399
/>
400400
<var name="v2tend2" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
401-
description="gradient production proportional to dUdz"
401+
description="parameterized pressure-strain terms (Rotta, rapid, buoyancy, Stokes)"
402402
/>
403403
<var name="v2tend3" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
404-
description="gradient production proportional to dVdz"
404+
description="shear production of v2 [-2*vw*dV/dz]"
405405
/>
406406
<var name="v2tend4" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
407-
description="buoyancy production"
407+
description="dummy variable (should be zero)"
408408
/>
409409
<var name="v2tend5" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
410-
description="return to isotropy"
410+
description="dissipation of v2 [-(2/3)*dissipation]"
411411
/>
412412
<var name="v2tend6" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
413-
description="production due to splatting of w'2"
413+
description="production due to splatting of w2"
414414
/>
415415
<var name="u2cliptend" type="real" dimensions="nVertLevelsP1 nCells Time" units="m^2/s^3"
416416
description="if less than zero, it is reset to zero, this stores when that is active"
@@ -585,6 +585,7 @@
585585
<var name="w2tend3"/>
586586
<var name="w2tend4"/>
587587
<var name="w2tend5"/>
588+
<var name="w2tend6"/>
588589
<var name="u2tend1"/>
589590
<var name="u2tend2"/>
590591
<var name="u2tend3"/>

src/core_ocean/adc_mixing/mpas_ocn_turbulence.F

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
!! \date 14 Jan 2020
1818
!! \details
1919
!! This module creates and maintains a primary ocean mesh structure
20-
!! for the ADC mixing scheme. Eventually it will send arrays over to GPU
20+
!! for the ADC mixing scheme. Eventually it will send arrays over to GPU
2121
!! but for now just loads on to cpu
2222
!
2323
!-------------------------------------------------------------------------------
@@ -54,7 +54,7 @@ module ocn_turbulence
5454
Detrainment, tumd, sumd, wumd, Mc
5555

5656
real(kind=RKIND), dimension(:,:), pointer :: w2tend1, w2tend2, &
57-
w2tend3, w2tend4, w2tend5, wttend1, wttend2, &
57+
w2tend3, w2tend4, w2tend5, w2tend6, wttend1, wttend2, &
5858
wttend3, wttend4, wttend5, w3tend1, w3tend2, &
5959
w3tend3, w3tend5, w3tend4, wstend1, wstend2, &
6060
wstend3, wstend4, wstend5, uwtend1, uwtend2, &
@@ -104,7 +104,8 @@ subroutine ocn_turbulenceCreate(domain)
104104
DetrainmentTmp, tumdTmp, sumdTmp, wumdTmp, McTmp
105105

106106
real(kind=RKIND), dimension(:,:), pointer :: w2tend1Tmp, w2tend2Tmp, &
107-
w2tend3Tmp, w2tend4Tmp, w2tend5Tmp, wttend1Tmp, wttend2Tmp, &
107+
w2tend3Tmp, w2tend4Tmp, w2tend5Tmp, w2tend6Tmp, &
108+
wttend1Tmp, wttend2Tmp, &
108109
wttend3Tmp, wttend4Tmp, wttend5Tmp, w3tend1Tmp, w3tend2Tmp, &
109110
w3tend3Tmp, w3tend5Tmp, w3tend4Tmp, wstend1Tmp, wstend2Tmp, &
110111
wstend3Tmp, wstend4Tmp, wstend5Tmp, uwtend1Tmp, uwtend2Tmp, &
@@ -231,6 +232,7 @@ subroutine ocn_turbulenceCreate(domain)
231232
call mpas_pool_get_array(adcTendPool, 'w2tend3', w2tend3Tmp)
232233
call mpas_pool_get_array(adcTendPool, 'w2tend4', w2tend4Tmp)
233234
call mpas_pool_get_array(adcTendPool, 'w2tend5', w2tend5Tmp)
235+
call mpas_pool_get_array(adcTendPool, 'w2tend6', w2tend6Tmp)
234236
call mpas_pool_get_array(adcTendPool, 'w3tend1', w3tend1Tmp)
235237
call mpas_pool_get_array(adcTendPool, 'w3tend2', w3tend2Tmp)
236238
call mpas_pool_get_array(adcTendPool, 'w3tend3', w3tend3Tmp)
@@ -275,6 +277,7 @@ subroutine ocn_turbulenceCreate(domain)
275277
adcMixing%w2tend3 = w2tend3Tmp
276278
adcMixing%w2tend4 = w2tend4Tmp
277279
adcMixing%w2tend5 = w2tend5Tmp
280+
adcMixing%w2tend6 = w2tend6Tmp
278281
adcMixing%w3tend1 = w3tend1Tmp
279282
adcMixing%w3tend2 = w3tend2Tmp
280283
adcMixing%w3tend3 = w3tend3Tmp

0 commit comments

Comments
 (0)