modifying model constants

Ideas, problems or suggestions regarding the WRF software.

modifying model constants

Postby kala » Wed Mar 08, 2017 3:31 am

Hi, I'm not entirely sure this is the right board for this question, but anyway:

I am running global simulations, which I have succeeded in setting up, but I'm interested in varying the parameters that WRF uses for Earth. For example, I want to change the rotational period, the radius, the length of the year, axial tilt, etc., to simulate the effects of these variations on climate and weather. I found a file where most (or all) of these parameters are located, module_model_constants.F, and I tried modifying one of them (P2SI) but found that it did not change the simulation (I even un-commented it!)

Does WRF need to be recompiled any time a change is made to its constants, and how would I go about doing that, knowing that I only need to modify one file? Is there a simple way for this to be done?
kala
 
Posts: 5
Joined: Wed Mar 08, 2017 3:18 am

Re: modifying model constants

Postby BHajni » Thu Mar 22, 2018 4:34 am

Hi,

Yes, every time you make a modification in the source code you have to recompile it. However you don't have to go through the cleaning process. After the modification when you hit compile again, the compiler script searches for modification dates. If a source code is newer than the compiled version then it will compile it. Of course since everything is compiled together all subsequent, related object files will be compiled again, but it is shorter. For example, on my computer it takes about 15 minutes to compile everything form scratch, but after modifying a parametrization source code recompilation takes only about 3-4 minutes.

Have fun playing with the planetary constants!
BHajni
 
Posts: 21
Joined: Sun Mar 10, 2013 11:50 am


Return to Software Engineering

Who is online

Users browsing this forum: No registered users and 2 guests