-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addition of functionality for inputting aspect and non-zero slope/aspect effects on radiation, and also a BUG FIX: correcting averageRoutedRunoff in run_oneGRU.f90 and qTimeDelay.f90 #454
Conversation
…f90 and qTimeDelay.f90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of minor style changes. Could you also add an entry to the docs/whats-new.md
?
build/source/engine/read_attrb.f90
Outdated
|
||
do iGRU=1,nGRU | ||
do iHRU = 1, gru_struc(iGRU)%hruCount | ||
attrStruct%gru(iGRU)%hru(iHRU)%var(varIndx) = -1._dp ! populate variable with out-of-range value, used later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be changed to a missing value placeholder from engine/nrtype.f90
so that the intention is clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
build/source/engine/derivforce.f90
Outdated
@@ -234,11 +236,21 @@ subroutine derivforce(time_data,forc_data,attr_data,mpar_data,prog_data,diag_dat | |||
dataStep = data_step/secprhour ! time step (hours) | |||
ahour = real(jh,kind(dp)) + real(jmin,kind(dp))/minprhour - data_step/secprhour ! decimal hour (start of the step) | |||
|
|||
! check slope/aspect intent for radiation calculation | |||
if(aspect == -1)then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be changed to a missing value indicator from engine/nrtype.f90
to be clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
build/source/engine/computFlux.f90
Outdated
scalarTotalRunoff = scalarSurfaceRunoff + scalarAquiferBaseflow | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove empty spaces.
build/source/engine/computFlux.f90
Outdated
@@ -771,7 +773,7 @@ subroutine computFlux(& | |||
|
|||
! check if computing aquifer fluxes | |||
if(ixAqWat/=integerMissing)then | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove empty spaces.
build/source/engine/computFlux.f90
Outdated
@@ -729,7 +729,7 @@ subroutine computFlux(& | |||
message=trim(message)//'expect dBaseflow_dMatric to be nSoil x nSoil' | |||
err=20; return | |||
endif | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove empty spaces.
build/source/engine/checkStruc.f90
Outdated
@@ -152,10 +152,10 @@ subroutine checkPopulated(iStruct,metadata,err,message) | |||
|
|||
! loop through variables | |||
do iVar=1,size(metadata) | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor cleanup, but could you remove empty line spaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
…ctionality and fix basin runoff bug
Made all suggested changes |
build/source/engine/derivforce.f90
Outdated
slope = 0._dp | ||
else | ||
azimuth = aspect ! in degrees | ||
slope = atan(abs(tan_slope))*180.0D0/PI_D ! convert from m/m to degrees |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the slope equation it should be 180._dp
instead of 180.0D0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
build/source/engine/run_oneGRU.f90
Outdated
! ----- calculate weighted basin (GRU) fluxes -------------------------------------------------------------------------------------- | ||
|
||
! increment basin total runoff (m s-1) | ||
bvarData%var(iLookBVAR%basin__TotalRunoff)%dat(1) = bvarData%var(iLookBVAR%basin__TotalRunoff)%dat(1) + fluxHRU%hru(iHRU)%var(iLookFLUX%scalarTotalRunoff)%dat(1) * fracHRU |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable will only work when the HRUs within a GRU are disconnected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this ... could you explain it more? It should be just like the terms below ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scalarRunoff
is the runoff from an HRU. If HRUs are connected, then we only need the lateral flow from the most downslope HRU(s).
…ng basin column outflow rather than soil baseflow
The code looks good. Before merging, can I ask what tests were completed? |
Fix merge conflicts
apologies for not responding before - the main thing was to compare the new
basin runoff variable to total runoff and see that they matched. I didn't
assess other variables. The problem before was basin runoff being wrong by
a factor of about 2, which was 'fixed'. I think better numerical tests
could be applied here, though.
…On Thu, Apr 8, 2021 at 4:45 PM Martyn Clark ***@***.***> wrote:
The code looks good. Before merging, can I ask what tests were completed?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#454 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIKARLTDW6XCFEDK476UTTTHYWXNANCNFSM42LUSF3A>
.
|
No description provided.