Skip to content
Snippets Groups Projects
Commit 0609abac authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 15/03/2023: reapply lost commit on budget after merge (commit 9f26b7a5)

parent 814842f7
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@
! P. Wautelet 28/01/2020: new subroutines: Budget_store_init, Budget_store_end and Budget_source_id_find in new module mode_budget
! P. Wautelet 17/08/2020: treat LES budgets correctly
! P. Wautelet 05/03/2021: measure cpu_time for budgets
! J.Escobar 06/10/2021: for bit reproductiblity use MPPDB_CHECK if LCHECK=T
!-----------------------------------------------------------------
!#################
......@@ -16,12 +17,12 @@ module mode_budget
use modd_budget, only: cbutype, nbutime, tbudgetdata, xtime_bu, xtime_bu_process
use modd_les_budget, only: xtime_les_bu, xtime_les_bu_process
use mode_msg
use modi_cart_compress, only: Cart_compress
use modi_mask_compress, only: Mask_compress
use modi_second_mnh, only: Second_mnh
use mode_msg
implicit none
private
......@@ -36,15 +37,23 @@ contains
!
subroutine Budget_store_init( tpbudget, hsource, pvars )
use modd_les, only: lles_call
use modd_conf, only: lcheck
use modd_les, only: lles_call
use mode_mppdb
type(tbudgetdata), intent(inout) :: tpbudget ! Budget datastructure
character(len=*), intent(in) :: hsource ! Name of the source term
real, dimension(:,:,:), intent(in) :: pvars ! Current value to be stored
character(len=:), allocatable :: hbudget
integer :: iid ! Reference number of the current source term
call Print_msg( NVERB_DEBUG, 'BUD', 'Budget_store_init', trim( tpbudget%cname )//':'//trim( hsource ) )
hbudget = trim( tpbudget%cname )//':'//trim( hsource )
call Print_msg( NVERB_DEBUG, 'BUD', 'Budget_store_init', hbudget )
if ( lcheck ) call Mppdb_check3d( pvars, 'BUD_INI::' // hbudget, precision )
if ( lles_call ) then
call Second_mnh( ztime1 )
......@@ -112,19 +121,27 @@ subroutine Budget_store_init( tpbudget, hsource, pvars )
subroutine Budget_store_end( tpbudget, hsource, pvars )
use modd_conf, only: lcheck
use modd_les, only: lles_call
use mode_mppdb
use modi_les_budget, only: Les_budget
type(tbudgetdata), intent(inout) :: tpbudget ! Budget datastructure
character(len=*), intent(in) :: hsource ! Name of the source term
real, dimension(:,:,:), intent(in) :: pvars ! Current value to be stored
character(len=:), allocatable :: hbudget
integer :: iid ! Reference number of the current source term
integer :: igroup ! Number of the group where to store the source term
real, dimension(:,:,:), allocatable :: zvars_add
call Print_msg( NVERB_DEBUG, 'BUD', 'Budget_store_end', trim( tpbudget%cname )//':'//trim( hsource ) )
hbudget = trim( tpbudget%cname )//':'//trim( hsource )
call Print_msg( NVERB_DEBUG, 'BUD', 'Budget_store_end', hbudget )
if ( lcheck ) call Mppdb_check3d( pvars, 'BUD_INI::' // hbudget, precision )
if ( lles_call ) then
if ( hsource /= tpbudget%clessource ) &
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment