Skip to content

Fixes bug in tracer read in for global init#511

Merged
mark-petersen merged 3 commits intoMPAS-Dev:ocean/developfrom
vanroekel:ocean/fixGlobalInitTracerInterp
Apr 6, 2020
Merged

Fixes bug in tracer read in for global init#511
mark-petersen merged 3 commits intoMPAS-Dev:ocean/developfrom
vanroekel:ocean/fixGlobalInitTracerInterp

Conversation

@vanroekel
Copy link
Contributor

@vanroekel vanroekel commented Apr 5, 2020

Previously the depth coordinate for target has been the same as the
tracer IC file. When the depth is different the code would look for a
variable during read that did not exist in the tracer IC due to a bug. This fixes
this issue

@xylar
Copy link
Collaborator

xylar commented Apr 5, 2020

@vanroekel, this is great! I added the same fix for salinity and ecosystem tracers, as you'll see above.

Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing

I tested this PR (with my commit for salinity and ecosystem tracers) and was able to initialize the following, and I checked that salinity looked right (definitely wasn't all zeros and was in the expected range):

  • QU240
  • QU240wISC
  • EC60to30
  • EC60to30wISC
  • SO60to10wISC

I tested a merge of this PR, #506, #507, #508 and #510 together through spin-up for the following test cases:

  • EC60to30
  • EC60to30wISC
  • SO60to10wISC

vanroekel and others added 2 commits April 6, 2020 13:50
Previously the depth coordinate for target has been the same as the
tracer IC file.  When the depth is different the code would look for a
variable during read that did not exist in the tracer IC due to a bug.  This fixes
this issue
@xylar
Copy link
Collaborator

xylar commented Apr 6, 2020

@mark-petersen, thanks for reviewing and merging those other three, much appreciated! Once this one is merged, I'll rebase my various other in-progress PRs.

@mark-petersen mark-petersen force-pushed the ocean/fixGlobalInitTracerInterp branch from 6c06cd8 to 52c9996 Compare April 6, 2020 20:45
@mark-petersen
Copy link
Contributor

I rebased and added T, S, and layerthickness plots. This plot is now automatically generated in init/initial_state/initial_state.png
initial_state
At least a visual check of the range could give us another way to avoid these errors, but the person generating the initial state would have to know to look at it.

@mark-petersen mark-petersen force-pushed the ocean/fixGlobalInitTracerInterp branch from 4b925d1 to c1ae890 Compare April 6, 2020 21:43
@mark-petersen
Copy link
Contributor

When running initial_state you now see this at the end with the text output. Here is the EC60to30 64 layer:

plotting histograms of the initial condition
see: init/initial_state/initial_state.png
MPAS-Ocean initial state
date: 04/06/2020
number cells: 236771
number cells, millions:  0.237
number layers: 64

  min val   max val  variable name
  5.00e+00  6.40e+01 maxLevelCell
  1.27e+01  6.00e+03 bottomDepth
 -2.10e+00  3.05e+01 temperature
  0.00e+00  4.13e+01 salinity
  0.00e+00  2.09e+02 layerThickness
  0.00e+00  3.12e-01 rx1Edge

initial_state_EC60to30_64L

Copy link
Contributor

@mark-petersen mark-petersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested nightly regression suite, initial state for EC60to30 64L, EC60to30 60L

@mark-petersen mark-petersen merged commit 5345dd3 into MPAS-Dev:ocean/develop Apr 6, 2020
@xylar
Copy link
Collaborator

xylar commented Apr 7, 2020

@mark-petersen, your plotting and stats routines don't seem to be masking out cells below maxLevelCell for T, S and layer thickness. This is leading to a bunch of zero values and an inaccurate min for salinity and layer thickness. I think we need to fix that.

@xylar
Copy link
Collaborator

xylar commented Apr 7, 2020

But I'm very happy to have these histograms!

@mark-petersen
Copy link
Contributor

Thanks for the comment. I will mask those out soon.

@xylar
Copy link
Collaborator

xylar commented Apr 7, 2020

I already did in #512

@mark-petersen
Copy link
Contributor

@xylar and @vanroekel, I created these, start to finish, on the current head of ocean/develop 5345dd3 after merging this PR:

EC60to30 64 layer: 
  /lustre/scratch4/turquoise/mpeterse/runs/200406_test_initial_state_od/ocean/global_ocean/EC60to30/
EC60to30wISC 60 layer:
  /lustre/scratch4/turquoise/mpeterse/runs/200406_test_initial_state_od/ocean/global_ocean/EC60to30wISC

Both got through the 20-day spin-up without any trouble.

@xylar
Copy link
Collaborator

xylar commented Apr 7, 2020

Great! I'm going to work on the SO60to10wISC tonight or tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants