爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 4684|回复: 0

怎么用wrf_map_overlays口令画出墨卡托投影方式的图?

[复制链接]

新浪微博达人勋

发表于 2019-5-13 15:11:21 | 显示全部楼层 |阅读模式
论文写作
我看过提问的智慧: 看过

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
想要出一张具有墨卡托投影方式的温度图,但是设置了 mpres@mpProjection ="Mercator",是wrf_map_overlays这个函数的问题吗?如果要换成墨卡托投影,该怎么设置呢?恳请大神指导指导代码如下:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
       filelist=systemfunc("ls /mnt/d/test/wrfout*")     
        f=addfiles(filelist,"r")
        temdata=wrf_user_getvar(f,"T2",-1)
        ave=dim_avg_n(temdata,0)
        aave=ave-273.15
;-- define the workstation
                cmap                                  =read_colormap_file("matlab_hot")
                wks_type                                   ="pdf"                       
                wks_type@wkPaperWidthF           =15                               
                wks_type@wkPaperHeightF           =10                       
                wks                                     =gsn_open_wks(wks_type,"/mnt/f/dasixia/data/wrf/air/air_indian")

        res                                           =True
        res@gsnMaximize                        =True                       
        res@gsnPaperOrientation             ="portrait"               
        res@gsnPaperMargin                        =0.2                       
        res@cnRasterSmoothingOn                =True         
        res@cnLineLabelsOn                   =False                                       
        res@cnInfoLabelOn                    =False                                       
        res@pmTickMarkDisplayMode      ="Conditional"                       
        res@tmXTOn                             =False
        res@tmYROn                             =False

        gsn_define_colormap(wks,"matlab_hot")
        res@cnLevelSelectionMode        ="ExplicitLevels"
        res@cnLevels                    =(/20,20.5,21,21.5,22,22.5,23,23.5,24,24.5,25,25.5,26,26.5,27,27.5,28,28.5,29,29.5,30,30.5/)   
        res@cnFillColors                =(/60,59,54,53,50,48,46,44,42,40,38,36,34,32,30,28,26,24,22,20,18,16,12/)                     
        res@cnFillOn                    =True
        res@cnLinesOn                   =False
        res@InitTime                    =False
        res@ValidTime                   =False
        res@Footer                       =False
        res@FieldTitle                        ="WRF Temperature of the Indian Ocean in Oct. 2015"
        contour                            =wrf_contour(f[0],wks,aave,res)

        mpres = True
        mpres@mpNationalLineColor       ="Black"
        mpres@mpDataSetName               ="Earth..4"
        mpres@mpOutlineBoundarySets       ="National"
        mpres@mpProjection                ="Mercator"
        mpres@mpDataBaseVersion           ="HighRes"
        mpres@mpLeftCornerLatF            =-5
        mpres@mpRightCornerLatF           =25
        mpres@mpLeftCornerLonF            =65
        mpres@mpRightCornerLonF           =100
        mpres@mpGridAndLimbOn             =True
        mpres@mpGridLatSpacingF           =2.5
        mpres@mpGridLonSpacingF           =2.5
        mpres@mpGridLineThicknessF        =0.5
        mpres@mpDataSetName               ="Earth..4"               
       mpres@mpLimitMode                 ="Corners"               
        mpres@mpOutlineOn                 =True
        over_id=wrf_map_overlays(f[0],wks,(/contour/),True,mpres)
end



密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表