Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

(RESOLVED) Modify the number and depths of lake levels in the lake model

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

kholman

New member
Hello

I am currently running version 4.2.1 of the WRF model with the lake model turned on. I would like to modify the total number of lake levels and the depths of those lake levels. Where can this be done? I've located the module_sf_lake.f90 code in the /BuildWRF/WRFV4/phys/ directory, which appears to have a hard-coded number of lake levels (variable name, nlevlake) set to 10. Can I simply change this number and recompile? I have yet to identify where the depths are specified. In the output files, lake level depths are found in the variable, soil_levels_or_lake_levels_stag, but I have yet to find where that variable is in the WRF code to modify them.

Any help on this problem would be greatly appreciated. Thank you for your time.

K. Holman
 
Hi,
I think you're on the right track, except you will need to modify the *.F file, instead of the *.f90 file. The *.f90 files are created with the compile.

It looks like you're correct about the variable to change for number of layers. As for the depth of the layers, I'm not sure if you mean the depth of each layer from the surface, or the thickness of each layer. I assume the former.

The depth of the layer from the surface is called "z_lake" and ultimately is set in the subroutine "lakeini."
z_lake = z_lake3d (in subroutine "lake")
and in subroutine lakeini,
z_lake3d = zlak
zlak is set differently depending on the level, but you should see the start of this code around line 5157, so that is the code you'll change.

The thickness of the layer is called "dz_lake" and ultimately is set in the subroutine "lakeini."
dz_lake = dz_lake3d (in subroutine "lake")
and in subroutine lakeini,
dz_lake3d = dzlak
dzlak = 0.1_r8 (which is the value with double-precision - 64 decimal places) for every level. You should see the start of this code around line 5146.

If you are modifying the number of layers, make sure to add more layers for either the dzlak or zlak you change. Once done with the modifications, save the file and recompile the code.
 
Top