From e570acbfb74013dbc147ae15caf00d2b060e79fd Mon Sep 17 00:00:00 2001 From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr> Date: Mon, 28 Jun 2021 11:31:35 +0200 Subject: [PATCH] Philippe 28/06/2021: budgets: adapt budgets to new developments + add LIMA supersaturation terms --- src/MNH/ini_budget.f90 | 144 +++++++++++++++++------------- src/MNH/lima.f90 | 56 ++++++------ src/MNH/lima_adjust.f90 | 12 ++- src/MNH/lima_adjust_split.f90 | 68 +++++++++----- src/MNH/lima_notadjust.f90 | 68 ++++++++++---- src/MNH/lima_nucleation_procs.f90 | 70 ++++++++------- src/MNH/lima_warm.f90 | 13 ++- 7 files changed, 261 insertions(+), 170 deletions(-) diff --git a/src/MNH/ini_budget.f90 b/src/MNH/ini_budget.f90 index b7c106947..4651b8599 100644 --- a/src/MNH/ini_budget.f90 +++ b/src/MNH/ini_budget.f90 @@ -236,7 +236,7 @@ use modd_nsv, only: csvnames, nsv_lgbeg, nsv_lgend, & nsv_lima_beg, nsv_lima_end, nsv_lima_ccn_acti, nsv_lima_ccn_free, nsv_lima_hom_haze, & nsv_lima_ifn_free, nsv_lima_ifn_nucl, nsv_lima_imm_nucl, & - nsv_lima_nc, nsv_lima_nr, nsv_lima_ni, nsv_lima_scavmass, & + nsv_lima_nc, nsv_lima_nr, nsv_lima_ni, nsv_lima_scavmass, nsv_lima_spro, & nsv_lnoxbeg, nsv_lnoxend, nsv_ppbeg, nsv_ppend, & nsv_sltbeg, nsv_sltend, nsv_sltdepbeg, nsv_sltdepend, nsv_snwbeg, nsv_snwend, & nsv_user @@ -245,13 +245,14 @@ use modd_param_c2r2, only: ldepoc_c2r2 => ldepoc, lrain_c2r2 => lrain, lsedc_c use modd_param_ice, only: ladj_after, ladj_before, ldeposc_ice => ldeposc, lred, lsedic_ice => lsedic, lwarm_ice => lwarm use modd_param_n, only: cactccn, celec use modd_param_lima, only: laero_mass_lima => laero_mass, lacti_lima => lacti, lcold_lima => lcold, ldepoc_lima => ldepoc, & - lhail_lima => lhail, lhhoni_lima => lhhoni, lmeyers_lima => lmeyers, lnucl_lima => lnucl, & - lptsplit, & - lrain_lima => lrain, lscav_lima => lscav, lsedc_lima => lsedc, lsedi_lima => lsedi, & - lsnow_lima => lsnow, lwarm_lima => lwarm, & + lhail_lima => lhail, lhhoni_lima => lhhoni, lmeyers_lima => lmeyers, lnucl_lima => lnucl, & + lptsplit, & + lrain_lima => lrain, lscav_lima => lscav, lsedc_lima => lsedc, lsedi_lima => lsedi, & + lsnow_lima => lsnow, lspro_lima => lspro, lwarm_lima => lwarm, & nmod_ccn, nmod_ifn, nmod_imm use modd_ref, only: lcouples use modd_salt, only: lsalt +use modd_turb_n, only: lsubg_cond use modd_viscosity, only: lvisc, lvisc_r, lvisc_sv, lvisc_th, lvisc_uvw USE MODE_ll @@ -1094,7 +1095,8 @@ if ( lbu_rth ) then tzsource%cmnhname = 'HENU' tzsource%clongname = 'heterogeneous nucleation' gtmp = cactccn == 'ABRK' .and. (lorilam .or. ldust .or. lsalt ) - tzsource%lavailable = ( hcloud == 'LIMA' .and. lwarm_lima .and. lacti_lima .and. nmod_ccn >= 1 ) & + tzsource%lavailable = ( hcloud == 'LIMA' .and. lwarm_lima .and. lacti_lima .and. nmod_ccn >= 1 & + .and. ( .not.lptsplit .or. .not.lsubg_cond ) ) & .or. hcloud(1:3) == 'ICE' & .or. ( hcloud == 'C2R2' .and. ( gtmp .or. .not.lsupsat_c2r2 ) ) & .or. ( hcloud == 'KHKO' .and. ( gtmp .or. .not.lsupsat_c2r2 ) ) @@ -1238,8 +1240,8 @@ if ( lbu_rth ) then tzsource%cmnhname = 'DEPI' tzsource%clongname = 'deposition on ice' - tzsource%lavailable = hcloud(1:3) == 'ICE' .and. ( .not. lred .or. ( lred .and. ladj_after ) .or. celec /= 'NONE')& - .or. (hcloud == 'LIMA' .and. lptsplit) + tzsource%lavailable = ( hcloud(1:3) == 'ICE' .and. ( .not. lred .or. ( lred .and. ladj_after ) .or. celec /= 'NONE') ) & + .or. ( hcloud == 'LIMA' .and. lptsplit ) call Budget_source_add( tbudgets(NBUDGET_TH), tzsource ) tzsource%cmnhname = 'COND' @@ -1491,7 +1493,8 @@ if ( tbudgets(NBUDGET_RV)%lenabled ) then tzsource%cmnhname = 'HENU' tzsource%clongname = 'heterogeneous nucleation' gtmp = cactccn == 'ABRK' .and. (lorilam .or. ldust .or. lsalt ) - tzsource%lavailable = ( hcloud == 'LIMA' .and. lwarm_lima .and. lacti_lima .and. nmod_ccn >= 1 ) & + tzsource%lavailable = ( hcloud == 'LIMA' .and. lwarm_lima .and. lacti_lima .and. nmod_ccn >= 1 & + .and. ( .not.lptsplit .or. .not.lsubg_cond ) ) & .or. hcloud(1:3) == 'ICE' & .or. ( hcloud == 'C2R2' .and. ( gtmp .or. .not.lsupsat_c2r2 ) ) & .or. ( hcloud == 'KHKO' .and. ( gtmp .or. .not.lsupsat_c2r2 ) ) @@ -1550,8 +1553,8 @@ if ( tbudgets(NBUDGET_RV)%lenabled ) then tzsource%cmnhname = 'DEPI' tzsource%clongname = 'deposition on ice' - tzsource%lavailable = hcloud(1:3) == 'ICE' .and. ( .not. lred .or. ( lred .and. ladj_after ) .or. celec /= 'NONE')& - .or. (hcloud == 'LIMA' .and. lptsplit) + tzsource%lavailable = ( hcloud(1:3) == 'ICE' .and. ( .not. lred .or. ( lred .and. ladj_after ) .or. celec /= 'NONE') ) & + .or. ( hcloud == 'LIMA' .and. lptsplit ) call Budget_source_add( tbudgets(NBUDGET_RV), tzsource ) tzsource%cmnhname = 'CORR2' @@ -1688,8 +1691,9 @@ if ( tbudgets(NBUDGET_RC)%lenabled ) then tzsource%cmnhname = 'CORR' tzsource%clongname = 'correction' - tzsource%lavailable = ( hcloud == 'LIMA' .and. lptsplit .and. lwarm_lima .and. lrain_lima ) & - .or. ( hcloud(1:3) == 'ICE' .and. lred .and. celec == 'NONE' ) +! tzsource%lavailable = ( hcloud == 'LIMA' .and. lptsplit .and. lwarm_lima .and. lrain_lima ) & +! .or. ( hcloud(1:3) == 'ICE' .and. lred .and. celec == 'NONE' ) + tzsource%lavailable = hcloud(1:3) == 'ICE' .and. lred .and. celec == 'NONE' call Budget_source_add( tbudgets(NBUDGET_RC), tzsource ) tzsource%cmnhname = 'SEDI' @@ -1716,8 +1720,9 @@ if ( tbudgets(NBUDGET_RC)%lenabled ) then tzsource%cmnhname = 'HENU' tzsource%clongname = 'CCN activation' gtmp = cactccn == 'ABRK' .and. (lorilam .or. ldust .or. lsalt ) - tzsource%lavailable = ( hcloud == 'LIMA' .and. lwarm_lima .and. lacti_lima .and. nmod_ccn >= 1 ) & - .or. ( hcloud == 'C2R2' .and. ( gtmp .or. .not.lsupsat_c2r2 ) ) & + tzsource%lavailable = ( hcloud == 'LIMA' .and. lwarm_lima .and. lacti_lima .and. nmod_ccn >= 1 & + .and. ( .not.lptsplit .or. .not.lsubg_cond ) ) & + .or. ( hcloud == 'C2R2' .and. ( gtmp .or. .not.lsupsat_c2r2 ) ) & .or. ( hcloud == 'KHKO' .and. ( gtmp .or. .not.lsupsat_c2r2 ) ) call Budget_source_add( tbudgets(NBUDGET_RC), tzsource ) @@ -1938,8 +1943,9 @@ if ( tbudgets(NBUDGET_RR)%lenabled ) then tzsource%cmnhname = 'CORR' tzsource%clongname = 'correction' - tzsource%lavailable = ( hcloud == 'LIMA' .and. lptsplit .and. lwarm_lima .and. lrain_lima ) & - .or. ( hcloud(1:3) == 'ICE' .and. lred .and. celec == 'NONE' ) +! tzsource%lavailable = ( hcloud == 'LIMA' .and. lptsplit .and. lwarm_lima .and. lrain_lima ) & +! .or. ( hcloud(1:3) == 'ICE' .and. lred .and. celec == 'NONE' ) + tzsource%lavailable = hcloud(1:3) == 'ICE' .and. lred .and. celec == 'NONE' call Budget_source_add( tbudgets(NBUDGET_RR), tzsource ) tzsource%cmnhname = 'SEDI' @@ -2179,8 +2185,9 @@ if ( tbudgets(NBUDGET_RI)%lenabled ) then tzsource%cmnhname = 'CORR' tzsource%clongname = 'correction' - tzsource%lavailable = ( hcloud == 'LIMA' .and. lptsplit .and. lcold_lima .and. lsnow_lima ) & - .or. ( hcloud(1:3) == 'ICE' .and. lred .and. celec == 'NONE' ) +! tzsource%lavailable = ( hcloud == 'LIMA' .and. lptsplit .and. lcold_lima .and. lsnow_lima ) & +! .or. ( hcloud(1:3) == 'ICE' .and. lred .and. celec == 'NONE' ) + tzsource%lavailable = hcloud(1:3) == 'ICE' .and. lred .and. celec == 'NONE' call Budget_source_add( tbudgets(NBUDGET_RI), tzsource ) tzsource%cmnhname = 'ADJU' @@ -2301,8 +2308,8 @@ if ( tbudgets(NBUDGET_RI)%lenabled ) then tzsource%cmnhname = 'DEPI' tzsource%clongname = 'condensation/deposition on ice' - tzsource%lavailable = hcloud(1:3) == 'ICE' .and. ( .not. lred .or. ( lred .and. ladj_after ) .or. celec /= 'NONE')& - .or. (hcloud == 'LIMA' .and. lptsplit) + tzsource%lavailable = ( hcloud(1:3) == 'ICE' .and. ( .not. lred .or. ( lred .and. ladj_after ) .or. celec /= 'NONE') ) & + .or. ( hcloud == 'LIMA' .and. lptsplit ) call Budget_source_add( tbudgets(NBUDGET_RI), tzsource ) tzsource%cmnhname = 'CORR2' @@ -2415,8 +2422,9 @@ if ( tbudgets(NBUDGET_RS)%lenabled ) then tzsource%cmnhname = 'CORR' tzsource%clongname = 'correction' - tzsource%lavailable = ( hcloud == 'LIMA' .and. lptsplit .and. lcold_lima .and. lsnow_lima ) & - .or. ( hcloud(1:3) == 'ICE' .and. lred .and. celec == 'NONE' ) +! tzsource%lavailable = ( hcloud == 'LIMA' .and. lptsplit .and. lcold_lima .and. lsnow_lima ) & +! .or. ( hcloud(1:3) == 'ICE' .and. lred .and. celec == 'NONE' ) + tzsource%lavailable = hcloud(1:3) == 'ICE' .and. lred .and. celec == 'NONE' call Budget_source_add( tbudgets(NBUDGET_RS), tzsource ) tzsource%cmnhname = 'SEDI' @@ -2685,7 +2693,7 @@ if ( tbudgets(NBUDGET_RG)%lenabled ) then tzsource%clongname = 'wet growth of hail' tzsource%lavailable = ( hcloud == 'LIMA' .and. .not.lptsplit .and. lhail_lima .and. lcold_lima & .and. lwarm_lima .and. lsnow_lima ) & - .or. (hcloud == 'ICE4' .and. .not. lred) + .or. hcloud == 'ICE4' call Budget_source_add( tbudgets(NBUDGET_RG), tzsource ) tzsource%cmnhname = 'COHG' @@ -3101,26 +3109,28 @@ SV_BUDGETS: do jsv = 1, ksv else if ( jsv >= nsv_lima_beg .and. jsv <= nsv_lima_end ) then SV_VAR ! LIMA case - ! Source terms in common for all LIMA budgets - tzsource%cmnhname = 'NETUR' - tzsource%clongname = 'negative correction induced by turbulence' - tzsource%lavailable = hturb == 'TKEL' - call Budget_source_add( tbudgets(ibudget), tzsource ) + ! Source terms in common for all LIMA budgets (except supersaturation) + if ( jsv /= nsv_lima_spro ) then + tzsource%cmnhname = 'NETUR' + tzsource%clongname = 'negative correction induced by turbulence' + tzsource%lavailable = hturb == 'TKEL' + call Budget_source_add( tbudgets(ibudget), tzsource ) - tzsource%cmnhname = 'NEADV' - tzsource%clongname = 'negative correction induced by advection' - tzsource%lavailable = .true. - call Budget_source_add( tbudgets(ibudget), tzsource ) + tzsource%cmnhname = 'NEADV' + tzsource%clongname = 'negative correction induced by advection' + tzsource%lavailable = .true. + call Budget_source_add( tbudgets(ibudget), tzsource ) - tzsource%cmnhname = 'NEGA' - tzsource%clongname = 'negative correction' - tzsource%lavailable = .true. - call Budget_source_add( tbudgets(ibudget), tzsource ) + tzsource%cmnhname = 'NEGA' + tzsource%clongname = 'negative correction' + tzsource%lavailable = .true. + call Budget_source_add( tbudgets(ibudget), tzsource ) - tzsource%cmnhname = 'NECON' - tzsource%clongname = 'negative correction induced by condensation' - tzsource%lavailable = .true. - call Budget_source_add( tbudgets(ibudget), tzsource ) + tzsource%cmnhname = 'NECON' + tzsource%clongname = 'negative correction induced by condensation' + tzsource%lavailable = .true. + call Budget_source_add( tbudgets(ibudget), tzsource ) + end if ! Source terms specific to each budget @@ -3131,10 +3141,10 @@ SV_BUDGETS: do jsv = 1, ksv tzsource%lavailable = odragtree .and. odepotree call Budget_source_add( tbudgets(ibudget), tzsource ) - tzsource%cmnhname = 'CORR' - tzsource%clongname = 'correction' - tzsource%lavailable = lptsplit .and. lwarm_lima .and. lrain_lima - call Budget_source_add( tbudgets(ibudget), tzsource ) +! tzsource%cmnhname = 'CORR' +! tzsource%clongname = 'correction' +! tzsource%lavailable = lptsplit .and. lwarm_lima .and. lrain_lima +! call Budget_source_add( tbudgets(ibudget), tzsource ) tzsource%cmnhname = 'SEDI' tzsource%clongname = 'sedimentation' @@ -3153,7 +3163,7 @@ SV_BUDGETS: do jsv = 1, ksv tzsource%cmnhname = 'HENU' tzsource%clongname = 'CCN activation' - tzsource%lavailable = lwarm_lima .and. lacti_lima .and. nmod_ccn >= 1 + tzsource%lavailable = lwarm_lima .and. lacti_lima .and. nmod_ccn >= 1 .and. ( .not.lptsplit .or. .not.lsubg_cond ) call Budget_source_add( tbudgets(ibudget), tzsource ) tzsource%cmnhname = 'HINC' @@ -3223,16 +3233,16 @@ SV_BUDGETS: do jsv = 1, ksv tzsource%cmnhname = 'CEDS' tzsource%clongname = 'adjustment to saturation' - tzsource%lavailable = .true. + tzsource%lavailable = lwarm_lima call Budget_source_add( tbudgets(ibudget), tzsource ) else if ( jsv == nsv_lima_nr ) then SV_LIMA ! Rain drops concentration - tzsource%cmnhname = 'CORR' - tzsource%clongname = 'correction' - tzsource%lavailable = lptsplit .and. lwarm_lima .and. lrain_lima - call Budget_source_add( tbudgets(ibudget), tzsource ) +! tzsource%cmnhname = 'CORR' +! tzsource%clongname = 'correction' +! tzsource%lavailable = lptsplit .and. lwarm_lima .and. lrain_lima +! call Budget_source_add( tbudgets(ibudget), tzsource ) tzsource%cmnhname = 'SEDI' tzsource%clongname = 'sedimentation' @@ -3319,7 +3329,7 @@ SV_BUDGETS: do jsv = 1, ksv ! Free CCN concentration tzsource%cmnhname = 'HENU' tzsource%clongname = 'CCN activation' - tzsource%lavailable = lwarm_lima .and. lacti_lima .and. nmod_ccn >= 1 + tzsource%lavailable = lwarm_lima .and. lacti_lima .and. nmod_ccn >= 1 .and. ( .not.lptsplit .or. .not.lsubg_cond ) call Budget_source_add( tbudgets(ibudget), tzsource ) tzsource%cmnhname = 'HONH' @@ -3342,7 +3352,7 @@ SV_BUDGETS: do jsv = 1, ksv ! Activated CCN concentration tzsource%cmnhname = 'HENU' tzsource%clongname = 'CCN activation' - tzsource%lavailable = lwarm_lima .and. lacti_lima .and. nmod_ccn >= 1 + tzsource%lavailable = lwarm_lima .and. lacti_lima .and. nmod_ccn >= 1 .and. ( .not.lptsplit .or. .not.lsubg_cond ) call Budget_source_add( tbudgets(ibudget), tzsource ) tzsource%cmnhname = 'HINC' @@ -3365,16 +3375,16 @@ SV_BUDGETS: do jsv = 1, ksv tzsource%cmnhname = 'CEDS' tzsource%clongname = 'adjustment to saturation' - tzsource%lavailable = lscav_lima .and. laero_mass_lima + tzsource%lavailable = lscav_lima .and. laero_mass_lima .and. .not.lspro_lima call Budget_source_add( tbudgets(ibudget), tzsource ) else if ( jsv == nsv_lima_ni ) then SV_LIMA ! Pristine ice crystals concentration - tzsource%cmnhname = 'CORR' - tzsource%clongname = 'correction' - tzsource%lavailable = lptsplit .and. lcold_lima .and. lsnow_lima - call Budget_source_add( tbudgets(ibudget), tzsource ) +! tzsource%cmnhname = 'CORR' +! tzsource%clongname = 'correction' +! tzsource%lavailable = lptsplit .and. lcold_lima .and. lsnow_lima +! call Budget_source_add( tbudgets(ibudget), tzsource ) tzsource%cmnhname = 'SEDI' tzsource%clongname = 'sedimentation' @@ -3453,7 +3463,7 @@ SV_BUDGETS: do jsv = 1, ksv tzsource%cmnhname = 'CEDS' tzsource%clongname = 'adjustment to saturation' - tzsource%lavailable = .true. + tzsource%lavailable = lcold_lima .and. .not.lptsplit .and. .not.lspro_lima call Budget_source_add( tbudgets(ibudget), tzsource ) tzsource%cmnhname = 'CORR2' @@ -3471,7 +3481,7 @@ SV_BUDGETS: do jsv = 1, ksv tzsource%cmnhname = 'CEDS' tzsource%clongname = 'adjustment to saturation' - tzsource%lavailable = lcold_lima + tzsource%lavailable = lcold_lima .and. .not.lptsplit .and. .not.lspro_lima call Budget_source_add( tbudgets(ibudget), tzsource ) tzsource%cmnhname = 'SCAV' @@ -3500,7 +3510,7 @@ SV_BUDGETS: do jsv = 1, ksv tzsource%cmnhname = 'CEDS' tzsource%clongname = 'adjustment to saturation' - tzsource%lavailable = lcold_lima + tzsource%lavailable = lcold_lima .and. .not.lptsplit .and. .not.lspro_lima call Budget_source_add( tbudgets(ibudget), tzsource ) @@ -3513,7 +3523,7 @@ SV_BUDGETS: do jsv = 1, ksv tzsource%cmnhname = 'CEDS' tzsource%clongname = 'adjustment to saturation' - tzsource%lavailable = lcold_lima + tzsource%lavailable = lcold_lima .and. .not.lptsplit .and. .not.lspro_lima call Budget_source_add( tbudgets(ibudget), tzsource ) @@ -3526,7 +3536,15 @@ SV_BUDGETS: do jsv = 1, ksv .or. ( lptsplit .and. ( lhhoni_lima .and. nmod_ccn >= 1 ) ) ) call Budget_source_add( tbudgets(ibudget), tzsource ) - end if SV_LIMA + + else if ( jsv == nsv_lima_spro ) then SV_LIMA + ! Supersaturation + tzsource%cmnhname = 'CEDS' + tzsource%clongname = 'adjustment to saturation' + tzsource%lavailable = .true. + call Budget_source_add( tbudgets(ibudget), tzsource ) + + end if SV_LIMA else if ( jsv >= nsv_elecbeg .and. jsv <= nsv_elecend ) then SV_VAR diff --git a/src/MNH/lima.f90 b/src/MNH/lima.f90 index 1b6dc87de..c248f1acf 100644 --- a/src/MNH/lima.f90 +++ b/src/MNH/lima.f90 @@ -564,20 +564,20 @@ ZT(:,:,:) = ZTHT(:,:,:) * ZEXN(:,:,:) ! !* 0. Check mean diameter for cloud, rain and ice ! -------------------------------------------- -if ( lbu_enable ) then - if ( lbudget_rc .and. lwarm .and. lrain ) call Budget_store_init( tbudgets(NBUDGET_RC), 'CORR', zrcs(:, :, :) * prhodj(:, :, :) ) - if ( lbudget_rr .and. lwarm .and. lrain ) call Budget_store_init( tbudgets(NBUDGET_RR), 'CORR', zrrs(:, :, :) * prhodj(:, :, :) ) - if ( lbudget_ri .and. lcold .and. lsnow ) call Budget_store_init( tbudgets(NBUDGET_RI), 'CORR', zris(:, :, :) * prhodj(:, :, :) ) - if ( lbudget_rs .and. lcold .and. lsnow ) call Budget_store_init( tbudgets(NBUDGET_RS), 'CORR', zrss(:, :, :) * prhodj(:, :, :) ) - if ( lbudget_sv ) then - if ( lwarm .and. lrain ) & - call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CORR', zccs(:, :, :) * prhodj(:, :, :) ) - if ( lwarm .and. lrain ) & - call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nr), 'CORR', zcrs(:, :, :) * prhodj(:, :, :) ) - if ( lcold .and. lsnow ) & - call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CORR', zcis(:, :, :) * prhodj(:, :, :) ) - end if -end if +! if ( lbu_enable ) then +! if ( lbudget_rc .and. lwarm .and. lrain ) call Budget_store_init( tbudgets(NBUDGET_RC), 'CORR', zrcs(:, :, :) * prhodj(:, :, :) ) +! if ( lbudget_rr .and. lwarm .and. lrain ) call Budget_store_init( tbudgets(NBUDGET_RR), 'CORR', zrrs(:, :, :) * prhodj(:, :, :) ) +! if ( lbudget_ri .and. lcold .and. lsnow ) call Budget_store_init( tbudgets(NBUDGET_RI), 'CORR', zris(:, :, :) * prhodj(:, :, :) ) +! if ( lbudget_rs .and. lcold .and. lsnow ) call Budget_store_init( tbudgets(NBUDGET_RS), 'CORR', zrss(:, :, :) * prhodj(:, :, :) ) +! if ( lbudget_sv ) then +! if ( lwarm .and. lrain ) & +! call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CORR', zccs(:, :, :) * prhodj(:, :, :) ) +! if ( lwarm .and. lrain ) & +! call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nr), 'CORR', zcrs(:, :, :) * prhodj(:, :, :) ) +! if ( lcold .and. lsnow ) & +! call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CORR', zcis(:, :, :) * prhodj(:, :, :) ) +! end if +! end if !!$IF (LWARM .AND. LRAIN) THEN !!$ WHERE( ZRCT>XRTMIN(2) .AND. ZCCT>XCTMIN(2) .AND. ZRCT>XAC*ZCCT*(100.E-6)**XBC ) !!$ ZRRT=ZRRT+ZRCT @@ -615,20 +615,20 @@ end if !!$ END WHERE !!$END IF ! -if ( lbu_enable ) then - if ( lbudget_rc .and. lwarm .and. lrain ) call Budget_store_end( tbudgets(NBUDGET_RC), 'CORR', zrcs(:, :, :) * prhodj(:, :, :) ) - if ( lbudget_rr .and. lwarm .and. lrain ) call Budget_store_end( tbudgets(NBUDGET_RR), 'CORR', zrrs(:, :, :) * prhodj(:, :, :) ) - if ( lbudget_ri .and. lcold .and. lsnow ) call Budget_store_end( tbudgets(NBUDGET_RI), 'CORR', zris(:, :, :) * prhodj(:, :, :) ) - if ( lbudget_rs .and. lcold .and. lsnow ) call Budget_store_end( tbudgets(NBUDGET_RS), 'CORR', zrss(:, :, :) * prhodj(:, :, :) ) - if ( lbudget_sv ) then - if ( lwarm .and. lrain ) & - call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CORR', zccs(:, :, :) * prhodj(:, :, :) ) - if ( lwarm .and. lrain ) & - call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nr), 'CORR', zcrs(:, :, :) * prhodj(:, :, :) ) - if ( lcold .and. lsnow ) & - call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CORR', zcis(:, :, :) * prhodj(:, :, :) ) - end if -end if +! if ( lbu_enable ) then +! if ( lbudget_rc .and. lwarm .and. lrain ) call Budget_store_end( tbudgets(NBUDGET_RC), 'CORR', zrcs(:, :, :) * prhodj(:, :, :) ) +! if ( lbudget_rr .and. lwarm .and. lrain ) call Budget_store_end( tbudgets(NBUDGET_RR), 'CORR', zrrs(:, :, :) * prhodj(:, :, :) ) +! if ( lbudget_ri .and. lcold .and. lsnow ) call Budget_store_end( tbudgets(NBUDGET_RI), 'CORR', zris(:, :, :) * prhodj(:, :, :) ) +! if ( lbudget_rs .and. lcold .and. lsnow ) call Budget_store_end( tbudgets(NBUDGET_RS), 'CORR', zrss(:, :, :) * prhodj(:, :, :) ) +! if ( lbudget_sv ) then +! if ( lwarm .and. lrain ) & +! call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CORR', zccs(:, :, :) * prhodj(:, :, :) ) +! if ( lwarm .and. lrain ) & +! call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nr), 'CORR', zcrs(:, :, :) * prhodj(:, :, :) ) +! if ( lcold .and. lsnow ) & +! call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CORR', zcis(:, :, :) * prhodj(:, :, :) ) +! end if +! end if !------------------------------------------------------------------------------- ! !* 1. Sedimentation diff --git a/src/MNH/lima_adjust.f90 b/src/MNH/lima_adjust.f90 index 5a1030b30..6f580b311 100644 --- a/src/MNH/lima_adjust.f90 +++ b/src/MNH/lima_adjust.f90 @@ -431,8 +431,10 @@ if ( nbumod == kmi .and. lbu_enable ) then if ( lbudget_rc ) call Budget_store_init( tbudgets(NBUDGET_RC), 'CEDS', prcs(:, :, :) * prhodj(:, :, :) ) if ( lbudget_ri ) call Budget_store_init( tbudgets(NBUDGET_RI), 'CEDS', pris(:, :, :) * prhodj(:, :, :) ) if ( lbudget_sv ) then - call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CEDS', pccs(:, :, :) * prhodj(:, :, :) ) - if (lcold) call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CEDS', pcis(:, :, :) * prhodj(:, :, :) ) + if ( lwarm ) & + call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CEDS', pccs(:, :, :) * prhodj(:, :, :) ) + if ( lcold ) & + call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CEDS', pcis(:, :, :) * prhodj(:, :, :) ) if ( lscav .and. laero_mass ) & call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_scavmass), 'CEDS', pmas(:, :, :) * prhodj(:, :, :) ) if ( lwarm ) then @@ -1308,8 +1310,10 @@ if ( nbumod == kmi .and. lbu_enable ) then if ( lbudget_rc ) call Budget_store_end( tbudgets(NBUDGET_RC), 'CEDS', prcs(:, :, :) * prhodj(:, :, :) ) if ( lbudget_ri ) call Budget_store_end( tbudgets(NBUDGET_RI), 'CEDS', pris(:, :, :) * prhodj(:, :, :) ) if ( lbudget_sv ) then - call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CEDS', pccs(:, :, :) * prhodj(:, :, :) ) - if (lcold) call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CEDS', pcis(:, :, :) * prhodj(:, :, :) ) + if ( lwarm ) & + call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CEDS', pccs(:, :, :) * prhodj(:, :, :) ) + if ( lcold ) & + call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CEDS', pcis(:, :, :) * prhodj(:, :, :) ) if ( lscav .and. laero_mass ) & call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_scavmass), 'CEDS', pmas(:, :, :) * prhodj(:, :, :) ) if ( lwarm ) then diff --git a/src/MNH/lima_adjust_split.f90 b/src/MNH/lima_adjust_split.f90 index e965a2cd9..ff33a384a 100644 --- a/src/MNH/lima_adjust_split.f90 +++ b/src/MNH/lima_adjust_split.f90 @@ -423,20 +423,34 @@ if ( nbumod == kmi .and. lbu_enable ) then if ( lbudget_th ) call Budget_store_init( tbudgets(NBUDGET_TH), 'CEDS', pths(:, :, :) * prhodj(:, :, :) ) if ( lbudget_rv ) call Budget_store_init( tbudgets(NBUDGET_RV), 'CEDS', prvs(:, :, :) * prhodj(:, :, :) ) if ( lbudget_rc ) call Budget_store_init( tbudgets(NBUDGET_RC), 'CEDS', prcs(:, :, :) * prhodj(:, :, :) ) + !Remark: PRIS is not modified but source term kept for better coherence with lima_adjust and lima_notadjust if ( lbudget_ri ) call Budget_store_init( tbudgets(NBUDGET_RI), 'CEDS', pris(:, :, :) * prhodj(:, :, :) ) if ( lbudget_sv ) then - call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CEDS', pccs(:, :, :) * prhodj(:, :, :) ) - do jl = nsv_lima_ccn_free,nsv_lima_ccn_free + nmod_ccn - 1 - idx = NBUDGET_SV1 - 1 + jl - call Budget_store_init( tbudgets(idx), 'CEDS', pnfs(:, :, :, jl) * prhodj(:, :, :) ) - end do - if ( lcold ) then - call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CEDS', pcis(:, :, :) * prhodj(:, :, :) ) - do jl = 1, nsv_lima_ifn_free, nsv_lima_ifn_free + nmod_ifn - 1 - idx = NBUDGET_SV1 - 1 + jl - call Budget_store_init( tbudgets(idx), 'CEDS', pifs(:, :, :, jl) * prhodj(:, :, :) ) + if ( lwarm ) & + call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CEDS', pccs(:, :, :) * prhodj(:, :, :) ) + if ( lscav .and. laero_mass ) & + call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_scavmass), 'CEDS', pmas(:, :, :) * prhodj(:, :, :) ) + if ( lwarm ) then + do jl = 1, nmod_ccn + idx = NBUDGET_SV1 - 1 + nsv_lima_ccn_free - 1 + jl + call Budget_store_init( tbudgets(idx), 'CEDS', pnfs(:, :, :, jl) * prhodj(:, :, :) ) + idx = NBUDGET_SV1 - 1 + nsv_lima_ccn_acti - 1 + jl + call Budget_store_init( tbudgets(idx), 'CEDS', pnas(:, :, :, jl) * prhodj(:, :, :) ) end do end if +! if ( lcold ) then +! call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CEDS', pcis(:, :, :) * prhodj(:, :, :) ) +! do jl = 1, nmod_ifn +! idx = NBUDGET_SV1 - 1 + nsv_lima_ifn_free - 1 + jl +! call Budget_store_init( tbudgets(idx), 'CEDS', pifs(:, :, :, jl) * prhodj(:, :, :) ) +! idx = NBUDGET_SV1 - 1 + nsv_lima_ifn_nucl - 1 + jl +! call Budget_store_init( tbudgets(idx), 'CEDS', pins(:, :, :, jl) * prhodj(:, :, :) ) +! end do +! do jl = 1, nmod_imm +! idx = NBUDGET_SV1 - 1 + nsv_lima_imm_nucl - 1 + jl +! call Budget_store_init( tbudgets(idx), 'CEDS', pnis(:, :, :, jl) * prhodj(:, :, :) ) +! end do +! end if end if end if ! @@ -797,20 +811,34 @@ if ( nbumod == kmi .and. lbu_enable ) then if ( lbudget_th ) call Budget_store_end( tbudgets(NBUDGET_TH), 'CEDS', pths(:, :, :) * prhodj(:, :, :) ) if ( lbudget_rv ) call Budget_store_end( tbudgets(NBUDGET_RV), 'CEDS', prvs(:, :, :) * prhodj(:, :, :) ) if ( lbudget_rc ) call Budget_store_end( tbudgets(NBUDGET_RC), 'CEDS', prcs(:, :, :) * prhodj(:, :, :) ) + !Remark: PRIS is not modified but source term kept for better coherence with lima_adjust and lima_notadjust if ( lbudget_ri ) call Budget_store_end( tbudgets(NBUDGET_RI), 'CEDS', pris(:, :, :) * prhodj(:, :, :) ) if ( lbudget_sv ) then - call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CEDS', pccs(:, :, :) * prhodj(:, :, :) ) - do jl = nsv_lima_ccn_free,nsv_lima_ccn_free + nmod_ccn - 1 - idx = NBUDGET_SV1 - 1 + jl - call Budget_store_end( tbudgets(idx), 'CEDS', pnfs(:, :, :, jl) * prhodj(:, :, :) ) - end do - if ( lcold ) then - call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CEDS', pcis(:, :, :) * prhodj(:, :, :) ) - do jl = 1, nsv_lima_ifn_free, nsv_lima_ifn_free + nmod_ifn - 1 - idx = NBUDGET_SV1 - 1 + jl - call Budget_store_end( tbudgets(idx), 'CEDS', pifs(:, :, :, jl) * prhodj(:, :, :) ) + if ( lwarm ) & + call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CEDS', pccs(:, :, :) * prhodj(:, :, :) ) + if ( lscav .and. laero_mass ) & + call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_scavmass), 'CEDS', pmas(:, :, :) * prhodj(:, :, :) ) + if ( lwarm ) then + do jl = 1, nmod_ccn + idx = NBUDGET_SV1 - 1 + nsv_lima_ccn_free - 1 + jl + call Budget_store_end( tbudgets(idx), 'CEDS', pnfs(:, :, :, jl) * prhodj(:, :, :) ) + idx = NBUDGET_SV1 - 1 + nsv_lima_ccn_acti - 1 + jl + call Budget_store_end( tbudgets(idx), 'CEDS', pnas(:, :, :, jl) * prhodj(:, :, :) ) end do end if +! if ( lcold ) then +! call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CEDS', pcis(:, :, :) * prhodj(:, :, :) ) +! do jl = 1, nmod_ifn +! idx = NBUDGET_SV1 - 1 + nsv_lima_ifn_free - 1 + jl +! call Budget_store_end( tbudgets(idx), 'CEDS', pifs(:, :, :, jl) * prhodj(:, :, :) ) +! idx = NBUDGET_SV1 - 1 + nsv_lima_ifn_nucl - 1 + jl +! call Budget_store_end( tbudgets(idx), 'CEDS', pins(:, :, :, jl) * prhodj(:, :, :) ) +! end do +! do jl = 1, nmod_imm +! idx = NBUDGET_SV1 - 1 + nsv_lima_imm_nucl - 1 + jl +! call Budget_store_init( tbudgets(idx), 'CEDS', pnis(:, :, :, jl) * prhodj(:, :, :) ) +! end do +! end if end if end if !++cb++ diff --git a/src/MNH/lima_notadjust.f90 b/src/MNH/lima_notadjust.f90 index 79affeae9..78dca60d9 100644 --- a/src/MNH/lima_notadjust.f90 +++ b/src/MNH/lima_notadjust.f90 @@ -192,18 +192,36 @@ if ( nbumod == kmi .and. lbu_enable ) then if ( lbudget_rc ) call Budget_store_init( tbudgets(NBUDGET_RC), 'CEDS', prs(:, :, :, 2) * prhodj(:, :, :) ) if ( lbudget_ri ) call Budget_store_init( tbudgets(NBUDGET_RI), 'CEDS', prs(:, :, :, 4) * prhodj(:, :, :) ) if ( lbudget_sv ) then - call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CEDS', psvs(:, :, :, nsv_lima_nc) * prhodj(:, :, :) ) - do jl = nsv_lima_ccn_free,nsv_lima_ccn_free + nmod_ccn - 1 - idx = NBUDGET_SV1 - 1 + jl - call Budget_store_init( tbudgets(idx), 'CEDS', psvs(:, :, :, jl) * prhodj(:, :, :) ) - end do - if ( lcold ) then - call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CEDS', psvs(:, :, :, nsv_lima_ni) * prhodj(:, :, :) ) - do jl = 1, nsv_lima_ifn_free, nsv_lima_ifn_free + nmod_ifn - 1 + if ( lwarm ) then + call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CEDS', psvs(:, :, :, nsv_lima_nc) * prhodj(:, :, :) ) + do jl = nsv_lima_ccn_free, nsv_lima_ccn_free + nmod_ccn - 1 + idx = NBUDGET_SV1 - 1 + jl + call Budget_store_init( tbudgets(idx), 'CEDS', psvs(:, :, :, jl) * prhodj(:, :, :) ) + end do + do jl = nsv_lima_ccn_acti, nsv_lima_ccn_acti + nmod_ccn - 1 idx = NBUDGET_SV1 - 1 + jl call Budget_store_init( tbudgets(idx), 'CEDS', psvs(:, :, :, jl) * prhodj(:, :, :) ) end do end if +! if ( lscav .and. laero_mass ) & +! call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_scavmass), 'CEDS', psvs(:, :, :, nsv_lima_scavmass) & +! * prhodj(:, :, :) ) +! if ( lcold ) then +! call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CEDS', psvs(:, :, :, nsv_lima_ni) * prhodj(:, :, :) ) +! do jl = 1, nsv_lima_ifn_free, nsv_lima_ifn_free + nmod_ifn - 1 +! idx = NBUDGET_SV1 - 1 + jl +! call Budget_store_init( tbudgets(idx), 'CEDS', psvs(:, :, :, jl) * prhodj(:, :, :) ) +! end do +! do jl = 1, nsv_lima_ifn_nucl, nsv_lima_ifn_nucl + nmod_ifn - 1 +! idx = NBUDGET_SV1 - 1 + jl +! call Budget_store_init( tbudgets(idx), 'CEDS', psvs(:, :, :, jl) * prhodj(:, :, :) ) +! end do +! do jl = 1, nsv_lima_imm_nucl, nsv_lima_imm_nucl + nmod_ifn - 1 +! idx = NBUDGET_SV1 - 1 + jl +! call Budget_store_init( tbudgets(idx), 'CEDS', psvs(:, :, :, jl) * prhodj(:, :, :) ) +! end do +! end if + call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_spro), 'CEDS', psvs(:, :, :, nsv_lima_spro) * prhodj(:, :, :) ) end if end if ! @@ -574,18 +592,36 @@ if ( nbumod == kmi .and. lbu_enable ) then if ( lbudget_rc ) call Budget_store_end( tbudgets(NBUDGET_RC), 'CEDS', prs(:, :, :, 2) * prhodj(:, :, :) ) if ( lbudget_ri ) call Budget_store_end( tbudgets(NBUDGET_RI), 'CEDS', prs(:, :, :, 4) * prhodj(:, :, :) ) if ( lbudget_sv ) then - call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CEDS', psvs(:, :, :, nsv_lima_nc) * prhodj(:, :, :) ) - do jl = nsv_lima_ccn_free,nsv_lima_ccn_free + nmod_ccn - 1 - idx = NBUDGET_SV1 - 1 + jl - call Budget_store_end( tbudgets(idx), 'CEDS', psvs(:, :, :, jl) * prhodj(:, :, :) ) - end do - if ( lcold ) then - call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CEDS', psvs(:, :, :, nsv_lima_ni) * prhodj(:, :, :) ) - do jl = 1, nsv_lima_ifn_free, nsv_lima_ifn_free + nmod_ifn - 1 + if ( lwarm ) then + call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'CEDS', psvs(:, :, :, nsv_lima_nc) * prhodj(:, :, :) ) + do jl = nsv_lima_ccn_free, nsv_lima_ccn_free + nmod_ccn - 1 + idx = NBUDGET_SV1 - 1 + jl + call Budget_store_end( tbudgets(idx), 'CEDS', psvs(:, :, :, jl) * prhodj(:, :, :) ) + end do + do jl = nsv_lima_ccn_acti, nsv_lima_ccn_acti + nmod_ccn - 1 idx = NBUDGET_SV1 - 1 + jl call Budget_store_end( tbudgets(idx), 'CEDS', psvs(:, :, :, jl) * prhodj(:, :, :) ) end do end if +! if ( lscav .and. laero_mass ) & +! call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_scavmass), 'CEDS', psvs(:, :, :, nsv_lima_scavmass) & +! * prhodj(:, :, :) ) +! if ( lcold ) then +! call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_ni), 'CEDS', psvs(:, :, :, nsv_lima_ni) * prhodj(:, :, :) ) +! do jl = 1, nsv_lima_ifn_free, nsv_lima_ifn_free + nmod_ifn - 1 +! idx = NBUDGET_SV1 - 1 + jl +! call Budget_store_end( tbudgets(idx), 'CEDS', psvs(:, :, :, jl) * prhodj(:, :, :) ) +! end do +! do jl = 1, nsv_lima_ifn_nucl, nsv_lima_ifn_nucl + nmod_ifn - 1 +! idx = NBUDGET_SV1 - 1 + jl +! call Budget_store_end( tbudgets(idx), 'CEDS', psvs(:, :, :, jl) * prhodj(:, :, :) ) +! end do +! do jl = 1, nsv_lima_imm_nucl, nsv_lima_imm_nucl + nmod_ifn - 1 +! idx = NBUDGET_SV1 - 1 + jl +! call Budget_store_end( tbudgets(idx), 'CEDS', psvs(:, :, :, jl) * prhodj(:, :, :) ) +! end do +! end if + call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_spro), 'CEDS', psvs(:, :, :, nsv_lima_spro) * prhodj(:, :, :) ) end if end if ! diff --git a/src/MNH/lima_nucleation_procs.f90 b/src/MNH/lima_nucleation_procs.f90 index 0bb8adb45..e0773e220 100644 --- a/src/MNH/lima_nucleation_procs.f90 +++ b/src/MNH/lima_nucleation_procs.f90 @@ -149,40 +149,46 @@ INTEGER :: JL !------------------------------------------------------------------------------- ! IF ( LWARM .AND. LACTI .AND. NMOD_CCN >=1 ) THEN - if ( lbu_enable ) then - if ( lbudget_th ) call Budget_store_init( tbudgets(NBUDGET_TH), 'HENU', ptht(:, :, :) * prhodj(:, :, :) / ptstep ) - if ( lbudget_rv ) call Budget_store_init( tbudgets(NBUDGET_RV), 'HENU', prvt(:, :, :) * prhodj(:, :, :) / ptstep ) - if ( lbudget_rc ) call Budget_store_init( tbudgets(NBUDGET_RC), 'HENU', prct(:, :, :) * prhodj(:, :, :) / ptstep ) - if ( lbudget_sv ) then - call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'HENU', pcct(:, :, :) * prhodj(:, :, :) / ptstep ) - do jl = 1, nmod_ccn - idx = NBUDGET_SV1 - 1 + nsv_lima_ccn_free - 1 + jl - call Budget_store_init( tbudgets(idx), 'HENU', pnft(:, :, :, jl) * prhodj(:, :, :) / ptstep ) - idx = NBUDGET_SV1 - 1 + nsv_lima_ccn_acti - 1 + jl - call Budget_store_init( tbudgets(idx), 'HENU', pnat(:, :, :, jl) * prhodj(:, :, :) / ptstep ) - end do + + IF (.NOT.LSUBG_COND .AND. .NOT.LSPRO) THEN + + if ( lbu_enable ) then + if ( lbudget_th ) call Budget_store_init( tbudgets(NBUDGET_TH), 'HENU', ptht(:, :, :) * prhodj(:, :, :) / ptstep ) + if ( lbudget_rv ) call Budget_store_init( tbudgets(NBUDGET_RV), 'HENU', prvt(:, :, :) * prhodj(:, :, :) / ptstep ) + if ( lbudget_rc ) call Budget_store_init( tbudgets(NBUDGET_RC), 'HENU', prct(:, :, :) * prhodj(:, :, :) / ptstep ) + if ( lbudget_sv ) then + call Budget_store_init( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'HENU', pcct(:, :, :) * prhodj(:, :, :) / ptstep ) + do jl = 1, nmod_ccn + idx = NBUDGET_SV1 - 1 + nsv_lima_ccn_free - 1 + jl + call Budget_store_init( tbudgets(idx), 'HENU', pnft(:, :, :, jl) * prhodj(:, :, :) / ptstep ) + idx = NBUDGET_SV1 - 1 + nsv_lima_ccn_acti - 1 + jl + call Budget_store_init( tbudgets(idx), 'HENU', pnat(:, :, :, jl) * prhodj(:, :, :) / ptstep ) + end do + end if end if - end if - IF (.NOT.LSUBG_COND .AND. .NOT.LSPRO) THEN - CALL LIMA_CCN_ACTIVATION (PTSTEP, TPFILE, & - PRHODREF, PEXNREF, PPABST, PT, PDTHRAD, PW_NU, & - PTHT, PRVT, PRCT, PCCT, PRRT, PNFT, PNAT, PCLDFR ) - END IF - WHERE(PCLDFR(:,:,:)<1.E-10 .AND. PRCT(:,:,:)>XRTMIN(2) .AND. PCCT(:,:,:)>XCTMIN(2)) PCLDFR(:,:,:)=1. - if ( lbu_enable ) then - if ( lbudget_th ) call Budget_store_end( tbudgets(NBUDGET_TH), 'HENU', ptht(:, :, :) * prhodj(:, :, :) / ptstep ) - if ( lbudget_rv ) call Budget_store_end( tbudgets(NBUDGET_RV), 'HENU', prvt(:, :, :) * prhodj(:, :, :) / ptstep ) - if ( lbudget_rc ) call Budget_store_end( tbudgets(NBUDGET_RC), 'HENU', prct(:, :, :) * prhodj(:, :, :) / ptstep ) - if ( lbudget_sv ) then - call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'HENU', pcct(:, :, :) * prhodj(:, :, :) / ptstep ) - do jl = 1, nmod_ccn - idx = NBUDGET_SV1 - 1 + nsv_lima_ccn_free - 1 + jl - call Budget_store_end( tbudgets(idx), 'HENU', pnft(:, :, :, jl) * prhodj(:, :, :) / ptstep ) - idx = NBUDGET_SV1 - 1 + nsv_lima_ccn_acti - 1 + jl - call Budget_store_end( tbudgets(idx), 'HENU', pnat(:, :, :, jl) * prhodj(:, :, :) / ptstep ) - end do + + CALL LIMA_CCN_ACTIVATION( PTSTEP, TPFILE, & + PRHODREF, PEXNREF, PPABST, PT, PDTHRAD, PW_NU, & + PTHT, PRVT, PRCT, PCCT, PRRT, PNFT, PNAT, PCLDFR ) + if ( lbu_enable ) then + if ( lbudget_th ) call Budget_store_end( tbudgets(NBUDGET_TH), 'HENU', ptht(:, :, :) * prhodj(:, :, :) / ptstep ) + if ( lbudget_rv ) call Budget_store_end( tbudgets(NBUDGET_RV), 'HENU', prvt(:, :, :) * prhodj(:, :, :) / ptstep ) + if ( lbudget_rc ) call Budget_store_end( tbudgets(NBUDGET_RC), 'HENU', prct(:, :, :) * prhodj(:, :, :) / ptstep ) + if ( lbudget_sv ) then + call Budget_store_end( tbudgets(NBUDGET_SV1 - 1 + nsv_lima_nc), 'HENU', pcct(:, :, :) * prhodj(:, :, :) / ptstep ) + do jl = 1, nmod_ccn + idx = NBUDGET_SV1 - 1 + nsv_lima_ccn_free - 1 + jl + call Budget_store_end( tbudgets(idx), 'HENU', pnft(:, :, :, jl) * prhodj(:, :, :) / ptstep ) + idx = NBUDGET_SV1 - 1 + nsv_lima_ccn_acti - 1 + jl + call Budget_store_end( tbudgets(idx), 'HENU', pnat(:, :, :, jl) * prhodj(:, :, :) / ptstep ) + end do + end if end if - end if + + END IF + + WHERE(PCLDFR(:,:,:)<1.E-10 .AND. PRCT(:,:,:)>XRTMIN(2) .AND. PCCT(:,:,:)>XCTMIN(2)) PCLDFR(:,:,:)=1. + END IF ! !------------------------------------------------------------------------------- diff --git a/src/MNH/lima_warm.f90 b/src/MNH/lima_warm.f90 index b3989e7a2..14b1a09fc 100644 --- a/src/MNH/lima_warm.f90 +++ b/src/MNH/lima_warm.f90 @@ -362,7 +362,7 @@ END IF ! -------------------------------------- ! ! -IF ( LACTI .AND. NMOD_CCN > 0 ) THEN +IF ( LACTI .AND. NMOD_CCN > 0 .AND. .NOT. LSPRO ) THEN if ( lbudget_th ) call Budget_store_init( tbudgets(NBUDGET_TH), 'HENU', pths(:, :, :) * prhodj(:, :, :) ) if ( lbudget_rv ) call Budget_store_init( tbudgets(NBUDGET_RV), 'HENU', prvs(:, :, :) * prhodj(:, :, :) ) if ( lbudget_rc ) call Budget_store_init( tbudgets(NBUDGET_RC), 'HENU', prcs(:, :, :) * prhodj(:, :, :) ) @@ -375,12 +375,11 @@ IF ( LACTI .AND. NMOD_CCN > 0 ) THEN call Budget_store_init( tbudgets(idx), 'HENU', znas(:, :, :, jl) * prhodj(:, :, :) ) end do end if - IF (.NOT. LSPRO) THEN - CALL LIMA_WARM_NUCL(OACTIT, PTSTEP, KMI, TPFILE, & - PRHODREF, PEXNREF, PPABST, ZT, PTHM, PW_NU, & - PRCM, PRVT, PRCT, PRRT, & - PTHS, PRVS, PRCS, PCCS, ZNFS, ZNAS ) - END IF + + CALL LIMA_WARM_NUCL( OACTIT, PTSTEP, KMI, TPFILE, & + PRHODREF, PEXNREF, PPABST, ZT, PTHM, PW_NU, & + PRCM, PRVT, PRCT, PRRT, & + PTHS, PRVS, PRCS, PCCS, ZNFS, ZNAS ) if ( lbudget_th ) call Budget_store_end( tbudgets(NBUDGET_TH), 'HENU', pths(:, :, :) * prhodj(:, :, :) ) if ( lbudget_rv ) call Budget_store_end( tbudgets(NBUDGET_RV), 'HENU', prvs(:, :, :) * prhodj(:, :, :) ) -- GitLab