Skip to content

Commit

Permalink
save work
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Nov 19, 2022
1 parent cc86157 commit fbb8ef5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions mediator/med_map_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -713,10 +713,10 @@ end function med_map_RH_is_created_RH1d

!================================================================================
subroutine med_map_packed_field_create(destcomp, flds_scalar_name, &
fldsSrc, FBSrc, FBDst, packed_data, rc)
fieldsSrc, FBSrc, FBDst, packed_data, rc)

use ESMF
use esmFlds , only : med_fldList_entry_type
use esmFlds , only : med_fldList_entry_type, med_fldList_getNumFlds
use med_internalstate_mod , only : nmappers
use med_internalstate_mod , only : ncomps, compatm, compice, compocn, compname, mapnames
use med_internalstate_mod , only : packed_data_type
Expand All @@ -743,6 +743,7 @@ subroutine med_map_packed_field_create(destcomp, flds_scalar_name, &
type(ESMF_Mesh) :: lmesh_src
type(ESMF_Mesh) :: lmesh_dst
integer :: mapindex
integer :: numFlds
type(ESMF_Field), pointer :: fieldlist_src(:)
type(ESMF_Field), pointer :: fieldlist_dst(:)
character(CL), allocatable :: fieldNameList(:)
Expand Down Expand Up @@ -798,16 +799,17 @@ subroutine med_map_packed_field_create(destcomp, flds_scalar_name, &
! Loop over source field bundle
do nf = 1, fieldCount
! Loop over the fldsSrc types
numflds = med_fldlist_GetNumFlds(fldsSrc)

numflds = med_fldlist_GetNumFlds(fieldsSrc)
do ns = 1,numflds
! Note that fieldnamelist is an array of names for the source fields
! The assumption is that there is only one mapping normalization
! for any given mapping type
call med_fldList_GetFldInfo(fldsSrc, ns, compsrc=destcomp, shortname=shortname, mapindex=destindex)
call med_fldList_GetFldInfo(fieldsSrc, ns, compsrc=destcomp, shortname=shortname, mapindex=destindex)
if ( destindex == mapindex .and. &
trim(shortname) == trim(fieldnamelist(nf))) then
! Set the normalization to the input
call med_FldList_GetFldInfo(fldsSrc, ns, compsrc=destcomp, mapnorm=packed_data(mapindex)%mapnorm=mapnorm)
call med_FldList_GetFldInfo(fieldsSrc, ns, compsrc=destcomp, mapnorm=packed_data(mapindex)%mapnorm=mapnorm)
if (mapnorm_mapindex == 'not_set') then
mapnorm_mapindex = packed_data(mapindex)%mapnorm
write(tmpstr,*)'Map type '//trim(mapnames(mapindex)) &
Expand Down
2 changes: 1 addition & 1 deletion mediator/med_phases_prep_rof_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ subroutine med_phases_prep_rof_init(gcomp, rc)
! Create packed mapping from rof->lnd
call med_map_packed_field_create(destcomp=comprof, &
flds_scalar_name=is_local%wrap%flds_scalar_name, &
fldsSrc=med_fldlist_getfldListFr(complnd), &
fldsSrc=fldList, &
FBSrc=FBLndAccum2rof_l, FBDst=FBLndAccum2rof_r, &
packed_data=is_local%wrap%packed_data(complnd,comprof,:), rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
Expand Down

0 comments on commit fbb8ef5

Please sign in to comment.