# Metview Macro

# **************************** LICENSE START ***********************************
#
# Copyright 2012 ECMWF. This software is distributed under the terms
# of the Apache License version 2.0. In applying this license, ECMWF does not
# waive the privileges and immunities granted to it by virtue of its status as
# an Intergovernmental Organization or submit itself to any jurisdiction.
#
# ***************************** LICENSE END ************************************

function metops_instanciate(parameter,request)
	load_param_classes()

	global map = (
			"tp":	(param: "tp_param", args : [24]),
			"tp5":	(param: "tp_param", args : [120]),
			"tp10":	(param: "tp_param", args : [240]),
			"ff":	(param: "ff10_param", args : []),
			"ff10":	(param: "ff10_param", args : [])
		)
	
	if (map[parameter] <> nil) then
		return callargs(map[parameter].param,[request] & [map[parameter].args])	
	else
		return callargs("generic_param",[request,parameter])
	end if

end metops_instanciate
