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

Bug in E3SM related to mapping check #12

Open
changliao1025 opened this issue Aug 23, 2023 · 1 comment
Open

Bug in E3SM related to mapping check #12

changliao1025 opened this issue Aug 23, 2023 · 1 comment

Comments

@changliao1025
Copy link
Member

/compyfs/liao313/00raw/mingpan_runoff/susquehanna/
(shr_strdata_init_streams) fileName = 1
/compyfs/liao313/00raw/mingpan_runoff/susquehanna/ming_daily_1980.nc
(shr_strdata_init_streams) timeName = 1 time
(shr_strdata_init_streams) lonName = 1 lon
(shr_strdata_init_streams) latName = 1 lat
(shr_strdata_init_streams) hgtName = 1 unknownname
(shr_strdata_init_streams) maskName = 1 unknownname
(shr_strdata_init_streams) areaName = 1 unknownname
(shr_strdata_init_mapping) calling shr_dmodel_mapSet for fill
(shr_strdata_init_mapping) calling shr_dmodel_mapSet for remap
('shr_map_getWts') ERROR: yd outside bounds 42.7750000000000
('shr_map_getWts') cpole = 1.57079632679490
ERROR: ('shr_map_getWts') ERROR yd outside 90 degree bounds

@changliao1025
Copy link
Member Author

This bug is seemly caused by the function:
logical function shr_map_checkRad(Grid)

! check if grid is rad or degree

implicit none
real(SHR_KIND_R8),intent(in) :: Grid(:,:)
character(*),parameter :: subName = "('shr_map_checkRad') "
real(SHR_KIND_R8) :: rmin,rmax

!-------------------------------------------------------------------------------

shr_map_checkRad = .false.
rmin = minval(Grid)
rmax = maxval(Grid)
if (rmax.ne.rmin) then
   shr_map_checkRad = ((rmax - rmin) < 1.01_SHR_KIND_R8*c2*pi)
else
   shr_map_checkRad = .true.
end if

end function shr_map_checkRad

If the domain is small, then this function falsely think the units are radian because the lat diff is less than 2pi.

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