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

Spoon topography is incorrectly implemented in initialize_topography_named #392

Open
pittwolfe opened this issue May 19, 2023 · 1 comment

Comments

@pittwolfe
Copy link

The spoon topography is supposed to limit to max_depth at the southern boundary of the domain, but does not because of an extraneous square. The lines in question are in MOM_shared_initialization.F90:

elseif (trim(topog_config) == "spoon") then
  D0 = (max_depth - Dedge) / &
           ((1.0 - exp(-0.5*G%len_lat*G%Rad_Earth_L*PI/(180.0 *expdecay))) * &
            (1.0 - exp(-0.5*G%len_lat*G%Rad_Earth_L*PI/(180.0 *expdecay))))
  do i=is,ie ; do j=js,je
!  This sets a bowl shaped (sort of) bottom topography, with a       !
!  maximum depth of max_depth.                                   !
    D(i,j) =  Dedge + D0 * &
           (sin(PI * (G%geoLonT(i,j) - (G%west_lon)) / G%len_lon) * &
         (1.0 - exp((G%geoLatT(i,j) - (G%south_lat+G%len_lat))*G%Rad_Earth_L*PI / &
                    (180.0*expdecay)) ))
  enddo ; enddo

The definition of D0 is copied from the bowl topography, which contains a product of exponentials. The spoon topography only has a single exponential (decaying from the north), so the denominator of D0 should be linear, not quadratic.

Can issue a pull request on this if warranted, but I thought I'd check first before figuring out how to do that correctly.

@pittwolfe
Copy link
Author

Now that I think about it, there shouldn't the 0.5 in the exponentials either. The lines in question should read

D0 = (max_depth - Dedge) / &
           (1.0 - exp(-G%len_lat*G%Rad_Earth_L*PI/(180.0 *expdecay)))

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

1 participant