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

Philippe 14/09/2020: Store_one_budget: small improvements

parent 41b7f24e
Branches
Tags
No related merge requests found
...@@ -254,21 +254,21 @@ subroutine Write_budget( tpdiafile, tpdtcur, ptstep, ksv ) ...@@ -254,21 +254,21 @@ subroutine Write_budget( tpdiafile, tpdtcur, ptstep, ksv )
! !
IF (LBU_RU) THEN IF (LBU_RU) THEN
call Store_one_budget_rho( tpdiafile, tzdates, tbudgets(NBUDGET_U)%trhodj, NBUDGET_U, gnocompress, zrhodjn ) call Store_one_budget_rho( tpdiafile, tzdates, tbudgets(NBUDGET_U)%trhodj, NBUDGET_U, gnocompress, zrhodjn )
call Store_one_budget ( tpdiafile, tzdates, tbudgets(NBUDGET_U), zrhodjn, NBUDGET_U, gnocompress, ptstep ) call Store_one_budget ( tpdiafile, tzdates, tbudgets(NBUDGET_U), zrhodjn, gnocompress, ptstep )
END IF END IF
! !
!* RV budgets !* RV budgets
! !
IF (LBU_RV) THEN IF (LBU_RV) THEN
call Store_one_budget_rho( tpdiafile, tzdates, tbudgets(NBUDGET_V)%trhodj, NBUDGET_V, gnocompress, zrhodjn ) call Store_one_budget_rho( tpdiafile, tzdates, tbudgets(NBUDGET_V)%trhodj, NBUDGET_V, gnocompress, zrhodjn )
call Store_one_budget ( tpdiafile, tzdates, tbudgets(NBUDGET_V), zrhodjn, NBUDGET_V, gnocompress, ptstep ) call Store_one_budget ( tpdiafile, tzdates, tbudgets(NBUDGET_V), zrhodjn, gnocompress, ptstep )
END IF END IF
! !
!* RW budgets !* RW budgets
! !
IF (LBU_RW) THEN IF (LBU_RW) THEN
call Store_one_budget_rho( tpdiafile, tzdates, tbudgets(NBUDGET_W)%trhodj, NBUDGET_W, gnocompress, zrhodjn ) call Store_one_budget_rho( tpdiafile, tzdates, tbudgets(NBUDGET_W)%trhodj, NBUDGET_W, gnocompress, zrhodjn )
call Store_one_budget ( tpdiafile, tzdates, tbudgets(NBUDGET_W), zrhodjn, NBUDGET_W, gnocompress, ptstep ) call Store_one_budget ( tpdiafile, tzdates, tbudgets(NBUDGET_W), zrhodjn, gnocompress, ptstep )
END IF END IF
! !
!* RHODJ storage for Scalars !* RHODJ storage for Scalars
...@@ -282,62 +282,62 @@ subroutine Write_budget( tpdiafile, tpdtcur, ptstep, ksv ) ...@@ -282,62 +282,62 @@ subroutine Write_budget( tpdiafile, tpdtcur, ptstep, ksv )
!* RTH budget !* RTH budget
! !
IF (LBU_RTH) THEN IF (LBU_RTH) THEN
call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_TH), zrhodjn, NBUDGET_TH, gnocompress, ptstep ) call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_TH), zrhodjn, gnocompress, ptstep )
END IF END IF
! !
!* RTKE budget !* RTKE budget
! !
IF (LBU_RTKE) THEN IF (LBU_RTKE) THEN
call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_TKE), zrhodjn, NBUDGET_TKE, gnocompress, ptstep ) call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_TKE), zrhodjn, gnocompress, ptstep )
END IF END IF
! !
!* RRV budget !* RRV budget
! !
IF (LBU_RRV) THEN IF (LBU_RRV) THEN
call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RV), zrhodjn, NBUDGET_RV, gnocompress, ptstep ) call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RV), zrhodjn, gnocompress, ptstep )
END IF END IF
! !
!* RRC budget !* RRC budget
! !
IF (LBU_RRC) THEN IF (LBU_RRC) THEN
call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RC), zrhodjn, NBUDGET_RC, gnocompress, ptstep ) call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RC), zrhodjn, gnocompress, ptstep )
END IF END IF
! !
!* RRR budget !* RRR budget
! !
IF (LBU_RRR) THEN IF (LBU_RRR) THEN
call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RR), zrhodjn, NBUDGET_RR, gnocompress, ptstep ) call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RR), zrhodjn, gnocompress, ptstep )
END IF END IF
! !
!* RRI budget !* RRI budget
! !
IF (LBU_RRI) THEN IF (LBU_RRI) THEN
call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RI), zrhodjn, NBUDGET_RI, gnocompress, ptstep ) call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RI), zrhodjn, gnocompress, ptstep )
END IF END IF
! !
!* RRS budget !* RRS budget
! !
IF (LBU_RRS) THEN IF (LBU_RRS) THEN
call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RS), zrhodjn, NBUDGET_RS, gnocompress, ptstep ) call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RS), zrhodjn, gnocompress, ptstep )
END IF END IF
! !
!* RRG budget !* RRG budget
! !
IF (LBU_RRG) THEN IF (LBU_RRG) THEN
call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RG), zrhodjn, NBUDGET_RG, gnocompress, ptstep ) call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RG), zrhodjn, gnocompress, ptstep )
END IF END IF
! !
!* RRH budget !* RRH budget
! !
IF (LBU_RRH) THEN IF (LBU_RRH) THEN
call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RH), zrhodjn, NBUDGET_RH, gnocompress, ptstep ) call Store_one_budget( tpdiafile, tzdates, tbudgets(NBUDGET_RH), zrhodjn, gnocompress, ptstep )
END IF END IF
! !
!* RSV budgets !* RSV budgets
! !
IF (LBU_RSV) THEN IF (LBU_RSV) THEN
do jsv = nbudget_sv1, nbudget_sv1 - 1 + ksv do jsv = nbudget_sv1, nbudget_sv1 - 1 + ksv
call Store_one_budget( tpdiafile, tzdates, tbudgets(jsv), zrhodjn, jsv, gnocompress, ptstep ) call Store_one_budget( tpdiafile, tzdates, tbudgets(jsv), zrhodjn, gnocompress, ptstep )
end do end do
END IF END IF
end if end if
...@@ -444,7 +444,7 @@ subroutine Store_one_budget_rho( tpdiafile, tpdates, tprhodj, kp, knocompress, p ...@@ -444,7 +444,7 @@ subroutine Store_one_budget_rho( tpdiafile, tpdates, tprhodj, kp, knocompress, p
end subroutine Store_one_budget_rho end subroutine Store_one_budget_rho
subroutine Store_one_budget( tpdiafile, tpdates, tpbudget, prhodjn, kp, knocompress, ptstep ) subroutine Store_one_budget( tpdiafile, tpdates, tpbudget, prhodjn, knocompress, ptstep )
use modd_budget, only: cbutype, & use modd_budget, only: cbutype, &
lbu_icp, lbu_jcp, lbu_kcp, & lbu_icp, lbu_jcp, lbu_kcp, &
nbuil, nbuih, nbujl, nbujh, nbukl, nbukh, & nbuil, nbuih, nbujl, nbujh, nbukl, nbukh, &
...@@ -470,7 +470,6 @@ subroutine Store_one_budget( tpdiafile, tpdates, tpbudget, prhodjn, kp, knocompr ...@@ -470,7 +470,6 @@ subroutine Store_one_budget( tpdiafile, tpdates, tpbudget, prhodjn, kp, knocompr
type(date_time), dimension(:), intent(in) :: tpdates type(date_time), dimension(:), intent(in) :: tpdates
type(tbudgetdata), intent(in) :: tpbudget ! Budget datastructure type(tbudgetdata), intent(in) :: tpbudget ! Budget datastructure
real, dimension(:,:,:,:,:,:), allocatable, intent(in) :: prhodjn real, dimension(:,:,:,:,:,:), allocatable, intent(in) :: prhodjn
integer, intent(in) :: kp ! reference number of budget
logical, intent(in) :: knocompress ! compression for the cart option logical, intent(in) :: knocompress ! compression for the cart option
real, intent(in) :: ptstep ! time step real, intent(in) :: ptstep ! time step
...@@ -496,6 +495,8 @@ subroutine Store_one_budget( tpdiafile, tpdates, tpbudget, prhodjn, kp, knocompr ...@@ -496,6 +495,8 @@ subroutine Store_one_budget( tpdiafile, tpdates, tpbudget, prhodjn, kp, knocompr
igroups = tpbudget%ngroups igroups = tpbudget%ngroups
if ( igroups == 0 ) return
! unit conversion for ru budgets ! unit conversion for ru budgets
allocate( zconvert( igroups ) ) allocate( zconvert( igroups ) )
do jproc = 1, igroups do jproc = 1, igroups
...@@ -548,7 +549,7 @@ subroutine Store_one_budget( tpdiafile, tpdates, tpbudget, prhodjn, kp, knocompr ...@@ -548,7 +549,7 @@ subroutine Store_one_budget( tpdiafile, tpdates, tpbudget, prhodjn, kp, knocompr
yworkcomment(:) = tpbudget%tgroups(:)%ccomment yworkcomment(:) = tpbudget%tgroups(:)%ccomment
iworkgrid(:) = tpbudget%tgroups(:)%ngrid iworkgrid(:) = tpbudget%tgroups(:)%ngrid
select case( kp ) select case( tpbudget%nid )
case ( NBUDGET_U ) case ( NBUDGET_U )
write( ygroup_name, fmt = "('UU___',I4.4)" ) nbutshift write( ygroup_name, fmt = "('UU___',I4.4)" ) nbutshift
...@@ -586,7 +587,7 @@ subroutine Store_one_budget( tpdiafile, tpdates, tpbudget, prhodjn, kp, knocompr ...@@ -586,7 +587,7 @@ subroutine Store_one_budget( tpdiafile, tpdates, tpbudget, prhodjn, kp, knocompr
write( ygroup_name, fmt = "('RH___',I4.4)" ) nbutshift write( ygroup_name, fmt = "('RH___',I4.4)" ) nbutshift
case ( NBUDGET_SV1 : ) case ( NBUDGET_SV1 : )
jsv = kp - NBUDGET_SV1 + 1 jsv = tpbudget%nid - NBUDGET_SV1 + 1
! yworkunit(:) = 's-1' ; yworkunit(1:3) = ' ' ! yworkunit(:) = 's-1' ; yworkunit(1:3) = ' '
! DO JT = 1, igroups ! DO JT = 1, igroups
! WRITE(yworkcomment(JT),FMT="('Budget of SVx=',I3.3)") jsv ! WRITE(yworkcomment(JT),FMT="('Budget of SVx=',I3.3)") jsv
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment