Skip to content

Commit

Permalink
Changes so that can compile and run, had to add scale_to_thickness to…
Browse files Browse the repository at this point in the history
… all 2D restart variables, currently set to false for new variables which is likely correct, but should be checked
  • Loading branch information
ekluzek committed Sep 4, 2021
1 parent 7daa93c commit fd828ff
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/main/histFileMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fd828ff

Please sign in to comment.