立即注册 登录
气象家园 返回首页

无敌大壮壮的个人空间 http://bbs.06climate.com/?126437 [收藏] [复制] [分享] [RSS]

日志

根据站内大佬改的把最大最小值输出来并取出对应经纬

已有 121 次阅读2023-4-18 13:10

x1d = ndtooned(tmpq(5,:,:))      ; convert 2D array to 1D for use in maxind
inds = ind_resolve(maxind (x1d),dimsizes(tmpq(5,:,:)))    ; convert 1D array back to 2D  
ilat = inds(0,0)        ; select the latitude index where the X array is at its' maximum   
ilon = inds(0,1)        ; select the longitude index where the X array is at its' maximum  
lat_max = tmpq&lat(ilat)   ; insert the latitude index into the lat coordinate variable
lon_max = tmpq&lon(ilon)   ; insert the longitude index into the lon coordinate variable  
print("Maximum value located at june lat="+lat_max+", lon="+lon_max+",T="+max(tmpq(5,:,:)))     
inds = ind_resolve(minind (x1d),dimsizes(tmpq(5,:,:)))    ; convert 1D array back to 2D  
ilat = inds(0,0)        ; select the latitude index where the X array is at its' maximum   
ilon = inds(0,1)        ; select the longitude index where the X array is at its' maximum  
lat_max = tmpq&lat(ilat)   ; insert the latitude index into the lat coordinate variable
lon_max = tmpq&lon(ilon)   ; insert the longitude index into the lon coordinate variable  
print("Minimum value located at june="+lat_max+",lon= "+lon_max+",T="+min(tmpq(5,:,:)))

全部作者的其他最新日志

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 立即注册

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

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

返回顶部