I put together a stand-alone driver, and after doing so I can confidently say that many of Todd's concerns are justified:

  1. The initialization routines I have set up are dumb. To store the interface depths in a single column, the process is
    1. Set Vmix_vars%nlev
    2. Call vmix_init(Vmix_vars, other arguments) to allocate arrays of length nlev and nlev+1; everything needs to be allocated because there is no knowledge of what parts of CVMix will be used at this point in the code
    3. set Vmix_vars%z_iface = ?whatever
  2. Passing an array of columns is a head-ache. To run with a single column, I need to set it up as an array of 1 and then pass both it and the value 1 to signify there is only one column. I now feel pretty strongly about passing in a single column at a time and forcing the model to do all the looping.

The first test I set up was to output the diffusivity coefficients of a Bryan-Lewis scheme using the parameters that Steve uses in Figure 3.1 of ?cvmix_09aug2012.pdf (Background vertical tracer diffusivity in OM3, shown below). This was a fun exercise because I uncovered some bugs in my Bryan-Lewis implementation (which I couldn't test in POP since using just B-L mixing is not an option). I'm now confident that the algorithm is correct but my plot doesn't quite match Steve's. This is what Steve has:
And this is what I output:

My values for "low latitudes" look like a pretty good match, but my "high latitude" values are off. Given how the low latitude plots look, I suspect there might be a typo in the caption of Steve's figure for the high latitude.

I'll start work on switching to put / get tomorrow and then I'll make the stand-alone driver available... it seems silly to upload it here when it's going to change pretty drastically in the next day or two.

  • No labels