You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are, to my knowledge, two unused, untested functions in oceanspy.utils:
find_cs_sn (line 903)
local_to_latlon (line 844)
@MaceKuailv I checked and you wrote them. I think find_cs_sn was written to calculate CS and SN but that was made redundant since cs and sn are provided as output by the model. Is there a reason to keep find_cs_sn? I also remember there were some issues with it but don't remember very well.
The function local_to_latlon, on the other hand, is very relevant. However, aside from having no tests (in test_utils.py), it is actually inconsistent with the staggered C grid. The function is quite short, and basically is:
The transformation assumes all u, v, cs and sn are defined at the same point, but they are not. Both CS and SN are defined at center points (Y, X) and thus each need to be interpolated to U and V points.
@MaceKuailv are you using local_to_latlon within oceanspy?
My suggestion:
Have local_to_latlon take the od as argument, so that it can interpolate all of CS and SN along with the respective vector pairs and transform all vector fields at once.
The text was updated successfully, but these errors were encountered:
There are, to my knowledge, two unused, untested functions in
oceanspy.utils
:find_cs_sn
(line 903)local_to_latlon
(line 844)@MaceKuailv I checked and you wrote them. I think
find_cs_sn
was written to calculate CS and SN but that was made redundant sincecs
andsn
are provided as output by the model. Is there a reason to keepfind_cs_sn
? I also remember there were some issues with it but don't remember very well.The function
local_to_latlon
, on the other hand, is very relevant. However, aside from having no tests (intest_utils.py
), it is actually inconsistent with the staggered C grid. The function is quite short, and basically is:The transformation assumes all
u
,v
,cs
andsn
are defined at the same point, but they are not. BothCS
andSN
are defined at center points(Y, X)
and thus each need to be interpolated toU
andV
points.@MaceKuailv are you using
local_to_latlon
within oceanspy?My suggestion:
Have
local_to_latlon
take theod
as argument, so that it can interpolate all ofCS
andSN
along with the respective vector pairs and transform all vector fields at once.The text was updated successfully, but these errors were encountered: