Closed pwolfram closed 5 years ago
@bradyrx, note, the commit history from your branch bgcParticles
will need updating once I merge this code into particlePassiveFloatVerticalTreatmentFix
.
@bradyrx, additional testing is needed. Something you could test in the meantime is whether this works for your current case (e.g., doesn't crash). If it crashes, we can figure out that issue simultaneously while we figure out any accuracy bugs.
@pwolfram, I'll rebase bgcParticles
onto here and run a quick BGC-active test run. Also, the invitation link for collaboration on this repo didn't work for some reason. Please re-invite if you meant to send that out.
@pwolfram, forgot that we were discussing this here, so I'll duplicate my email I just sent for documentation here.
I ran a 60to30 case with BGC on (as well as temp, salinity, DIC, ALK sensors on) as a 5-day smoke test.
The run breaks due to an issue with summing barycentric weights:
Run directory is here:
/lustre/scratch3/turquoise/rileybrady/ACME/cases/GMPAS-OECO-ODMS-IAF.T62_oEC60to30v3.grizzly.4096o.512i.5ParticleLayers/run
@bradyrx, this is related to the known bug I need to fix. The problem is that the right vertex isn't being selected and a more complicated or brute force selection method is needed to get the "anchor" vertex for the interpolation. I think I've sorted this through conceptually but need to make the time for the coding and have started. I've blocked out a huge chunk of time Monday Dec 3 to devote to this issue. Will this work?
@pwolfram, sounds good to me. I should have some time early next week to run tests, rebase, etc.
Verified that particle is spatially interpolating for surface layer:
Salinity on boundary cell was also tested and particle and cell value of salinity lines were identical (as expected). Code testing was on gfortran and still needs tested using intel compiler in full E3SM case.
Testing against ocean/develop commit fd71e64529b7231d5d13882126e996849efd0d43
┌─[pwolfram][weaklynonlinear][~/Documents/MPAS_development/MPAS-Model_LIGHT_fix_freefloating/testing_and_setup/compass/tmp_bb3a6b322bfd2936a08e3e6b64ed3b5fcf815b45][10:28][±][branch_LIGHT_adds_scalar_interp ✗]
└─▪ ./nightly_ocean_test_suite.py
** Running case Periodic Planar 20km - LIGHT particle general test
** FAIL (See case_outputs/Periodic_Planar_20km_-_LIGHT_particle_general_test for more information)
** Running case Periodic Planar 20km - LIGHT particle region reset test
** FAIL (See case_outputs/Periodic_Planar_20km_-_LIGHT_particle_region_reset_test for more information)
** Running case Periodic Planar 20km - LIGHT particle time reset test
^[^[ ** FAIL (See case_outputs/Periodic_Planar_20km_-_LIGHT_particle_time_reset_test for more information)
** Running case SOMA 32km - LIGHT particle time general test
PASS
** Running case ZISO 20km - LIGHT particle time general test
PASS
TEST RUNTIMES:
00:19 Periodic_Planar_20km_-_LIGHT_particle_general_test
00:18 Periodic_Planar_20km_-_LIGHT_particle_region_reset_test
00:31 Periodic_Planar_20km_-_LIGHT_particle_time_reset_test
01:24 SOMA_32km_-_LIGHT_particle_time_general_test
00:43 ZISO_20km_-_LIGHT_particle_time_general_test
Total runtime 03:15
Failure is due to zLevelParticle
not being updated correctly in the previous version of the code, e.g., for surface constrained particles. This field was previously 0, but is no a number corresonding to zMid
, which is an improvement in accuracy of the code but one that breaks the regression testing. The offending code in ocean/develop is at https://github.com/MPAS-Dev/MPAS-Model/blob/ocean/develop/src/core_ocean/analysis_members/mpas_ocn_lagrangian_particle_tracking.F#L700-L722-- note if verticalTreatment
isn't 4, no assignment of zLevelParticle
is made as it should be made.
The key thing is that the real world cases pass, which correspond to previous uses of LIGHT.
This was also verified by using a spun-up version of SOMA corresponding to previous testing (not in regression suite) and particle movement was bfb following the refractors herein against fd71e64529b7231d5d13882126e996849efd0d43
.
bb3a6b322bfd2936a08e3e6b64ed3b5fcf815b45
is BFB on different processors@pwolfram, the most recent commit is still segfaulting on grizzly for a BGC run with sensors turned on.
I ran a 60to30 case with BGC and all sensors turned on (T, S, ALK, DIC):
/lustre/scratch3/turquoise/rileybrady/ACME/cases/GMPAS-OECO-ODMS-IAF.T62_oEC60to30v3.grizzly.512o.128i.5ParticleLayers.Ton.Son.DICon.ALKon/run
However, note that in ocn.log.16017775.181213-120421
, the sampling seems to proceed just fine for T and S, and the error happens within the interpolation call for DIC:
I suspect then the issue lies within code chunks like lines 830-852 in mpas_ocn_lagrangian_particle_tracking.F
.
Note that the run goes smoothly with no sensors turned on. I've queued a run with just T and S sensors to see if what I suspect is true.
@pwolfram, note that a 60to30 physics-only case with T & S sensors ran fine on grizzly. So this is a BGC-sensor interpolation problem.
Run directory:
/lustre/scratch3/turquoise/rileybrady/ACME/cases/GMPAS-IAF.T62_oEC60to30v3.grizzly.512o.128i.5ParticleLayers.Ton.Son/run/
Verified that merge commit e4f2dc54
into particlePassiveFloatVerticalTreatmentFix
was BFB against ocean/develop and BFB across processor decompositions and pushed the merge.
Will perform any additional fixes needed at https://github.com/MPAS-Dev/MPAS-Model/pull/56 in order to prepare for production runs.
Adds capability to do horizontal interpolation for LIGHT tracers. Particles nearest to a boundary vertex will use standard routine and just return cell-based scalar value.