ESCOMP / ESCOMP/CMEPS

Extending Remapping Background Fill Types

Open
#159 1 comment 0 reactions 1 assignee Claimed by @uturuncoglu View on GitHub
enhancement
Dominant language
Fortran
Stars
35
Forks
106
Avg merge
6d 5h
Merged PRs (30d)
4

Description

@uturuncoglu @mvertens @jedwards4b

Currently we have two background fill types handling unmapped points and they are built directly into the mapping type. We'd like to separate the background fill option from the mapping type. This will allow developers to add new fill types and mapping types independently and users to use more complex combinations.

**Current Background Fill Types**
- nearest neighbor source to destination (nstod)
- mapnstod_consd
- mapnstod_consf
- mapnstod_consd
- constant value
- mapfillv_bilnr

**Pseudo Code**
med_map_mod.F90: subroutine med_map_field
```
subroutine med_map_field(field_src, field_dst, routehandles, maptype, filltype, fldname, rc)
! input/output variables
integer , intent(in) :: filltype
! local variables
type(ESMF_Region_Flag) :: zeroregion

if (filltype == nstod) then
call ESMF_FieldRegrid(field_src, field_dst, routehandle=RouteHandles(mapnstod), termorderflag=ESMF_TERMORDER_SRCSEQ, checkflag=checkflag, zeroregion=ESMF_REGION_TOTAL, rc=rc)
zeroregion = ESMF_REGION_SELECT
else if (filltype == const) then
call ESMF_FieldFill(field_dst, dataFillScheme="const", const1=fillValue, rc=rc)
zeroregion = ESMF_REGION_SELECT
else if (filltype == none) then
zeroregion = ESMF_REGION_TOTAL
else
ERROR - Unsupported filltype
end if ! filltype
if (dbug_flag > 1) then
call Field_diagnose(field_dst, lfldname, " --> after fill: ", rc=rc)
end if

call ESMF_FieldRegrid(field_src, field_dst, routehandle=RouteHandles(maptype), termorderflag=ESMF_TERMORDER_SRCSEQ, checkflag=checkflag, zeroregion=zeroregion, rc=rc)
if (dbug_flag > 1) then
call Field_diagnose(field_dst, lfldname, " --> after remap: ", rc=rc)
end if

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.