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

NGEN/Snow-17 output varies from Snow-17-only #51

Open
drakest123 opened this issue Sep 7, 2024 · 4 comments
Open

NGEN/Snow-17 output varies from Snow-17-only #51

drakest123 opened this issue Sep 7, 2024 · 4 comments

Comments

@drakest123
Copy link
Contributor

NGEN is passing data with improper units to Snow-17

Current behavior

The output from NGEN/Snow-17 remains different from Snow-17-only. It was difficult to debug this problem with real data so I created a one-month simulated data set as input.

Expected behavior

The outputs should be the same.

Steps to replicate behavior (include URLs)

  1. Execute NGEN/Snow-17
  2. Execute Snow-17
  3. Compare output contained in a corresponding cat-*.csv file
  • The NGEN/Snow-17 executable creates output in which snowh is the same as Snow-17-only
  • The NGEN/Snow-17 executable creates output in which sneqv is a factor of 1000 times smaller than Snow-17-only
  • The NGEN/Snow-17 executable creates output in which precip_scf is a factor of 3600 times smaller than Snow-17-only
  • The variable raim is very different between the two runs

Screenshots

See entry for 9/7/2024 in https://docs.google.com/document/d/1RA52-iAZQP5n-feTo4E-VDl8ZmrPbhuCmcJKfAZi8B8/edit?usp=sharing

@SnowHydrology
Copy link
Collaborator

@drakest123, it appears the output writing utility in Snow-17 standalone is responsible for many of these differences.

SUBROUTINE write_snow17_output(namelist, runinfo, parameters, forcing, modelvar, n_curr_hru)

I'll respond using the same bullets as above (note I'm using the combined variable names as that is what is accessible via BMI):

  • The write_snow17_output subroutine in ioModule.f90 performs no transforms on snowh_comb when calling the write function
    • modelvar%snowh_comb
  • The subroutine multiplies sneqv_comb by 1000 when calling the write function
    • modelvar%sneqv_comb*1000.
  • The subroutine multiplies precip_scf_comb by dt (3600, in this case) when calling the write function
    • forcing%precip_scf_comb*runinfo%dt
  • Can you expand on the raim_comb differences? The raim_comb transform is the same as precip_scf_comb
    • modelvar%raim_comb*runinfo%dt

@andywood
Copy link
Contributor

It looks like those unit transforms in the standalone output, which were just a convenience for snow17 output analysis (ie put everything into mm for an easy mass balance calculation) are the issue. They could just be deleted from the standalone case to match whatever the nextgen model convention is (ie output a flux as L/T or M/T or a state as L or M).

@SnowHydrology
Copy link
Collaborator

SnowHydrology commented Sep 10, 2024

@andywood It makes no difference to me what the output units are for Snow-17 in standalone mode. It only matters that BMI correctly advertises the proper model units.

I believe this issue can be closed or adjusted once @drakest123 expands upon the raim_comb values.

@andywood
Copy link
Contributor

andywood commented Sep 10, 2024 via email

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

No branches or pull requests

3 participants