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

Feature/fix initialization of coupler fields #716

Merged

Conversation

dgergel
Copy link
Contributor

@dgergel dgergel commented Jun 7, 2017

  • closes #xxx
  • tests passed
  • new tests added
  • science test figures
  • ran uncrustify prior to final commit
  • ReleaseNotes entry

This PR does the following:

  • sets the temperature field in the l2x_data_struct (l2x_Sl_t) during initialization using avg_temp from the soil_con_struct, which is equivalent to using the temperature of the top soil layer, since this is the value we use to initialize soil temperatures from a cold start

  • sets the upwelling longwave field in the l2x_data_struct (l2x_Fall_lwup) using l2x_Sl_t and emissivity from the param struct

@dgergel dgergel self-assigned this Jun 7, 2017
@dgergel
Copy link
Contributor Author

dgergel commented Jun 7, 2017

Note: we may want to combine vic_initialize_albedo, vic_initialize_temperature and vic_initialize_lwup into one function.

@@ -36,6 +36,7 @@
#define GLOBALPARAM "vic.globalconfig.txt"
#define RPOINTER "rpointer.lnd"
#define SHR_CONST_SPVAL 1.0e30 /**< CESM missing value */
#define SHR_CONST_STEBOL 5.67e-8 /**< Stefan-Boltzmann constant ~ W/m^2/K^4 */
Copy link
Member

Choose a reason for hiding this comment

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

this is available elsewhere.

Copy link
Member

Choose a reason for hiding this comment

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

this line/variable should be removed and we should use the equivalent constant in vic_run.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

l2x_vic[i].l2x_Fall_flxdst4 = 0;
l2x_vic[i].l2x_Fall_flxvoc = 0;
l2x_vic[i].l2x_Flrl_rofliq = 0;
l2x_vic[i].l2x_Flrl_rofice = 0;
Copy link
Member

Choose a reason for hiding this comment

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

What's the logic you are using for setting some to SHR_CONST_SPVAL and some to zero? Add a comment above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've gone back to setting all to SHR_CONST_SPVAL for now. But I think we should revisit this, as we set the coupler fields to 0 previously for VIC in RASM (I'll make an issue for it so we can figure out what we want to do).

@jhamman jhamman merged commit ec96d1f into UW-Hydro:develop Jul 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants