Skip to content

Commit b8275cb

Browse files
Yujin ZengYujin Zeng
authored andcommitted
location of tile_pfaf_file changed
1 parent 973e59c commit b8275cb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSroute_GridComp/GEOS_RouteGridComp.F90

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,6 @@ subroutine INITIALIZE (GC,IMPORT, EXPORT, CLOCK, RC )
456456
type(MAPL_LocStream) :: locstream, pfaf_LocStream
457457

458458
character(len=ESMF_MAXSTR) :: RIVER_INPUT_FILE
459-
character(len=ESMF_MAXSTR) :: TILE_PFAF_FILE
460459

461460
type(ESMF_Grid) :: agrid
462461
type(ESMF_DELayout) :: layout
@@ -615,8 +614,7 @@ subroutine INITIALIZE (GC,IMPORT, EXPORT, CLOCK, RC )
615614
route%reservoir = Reservoir(GC, use_res, _RC)
616615
if(mapl_am_I_root()) print *,"reservoir init success"
617616

618-
call MAPL_GetResource (MAPL, TILE_PFAF_File, label = 'TILE_PFAF_FILE:', default = '../input/tile_pfaf.nc4', RC=STATUS )
619-
call create_mapping_handler(trim(TILE_PFAF_File), tilegrid, pfaf_tilegrid, _RC)
617+
call create_mapping_handler(tilegrid, pfaf_tilegrid, _RC)
620618
call setup_exchange_water(pfaf_tilegrid, _RC)
621619

622620
RETURN_(ESMF_SUCCESS)
@@ -659,9 +657,8 @@ end function create_pfaf_grid
659657

660658
! ----------------------------------------------------
661659

662-
subroutine create_mapping_handler(tile_pfaf_file, tilegrid, pfaf_tilegrid, rc)
660+
subroutine create_mapping_handler(tilegrid, pfaf_tilegrid, rc)
663661

664-
character(*), intent(in) :: tile_pfaf_file
665662
type(ESMF_Grid), intent(in) :: tilegrid
666663
type(ESMF_Grid), intent(in) :: pfaf_tilegrid
667664
integer, optional, intent(out) :: rc
@@ -679,6 +676,7 @@ subroutine create_mapping_handler(tile_pfaf_file, tilegrid, pfaf_tilegrid, rc)
679676
type(Netcdf4_Fileformatter) :: formatter
680677
type(Filemetadata) :: meta
681678
character(len=MAPL_TileNameLength), pointer :: GNAMES(:)
679+
character(len=ESMF_MAXSTR) :: tile_pfaf_file
682680

683681
! create source for orignal tile space
684682
route%field_src = ESMF_FieldCreate(grid=tilegrid, typekind=ESMF_TYPEKIND_R4, _RC)
@@ -695,6 +693,7 @@ subroutine create_mapping_handler(tile_pfaf_file, tilegrid, pfaf_tilegrid, rc)
695693

696694
if (index(GNAMES(1), 'EASEv') /=0) then
697695

696+
call MAPL_GetResource (MAPL, tile_pfaf_file, label = 'TILE_PFAF_FILE:', default = '../input/tile_pfaf.nc4', RC=STATUS )
698697
if (MAPL_AM_I_ROOT()) then
699698
call formatter%open(tile_pfaf_file, PFIO_READ, _RC)
700699
meta = formatter%read(rc=status)

0 commit comments

Comments
 (0)