diff --git a/route/build/src/init_model_data.f90 b/route/build/src/init_model_data.f90 index c2d126cf..1c745772 100644 --- a/route/build/src/init_model_data.f90 +++ b/route/build/src/init_model_data.f90 @@ -455,12 +455,14 @@ SUBROUTINE init_ntopo(nHRU_out, nRch_out, ! get the variable dimensions ! NOTE: need to update maxPfafLen to the exact character size for pfaf code in netCDF - call get_var_dims(trim(ancil_dir)//trim(fname_ntopOld), & ! input: file name - trim(meta_PFAF(ixPFAF%code)%varName), & ! input: pfaf code variable name in netcdf - ierr, cmessage, & ! output: error control - dlen=dummy) ! output optional: dimension length - if(ierr/=0)then; message=trim(message)//trim(cmessage); return; endif - maxPfafLen = dummy(1) + if (meta_PFAF(ixPFAF%code)%varFile) then + call get_var_dims(trim(ancil_dir)//trim(fname_ntopOld), & ! input: file name + trim(meta_PFAF(ixPFAF%code)%varName), & ! input: pfaf code variable name in netcdf + ierr, cmessage, & ! output: error control + dlen=dummy) ! output optional: dimension length + if(ierr/=0)then; message=trim(message)//trim(cmessage); return; endif + maxPfafLen = dummy(1) + end if call getData(& ! input diff --git a/route/build/src/popMetadat.f90 b/route/build/src/popMetadat.f90 index 5e3121ff..9f95c155 100644 --- a/route/build/src/popMetadat.f90 +++ b/route/build/src/popMetadat.f90 @@ -143,7 +143,7 @@ subroutine popMetadat(err,message) meta_NTOPO (ixNTOPO%goodBasin ) = var_info('goodBasin' , 'flag to define a good basin (1=true)' ,'-' ,ixDims%upSeg , .false.) ! PFAF CODE varName varDesc varUnit, varType, varFile - meta_PFAF (ixPFAF%code ) = var_info('code' , 'pfafstetter code' ,'-' ,ixDims%seg , .true.) + meta_PFAF (ixPFAF%code ) = var_info('code' , 'pfafstetter code' ,'-' ,ixDims%seg , .false.) ! ---------- populate segment fluxes/states metadata structures ----------------------------------------------------------------------------------------------------- ! Reach Flux varName varDesc unit, varType, varDim, writeOut