Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

change source mode

Hello, everyone:
"I would like to ask if there is a way to change some fixed values in parameterization schemes. I have been searching the source code but I can't find any relevant information. For these fixed constants, is there a separate file where they are stored? For example, I have been unable to locate this 'k' value." which document can I change it. Hope to receive your reply all!
1742519949960.png
 

slevis

Moderator
Staff member
@Sijia Chen
I went to my local copy of the code and typed
git grep -i porosity | grep '0.8'
and got these results:
src/biogeophys/SurfaceResistanceMod.F90:! dsl(c) = dzmm(c,1)*max(0.001_r8,(0.8*eff_porosity(c,1) - vwc_liq)) &
src/biogeophys/SurfaceResistanceMod.F90:! dsl(c) = 15._r8*max(0.001_r8,(0.8*eff_porosity(c,1) - vwc_liq)) &

"grep" and "git grep" are very useful ways of finding strings that you're looking for.

Then I looked in that file (SurfaceResistanceMod.F90) and found that 0.8 has been replaced (at least in my version of the code) with the parameter params_inst%frac_sat_soil_dsl_init. If this is also true in your version, then this is set in the paramfile that gets listed in your cases' lnd_in. And if so, you would change the value in that paramfile.

Alternatively, you would change the value directly in the code, making sure that you find all the instances where this parameter is used.
 
@Sijia Chen
I went to my local copy of the code and typed
git grep -i porosity | grep '0.8'
and got these results:
src/biogeophys/SurfaceResistanceMod.F90:! dsl(c) = dzmm(c,1)*max(0.001_r8,(0.8*eff_porosity(c,1) - vwc_liq)) &
src/biogeophys/SurfaceResistanceMod.F90:! dsl(c) = 15._r8*max(0.001_r8,(0.8*eff_porosity(c,1) - vwc_liq)) &

"grep" and "git grep" are very useful ways of finding strings that you're looking for.

Then I looked in that file (SurfaceResistanceMod.F90) and found that 0.8 has been replaced (at least in my version of the code) with the parameter params_inst%frac_sat_soil_dsl_init. If this is also true in your version, then this is set in the paramfile that gets listed in your cases' lnd_in. And if so, you would change the value in that paramfile.

Alternatively, you would change the value directly in the code, making sure that you find all the instances where this parameter is used.
Dear slevis ,thank you very much ,I'll do it !
 
Top