Skip to content

Commit 75c8a52

Browse files
authored
Remove MAPL_GenGridName from Base (#4835) (#4836)
1 parent cb20657 commit 75c8a52

2 files changed

Lines changed: 0 additions & 93 deletions

File tree

base/Base/Base_Base.F90

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ module MAPL_Base
3838
public MAPL_GetHorzIJIndex
3939
public MAPL_GetGlobalHorzIJIndex
4040
public MAPL_Reverse_Schmidt
41-
public MAPL_GenGridName
4241
public MAPL_GridGetCorners
4342
public MAPL_GridGetInterior
4443

@@ -133,13 +132,6 @@ module subroutine MAPL_Reverse_Schmidt(Grid, stretched, npts,lon,lat,lonR8,latR8
133132
integer, optional, intent(out ) :: rc ! return code
134133
end subroutine MAPL_Reverse_Schmidt
135134

136-
module subroutine MAPL_GenGridName(im, jm, lon, lat, xyoffset, gridname, geos_style)
137-
integer :: im, jm
138-
character (len=*) :: gridname
139-
real, optional :: lon(:), lat(:)
140-
integer, optional :: xyoffset
141-
logical, optional :: geos_style
142-
end subroutine MAPL_GenGridName
143135

144136
module function MAPL_StrUpCase(str) result(new)
145137
character(len=*), intent(IN) :: str

base/Base/Base_Base_implementation.F90

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,91 +1340,6 @@ function grid_is_ok(grid) result(OK)
13401340
end function
13411341
end subroutine MAPL_GetGlobalHorzIJIndex
13421342

1343-
module subroutine MAPL_GenGridName(im, jm, lon, lat, xyoffset, gridname, geos_style)
1344-
integer :: im, jm
1345-
character (len=*) :: gridname
1346-
character(len=2) :: dateline, pole
1347-
real, optional :: lon(:), lat(:)
1348-
integer, optional :: xyoffset
1349-
logical, optional :: geos_style
1350-
1351-
integer :: I
1352-
real, parameter :: eps=1.0e-4
1353-
character(len=16) :: imstr, jmstr
1354-
real :: dlat
1355-
1356-
logical :: old_style
1357-
if (present(geos_style)) then
1358-
old_style = geos_style
1359-
else
1360-
old_style = .false.
1361-
end if
1362-
1363-
if (jm /= 6*im) then
1364-
! Lat-Lon
1365-
dateline='UU' ! Undefined
1366-
pole='UU' ! Undefined
1367-
if (present(LON) .and. present(LAT)) then
1368-
1369-
dlat = LAT(4) - LAT(3)
1370-
if ((abs(LAT(1) + 90.0) < eps).or.(abs(LAT(1) + 90.0 - 0.25*dLat) < eps)) then
1371-
pole='PC'
1372-
else if (abs(LAT(1) + 90.0 - 0.5*dLat) < eps) then
1373-
pole='PE'
1374-
end if
1375-
do I=0,1
1376-
if(abs(LON(1) + 180.0*I) < eps) then
1377-
dateline='DC'
1378-
exit
1379-
else if (abs(LON(1) + 180.0*I - 0.5*(LON(2)-LON(1))) < eps) then
1380-
dateline='DE'
1381-
exit
1382-
end if
1383-
end do
1384-
1385-
else if (present(xyoffset)) then
1386-
! xyoffset Optional Flag for Grid Staggering (0:DcPc, 1:DePc, 2:DcPe, 3:DePe)
1387-
select case (xyoffset)
1388-
case (0)
1389-
dateline='DC'
1390-
pole='PC'
1391-
case (1)
1392-
dateline='DE'
1393-
pole='PC'
1394-
case (2)
1395-
dateline='DC'
1396-
pole='PE'
1397-
case (3)
1398-
dateline='DE'
1399-
pole='PE'
1400-
end select
1401-
endif
1402-
1403-
if (old_style) then
1404-
write(imstr,*) im
1405-
write(jmstr,*) jm
1406-
gridname = pole // trim(adjustl(imstr))//'x'//&
1407-
trim(adjustl(jmstr))//'-'//dateline
1408-
else
1409-
write(gridname,'(a,i4.4,a,a,i4.4)') dateline,im,'x',pole,jm
1410-
end if
1411-
else
1412-
! cubed-sphere
1413-
dateline='CF'
1414-
pole='6C'
1415-
if (old_style) then
1416-
pole='PE'
1417-
write(imstr,*) im
1418-
write(jmstr,*) jm
1419-
gridname = pole // trim(adjustl(imstr))//'x'//&
1420-
trim(adjustl(jmstr))//'-CF'
1421-
else
1422-
write(gridname,'(a,i4.4,a,a)') dateline,im,'x',pole
1423-
end if
1424-
end if
1425-
1426-
end subroutine MAPL_GenGridName
1427-
14281343
module subroutine MAPL_Reverse_Schmidt(Grid, stretched, npts, lon, lat, lonR8, latR8, lonRe, latRe, rc)
14291344
type(ESMF_Grid), intent(inout) :: Grid
14301345
logical, intent(out) :: stretched

0 commit comments

Comments
 (0)