Path: blob/devel/elmerice/Tests/Emergence/buelerprofile.f90
3206 views
!/*****************************************************************************/1! *2! * Elmer/Ice, a glaciological add-on to Elmer3! * http://elmerice.elmerfem.org4! *5! *6! * This program is free software; you can redistribute it and/or7! * modify it under the terms of the GNU General Public License8! * as published by the Free Software Foundation; either version 29! * of the License, or (at your option) any later version.10! *11! * This program is distributed in the hope that it will be useful,12! * but WITHOUT ANY WARRANTY; without even the implied warranty of13! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14! * GNU General Public License for more details.15! *16! * You should have received a copy of the GNU General Public License17! * along with this program (in file fem/GPL-2); if not, write to the18! * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,19! * Boston, MA 02110-1301, USA.20! *21! *****************************************************************************/22! ******************************************************************************23FUNCTION Bueler ( Model, nodenumber, coord) RESULT(elevation)24USE Types25USE DefUtils26IMPLICIT NONE27TYPE(Model_t) :: Model28INTEGER :: nodenumber29REAL(KIND=dp) :: coord(3), elevation3031REAL(KIND=dp), PARAMETER :: L = 361.25d03, H0 = 2.06d03, n = 3.0_dp, minh=100.0_dp32REAL(KIND=dp) :: T1, T2, H, R3334R = SQRT(coord(1)*coord(1) + coord(2)*coord(2))35T1 = ( H0/((n - 1.0_dp)**(n/(2.0_dp*n + 2.0_dp))) )36T2 = (n + 1.0_dp)*(R/L) - n*((R/L)**((n + 1.0_dp)/n)) + &37n*((1.0_dp - (R/L))**((n + 1.0_dp)/n) ) - 1.038H = T1 * ( T2**(n/(2.0*n + 2.0)) )39elevation = MAX(H,minh)40END FUNCTION Bueler414243