How to propose/contribute with new code for the model

Any miscellaneous question/problem/comment related to WRF support that does not fit under any of the other category
Post Reply
LluisFB
Posts: 18
Joined: Tue Jan 15, 2019 2:06 pm

How to propose/contribute with new code for the model

Post by LluisFB » Tue Jan 15, 2019 2:14 pm

I am not aware which are the steps to contribute with new code for the model. Thus I am using the forum and posting openly the question.

With my colleagues we have been working in a new WRF module to make CORDEX variables requirements (Reginal Climate modelling experiments) more easy to be meet for the WRF users avoiding post-processing the output. An article is already under revision about it.
https://www.geosci-model-dev-discuss.net/gmd-2018-241/

As leading author I had been asked by a reviewer to make contact with WRF-developers to make possible to include the module in the main source code of WRF. I was more keen to wait until the publication of the article, but never mind, this will not change too much the outcome.

There are already 4 different versions of the code for 4 different versions of WRF: 3.7.1., 3.8.1, 3.9.1.1 and 4.0 The code is already working and being used worldwide. Although as always, new demands arise and it might require further important developments like being able to cope with adaptive time-step.

Please, let me know if you need from me, to adapt the module to the latest version or you need more requirements (like meet adaptive time-step) before being considered to be included in the main WRF source.

Another maybe interesting work to do, might be to make it also available for the MPAS?

Hoping being useful to the model and the community.

Regards,

Lluís

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: How to propose/contribute with new code for the model

Post by kwerner » Tue Jan 15, 2019 6:54 pm

Hi Lluís,
Thanks for contacting us. We do typically propose that you make modifications to the most recent released version (or somewhere close). Are you familiar with GitHub? That is what we use for all of our code development. If you're familiar and able, it would be best if you created a pull request to our develop branch to request merging of your code. Let me know and I can give you additional information.

Thanks,
Kelly
NCAR/MMM

LluisFB
Posts: 18
Joined: Tue Jan 15, 2019 2:06 pm

Re: How to propose/contribute with new code for the model

Post by LluisFB » Tue Jan 15, 2019 8:01 pm

Hi Kelly,

Thank you very much for your quick response.

I am familiarized with gitHub, although I am not 100% sure if you really want all the parts of the module, or how it has been designed.

I can do it, but I will wait until someone of the WRF-developers team can have a look on it, and then pull out/in. I would not like to mess with the WRF-git with non desirable code.

Is that fine for you?

Lluís

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: How to propose/contribute with new code for the model

Post by kwerner » Wed Jan 16, 2019 8:24 pm

Hi,
I understand your hesitation, but although the WRF code is open-source on GitHub, we have very strict restrictions which means that everything must be approved by our development team before it is merged into the code. So If you cloned our repository and created a pull request, it's just that - a request. At that stage, the developers all will have a chance to review it and will be able to see the side-by-side code comparisons before and after your modifications. This is the easiest way for us to review everything. It is typical that there will be questions from the development group, and there may be additional modifications/tests that we ask of you. Once everything looks good, and it is agreed that this is a helpful/necessary modification, it can then be merged into the code. Until then, the primary repository is not touched. You can follow the instructions from this wiki page we have put together:
https://github.com/wrf-model/WRF/wiki/W ... dification
Since this is development work, you'll want to create your own fork, clone the WRF code, checkout the develop branch, and then create a new branch from there. Once you push your code to your online fork, then go back to the GitHub web page and create a pull request. There should be some guidance in the text box that will help you to know how to fill out that section. Be descriptive and let us know what tests you have run to ensure that this doesn't break other code, etc. Let me know if anything is not clear.
NCAR/MMM

LluisFB
Posts: 18
Joined: Tue Jan 15, 2019 2:06 pm

Re: How to propose/contribute with new code for the model

Post by LluisFB » Thu Jan 17, 2019 12:23 pm

I understand.

No problems, I will do the checkout and all the steps following the instructions. My concern was more about that certain modifications might not be interesting and would be a little messy to remove from the code.

But it is fine, I will work on it and let you know.

It might be useful, if in the FAQ of the Forum, some sort of instructions/steps related to the contribution of the code can be posted there.

Thank you very much,

Lluís

kwerner
Posts: 2287
Joined: Wed Feb 14, 2018 9:21 pm

Re: How to propose/contribute with new code for the model

Post by kwerner » Thu Jan 17, 2019 6:12 pm

Lluís,
That is a good idea. I will add a topic/information to the FAQ regarding this.
I also forgot to share this document with you, with more of the guidelines for contributing code:
http://www2.mmm.ucar.edu/wrf/users/contrib_info.php

Kelly
NCAR/MMM

Post Reply

Return to “Miscellaneous”