ESCOMP / CTSM

Community Terrestrial Systems Model (includes the Community Land Model of CESM)
http://www.cesm.ucar.edu/models/cesm2.0/land/
Other
309 stars 313 forks source link

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

Closed ekluzek closed 5 years ago

ekluzek commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

Add Zack to the CC list.

ekluzek commented 6 years ago

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 commented 5 years ago

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