Skip to content

Commit

Permalink
WRFDA registry.var fixes for packaging moist variables and for non-4D…
Browse files Browse the repository at this point in the history
…VAR (wrf-model#281)

TYPE: bug fix/enhancement

KEYWORDS: WRFDA, registry.var, package

SOURCE: Jamie Bresch (NCAR)

DESCRIPTION OF CHANGES:

Main changes are in registry.var.
All others are for complementing registry changes.

1. Simply the packaging for moist variables.
    When mp_physics is on, allocate all 5 (qc, qr, qi, qs, qg, excluding qh)
    moist variables that DA uses.
    This fixes some incorrect cloud DA analyses when certain mp_physics is used.
2. Package vp6, vv6, x6a and a_/g_ variables for 4DVAR use only.
    This reduces the non-4DVAR memory usage by ~35%.

LIST OF MODIFIED FILES:
M Registry/registry.var
M var/da/da_main/da_solve.inc
M var/da/da_main/da_wrfvar_init2.inc
M var/da/da_minimisation/da_calculate_gradj.inc
M var/da/da_minimisation/da_calculate_j.inc
M var/da/da_minimisation/da_sensitivity.inc
M var/da/da_minimisation/da_transform_vtoy.inc
M var/da/da_minimisation/da_transform_vtoy_adj.inc
M var/da/da_test/da_check_vtoy_adjoint.inc
M var/da/da_test/da_check_xtoy_adjoint.inc
M var/da/da_transfer_model/da_transfer_model.f90
M var/da/da_transfer_model/da_transfer_wrftltoxa.inc
M var/da/da_transfer_model/da_transfer_wrftltoxa_adj.inc
M var/da/da_transfer_model/da_transfer_xatowrftl.inc
M var/da/da_transfer_model/da_transfer_xatowrftl_adj.inc

TESTS CONDUCTED:
WRFDA regtests on cheyenne with intel/17.0.1 passed.
A few 3DVAR and 4DVAR tests on Mac with gnu/5.2.0 gave identical results after the changes.
  • Loading branch information
jamiebresch authored Aug 4, 2017
1 parent c4eeff5 commit 81ca2ff
Show file tree
Hide file tree
Showing 15 changed files with 187 additions and 248 deletions.
59 changes: 24 additions & 35 deletions Registry/registry.var
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ state real a_qs ijkft a_moist 1 - rh "A_QSNOW
state real g_qs ijkft g_moist 1 - rh "G_QSNOW" "Snow mixing ratio" "kg kg-1"
state real a_qg ijkft a_moist 1 - rh "A_QGRAUP" "Graupel mixing ratio" "kg kg-1"
state real g_qg ijkft g_moist 1 - rh "G_QGRAUP" "Graupel mixing ratio" "kg kg-1"
state real a_qh ijkft a_moist 1 - rh "A_QHAIL" "Hail mixing ratio" "kg kg-1"
state real g_qh ijkft g_moist 1 - rh "G_QHAIL" "Hail mixing ratio" "kg kg-1"
#state real a_qh ijkft a_moist 1 - rh "A_QHAIL" "Hail mixing ratio" "kg kg-1"
#state real g_qh ijkft g_moist 1 - rh "G_QHAIL" "Hail mixing ratio" "kg kg-1"
# Other Misc State Variables
state real g_h_diabatic ijk misc 1 - rdu "g_h_diabatic" "MICROPHYSICS LATENT HEATING" "K s-1"
state real a_h_diabatic ijk misc 1 - rdu "a_h_diabatic" "MICROPHYSICS LATENT HEATING" "K s-1"
Expand Down Expand Up @@ -472,6 +472,8 @@ rconfig logical var4d_run namelist,perturbation 1 .true. -
rconfig integer mp_physics_ad namelist,physics max_domains 98 - "mp_physics_ad" "" ""
# NAMELIST DERIVED
rconfig integer mp_physics_4dvar derived max_domains -1 - "mp_physics_4dvar" "" "-1 = no 4dvar and so no need to allocate a_ and g_ moist and scalar variables, >0 = running 4dvar, so allocate a_ and g_ moist and scalar variables appropriate for selected microphysics package"
rconfig integer mp_physics_da derived max_domains 1 - "mp_physics_da" "" "1 when mp_physics>0 for allocating moist variables"
rconfig integer mp_physics_da_4dvar derived max_domains -1 - "mp_physics_da_4dvar" "" "1 when mp_physics>0 for allocating g_/a_moist variables"
#
#---------------------------------------------------------------------------------------------------------------------------------------
# Package Declarations
Expand All @@ -486,40 +488,16 @@ package dyn_em_ad dyn_opt==302 - -
package dyn_em_tst dyn_opt==402 - -
package dyn_em_var dyn_opt==502 - -

package not_set mp_physics==-1 - moist:qv,qc,qr,qi,qs,qg;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg
package passiveqv mp_physics==0 - moist:qv;g_moist:g_qv;a_moist:a_qv
package kesslerscheme mp_physics==1 - moist:qv,qc,qr;g_moist:g_qv,g_qc,g_qr;a_moist:a_qv,a_qc,a_qr
package linscheme mp_physics==2 - moist:qv,qc,qr,qi,qs,qg;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg
package wsm3scheme mp_physics==3 - moist:qv,qc,qr;g_moist:g_qv,g_qc,g_qr;a_moist:a_qv,a_qc,a_qr
package wsm5scheme mp_physics==4 - moist:qv,qc,qr,qi,qs;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs
package fer_mp_hires mp_physics==5 - moist:qv,qc,qr,qi;g_moist:g_qv,g_qc,g_qr,g_qi;a_moist:a_qv,a_qc,a_qr,a_qi;scalar:qt
package fer_mp_hires_advect mp_physics==15 - moist:qv,qc,qr,qi;g_moist:g_qv,g_qc,g_qr,g_qi;a_moist:a_qv,a_qc,a_qr,a_qi
package wsm6scheme mp_physics==6 - moist:qv,qc,qr,qi,qs,qg;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg
package gsfcgcescheme mp_physics==7 - moist:qv,qc,qr,qi,qs,qg;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg
package thompson mp_physics==8 - moist:qv,qc,qr,qi,qs,qg;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg;scalar:qni,qnr
package milbrandt2mom mp_physics==9 - moist:qv,qc,qr,qi,qs,qg,qh;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg,g_qh;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg,a_qh;scalar:qnc,qnr,qni,qns,qng,qnh
package morr_two_moment mp_physics==10 - moist:qv,qc,qr,qi,qs,qg;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg;scalar:qni,qns,qnr,qng
package cammgmpscheme mp_physics==11 - moist:qv,qc,qi,qr,qs;g_moist:g_qv,g_qc,g_qi,g_qr,g_qs;a_moist:a_qv,a_qc,a_qi,a_qr,a_qs;scalar:qnc,qni,qnr,qns
#package milbrandt3mom mp_physics==12 - moist:qv,qc,qr,qi,qs,qg,qh;scalar:qnc,qnr,qni,qns,qng,qnh,qzr,qzi,qzs,qzg,qzh
package sbu_ylinscheme mp_physics==13 - moist:qv,qc,qr,qi,qs;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs
package wdm5scheme mp_physics==14 - moist:qv,qc,qr,qi,qs;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs;scalar:qnn,qnc,qnr
package wdm6scheme mp_physics==16 - moist:qv,qc,qr,qi,qs,qg;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg;scalar:qnn,qnc,qnr
package nssl_2mom mp_physics==17 - moist:qv,qc,qr,qi,qs,qg,qh;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg,g_qh;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg,a_qh;scalar:qnc,qnr,qni,qns,qng,qnh,qvolg
package nssl_2momccn mp_physics==18 - moist:qv,qc,qr,qi,qs,qg,qh;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg,g_qh;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg,a_qh;scalar:qnn,qnc,qnr,qni,qns,qng,qnh,qvolg
package nssl_1mom mp_physics==19 - moist:qv,qc,qr,qi,qs,qg,qh;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg,g_qh;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg,a_qh;scalar:qvolg
package nssl_1momlfo mp_physics==21 - moist:qv,qc,qr,qi,qs,qg;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg
package nssl_2momg mp_physics==22 - moist:qv,qc,qr,qi,qs,qg;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg;scalar:qndrop,qnr,qni,qns,qng,qvolg
package thompsonaero mp_physics==28 - moist:qv,qc,qr,qi,qs,qg;g_moist:g_qv,g_qc,g_qr,g_qi,g_qs,g_qg;a_moist:a_qv,a_qc,a_qr,a_qi,a_qs,a_qg;scalar:qni,qnr,qnc
package p3_1category mp_physics==50 - moist:qv,qc,qr,qi;g_moist:g_qv,g_qc,g_qr,g_qi;a_moist:a_qv,a_qc,a_qr,a_qi
package p3_1category_nc mp_physics==51 - moist:qv,qc,qr,qi;g_moist:g_qv,g_qc,g_qr,g_qi;a_moist:a_qv,a_qc,a_qr,a_qi
package etampnew mp_physics==95 - moist:qv,qc,qr,qs;g_moist:g_qv,g_qc,g_qr,g_qs;a_moist:a_qv,a_qc,a_qr,a_qs;scalar:qt
package lscondscheme mp_physics==98 - moist:qv;g_moist:g_qv;a_moist:a_qv
package mkesslerscheme mp_physics==99 - moist:qv,qc,qr;g_moist:g_qv,g_qc,g_qr;a_moist:a_qv,a_qc,a_qr
package mp_phys_zero mp_physics_da==0 - moist:qv
package mp_phys_set mp_physics_da==1 - moist:qv,qc,qr,qi,qs,qg

package nomoist_4dvar mp_physics_da_4dvar==-1 - -
package passiveqv_4dvar mp_physics_da_4dvar==0 - g_moist:g_qv;a_moist:a_qv
package warmrain_4dvar mp_physics_da_4dvar==1 - g_moist:g_qv,g_qc,g_qr;a_moist:a_qv,a_qc,a_qr

package surfdragscheme bl_pbl_physics==98 - -
package ducuscheme cu_physics==98 - -


# only need to specify these once; not for every io_form* variable
# Placeholders for additional packages (we can go beyond zzz
# but that will entail modifying frame/module_io.F and frame/md_calls.m4)
Expand Down Expand Up @@ -841,13 +819,24 @@ state real dummy i dyn_em 1
#
#Set state
state vp_type vv - -
state vp_type vv6 - -
state vp_type vp - -
state vp_type vp6 - -
state ep_type ep - -
state xb_type xb - -
state x_type xa - -
state x_subtype xa_ens - -
state x_type xa_static - -
state x_type x6a - -
state xpose_type xp - -

ifdef VAR4D
state vp_type vv6 - -
state vp_type vp6 - -
state x_type x6a - -
endif

rconfig integer adj_sens_used derived 1 0 - "adj_sens_used" "turn on if adj_sens=true"
rconfig integer var4d_used derived 1 0 - "var4d_used" "turn on if var4d=true"

package no_adj_sens adj_sens_used==0 - -
package do_adj_sens adj_sens_used==1 - state:a_u,a_v,a_t,a_mu,a_ph,g_u,g_v,g_t,g_mu,g_ph;a_moist:a_qv;g_moist:g_qv
package no_var4d var4d_used==0 - -
package do_var4d var4d_used==1 - state:a_u,a_v,a_w,a_ph,a_t,a_mu,a_p,a_z,g_u,g_v,g_w,g_ph,g_t,g_mu,g_p,g_z,a_h_diabatic,g_h_diabatic,a_rainc,g_rainc,a_rainnc,g_rainnc,a_raincv,g_raincv,a_rainncv,g_rainncv
2 changes: 2 additions & 0 deletions var/da/da_main/da_solve.inc
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,10 @@
call da_zero_vp_type (grid%vp)

if ( var4d ) then
#ifdef VAR4D
call da_zero_vp_type (grid%vv6)
call da_zero_vp_type (grid%vp6)
#endif
end if

!---------------------------------------------------------------------------
Expand Down
29 changes: 29 additions & 0 deletions var/da/da_main/da_wrfvar_init2.inc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,35 @@ subroutine da_wrfvar_init2
call da_message(message(1:1))
endif

!mp_physics_da can be 0/1, used for allocating moist variables
!allocate all moist variables (excluding qh) used in DA when mp_physics is on
do i = 1, model_config_rec%max_dom
if ( mp_physics(i) > 0 ) then
model_config_rec%mp_physics_da(i) = 1
else if ( mp_physics(i) == 0 ) then
model_config_rec%mp_physics_da(i) = 0
else if ( mp_physics(i) == -1 ) then
!for DA, if physics_suite is set and mp_physics is not set, mp_physics will be -1
!in this case, also allocate all moist variables
model_config_rec%mp_physics_da(i) = 1
end if
end do

if ( var4d ) then
model_config_rec%var4d_used = 1
!mp_physics_da_4dvar can be 0/1, used for allocating a_moist and g_moist variables
do i = 1, model_config_rec%max_dom
if ( mp_physics(i) > 0 ) then
model_config_rec%mp_physics_da_4dvar(i) = 1
else
model_config_rec%mp_physics_da_4dvar(i) = 0
end if
end do
end if

if ( adj_sens ) then
model_config_rec%adj_sens_used = 1
end if

!<DESCRIPTION>
! Among the configuration variables read from the namelist is
Expand Down
21 changes: 18 additions & 3 deletions var/da/da_minimisation/da_calculate_gradj.inc
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,29 @@ subroutine da_calculate_gradj(it, iter, cv_size, cv_size_jb, cv_size_je, cv_size
if (present(re)) then
call da_calculate_grady(iv, re, jo_grad_y)
if ( iter > 0 .and. test_gradient ) jcdf_flag = .true.
#ifdef VAR4D
call da_transform_vtoy_adj(cv_size, be, grid%ep, grad_jo, iv, &
grid%vp, grid%vv, grid%vp6, grid%vv6, xbx, jo_grad_y, grid, config_flags, jcdf_flag)
grid%vp, grid%vv, xbx, jo_grad_y, grid, config_flags, jcdf_flag, grid%vp6, grid%vv6)
#else
call da_transform_vtoy_adj(cv_size, be, grid%ep, grad_jo, iv, &
grid%vp, grid%vv, xbx, jo_grad_y, grid, config_flags, jcdf_flag)
#endif
else
#ifdef VAR4D
call da_transform_vtoy(cv_size, be, grid%ep, cv, iv, grid%vp, &
grid%vv, xbx, y, grid, config_flags, grid%vp6, grid%vv6)
#else
call da_transform_vtoy(cv_size, be, grid%ep, cv, iv, grid%vp, &
grid%vv, grid%vp6, grid%vv6, xbx, y, grid, config_flags)
grid%vv, xbx, y, grid, config_flags)
#endif
call da_calculate_grady(iv, y, jo_grad_y)
#ifdef VAR4D
call da_transform_vtoy_adj(cv_size, be, grid%ep, grad_jo, iv, &
grid%vp, grid%vv, xbx, jo_grad_y, grid, config_flags, .true., grid%vp6, grid%vv6)
#else
call da_transform_vtoy_adj(cv_size, be, grid%ep, grad_jo, iv, &
grid%vp, grid%vv, grid%vp6, grid%vv6, xbx, jo_grad_y, grid, config_flags, .true.)
grid%vp, grid%vv, xbx, jo_grad_y, grid, config_flags, .true.)
#endif
grad_jo = - grad_jo !! Compensate for sign in calculation of grad_v (Jo)
end if

Expand Down
13 changes: 10 additions & 3 deletions var/da/da_minimisation/da_calculate_j.inc
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,17 @@ subroutine da_calculate_j(it, iter, cv_size, cv_size_jb, cv_size_je, cv_size_jp,

! [1.1] transform from control variable to model grid space:

if (iter > 0) &
if (iter > 0) then
#ifdef VAR4D
call da_transform_vtoy(cv_size, be, grid%ep, xhat, iv, grid%vp, grid%vv,&
xbx, y, &
grid, config_flags, grid%vp6, grid%vv6)
#else
call da_transform_vtoy(cv_size, be, grid%ep, xhat, iv, grid%vp, grid%vv,&
grid%vp6, grid%vv6, xbx, y, &
grid, config_flags )
xbx, y, &
grid, config_flags)
#endif
end if

! [1.2] compute residual (o-a) = (o-b) - h x~

Expand Down
7 changes: 6 additions & 1 deletion var/da/da_minimisation/da_sensitivity.inc
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,13 @@ subroutine da_sensitivity(grid, config_flags, it, cv_size, xbx, be, iv, xhat, qh
call da_allocate_y (iv, ktr)

! Apply observation operator H
#ifdef VAR4D
call da_transform_vtoy(cv_size, be, grid%ep, amat, iv, grid%vp, grid%vv, &
grid%vp6, grid%vv6, xbx, ktr, grid, config_flags)
xbx, ktr, grid, config_flags, grid%vp6, grid%vv6)
#else
call da_transform_vtoy(cv_size, be, grid%ep, amat, iv, grid%vp, grid%vv, &
xbx, ktr, grid, config_flags)
#endif

! Apply R-1 (for Observation Sensitivity) and then Dot Product with initial innovations (for Observation Impact)
call da_obs_sensitivity(ktr, iv)
Expand Down
10 changes: 6 additions & 4 deletions var/da/da_minimisation/da_transform_vtoy.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
subroutine da_transform_vtoy(cv_size, be, ep, cv, iv, vp, vv, vp6, vv6, xbx, &
y, grid, config_flags)
subroutine da_transform_vtoy(cv_size, be, ep, cv, iv, vp, vv, xbx, &
y, grid, config_flags, vp6, vv6)

!----------------------------------------------------------------------
! Purpose: Does transform of control variable (V) to Obs-space (Y)
Expand All @@ -13,14 +13,16 @@ subroutine da_transform_vtoy(cv_size, be, ep, cv, iv, vp, vv, vp6, vv6, xbx, &
real, intent(in) :: cv(1:cv_size) ! control variables.
type(iv_type), intent(inout) :: iv ! innovation vector (o-b).
type(vp_type), intent(inout) :: vp ! Grdipt/level CV.
type(vp_type), intent(inout) :: vp6 ! Grdipt/level CV for 6h.
type(vp_type), intent(inout) :: vv ! Grdipt/EOF CV.
type(vp_type), intent(inout) :: vv6 ! Grdipt/EOF CV for 6h.
type(xbx_type), intent(inout) :: xbx ! For header & non-grid arrays.
type(y_type), intent(inout) :: y ! y = H(x_inc).
type(domain), intent(inout) :: grid
type(grid_config_rec_type), intent(inout) :: config_flags

! vp6 and vv6 are defined only when the code is configured and compiled for 4dvar
type(vp_type), optional, intent(inout) :: vp6 ! Grdipt/level CV for 6h.
type(vp_type), optional, intent(inout) :: vv6 ! Grdipt/EOF CV for 6h.

type(x_type) :: shuffle
integer :: nobwin, jl_start, jl_end, time_step_seconds
integer :: num_subtwindow
Expand Down
10 changes: 6 additions & 4 deletions var/da/da_minimisation/da_transform_vtoy_adj.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
subroutine da_transform_vtoy_adj(cv_size, be, ep, cv, iv, vp, vv, vp6, vv6, xbx, y, &
grid, config_flags, jcdf_flag)
subroutine da_transform_vtoy_adj(cv_size, be, ep, cv, iv, vp, vv, xbx, y, &
grid, config_flags, jcdf_flag, vp6, vv6)

!-------------------------------------------------------------------------
! Purpose: Does Adjoint of control variable (V) transform to Obs-space(Y)
Expand All @@ -13,15 +13,17 @@ subroutine da_transform_vtoy_adj(cv_size, be, ep, cv, iv, vp, vv, vp6, vv6, xbx,
real, intent(out) :: cv(1:cv_size) ! control variables.
type(iv_type), intent(inout) :: iv ! innovation vector (o-b).
type(vp_type), intent(inout) :: vp ! Grdipt/level CV.
type(vp_type), intent(inout) :: vp6 ! Grdipt/level CV for 6h.
type(vp_type), intent(inout) :: vv ! Grdipt/EOF CV.
type(vp_type), intent(inout) :: vv6 ! Grdipt/EOF CV for 6h.
type(xbx_type), intent(inout) :: xbx ! For header & non-grid arrays.
type(y_type), intent(inout) :: y ! y = H(x_inc).
type(domain), intent(inout) :: grid
type(grid_config_rec_type), intent(inout) :: config_flags
logical, intent(in) :: jcdf_flag ! additional flag to switch off JcDF, used to switch off JcDF in calculation of J.

! vp6 and vv6 are defined only when the code is configured and compiled for 4dvar
type(vp_type), optional, intent(inout) :: vp6 ! Grdipt/level CV for 6h.
type(vp_type), optional, intent(inout) :: vv6 ! Grdipt/EOF CV for 6h.

type(x_type) :: shuffle
real :: cv_local(1:cv_size) ! control variables
integer :: nobwin, jl_start, jl_end, time_step_seconds
Expand Down
6 changes: 3 additions & 3 deletions var/da/da_test/da_check_vtoy_adjoint.inc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ subroutine da_check_vtoy_adjoint(cv_size,grid, config_flags, vp, vv, xbx, be, ep
call da_zero_vp_type(vp)
call da_zero_vp_type(vv)

call da_transform_vtoy(cv_size, be, ep, cv, iv, vp, vv, vp, vv, xbx, y, grid, config_flags)
call da_transform_vtoy(cv_size, be, ep, cv, iv, vp, vv, xbx, y, grid, config_flags, vp, vv)

!-------------------------------------------------------------------------
! [3.0] Calculate LHS of adjoint test equation and
Expand All @@ -57,8 +57,8 @@ subroutine da_check_vtoy_adjoint(cv_size,grid, config_flags, vp, vv, xbx, be, ep
! call da_zero_vp_type(vv)
! call da_zero_x(grid%xa)

call da_transform_vtoy_adj(cv_size, be, ep, cv, iv, vp, vv, vp, vv, xbx, y, grid, &
config_flags, .true.)
call da_transform_vtoy_adj(cv_size, be, ep, cv, iv, vp, vv, xbx, y, grid, &
config_flags, .true., vp, vv)

adj_rhs = sum(cv(1:cv_size) * cv_2(1:cv_size))

Expand Down
Loading

0 comments on commit 81ca2ff

Please sign in to comment.