diff --git a/build/source/actors/file_access_actor/fortran_code/output_structure.f90 b/build/source/actors/file_access_actor/fortran_code/output_structure.f90 index 8f0da6c06f27c25cadca4f8c771c559ccd5aa113..71581fa0cd0d80e187e9cb5e74adf7a3597ca015 100644 --- a/build/source/actors/file_access_actor/fortran_code/output_structure.f90 +++ b/build/source/actors/file_access_actor/fortran_code/output_structure.f90 @@ -271,39 +271,7 @@ subroutine deallocateOutputStructure(err) bind(C, name="deallocateOutputStructur integer(i4b), intent(inout) :: err err = 0 - ! Time deallocate(outputStructure) - ! call deallocateData_output(outputStructure(1)%timeStruct(1)); deallocate(outputStructure(1)%timeStruct) - ! ! Forc - ! call deallocateData_output(outputStructure(1)%forcStat(1)); deallocate(outputStructure(1)%forcStat) - ! call deallocateData_output(outputStructure(1)%forcStruct(1)); deallocate(outputStructure(1)%forcStruct) - ! ! prog - ! call deallocateData_output(outputStructure(1)%progStat(1)); deallocate(outputStructure(1)%progStat) - ! call deallocateData_output(outputStructure(1)%progStruct(1)); deallocate(outputStructure(1)%progStruct) - ! ! diag - ! call deallocateData_output(outputStructure(1)%diagStat(1)); deallocate(outputStructure(1)%diagStat) - ! call deallocateData_output(outputStructure(1)%diagStruct(1)); deallocate(outputStructure(1)%diagStruct) - ! ! flux - ! call deallocateData_output(outputStructure(1)%fluxStat(1)); deallocate(outputStructure(1)%fluxStat) - ! call deallocateData_output(outputStructure(1)%fluxStruct(1)); deallocate(outputStructure(1)%fluxStruct) - ! ! indx - ! call deallocateData_output(outputStructure(1)%indxStat(1)); deallocate(outputStructure(1)%indxStat) - ! call deallocateData_output(outputStructure(1)%indxStruct(1)); deallocate(outputStructure(1)%indxStruct) - ! ! bvar - ! call deallocateData_output(outputStructure(1)%bvarStat(1)); deallocate(outputStructure(1)%bvarStat) - ! call deallocateData_output(outputStructure(1)%bvarStruct(1)); deallocate(outputStructure(1)%bvarStruct) - ! ! id - ! call deallocateData_output(outputStructure(1)%idStruct(1)); deallocate(outputStructure(1)%idStruct) - ! ! attr - ! call deallocateData_output(outputStructure(1)%attrStruct(1)); deallocate(outputStructure(1)%attrStruct) - ! ! type - ! call deallocateData_output(outputStructure(1)%typeStruct(1)); deallocate(outputStructure(1)%typeStruct) - ! ! mpar - ! call deallocateData_output(outputStructure(1)%mparStruct(1)); deallocate(outputStructure(1)%mparStruct) - ! ! bpar - ! call deallocateData_output(outputStructure(1)%bparStruct(1)); deallocate(outputStructure(1)%bparStruct) - ! ! finalize stats - ! call deallocateData_output(outputStructure(1)%finalizeStats(1)); deallocate(outputStructure(1)%finalizeStats) end subroutine deallocateOutputStructure diff --git a/build/source/actors/hru_actor/fortran_code/hru_modelRun.f90 b/build/source/actors/hru_actor/fortran_code/hru_modelRun.f90 index 63bcf611f1ae496514aa7a622f86bdc3fe861aec..ee560bc77d92f6b3744ded11996dbf4066fc2a71 100644 --- a/build/source/actors/hru_actor/fortran_code/hru_modelRun.f90 +++ b/build/source/actors/hru_actor/fortran_code/hru_modelRun.f90 @@ -223,7 +223,7 @@ subroutine runPhysics(& notUsed_canopyDepth, & ! intent(out): NOT USED: canopy depth (m) notUsed_exposedVAI, & ! intent(out): NOT USED: exposed vegetation area index (m2 m-2) err,cmessage) ! intent(out): error control - if(err/=0)then;message=trim(message)//trim(cmessage); print*, char(27),'[33m',message,char(27),'[0m'; return; endif + if(err/=0)then;message=trim(message)//trim(cmessage); print*, message; return; endif ! save the flag for computing the vegetation fluxes @@ -275,7 +275,7 @@ subroutine runPhysics(& ! get height at bottom of each soil layer, negative downwards (used in Noah MP) allocate(zSoilReverseSign(nSoil),stat=err) - if(err/=0)then; message=trim(message)//'problem allocating space for zSoilReverseSign'; print*, char(27),'[33m',message,char(27),'[0m'; return; endif + if(err/=0)then; message=trim(message)//'problem allocating space for zSoilReverseSign'; print*, message; return; endif zSoilReverseSign(:) = -progStruct%var(iLookPROG%iLayerHeight)%dat(nSnow+1:nLayers) @@ -291,7 +291,7 @@ subroutine runPhysics(& ! deallocate height at bottom of each soil layer(used in Noah MP) deallocate(zSoilReverseSign,stat=err) - if(err/=0)then;message=trim(message)//'problem deallocating space for zSoilReverseSign'; print*, char(27),'[33m',message,char(27),'[0m'; return; endif + if(err/=0)then;message=trim(message)//'problem deallocating space for zSoilReverseSign'; print*, message; return; endif ! overwrite the minimum resistance @@ -318,7 +318,7 @@ subroutine runPhysics(& fluxStruct, & ! data structure of model fluxes tmZoneOffsetFracDay,& ! time zone offset in fractional days err,cmessage) ! error control - if(err/=0)then;err=20; message=trim(message)//cmessage; print*, char(27),'[33m',message,char(27),'[0m'; return; endif + if(err/=0)then;err=20; message=trim(message)//cmessage; print*, message; return; endif ! initialize the number of flux calls diagStruct%var(iLookDIAG%numFluxCalls)%dat(1) = 0._dp @@ -346,7 +346,7 @@ subroutine runPhysics(& fluxStruct, & ! intent(inout): model fluxes for a local HRU ! error control err,cmessage) ! intent(out): error control - if(err/=0)then; err=20; message=trim(message)//trim(cmessage); print*, char(27),'[33m',message,char(27),'[0m'; return; endif; + if(err/=0)then; err=20; message=trim(message)//trim(cmessage); print*, message; return; endif; !************************************* End of run_oneHRU ***************************************** @@ -380,7 +380,7 @@ subroutine runPhysics(& ! compute water balance for the basin aquifer if(model_decisions(iLookDECISIONS%spatial_gw)%iDecision == singleBasin)then message=trim(message)//'multi_driver/bigBucket groundwater code not transferred from old code base yet' - err=20; print*, char(27),'[33m',message,char(27),'[0m'; return + err=20; print*, message; return end if ! calculate total runoff depending on whether aquifer is connected @@ -402,7 +402,7 @@ subroutine runPhysics(& bvarStruct%var(iLookBVAR%averageInstantRunoff)%dat(1), & ! intent(out): instantaneous runoff (m s-1) bvarStruct%var(iLookBVAR%averageRoutedRunoff)%dat(1), & ! intent(out): routed runoff (m s-1) err,message) ! intent(out): error control - if(err/=0)then; err=20; message=trim(message)//trim(cmessage); print*, char(27),'[33m',message,char(27),'[0m'; return; endif; + if(err/=0)then; err=20; message=trim(message)//trim(cmessage); print*, message; return; endif; end associate !************************************* End of run_oneGRU ***************************************** diff --git a/build/source/netcdf/def_output.f90 b/build/source/netcdf/def_output.f90 index 0f3e4f7c875e9e4cd7d4717b6d2b1158e4f3cad9..64795869fc26688835b77d6407303befefd3c219 100755 --- a/build/source/netcdf/def_output.f90 +++ b/build/source/netcdf/def_output.f90 @@ -171,11 +171,7 @@ subroutine def_output(handle_ncid,startGRU,nGRU,nHRU,actor_info,err) bind(C, nam fstring = get_freqName(iFreq) fname = trim(fileout)//'_'//trim(fstring)//'.nc' call ini_create(nGRU,nHRU,gru_struc(1)%hruInfo(1)%nSoil,trim(fname),ncid%var(iFreq),err,cmessage) - if(err/=0)then - message=trim(message)//trim(cmessage) - print*, message - return - end if + if(err/=0)then; message=trim(message)//trim(cmessage); print*, message; return; end if ! define model decisions do iVar = 1,size(model_decisions)