Skip to content
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

Add support for calibratable parameters (lumped version) #102

Merged

Conversation

GreyREvenson
Copy link
Contributor

@GreyREvenson GreyREvenson commented Mar 12, 2024

Purpose

This PR exposes the model's calibratable parameters via its BMI so that they can be calibrated via NextGen. This PR exposes these parameters in the lumped (i.e., non-gridded) version of Noah-OWP-Modular.

Additions

Calibratable parameters

The following parameters were added to the model's BMI:

  • BEXP
  • SMCMAX
  • DKSAT
  • RSURF_EXP
  • REFKDT
  • AXAJ
  • BXAJ
  • XXAJ
  • SLOPE
  • CWP
  • VCMX25
  • MP
  • MFSNO
  • SCAMAX***
  • RSURF_SNOW
  • HVT
  • FRZX**
  • KDT**

** FRZX and KDT were added because they are recalculated/reinitialized when setting SMCMAX, DKSAT and/or REFKDT. FRZX and KDT were added so that they may be included in the unit test program; they are not intended to be calibrated.

*** This PR adds SCAMAX to Noah-OWP-Modular because it is a NWM 3.0 calibratable parameter. SCAMAX was added as a member of parameters_type. The calculation of FSNO (i.e., snow covered area) was amended to follow WRF-Hydro's calculation as:

water%FSNO = parameters%SCAMAX * TANH( water%SNOWH /(2.5 * parameters%Z0 * FMELT))

Changes

The Noah-OWP-Modular unit test program (/test/noahowp_driver_test.f90) was updated to facilitate testing of the calibratable parameters.

Testing

The refactored unit test program was executed and gave these results.

Notes

This PR replicates PR #95, which exposed the calibratable parameters for the gridded version of Noah-OWP-Modular.

@GreyREvenson GreyREvenson marked this pull request as draft March 12, 2024 16:57
@GreyREvenson GreyREvenson changed the title Add support for calibratable parameters Add support for calibratable parameters (lumped version) Mar 12, 2024
@GreyREvenson
Copy link
Contributor Author

GreyREvenson commented Mar 13, 2024

Ngen automatic integration tests may be failing due to NGEN issue #751.

@GreyREvenson GreyREvenson marked this pull request as ready for review March 13, 2024 16:14
@drakest123
Copy link

drakest123 commented Mar 15, 2024

PR #102 Review

  • No issues were found by code inspection
  • Note that case statements would be slightly easier to read if the test variables were in ~ alphabetical order
  • Addition of trim() function in test/noahowp_driver_test.f90 improves robustness of test routine
  • Most of the changes were boilerplate additions to bmi_noahowp.f90 and test/noahowp_driver_test.f90 .
  • Compiled and executed:
    run/noah_owp_modular.exe
    test/noahowp_test.exe ../run/namelist.input > output_test
  • There is no difference between the test output and that posted with the PR:
    % diff ~/Downloads/noahowp_test_output.txt output_test

As noted by Grey, the NGen integration tests indicate that a shared library called “register_bmi” is missing. I don't know the significance of these checks.

@GreyREvenson GreyREvenson requested review from zhengtaocui and drakest123 and removed request for zhengtaocui March 20, 2024 19:40
Copy link

@drakest123 drakest123 left a comment

Choose a reason for hiding this comment

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

Request that case statements be rearranged to alphabetical order to facilitate code readability.

@GreyREvenson GreyREvenson marked this pull request as draft April 9, 2024 14:20
@GreyREvenson GreyREvenson marked this pull request as ready for review April 9, 2024 17:07
@GreyREvenson GreyREvenson requested a review from drakest123 April 9, 2024 17:07
@GreyREvenson
Copy link
Contributor Author

Thanks for your review, @drakest123. I put the BMI case listings in alphabetical order for easier reading.

Copy link

@drakest123 drakest123 left a comment

Choose a reason for hiding this comment

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

Thanks for reordering the case statements in BMI_noahowp.f90.

@GreyREvenson GreyREvenson merged commit 4b1e899 into NOAA-OWP:main Apr 10, 2024
4 checks passed
@GreyREvenson GreyREvenson deleted the lumped_calibratable_parameters branch April 10, 2024 12:47
@drakest123 drakest123 mentioned this pull request May 7, 2024
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.

2 participants