From bfa92e3f742d30189e17516398ccb7fe745e33e4 Mon Sep 17 00:00:00 2001 From: Mariana Vertenstein Date: Sat, 8 Aug 2020 15:14:31 -0600 Subject: [PATCH] more bug fixes --- dice/cime_config/namelist_definition_dice.xml | 2 +- streams/dshr_strdata_mod.F90 | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dice/cime_config/namelist_definition_dice.xml b/dice/cime_config/namelist_definition_dice.xml index 86e4b24d2c..9401e295cc 100644 --- a/dice/cime_config/namelist_definition_dice.xml +++ b/dice/cime_config/namelist_definition_dice.xml @@ -76,7 +76,7 @@ $DIN_LOC_ROOT/ice/dice7/SSMI/ssmi.ifrac.0.5x0.5_ESMFmesh_120520.nc - + $DIN_LOC_ROOT/ocn/iaf/ssmi.ifrac.0.5x0.5_ESMFmesh_120520.nc diff --git a/streams/dshr_strdata_mod.F90 b/streams/dshr_strdata_mod.F90 index 21441bf0a6..a250f7143d 100644 --- a/streams/dshr_strdata_mod.F90 +++ b/streams/dshr_strdata_mod.F90 @@ -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 @@ -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