From fbb8ef5c0590af68defbd1faef95a227ec6be459 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Sat, 19 Nov 2022 14:38:39 -0700 Subject: [PATCH] save work --- mediator/med_map_mod.F90 | 12 +++++++----- mediator/med_phases_prep_rof_mod.F90 | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mediator/med_map_mod.F90 b/mediator/med_map_mod.F90 index 6b8142a0f..d2e5b3057 100644 --- a/mediator/med_map_mod.F90 +++ b/mediator/med_map_mod.F90 @@ -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 @@ -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(:) @@ -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)) & diff --git a/mediator/med_phases_prep_rof_mod.F90 b/mediator/med_phases_prep_rof_mod.F90 index f332fbad0..47430d685 100644 --- a/mediator/med_phases_prep_rof_mod.F90 +++ b/mediator/med_phases_prep_rof_mod.F90 @@ -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