@@ -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