Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allowlakeprod are outputing standard variables instead of the "lake" specific versions... #168

Closed
ekluzek opened this issue Dec 16, 2017 · 4 comments
Labels
bug something is working incorrectly closed: wontfix We won't fix this issue, because it would be too difficult and/or isn't important enough to fix
Milestone

Comments

@ekluzek
Copy link
Collaborator

ekluzek commented Dec 16, 2017

Erik Kluzek < erik > - 2017-05-19 12:12:34 -0600
Bugzilla Id: 2464
Bugzilla CC: cdkoven, dlawren, rfisher, subin,

When allowlakeprod is on, the lake specific version of variables should be output, and yet it's outputting the non-lake versions which already are output.

This is in clm4_5_16_r241. I need someone to look at this and check if I'm right about this or not. I noticed this looking at the code for other issues.

[erik@yslogin1 biogeochem]$ svn diff ch4Mod.F90 
Index: ch4Mod.F90
===================================================================
--- ch4Mod.F90	(revision 85170)
+++ ch4Mod.F90	(working copy)
@@ -602,45 +602,45 @@
     end if
 
     if (hist_wrtch4diag .and. allowlakeprod) then
-       this%ch4_prod_depth_sat_col(begc:endc,1:nlevgrnd) = spval
+       this%ch4_prod_depth_lake_col(begc:endc,1:nlevgrnd) = spval
        call hist_addfld2d (fname='CH4_PROD_DEPTH_LAKE', units='mol/m3/s', type2d='levgrnd', &
             avgflag='A', long_name='CH4 production in each soil layer, lake col. only', &
-            ptr_col=this%ch4_prod_depth_sat_col)
+            ptr_col=this%ch4_prod_depth_lake_col)
     end if
 
     if (hist_wrtch4diag .and. allowlakeprod) then
-       this%conc_ch4_sat_col(begc:endc,1:nlevgrnd) = spval
+       this%conc_ch4_lake_col(begc:endc,1:nlevgrnd) = spval
        call hist_addfld2d (fname='CONC_CH4_LAKE', units='mol/m3', type2d='levgrnd', &
             avgflag='A', long_name='CH4 Concentration each soil layer, lake col. only', &
-            ptr_col=this%conc_ch4_sat_col)
+            ptr_col=this%conc_ch4_lake_col)
     end if
 
     if (hist_wrtch4diag .and. allowlakeprod) then
-       this%conc_o2_sat_col(begc:endc,1:nlevgrnd) = spval
+       this%conc_o2_lake_col(begc:endc,1:nlevgrnd) = spval
        call hist_addfld2d (fname='CONC_O2_LAKE', units='mol/m3', type2d='levgrnd', &
             avgflag='A', long_name='O2 Concentration each soil layer, lake col. only', &
-            ptr_col=this%conc_o2_sat_col)
+            ptr_col=this%conc_o2_lake_col)
     end if
 
     if (hist_wrtch4diag .and. allowlakeprod) then
-       this%ch4_surf_diff_sat_col(begc:endc) = spval
+       this%ch4_surf_diff_lake_col(begc:endc) = spval
        call hist_addfld1d (fname='CH4_SURF_DIFF_LAKE', units='mol/m2/s',  &
             avgflag='A', long_name='diffusive surface CH4 flux, lake col. only (+ to atm)', &
-            ptr_col=this%ch4_surf_diff_sat_col)
+            ptr_col=this%ch4_surf_diff_lake_col)
     end if
 
     if (hist_wrtch4diag .and. allowlakeprod) then
-       this%ch4_surf_ebul_sat_col(begc:endc) = spval
+       this%ch4_surf_ebul_lake_col(begc:endc) = spval
        call hist_addfld1d (fname='CH4_SURF_EBUL_LAKE', units='mol/m2/s',  &
             avgflag='A', long_name='ebullition surface CH4 flux, lake col. only (+ to atm)', &
-            ptr_col=this%ch4_surf_ebul_sat_col)
+            ptr_col=this%ch4_surf_ebul_lake_col)
     end if
 
     if (hist_wrtch4diag .and. allowlakeprod) then
