Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code error in helpers/genNetCDF/Topography.py #180

Open
wwwliye opened this issue Mar 4, 2024 · 3 comments
Open

code error in helpers/genNetCDF/Topography.py #180

wwwliye opened this issue Mar 4, 2024 · 3 comments
Assignees

Comments

@wwwliye
Copy link

wwwliye commented Mar 4, 2024

question1: in Topography.py, in function "genHill": j = (np.arange(self.nx) - self.ny/2) / self.ny * np.pi *2, is this nx should be ny?

question2: in icar, if all variables's levels must be same? in wrfout data , vertical velocity w's levels are u's levels plus 1,
when running icar, there will be some errors.

question3: also in Topography.py, is Schar's advection test's code correct?, in Schar's article in 2004, I don't found the same formula ,especially "hgt = (
hill_height *
self.h_x(ig, lmbda) * self.h_x_star( ig, a)
)" , that make me very confused

hope your reply, thank you !

@scrasmussen scrasmussen self-assigned this Mar 12, 2024
@gutmann
Copy link
Member

gutmann commented Mar 18, 2024

Hi @wwwliye thanks for filing this issue.

Q1: I think @scrasmussen assigned himself to fix this, it does look like there is an inconsistency there.

Q2: ICAR does not read in the "w" field, so it shouldn't be an issue. At one point, ICAR had an option to interpolate, e.g. Z and P if they were on interface levels instead of mass levels, though I think that functionality may have been dropped with the move to v2. I recommend having all forcing data on the same levels.

Q3: I am not sure, this may have used a different topographic hill than in Christoph Schar's paper, I'm not sure if @scrasmussen or @bertjebertjek are best to answer this one.

@scrasmussen
Copy link
Member

scrasmussen commented Apr 2, 2024

question1: in Topography.py, in function "genHill": j = (np.arange(self.nx) - self.ny/2) / self.ny * np.pi *2, is this nx should be ny?

Thank you for pointing this out! It will be fixed in an upcoming PR.

question3: also in Topography.py, is Schar's advection test's code correct?, in Schar's article in 2004, I don't found the same formula ,especially "hgt = ( hill_height * self.h_x(ig, lmbda) * self.h_x_star( ig, a) )" , that make me very confused

In the paper, on pdf page 7 and page 2465 is the following diagram:
image
and in the second column's second paragraph we find "For all tests we use a computational domain that is confined above by a rigid lid at H 5 25 km and that is periodic in the x direction."

This should match up to the generated file? I'll ping the person who wrote this to double check my interpretation is correct, @bertjebertjek.
image

@bertjebertjek
Copy link
Contributor

Hey, sorry for the late reply.
wrt the Schaer's topography, I dont recall where i got the formula from. Potentially from @d-reynolds , or I made it up myself? Anyway, it looks pretty similar to me:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants