Title: MPP vs Adjoint MPP
1 Adjointing the MOM4 MPP Package Benny
Cheng NASA JPL Oceans Element
2 Routines to be adjointed
- mpp_global_sum (self-adjoint)
- mpp_update_domains
3mpp_update_domains
mpp_update_domains_ad
do list 0,n-1 m mod(
domainpos-listn, n) if( .NOT.domainlist(m)
overlap )cycle to_pe domainlist(m)p
pos buffer_pos if( recv_e .AND.
domainlist(m)recv_eoverlap )then is
domainlist(m)recv_eis ie domainlist(m)recv
_eie js domainlist(m)recv_ejs je
domainlist(m)recv_eje if(
grid_offset_type.NE.AGRID)then is
domainlist(m)recv_e_offis ie
domainlist(m)recv_e_offie js
domainlist(m)recv_e_offjs je
domainlist(m)recv_e_offje end
if do k 1,ke do j
js,je do i is,ie
pos pos 1
buffer(pos) field(i,j,k)
field(i,j,k) 0. end do
end do end do end
if .......
call mpp_send( buffer(buffer_pos1),
plenmsgsize, to_peto_pe ) .......
enddo
-
- do list 0,n-1
- m mod( domainposlist, n)
- if( .NOT.domainlist(m)overlap )cycle
- to_pe domainlist(m)p
- pos buffer_pos
- if( send_w .AND. domainlist(m)send_woverlap
)then - is domainlist(m)send_wis ie
domainlist(m)send_wie - js domainlist(m)send_wjs je
domainlist(m)send_wje - if( grid_offset_type.NE.AGRID)then
- is domainlist(m)send_w_offis
- ie domainlist(m)send_w_offie
- js domainlist(m)send_w_offjs
- je domainlist(m)send_w_offje
- end if
4(No Transcript)