lanl / palm_lanl

LANL Contributions to PArallelized Large-eddy simulation Model (PALM)
2 stars 5 forks source link

Add ability to set u and v dirichlet values at top and bottom #65

Closed katsmith133 closed 1 year ago

katsmith133 commented 4 years ago

I've implemented this be able to set surface sea ice drift velocities to be used with the MOST approach already in place, but this can be used to set the u and v velocities at both the top and bottom boundaries, using the namelist parameters u_top, u_bott, v_top, and v_bott. If left unset or set to 9999999.9 it will not use these parameters to set the top and bottom boundary conditions, and it will revert to what was previous implemented in the code. The way this is set up you could have geostrophic velocities set by either ug_surface and vg_surface or through the pressure gradient, but still be able to set a different BC value. I imagined this would be the case if you had ice drift (or an ice shelf, i.e. u_top = v_top = 0.0) and geostrophic velocities/river inflow/etc...? so I wanted to keep this as an option, but I am open to implementing this in a different way if someone has a better idea or thinks there will be an issue here.

katsmith133 commented 4 years ago

@cbegeman Ok, I've added a check for non-flat topography and the else clause for the bottom boundary.

I did a quick calculation of what the maximum u* would be for a given non-zero surface velocity in the constant surface flux case and the actual value of u* was just about half of that. Do you think a more thorough check is warranted?

cbegeman commented 4 years ago

@katsmith133 This is great, thanks! Your assessment of u* sounds fine. The most likely error is that the momentum flux is the wrong sign for either a top constant flux layer or a bottom constant flux layer, which should be a pretty obvious error. I'm assuming you didn't see that?

katsmith133 commented 4 years ago

@cbegeman Nope, it was the correct sign.

cbegeman commented 4 years ago

@katsmith133 Great! I'm fine with you merging this PR