Skip to content

Commit

Permalink
more bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariana Vertenstein committed Aug 8, 2020
1 parent 54b6bb7 commit bfa92e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dice/cime_config/namelist_definition_dice.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<value stream="ssmi$">
$DIN_LOC_ROOT/ice/dice7/SSMI/ssmi.ifrac.0.5x0.5_ESMFmesh_120520.nc
</value>
<value stream="ssmi_IAF">
<value stream="ssmi_iaf">
$DIN_LOC_ROOT/ocn/iaf/ssmi.ifrac.0.5x0.5_ESMFmesh_120520.nc
</value>
</values>
Expand Down
12 changes: 8 additions & 4 deletions streams/dshr_strdata_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ subroutine shr_strdata_init(sdat, model_clock, rc)
call shr_sys_abort(subName//"ERROR: file does not exist: "//trim(fileName))
end if
endif
if(filename /= 'none') then
if (filename /= 'none') then
sdat%pstrm(ns)%stream_mesh = ESMF_MeshCreate(trim(filename), fileformat=ESMF_FILEFORMAT_ESMFMESH, rc=rc)
endif
if (ChkErr(rc,__LINE__,u_FILE_u)) return
Expand Down Expand Up @@ -1363,19 +1363,23 @@ subroutine shr_strdata_readstrm(sdat, ns, stream, stream_mesh, &
call shr_sys_abort(subName//"ERROR: only double, real and short types are supported for stream read")
end if

if(associated(dataptr2d_src) .and. trim(fldlist_model(nf)) .eq. uname) then
if (associated(dataptr2d_src) .and. trim(fldlist_model(nf)) .eq. uname) then
! save in dataptr2d_src
dataptr2d_src(1,:) = dataptr(:)
elseif(associated(dataptr2d_src) .and. trim(fldlist_model(nf)) .eq. vname) then
else if (associated(dataptr2d_src) .and. trim(fldlist_model(nf)) .eq. vname) then
! save in dataptr2d_src
dataptr2d_src(2,:) = dataptr(:)
else if (pio_iodesc_set) then
! regrid the data
call dshr_fldbun_getfieldN(fldbun_model, nf, field_dst, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return

call ESMF_FieldRegrid(sdat%pstrm(ns)%field_stream, field_dst, routehandle=sdat%pstrm(ns)%routehandle, &
termorderflag=ESMF_TERMORDER_SRCSEQ, checkflag=.false., zeroregion=ESMF_REGION_TOTAL, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
else
! fill the data
call dshr_fldbun_getfieldN(fldbun_model, nf, field_dst, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call ESMF_FieldFill(field_dst, dataFillScheme="const", const1=dataptr(1), rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
endif
Expand Down

0 comments on commit bfa92e3

Please sign in to comment.