From fd828ff48d46dba13da392646d555761e54d7511 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Sat, 4 Sep 2021 00:40:35 -0600 Subject: [PATCH] Changes so that can compile and run, had to add scale_to_thickness to all 2D restart variables, currently set to false for new variables which is likely correct, but should be checked --- src/main/histFileMod.F90 | 1 - .../SoilBiogeochemCarbonStateType.F90 | 21 +++++++++++++++++++ .../SoilBiogeochemNitrogenStateType.F90 | 7 +++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/main/histFileMod.F90 b/src/main/histFileMod.F90 index 2c577dd833..8b5820c0fd 100644 --- a/src/main/histFileMod.F90 +++ b/src/main/histFileMod.F90 @@ -2478,7 +2478,6 @@ subroutine htape_timeconst3D(t, & 'PCT_SAND ', & 'PCT_CLAY ' & /) - /) ! Scale type for subgrid averaging of landunits to grid cells, for lake fields character(len=scale_type_strlen) :: l2g_scale_typel(nfldsl) = [ & 'lake', & ! ZLAKE diff --git a/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 b/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 index dc929bf147..b25396e417 100644 --- a/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 +++ b/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 @@ -705,11 +705,13 @@ subroutine Restart ( this, bounds, ncid, flag, carbon_type, totvegc_col, c12_so call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_Cap_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%decomp0_cpools_vr_col(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"0_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) else ptr1d => this%matrix_cap_decomp_cpools_vr_col(:,1,k) @@ -767,21 +769,25 @@ subroutine Restart ( this, bounds, ncid, flag, carbon_type, totvegc_col, c12_so call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_input_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%vert_up_tran_acc(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_vert_up_tran_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%vert_down_tran_acc(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_vert_down_tran_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%exit_acc(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_exit_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) else ptr1d => this%in_acc_2d(:,1,k) @@ -808,6 +814,7 @@ subroutine Restart ( this, bounds, ncid, flag, carbon_type, totvegc_col, c12_so ptr2d => this%hori_tran_acc(:,:,i) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_hori_tran_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & + scale_by_thickness=.false., & long_name='', units='', fill_value=spval, & interpinic_flag='interp', readvar=readvar, data=ptr2d) else @@ -897,11 +904,13 @@ subroutine Restart ( this, bounds, ncid, flag, carbon_type, totvegc_col, c12_so call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_Cap_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%decomp0_cpools_vr_col(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"0_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) end if else @@ -984,21 +993,25 @@ subroutine Restart ( this, bounds, ncid, flag, carbon_type, totvegc_col, c12_so call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_input_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%vert_up_tran_acc(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_vert_up_tran_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%vert_down_tran_acc(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_vert_down_tran_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%exit_acc(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_exit_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) else ptr1d => this%in_acc_2d(:,1,k) @@ -1026,6 +1039,7 @@ subroutine Restart ( this, bounds, ncid, flag, carbon_type, totvegc_col, c12_so call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_hori_tran_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) else ptr1d => this%hori_tran_acc(:,1,i) @@ -1109,10 +1123,12 @@ subroutine Restart ( this, bounds, ncid, flag, carbon_type, totvegc_col, c12_so call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_Cap_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%decomp0_cpools_vr_col(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"0_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & + scale_by_thickness=.false., & long_name='', units='', fill_value=spval, & interpinic_flag='interp', readvar=readvar, data=ptr2d) end if @@ -1198,20 +1214,24 @@ subroutine Restart ( this, bounds, ncid, flag, carbon_type, totvegc_col, c12_so call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_input_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%vert_up_tran_acc(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_vert_up_tran_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%vert_down_tran_acc(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_vert_down_tran_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%exit_acc(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_exit_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & + scale_by_thickness=.false., & long_name='', units='', fill_value=spval, & interpinic_flag='interp', readvar=readvar, data=ptr2d) else @@ -1240,6 +1260,7 @@ subroutine Restart ( this, bounds, ncid, flag, carbon_type, totvegc_col, c12_so call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_hori_tran_acc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', fill_value=spval, & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) else ptr1d => this%hori_tran_acc(:,1,i) diff --git a/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 b/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 index 7eca14540d..591570d341 100644 --- a/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 +++ b/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 @@ -634,11 +634,13 @@ subroutine Restart ( this, bounds, ncid, flag, totvegc_col ) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_Cap_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%decomp0_npools_vr_col(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"0_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) else ptr1d => this%matrix_cap_decomp_npools_vr_col(:,1,k) @@ -657,21 +659,25 @@ subroutine Restart ( this, bounds, ncid, flag, totvegc_col ) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_input_nacc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%vert_up_tran_nacc(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_vert_up_tran_nacc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%vert_down_tran_nacc(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_vert_down_tran_nacc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) ptr2d => this%exit_nacc(:,:,k) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_exit_nacc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & long_name='', units='', & + scale_by_thickness=.false., & interpinic_flag='interp', readvar=readvar, data=ptr2d) else ptr1d => this%in_nacc_2d(:,1,k) @@ -705,6 +711,7 @@ subroutine Restart ( this, bounds, ncid, flag, totvegc_col ) ptr2d => this%hori_tran_nacc(:,:,i) call restartvar(ncid=ncid, flag=flag, varname=trim(varname)//"_hori_tran_nacc_vr", xtype=ncd_double, & dim1name='column', dim2name='levgrnd', switchdim=.true., & + scale_by_thickness=.false., & long_name='', units='', & interpinic_flag='interp', readvar=readvar, data=ptr2d) else