lanl / palm_lanl

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

Fix a bug in linear EOS with constant alpha #70

Closed qingli411 closed 4 years ago

qingli411 commented 4 years ago

This PR fixes a bug in linear EOS with constant alpha where the temperature was in K whereas the reference temperature was in degC.

cbegeman commented 4 years ago

@qingli411 Thanks for catching this. I'd prefer to change the default value and comment in modules.f90 to specify that it should be provided in K, as this is more consistent with PALM's pt variables. Are you open to that?

qingli411 commented 4 years ago

@cbegeman While I agree with you that using K is more consistent with the pt variable in PALM, one reason we might want to use C here is that in the equation of state for seawater we are always using temperature in degC. So it would be more convenient to use the reference temperature in degC here when thinking about the linear equation of state. But I'm fine with either. I think we just need to make it consistent with the description.

cbegeman commented 4 years ago

@qingli411 I'm not bothered by both pt_p and pt_ref being in K for the linear EOS given that all we need is dT, saving the subtraction. When I ran linear EOS cases, it was convenient to be able to set pt_surface in K and pt_ref in K in the namelist file. It's a small thing, but that's my preference.

qingli411 commented 4 years ago

@cbegeman OK. Sounds good to me. Then I guess we can ignore the changes here and modify the default value and the description of pt_ref in modules.f90.

cbegeman commented 4 years ago

@qingli411 Thanks for accommodating! I don't mind if you use this PR to do it.

qingli411 commented 4 years ago

@cbegeman Done

cbegeman commented 4 years ago

Thanks @qingli411! I'll go ahead and merge.