Skip to content

Conversation

@dmey
Copy link

@dmey dmey commented Jan 5, 2020

Hi @davegill and @dudhia this is the code as implemented in the paper:

Meyer, D., Schoetter, R., Riechert, M., Verrelle, A., Tewari, M., Dudhia, J., Masson, V.,et al. (2019). WRF-TEB: Implementation and evaluation of the coupled Weather Researchand Forecasting (WRF) and Town Energy Balance (TEB) model. Submitted to Journal of Advances in Modeling Earth Systems.

It includes all the files modified in WRF as well as the wrapper for TEB phys/module_sf_teb.F used to integrate TEB model (https://github.com/teb-model/teb) as an external library into WRF.

The implementation here reflects what is in the paper (currently under review) and at https://github.com/WRF-CMake/wrf-teb. The current implementation is only available through the CMake project and is currently dependent on WRF-CMake as I found it much easier to do so when developing the code and port TEB into WRF however, given that we are currently awaiting to know more about the integration of WRF-CMake into WRF (#1010) I have created this draft PR to ask you if you could review the code (without CMake).

This PR is only meant for review, not for merging (this is why I picked the 4.1 branch). I will create a separate PR later if the contribution is accepted, targeted at the develop branch and with Makefiles. The idea is that depending on your specific requirements (e.g. whether we can depend on TEB as an external library) I could then write the Makefiles necessary to make this work also with the current WRF version.

The entry point for TEB is phys/module_sf_teb.F which calls src/driver/modd_wrf_teb_driver.F90 (currently linked in using CMake as an external project) from the TEB model repository https://github.com/teb-model/teb.

@davegill
Copy link
Contributor

@dmey
As you mention, we probably need to have a modification to a couple of Makefiles for the newly added files and the new dependencies:physics/Makefile and main/depend.common.

@davegill
Copy link
Contributor

@dudhia @weiwangncar
Does this require the physics review board approval?

@dudhia
Copy link
Collaborator

dudhia commented Jan 13, 2020 via email

@dmey
Copy link
Author

dmey commented Jan 14, 2020

@davegill thanks for this -- I also wanted to clarify a couple of general points:

  1. how do you want me to treat the external library (teb) when building WRF with Makefiles? Are you happy to have this done as an external project as it's done with other dependencies like NetCDF? So, if the user wants to use TEB it needs to have it installed on the system first.

  2. do you see any issues with the general coupling that we should fix?

@dmey
Copy link
Author

dmey commented Jan 23, 2020

👋 @davegill -- I was just wondering if you had a chance to look at #1052 (comment).

@dmey
Copy link
Author

dmey commented Jan 23, 2020

It's in a grey area like irrigation because it mostly couples through the
LSM.
Maybe it needs their approval first,
Jimy

@dudhia is there anything that I need to do on my side? Is there still a standard procedure to follow?

@dudhia
Copy link
Collaborator

dudhia commented Jan 23, 2020 via email

@davegill
Copy link
Contributor

@dmey

how do you want me to treat the external library (teb) when building WRF with Makefiles? Are you happy to have this done as an external project as it's done with other dependencies like NetCDF? So, if the user wants to use TEB it needs to have it installed on the system first.

I think it is just fine assume that a user installs TEB first. However, if this appears to be a problem, say after a year or so and there are lots of users complaining, then you could put the source (and necessary build files) in the external directory.

do you see any issues with the general coupling that we should fix?

We have provided a few comments that are easy to review on the github page with "Files changed".

@dmey
Copy link
Author

dmey commented Jan 24, 2020

@davegill

how do you want me to treat the external library (teb) when building WRF with Makefiles? Are you happy to have this done as an external project as it's done with other dependencies like NetCDF? So, if the user wants to use TEB it needs to have it installed on the system first.

I think it is just fine assume that a user installs TEB first. However, if this appears to be a problem, say after a year or so and there are lots of users complaining, then you could put the source (and necessary build files) in the external directory.

Sounds good. 👍

do you see any issues with the general coupling that we should fix?

We have provided a few comments that are easy to review on the github page with "Files changed".

Thanks for your comments but I had a few questions about a couple of comments -- can you please let me know about: #1052 (comment) and #1052 (comment)?

@dmey
Copy link
Author

dmey commented Jan 24, 2020

@davegill sounds good 👍 -- I will go ahead with those changes you suggested and create a PR for WRF-TEB targeting develop then. Shall we aim for 4.2.0 release? If so when's the deadline for that?

@davegill
Copy link
Contributor

@dmey
Please propose to the develop branch. We are in a VERY BIG hurry - Monday / Tues next week at the latest for the PR.

dmey added a commit to TEB-model/wrf-teb that referenced this pull request Jan 26, 2020
dmey added a commit to TEB-model/wrf-teb that referenced this pull request Jan 26, 2020
dmey added a commit to TEB-model/wrf-teb that referenced this pull request Jan 26, 2020
@dmey
Copy link
Author

dmey commented Jan 27, 2020

@dmey
Please propose to the develop branch. We are in a VERY BIG hurry - Monday / Tues next week at the latest for the PR.

@davegill I have added your changes -- please refer to PR #1064. I will close this now.

@dmey dmey closed this Jan 27, 2020
@dmey dmey deleted the wrf-teb branch January 27, 2020 15:18
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.

4 participants