function wrf_map_ggp(wks[1]:graphic,lat[*][*]:numeric, lon[*][*]:numeric, \ in_file[1]:file,opt_args[1]:logical) begin ; ; This function creates a map plot, and bases the projection on ; the MAP_PROJ attribute in the given file. ; ; 1. Make a copy of the resource list, and call a function to set ; some resources common to all map projections. ; ; 2. Determine the projection being used, and set resources based ; on that projection. ; ; 3. Create the map plot, and draw and advance the frame ; (if requested). if(opt_args.and.isatt(opt_args,"gsnDebugWriteFileName")) then wrf_debug_file = get_res_value(opt_args,"gsnDebugWriteFileName", "") end if opts = opt_args ; Make a copy of the resource list opts = True ;---Set some map resources based on parameters and variables in input file. opts = wrf_map_resources_ggp(in_file,lat, lon,opts) if(.not.isatt(opts,"mpProjection")) then print("wrf_map: Error: no MAP_PROJ attribute in input file") return(new(1,graphic)) else projection = opts@mpProjection end if ; The default is not to draw the plot or advance the frame, and ; to maximize the plot in the frame. opts@gsnDraw = get_res_value_keep(opts,"gsnDraw", False) opts@gsnFrame = get_res_value_keep(opts,"gsnFrame", False) opts@gsnMaximize = get_res_value_keep(opts,"gsnMaximize", True) delete_attrs(opts) ; Clean up. mp = gsn_map(wks,projection,opts) ; Create map plot. if(isvar("wrf_debug_file")) then opts@mpProjection = projection write_wrf_debug_info(wks,False,False,wrf_debug_file,opts,"wrf_map") end if return(mp) ; Return. end