Skip to content

Merging code from #162#166

Open
donaldwj wants to merge 11 commits into2024Sep12from
master-clone
Open

Merging code from #162#166
donaldwj wants to merge 11 commits into2024Sep12from
master-clone

Conversation

@donaldwj
Copy link

[Short description explaining the high-level reason for the pull request]

Additions

Removals

Changes

Testing

Screenshots

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Visually tested in supported browsers and devices (see checklist below 👇)
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist

Target Environment support

  • Windows
  • Linux
  • Browser

Accessibility

  • Keyboard friendly
  • Screen reader friendly

Other

  • Is useable without CSS
  • Is useable without JS
  • Flexible from small to large screens
  • No linting errors or warnings
  • JavaScript tests are passing

Brian-Cosgrove and others added 11 commits January 31, 2025 09:12
Added Apache license and copyright information for cfe repo via modification of existing LICENSE file
* Update cfe.c

Fixed major bug in xinanjiang function.  One minor bass balance fix.  Refactored.  Verified code against NWM Fortran Xinanjiang function.  Changed "infiltation_excess_params_struct" to "infiltration_excess_params_structure".   Added "#ifdef DEBUG #endif around mass balance warning print statement at end of xinanjiang scheme function.

* fix: adjust white space for better review, fix struct parameter

---------

Co-authored-by: hellkite500 <nfrazier@lynker.com>
…ulation

Co-authored-by: Nels <nels.frazier@noaa.gov>
* chore: small formatting refactor

Co-authored-by: ajkhattak <ajkhattak@gmail.com>

* feat: add method to compute et_from_retention_depth

Co-authored-by: ajkhattak <ajkhattak@gmail.com>

* fix: take AET from surface retention depth

Co-authored-by: ajkhattak <ajkhattak@gmail.com>

* fix: try to prevent segfault when computing AET from retention depth

---------

Co-authored-by: ajkhattak <ajkhattak@gmail.com>
Copy link
Contributor

@hellkite500 hellkite500 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this did have to resolve conflicts, can you comment on the previous commits which were modified? There were several key bug fixes that looked like they were properly captured, and I'm guessing its just the first commit here that had to be resolved and changed the subsequent commits? Can you let me know about where the conflicts occured?

#ifdef DEBUG
if(fabs(water_input_depth_m - (*infiltration_depth_m) - (*infiltration_excess_m)) > 1.0e-06) printf("Massball err. warning: %f\n",

if(fabs(water_input_depth_m - (*infiltration_depth_m) - (*infiltration_excess_m)) > 1.0e-06) Log(DEBUG, "Massball err. warning: %f\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced that this shouldn't still be wrapped in the conditional pre-processor, but since it is a small extra computation that probably isn't going to impact overall performance right now, we can probably leave it.


set_target_properties(cfebmi PROPERTIES PUBLIC_HEADER ./include/bmi_cfe.h)

target_link_libraries(cfebmi PRIVATE Boost::serialization)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are not bringing over the serialization right now, then this doesn't belong in this PR.

printf(" Runon infiltration = %8.4lf m\n",cfe_ptr->vol_struct.vol_runon_infilt);
printf(" Vol_et_from_retention_depth = %8.4lf m\n",cfe_ptr->vol_struct.vol_et_from_retention_depth);
printf(" Surface residual = %6.4e m\n", giuh_residual); // should equal zero
Log(INFO, "********************* SURFACE MASS BALANCE *********************\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this PR didn't capture all the logging, particularly the logger.h and its inclusion to make sure this code here "works".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants