diff --git a/build/source/actors/FileAccessActor.h b/build/source/actors/FileAccessActor.h index 127966930c5fc3e457b11bbb3d4e5525d0269526..00f2294567665e954d82b0a5ea98e6805c93d9fe 100644 --- a/build/source/actors/FileAccessActor.h +++ b/build/source/actors/FileAccessActor.h @@ -140,6 +140,8 @@ void initalizeFileAccessActor(stateful_actor<file_access_state>* self) { self->quit(); } + aout(self) << "\n\nNumber of timesteps for the simulation = " << self->state.num_steps << "\n"; + read_pinit_C(&err); read_vegitationTables(&err); diff --git a/build/source/actors/HRUActor.h b/build/source/actors/HRUActor.h index 76d0a7633375502b7e076d32f45bb642d9102727..46cd18fd9d3d8c490ae48313a711677f34e01ffc 100644 --- a/build/source/actors/HRUActor.h +++ b/build/source/actors/HRUActor.h @@ -127,6 +127,7 @@ behavior hru_actor(stateful_actor<hru_state>* self, int refGRU, int indxGRU, } self->state.timestep += 1; + self->state.outputStep += 1; // value to monitor how full the output structure is // check if we need more forcing information if (self->state.forcingStep > self->state.stepsInCurrentFFile) { // aout(self) << "Asking for more forcing data" << std::endl; @@ -141,8 +142,7 @@ behavior hru_actor(stateful_actor<hru_state>* self, int refGRU, int indxGRU, self->state.outputStep = 1; break; } - self->state.outputStep += 1; // value to monitor how full the output structure is - + } self->state.end = std::chrono::high_resolution_clock::now(); diff --git a/build/source/driver/summaActors_globalData.f90 b/build/source/driver/summaActors_globalData.f90 index d2acf39929a23f866925584c35568b57a9a2c65d..69e2f7fba341514f5c9de18ec5a2ca0ae206ee05 100755 --- a/build/source/driver/summaActors_globalData.f90 +++ b/build/source/driver/summaActors_globalData.f90 @@ -62,103 +62,103 @@ private public::summa_defineGlobalData contains - subroutine summa_defineGlobalData(err, message) - ! --------------------------------------------------------------------------------------- - ! * desired modules - ! --------------------------------------------------------------------------------------- - ! data types - USE nrtype ! variable types, etc. - ! subroutines and functions: initial priming - USE,intrinsic :: ieee_arithmetic ! IEEE arithmetic (obviously) - ! subroutines and functions: define metadata structures - USE popMetadat_module,only:popMetadat ! module to populate metadata structures - USE flxMapping_module,only:flxMapping ! module to map fluxes to states - USE checkStruc_module,only:checkStruc ! module to check metadata structures - USE childStruc_module,only:childStruc ! module to create a child data structure - ! miscellaneous global data - USE globalData,only:dNaN ! double precision NaN - USE globalData,only:doJacobian ! flag to compute the Jacobian - USE globalData,only:structInfo ! information on the data structures - ! named variables that describe elements of child model structures - USE var_lookup,only:iLookVarType ! look-up values for variable type structure - USE var_lookup,only:childFLUX_MEAN ! look-up values for timestep-average model fluxes - ! --------------------------------------------------------------------------------------- - ! * variables - ! --------------------------------------------------------------------------------------- - implicit none - ! dummy variables - integer(i4b),intent(out) :: err ! error code - character(*),intent(out) :: message ! error message - ! local variables - character(LEN=256) :: cmessage ! error message of downwind routine - logical(lgt), dimension(maxvarFlux) :: flux_mask ! mask defining desired flux variables - logical(lgt), dimension(maxvarForc) :: statForc_mask ! mask defining forc stats - logical(lgt), dimension(maxvarProg) :: statProg_mask ! mask defining prog stats - logical(lgt), dimension(maxvarDiag) :: statDiag_mask ! mask defining diag stats - logical(lgt), dimension(maxvarFlux) :: statFlux_mask ! mask defining flux stats - logical(lgt), dimension(maxvarIndx) :: statIndx_mask ! mask defining indx stats - logical(lgt), dimension(maxvarBvar) :: statBvar_mask ! mask defining bvar stats - integer(i4b) :: iStruct ! index of data structure - ! --------------------------------------------------------------------------------------- - ! initialize error control - err=0; message='summa_defineGlobalData/' - - ! initialize the Jacobian flag - doJacobian=.false. ! initialize the Jacobian flag - - ! define double precision NaNs (shared in globalData) - dNaN = ieee_value(1._dp, ieee_quiet_nan) - - ! populate metadata for all model variables - call popMetadat(err,cmessage) - if(err/=0)then; message=trim(message)//trim(cmessage); return; endif - - ! define mapping between fluxes and states - call flxMapping(err,cmessage) - if(err/=0)then; message=trim(message)//trim(cmessage); return; endif - - ! check data structures - call checkStruc(err,cmessage) - if(err/=0)then; message=trim(message)//trim(cmessage); return; endif - - ! define the mask to identify the subset of variables in the "child" data structure (just scalar variables) - flux_mask = (flux_meta(:)%vartype==iLookVarType%scalarv) - - ! create the averageFlux metadata structure - call childStruc(flux_meta, flux_mask, averageFlux_meta, childFLUX_MEAN, err, cmessage) - if(err/=0)then; message=trim(message)//trim(cmessage); return; endif - - ! child metadata structures - so that we do not carry full stats structures around everywhere - ! only carry stats for variables with output frequency > model time step - statForc_mask = (forc_meta(:)%vartype==iLookVarType%scalarv.and.forc_meta(:)%varDesire) - statProg_mask = (prog_meta(:)%vartype==iLookVarType%scalarv.and.prog_meta(:)%varDesire) - statDiag_mask = (diag_meta(:)%vartype==iLookVarType%scalarv.and.diag_meta(:)%varDesire) - statFlux_mask = (flux_meta(:)%vartype==iLookVarType%scalarv.and.flux_meta(:)%varDesire) - statIndx_mask = (indx_meta(:)%vartype==iLookVarType%scalarv.and.indx_meta(:)%varDesire) - statBvar_mask = (bvar_meta(:)%vartype==iLookVarType%scalarv.and.bvar_meta(:)%varDesire) - - ! create the stats metadata structures - do iStruct=1,size(structInfo) - select case (trim(structInfo(iStruct)%structName)) - case('forc'); call childStruc(forc_meta,statForc_mask,statForc_meta,forcChild_map,err,cmessage) - case('prog'); call childStruc(prog_meta,statProg_mask,statProg_meta,progChild_map,err,cmessage) - case('diag'); call childStruc(diag_meta,statDiag_mask,statDiag_meta,diagChild_map,err,cmessage) - case('flux'); call childStruc(flux_meta,statFlux_mask,statFlux_meta,fluxChild_map,err,cmessage) - case('indx'); call childStruc(indx_meta,statIndx_mask,statIndx_meta,indxChild_map,err,cmessage) - case('bvar'); call childStruc(bvar_meta,statBvar_mask,statBvar_meta,bvarChild_map,err,cmessage) - end select - ! check errors - if(err/=0)then; message=trim(message)//trim(cmessage)//'[statistics for = '//trim(structInfo(iStruct)%structName)//']'; return; endif - end do ! iStruct - - ! set all stats metadata to correct var types - statForc_meta(:)%vartype = iLookVarType%outstat - statProg_meta(:)%vartype = iLookVarType%outstat - statDiag_meta(:)%vartype = iLookVarType%outstat - statFlux_meta(:)%vartype = iLookVarType%outstat - statIndx_meta(:)%vartype = iLookVarType%outstat - statBvar_meta(:)%vartype = iLookVarType%outstat - - end subroutine summa_defineGlobalData +subroutine summa_defineGlobalData(err, message) + ! --------------------------------------------------------------------------------------- + ! * desired modules + ! --------------------------------------------------------------------------------------- + ! data types + USE nrtype ! variable types, etc. + ! subroutines and functions: initial priming + USE,intrinsic :: ieee_arithmetic ! IEEE arithmetic (obviously) + ! subroutines and functions: define metadata structures + USE popMetadat_module,only:popMetadat ! module to populate metadata structures + USE flxMapping_module,only:flxMapping ! module to map fluxes to states + USE checkStruc_module,only:checkStruc ! module to check metadata structures + USE childStruc_module,only:childStruc ! module to create a child data structure + ! miscellaneous global data + USE globalData,only:dNaN ! double precision NaN + USE globalData,only:doJacobian ! flag to compute the Jacobian + USE globalData,only:structInfo ! information on the data structures + ! named variables that describe elements of child model structures + USE var_lookup,only:iLookVarType ! look-up values for variable type structure + USE var_lookup,only:childFLUX_MEAN ! look-up values for timestep-average model fluxes + ! --------------------------------------------------------------------------------------- + ! * variables + ! --------------------------------------------------------------------------------------- + implicit none + ! dummy variables + integer(i4b),intent(out) :: err ! error code + character(*),intent(out) :: message ! error message + ! local variables + character(LEN=256) :: cmessage ! error message of downwind routine + logical(lgt), dimension(maxvarFlux) :: flux_mask ! mask defining desired flux variables + logical(lgt), dimension(maxvarForc) :: statForc_mask ! mask defining forc stats + logical(lgt), dimension(maxvarProg) :: statProg_mask ! mask defining prog stats + logical(lgt), dimension(maxvarDiag) :: statDiag_mask ! mask defining diag stats + logical(lgt), dimension(maxvarFlux) :: statFlux_mask ! mask defining flux stats + logical(lgt), dimension(maxvarIndx) :: statIndx_mask ! mask defining indx stats + logical(lgt), dimension(maxvarBvar) :: statBvar_mask ! mask defining bvar stats + integer(i4b) :: iStruct ! index of data structure + ! --------------------------------------------------------------------------------------- + ! initialize error control + err=0; message='summa_defineGlobalData/' + + ! initialize the Jacobian flag + doJacobian=.false. ! initialize the Jacobian flag + + ! define double precision NaNs (shared in globalData) + dNaN = ieee_value(1._dp, ieee_quiet_nan) + + ! populate metadata for all model variables + call popMetadat(err,cmessage) + if(err/=0)then; message=trim(message)//trim(cmessage); return; endif + + ! define mapping between fluxes and states + call flxMapping(err,cmessage) + if(err/=0)then; message=trim(message)//trim(cmessage); return; endif + + ! check data structures + call checkStruc(err,cmessage) + if(err/=0)then; message=trim(message)//trim(cmessage); return; endif + + ! define the mask to identify the subset of variables in the "child" data structure (just scalar variables) + flux_mask = (flux_meta(:)%vartype==iLookVarType%scalarv) + + ! create the averageFlux metadata structure + call childStruc(flux_meta, flux_mask, averageFlux_meta, childFLUX_MEAN, err, cmessage) + if(err/=0)then; message=trim(message)//trim(cmessage); return; endif + + ! child metadata structures - so that we do not carry full stats structures around everywhere + ! only carry stats for variables with output frequency > model time step + statForc_mask = (forc_meta(:)%vartype==iLookVarType%scalarv.and.forc_meta(:)%varDesire) + statProg_mask = (prog_meta(:)%vartype==iLookVarType%scalarv.and.prog_meta(:)%varDesire) + statDiag_mask = (diag_meta(:)%vartype==iLookVarType%scalarv.and.diag_meta(:)%varDesire) + statFlux_mask = (flux_meta(:)%vartype==iLookVarType%scalarv.and.flux_meta(:)%varDesire) + statIndx_mask = (indx_meta(:)%vartype==iLookVarType%scalarv.and.indx_meta(:)%varDesire) + statBvar_mask = (bvar_meta(:)%vartype==iLookVarType%scalarv.and.bvar_meta(:)%varDesire) + + ! create the stats metadata structures + do iStruct=1,size(structInfo) + select case (trim(structInfo(iStruct)%structName)) + case('forc'); call childStruc(forc_meta,statForc_mask,statForc_meta,forcChild_map,err,cmessage) + case('prog'); call childStruc(prog_meta,statProg_mask,statProg_meta,progChild_map,err,cmessage) + case('diag'); call childStruc(diag_meta,statDiag_mask,statDiag_meta,diagChild_map,err,cmessage) + case('flux'); call childStruc(flux_meta,statFlux_mask,statFlux_meta,fluxChild_map,err,cmessage) + case('indx'); call childStruc(indx_meta,statIndx_mask,statIndx_meta,indxChild_map,err,cmessage) + case('bvar'); call childStruc(bvar_meta,statBvar_mask,statBvar_meta,bvarChild_map,err,cmessage) + end select + ! check errors + if(err/=0)then; message=trim(message)//trim(cmessage)//'[statistics for = '//trim(structInfo(iStruct)%structName)//']'; return; endif + end do ! iStruct + + ! set all stats metadata to correct var types + statForc_meta(:)%vartype = iLookVarType%outstat + statProg_meta(:)%vartype = iLookVarType%outstat + statDiag_meta(:)%vartype = iLookVarType%outstat + statFlux_meta(:)%vartype = iLookVarType%outstat + statIndx_meta(:)%vartype = iLookVarType%outstat + statBvar_meta(:)%vartype = iLookVarType%outstat + +end subroutine summa_defineGlobalData end module summa_globalData diff --git a/build/source/engine/childStruc.f90 b/build/source/engine/childStruc.f90 index 01061eebcd7f104c2730eb1f1f9be40f4557caa3..bc7c974c8330241e2f3dd217a58f6217a6f3d05e 100755 --- a/build/source/engine/childStruc.f90 +++ b/build/source/engine/childStruc.f90 @@ -29,57 +29,57 @@ public::childStruc contains - ! ************************************************************************************************ - ! public subroutine childStruc: create a child data structure - ! ************************************************************************************************ - subroutine childStruc(metaParent,mask, & ! input - metaChild,parent2child_map,err,message) ! output - USE data_types,only:var_info ! data type for the metadata structure - USE data_types,only:extended_info ! data type for the extended metadata structure - implicit none - ! input variables - type(var_info),intent(in) :: metaParent(:) ! parent metadata structure - logical(lgt),intent(in) :: mask(:) ! variables desired - ! output variables - type(extended_info),allocatable,intent(out) :: metaChild(:) ! child metadata structure - integer(i4b),allocatable,intent(out) :: parent2child_map(:) ! index of the child variable - integer(i4b),intent(out) :: err ! error code - character(*),intent(out) :: message ! error message - ! local variables - integer(i4b) :: nParent ! number of elements in the parent data structure - integer(i4b) :: nChild ! number of elements in the child data structure - ! ----------------------------------------------------------------------------------------------------------------------------------- - ! initialize errors - err=0; message="childStruc/" +! ************************************************************************************************ +! public subroutine childStruc: create a child data structure +! ************************************************************************************************ +subroutine childStruc(metaParent,mask, & ! input + metaChild,parent2child_map,err,message) ! output + USE data_types,only:var_info ! data type for the metadata structure + USE data_types,only:extended_info ! data type for the extended metadata structure + implicit none + ! input variables + type(var_info),intent(in) :: metaParent(:) ! parent metadata structure + logical(lgt),intent(in) :: mask(:) ! variables desired + ! output variables + type(extended_info),allocatable,intent(out) :: metaChild(:) ! child metadata structure + integer(i4b),allocatable,intent(out) :: parent2child_map(:) ! index of the child variable + integer(i4b),intent(out) :: err ! error code + character(*),intent(out) :: message ! error message + ! local variables + integer(i4b) :: nParent ! number of elements in the parent data structure + integer(i4b) :: nChild ! number of elements in the child data structure + ! ----------------------------------------------------------------------------------------------------------------------------------- + ! initialize errors + err=0; message="childStruc/" - ! check the size of the input structures - nParent = size(metaParent) - if(size(mask)/=nParent)then - message=trim(message)//'size of mask vector does not match the size of the parent structure' - err=20; return - end if + ! check the size of the input structures + nParent = size(metaParent) + if(size(mask)/=nParent)then + message=trim(message)//'size of mask vector does not match the size of the parent structure' + err=20; return + end if - ! allocate space for the child metadata structure - nChild = count(mask) - if(allocated(metaChild)) deallocate(metaChild) - allocate(metaChild(nChild),stat=err) - if(err/=0)then - message=trim(message)//'problem allocating space for the child metadata structure' - err=20; return - end if + ! allocate space for the child metadata structure + nChild = count(mask) + if(allocated(metaChild)) deallocate(metaChild) + allocate(metaChild(nChild),stat=err) + if(err/=0)then + message=trim(message)//'problem allocating space for the child metadata structure' + err=20; return + end if - ! define mapping with the parent data structure - metaChild(:)%ixParent = pack(arth(1,1,nParent), mask) + ! define mapping with the parent data structure + metaChild(:)%ixParent = pack(arth(1,1,nParent), mask) - ! copy across the metadata from the parent structure - metaChild(:)%var_info = metaParent(metaChild(:)%ixParent) + ! copy across the metadata from the parent structure + metaChild(:)%var_info = metaParent(metaChild(:)%ixParent) - ! allows to map from the parent to the child - must carry this around outside - if(allocated(parent2child_map)) then; err=20; message=trim(message)//'child map already allocated'; return; end if; - allocate(parent2child_map(nParent)) - parent2child_map(:) = integerMissing - if(nChild>0) parent2child_map(metaChild(:)%ixParent) = arth(1,1,nChild) + ! allows to map from the parent to the child - must carry this around outside + if(allocated(parent2child_map)) then; err=20; message=trim(message)//'child map already allocated'; return; end if; + allocate(parent2child_map(nParent)) + parent2child_map(:) = integerMissing + if(nChild>0) parent2child_map(metaChild(:)%ixParent) = arth(1,1,nChild) - end subroutine childStruc +end subroutine childStruc end module childStruc_module diff --git a/build/source/engine/read_forcingActors.f90 b/build/source/engine/read_forcingActors.f90 index f53df549072ea00fd9de256f869c2822877364ff..17b2b1a969e33ca8deb319d835e5f9f1b7ea1131 100755 --- a/build/source/engine/read_forcingActors.f90 +++ b/build/source/engine/read_forcingActors.f90 @@ -188,9 +188,6 @@ subroutine read_forcingActors(& ! set timing of current forcing vector (in seconds since reference day) ! NOTE: It is a bit silly to have time information for each HRU and GRU forcStruct%var(iLookFORCE%time) = (currentJulday-refJulday)*secprday - ! if(indxGRU == 3)then - ! print*, "time = ", forcStruct%var(iLookFORCE%time), "iStep = ", iStep - ! endif ! compute the number of days in the current year yearLength = 365 diff --git a/build/source/hookup/summaActors_FileManager.f90 b/build/source/hookup/summaActors_FileManager.f90 index 4963369fe0cb3b30f3f3ab2adfed4f733dbfba10..041984fe422944b5a5fa490df1c25571f8195614 100755 --- a/build/source/hookup/summaActors_FileManager.f90 +++ b/build/source/hookup/summaActors_FileManager.f90 @@ -114,37 +114,37 @@ subroutine summa_SetTimesDirsAndFiles(summaFileManagerIn,err,message) ! assign entries from control file to module public variables; add checking as needed select case(trim(option)) - case('controlVersion' ); + case('controlVersion' ); CONTROL_VRS = trim(varEntry); if(trim(varEntry)/=trim(summaFileManagerHeader)) then message=trim(message)//"unknown control file version in '"//trim(summaFileManagerIn)//" looking for "//trim(summaFileManagerHeader) err=20 return end if - case('simStartTime' ); SIM_START_TM = trim(varEntry) ! start simulation time - case('simEndTime' ); SIM_END_TM = trim(varEntry) ! end simulation time - case('tmZoneInfo' ); NC_TIME_ZONE = trim(varEntry) ! time zone info - case('settingsPath' ); SETTINGS_PATH = trim(varEntry) ! settings directory - case('forcingPath' ); FORCING_PATH = trim(varEntry) ! input forcing directory - case('outputPath' ); OUTPUT_PATH = trim(varEntry) ! output directory - case('forcingFreq' ); FORCING_FREQ = trim(varEntry) ! Frequency of forcing files (input) - case('forcingStart' ); FORCING_START = trim(varEntry) ! number of forcing files - case('statePath' ); STATE_PATH = trim(varEntry) ! state file input/output directory - case('decisionsFile' ); M_DECISIONS = trim(varEntry) ! model decisions file - case('outputControlFile' ); OUTPUT_CONTROL = trim(varEntry) ! output control file - case('globalHruParamFile' ); LOCALPARAM_INFO = trim(varEntry) ! default/global hru-level param file - case('globalGruParamFile' ); BASINPARAM_INFO = trim(varEntry) ! default/global gru-level param file - case('attributeFile' ); LOCAL_ATTRIBUTES = trim(varEntry) ! attribute file - case('trialParamFile' ); PARAMETER_TRIAL = trim(varEntry) ! trial parameters file (hru and/or gru) - case('vegTableFile' ); VEGPARM = trim(varEntry) ! vegetation parameter table - case('soilTableFile' ); SOILPARM = trim(varEntry) ! soil parameter table - case('generalTableFile' ); GENPARM = trim(varEntry) ! general parameter table - case('noahmpTableFile' ); MPTABLE = trim(varEntry) ! noah mp parameter table - case('forcingListFile' ); FORCING_FILELIST = trim(varEntry) ! file listing forcing filenames - case('initConditionFile' ); MODEL_INITCOND = trim(varEntry) ! initial conditions file (cold State) - case('outFilePrefix' ); OUTPUT_PREFIX = trim(varEntry) ! filename root for output files - ! get to here if cannot find the variable - case default + case('simStartTime' ); SIM_START_TM = trim(varEntry) ! start simulation time + case('simEndTime' ); SIM_END_TM = trim(varEntry) ! end simulation time + case('tmZoneInfo' ); NC_TIME_ZONE = trim(varEntry) ! time zone info + case('settingsPath' ); SETTINGS_PATH = trim(varEntry) ! settings directory + case('forcingPath' ); FORCING_PATH = trim(varEntry) ! input forcing directory + case('outputPath' ); OUTPUT_PATH = trim(varEntry) ! output directory + case('forcingFreq' ); FORCING_FREQ = trim(varEntry) ! Frequency of forcing files (input) + case('forcingStart' ); FORCING_START = trim(varEntry) ! number of forcing files + case('statePath' ); STATE_PATH = trim(varEntry) ! state file input/output directory + case('decisionsFile' ); M_DECISIONS = trim(varEntry) ! model decisions file + case('outputControlFile' ); OUTPUT_CONTROL = trim(varEntry) ! output control file + case('globalHruParamFile' ); LOCALPARAM_INFO = trim(varEntry) ! default/global hru-level param file + case('globalGruParamFile' ); BASINPARAM_INFO = trim(varEntry) ! default/global gru-level param file + case('attributeFile' ); LOCAL_ATTRIBUTES = trim(varEntry) ! attribute file + case('trialParamFile' ); PARAMETER_TRIAL = trim(varEntry) ! trial parameters file (hru and/or gru) + case('vegTableFile' ); VEGPARM = trim(varEntry) ! vegetation parameter table + case('soilTableFile' ); SOILPARM = trim(varEntry) ! soil parameter table + case('generalTableFile' ); GENPARM = trim(varEntry) ! general parameter table + case('noahmpTableFile' ); MPTABLE = trim(varEntry) ! noah mp parameter table + case('forcingListFile' ); FORCING_FILELIST = trim(varEntry) ! file listing forcing filenames + case('initConditionFile' ); MODEL_INITCOND = trim(varEntry) ! initial conditions file (cold State) + case('outFilePrefix' ); OUTPUT_PREFIX = trim(varEntry) ! filename root for output files + ! get to here if cannot find the variable + case default err=10; message=trim(message)//"unknown control file option: "//trim(option); return end select end do diff --git a/utils/netcdf/compareOutput.py b/utils/netcdf/compareOutput.py index 7d743b1acdeeab1b04e15612fb60e5c9f215a1f9..69fba28df215b13c868d63cffc1cec5c075c15f2 100644 --- a/utils/netcdf/compareOutput.py +++ b/utils/netcdf/compareOutput.py @@ -3,7 +3,7 @@ from os.path import isfile, join from pathlib import Path import xarray as xr -numHRU = 10 +numHRU = 1 time = 'time' scalarSWE = 'scalarSWE' @@ -28,10 +28,9 @@ varList = [time, scalarSWE, scalarCanopyWat, scalarAquiferStorage, scalarTotalSo scalarTotalET, scalarTotalRunoff, scalarNetRadiation] # varList = [time, scalarSWE] -time = "day" -filename = "out_{}.txt".format(time) -originalPath = Path('/scratch/gwf/gwf_cmt/kck540/summaActors/netcdf/SummaActors_G000001-000010_{}.nc'.format(time)) -actorsPath = Path('/scratch/gwf/gwf_cmt/kck540/summaActors/netcdf/SummaActorsGRU1-10_{}.nc'.format(time)) +filename = "out.txt" +originalPath = Path('/home/k13nk/SummaProject/output/originalBench/SummaOriginal_G000001-000001_timestep.nc') +actorsPath = Path('/home/k13nk/SummaProject/output/testOutput/SummaActorsTestGRU1-1_timestep.nc') originalDataset = xr.open_dataset(originalPath) actorsDataset = xr.open_dataset(actorsPath) @@ -69,8 +68,8 @@ for i in range(0, numHRU): diff = dataOrig[a] - dataAct[a] if diff < -marginOfError or diff > marginOfError: file.write("{}: {} = Actor and {} = original is different: {}\n".format(a, dataAct[a], dataOrig[a], abs(dataAct[a] - dataOrig[a]))) - else: - file.write("{}: {} = Actor and {} = original is the same\n".format(a, dataAct[a], dataOrig[a])) + # else: + # file.write("{}: {} = Actor and {} = original is the same\n".format(a, dataAct[a], dataOrig[a]))