Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion input/stats/standard_stats.in
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ vars_zm =
'rtpthlp_bt', 'rtpthlp_ma', 'rtpthlp_ta', 'rtpthlp_tp1', 'rtpthlp_tp2',
'rtpthlp_dp1', 'rtpthlp_dp2', 'rtpthlp_cl', 'rtpthlp_sf', 'rtpthlp_forcing', 'rtpthlp_mc',
'wpthlp_enter_mfl', 'wpthlp_exit_mfl', 'wprtp_enter_mfl', 'wprtp_exit_mfl',
'wpthlp_mfl_min', 'wpthlp_mfl_max', 'wprtp_mfl_min', 'wprtp_mfl_max',
'wpthlp_mfl_min', 'wpthlp_mfl_max', 'wprtp_mfl_min', 'wprtp_mfl_max', 'C14',


'stability_correction',
Expand Down
7 changes: 7 additions & 0 deletions src/CLUBB_core/advance_xp2_xpyp_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,13 @@ subroutine advance_xp2_xpyp( nzm, nzt, ngrdcol, sclr_dim, sclr_tol, gr, sclr_idx

endif ! l_c14_ml

! Write the value of C14 to output on zm grid
if ( stats_metadata%l_stats_samp ) then
do i = 1, ngrdcol
call stat_update_var( stats_metadata%iC14, C14_1d(i,:), stats_zm(i) )
end do
end if

! Are we solving for passive scalars as well?
if ( sclr_dim > 0 ) then
l_scalar_calc = .true.
Expand Down
3 changes: 3 additions & 0 deletions src/CLUBB_core/stats_variables.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,9 @@ module stats_variables
ibrunt_term_time_avg = 0, & ! the time averaged Lscale term of the grid density
inorm_min_grid_dens = 0, & ! the brunt-vaisala term of the grid density
inorm_grid_dens = 0 ! the brunt-vaisala term of the grid density

integer :: &
iC14 = 0 ! Index for C14 parameter, relevant for CLUBB_ML


!====================================================================
Expand Down
7 changes: 7 additions & 0 deletions src/CLUBB_core/stats_zm_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2539,6 +2539,13 @@ subroutine stats_init_zm_api( hydromet_dim, sclr_dim, edsclr_dim, & ! intent(in)
l_silhs=.false., grid_kind=stats_zm )
k = k + 1
end do

case ( 'C14' ) ! Add output for C14, relevant for CLUBB_ML
stats_metadata%iC14 = k
call stat_assign( var_index=stats_metadata%iC14, var_name="C14", &
var_description="C_14 parameter", var_units="-", &
l_silhs=.false., grid_kind=stats_zm )
k = k + 1
Comment thread
Mikolaj-A-Kowalski marked this conversation as resolved.

case default
write(fstderr,*) 'Error: unrecognized variable in vars_zm: ', trim(vars_zm(i))
Expand Down