-       this%ch4_oxid_depth_sat_col(begc:endc,1:nlevgrnd) = spval
+       this%ch4_oxid_depth_lake_col(begc:endc,1:nlevgrnd) = spval
        call hist_addfld2d (fname='CH4_OXID_DEPTH_LAKE', units='mol/m2/s', type2d='levgrnd',  &
             avgflag='A', long_name='CH4 oxidation in each soil layer, lake col. only', &
-            ptr_col=this%ch4_oxid_depth_sat_col)
+            ptr_col=this%ch4_oxid_depth_lake_col)
     end if
 
     if (hist_wrtch4diag) then
@ekluzek ekluzek added this to the clm5 milestone Dec 16, 2017
@ekluzek
Copy link
Collaborator Author

ekluzek commented Dec 16, 2017

Erik Kluzek < erik > - 2017-05-19 12:41:29 -0600

If this is a legit problem it goes back to the beginning of this work. The changes below also do work.

It also appears that we don't have any tests for allowlakeprod.

@ekluzek
Copy link
Collaborator Author

ekluzek commented Dec 16, 2017

Erik Kluzek < erik > - 2017-05-19 13:04:14 -0600

Add Zack to the CC list.

@ekluzek
Copy link
Collaborator Author

ekluzek commented Dec 16, 2017

David Lawrence < dlawren > - 2017-05-20 08:32:00 -0600

Zack is no longer working in the field so is not likely to comment. We do not and have not used the lake production code so if this is a bug, it hasn't affected anything. We have no current plans to use it, either, though if the fix is easy, we should go ahead and do it.

@ekluzek ekluzek added closed: wontfix We won't fix this issue, because it would be too difficult and/or isn't important enough to fix bug something is working incorrectly labels May 29, 2019
@ekluzek
Copy link
Collaborator Author

ekluzek commented May 29, 2019

We don't test this configuration. So closing as a WONTFIX.

@ekluzek ekluzek closed this as completed May 29, 2019
mariuslam pushed a commit to NordicESMhub/ctsm that referenced this issue Aug 26, 2019
Merge branch 'rgknox-leafnpp-diag-fix'

This pull request mostly deals with some bug fixes to carbon
accounting. @jenniferholm noticed that the diagnostics for leaf_npp
were periodically showing negative values. Through ESCOMP#164 we identified
that this occurred because daily carbon balances during the allocation
sequences were sometimes negative to to high respiration and low
gpp. The model was correctly using storage carbon to "pay" the
negative daily carbon balance and allow maintenance respiration to
occur, it was not however correctly diagnosing this flow. The
accounting of this process is a little complicated because storage can
be used to pay for maintenance respiration as well as maintenance
turnover demand.

During the process of verifying that carbon accounting errors were
low, I triggered spurious values of output variables that triggered
netcdf write errors, this lead to the identification that
cohort%npp_accum was not being properly copied during copying of
cohorts during patch fission.

A fix was needed to lawrencium machine files for its lr2 partition for
serial runs. While these changes are unrelated to carbon accounting,
they are trivial and simple, so I bundled them here.

Fixes: ESCOMP#164, ESCOMP#169, ESCOMP#168 and possibly ESCOMP#154

User interface changes?: no

Code review: requesting @jenniferholm and @serbinsh for evaluation in
their science algorithms.

Testing:
  rgknox:
    Test suite: lawrencium lr3 (baseline) and lawrencium-lr2 (non-baseline) edTest, Rapid Science Check tool (single site multi-decadal analysis)
    Test baseline: 5c5928f
    Test namelist changes: none
    Test answer changes:
    Test summary: all PASS

  andre:
    Test suite: ed - yellowstone gnu, intel, pgi
                     hobart nag
    Test baseline: 30f84d7
    Test namelist changes: none
    Test answer changes: bit for bit
    Test summary: all tests pass

    Test suite: clm_short - yellowstone gnu, intel, pgi
    Test baseline: clm4_5_12_r195
    Test namelist changes: none
    Test answer changes: bit for bit
    Test summary: all tests pass
samsrabin pushed a commit to samsrabin/CTSM that referenced this issue May 3, 2024
Actually add a read for ZBOT in the streams for CLMNCEP fixing ESCOMP#168
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something is working incorrectly closed: wontfix We won't fix this issue, because it would be too difficult and/or isn't important enough to fix
Projects
None yet
Development

No branches or pull requests

1 participant