科学网

 找回密码
  注册

tag 标签: lambert

相关帖子

版块 作者 回复/查看 最后发表

没有相关内容

相关日志

热爱园艺的美国富婆Rachel Lambert Mellon (1910--2014)
livingfossil 2016-11-6 09:46
热爱园艺的美国富婆Rachel Lambert Mellon (1910--2014) Rachel Lowe Lambert Lloyd Mellon (1910--2014), often known as Bunny Mellon, who was an American horticulturalist, gardener, philanthropist, and art collector......... https://en.wikipedia.org/wiki/Rachel_Lambert_Mellon
个人分类: 杂集Others|3419 次阅读|0 个评论
regridding from lat-lon to lambert conformal conic (LLC)
cwjwang 2013-10-30 15:54
Recently, doing the regridding job for atmospheric model. There is a script I used to regrid the lat-lon to LLC. The case likes: Source: the soil organic matter data of China whose resolution is 30 seconds Goal: 36 km lambert conformal conic netcdf file Here is the script. Enjoying! load $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl load $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl load $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl load $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl load $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl begin ;---We want to write the results to netcdf file WRITE_RESULTS = True ;---The interpolation way we used INTERP_METHOD = bilinear ;---Data file containing source curvilinear grid src_file = SOM.nc ;;---Change (likely) sfile = addfile(src_file,r) src_lat = sfile-lat ;;---Change (likely) src_lon = sfile-lon ;;---Change (likely) ;---Get variable to regrid varname = SOM ;;---Change (likely) var = sfile-$varname$ som = var(0,:,:) ;---WRF file containing destination grid dst_file = wrfout.nc ;;---Change (likely) dfile = addfile(dst_file,r) dst_lat = dfile-XLAT(0,:,:) ;;---Change (maybe) dst_lon = dfile-XLONG(0,:,:) ;;---Change (maybe) ;---Set up regridding options Opt = True ;---bilinear is the default. patch and conserve are other options. Opt@InterpMethod = bilinear ;;---Change (maybe) Opt@WgtFileName = rec_to_WRF.nc Opt@SrcGridLat = src_lat ; source grid Opt@SrcGridLon = src_lon Opt@SrcRegional = True ;;--Change (maybe) Opt@SrcInputFileName = src_file ; optional, but good idea ; Opt@SrcMask2D = where(.not.ismissing(var),1,0) ; Necessary if has ; missing values. Opt@DstGridLat = dst_lat ; destination grid Opt@DstGridLon = dst_lon Opt@DstRegional = True ;;--Change (maybe) Opt@ForceOverwrite = True Opt@PrintTimings = True Opt@Debug = True var_regrid = ESMF_regrid(som,Opt) ; Do the regridding printVarSummary(var_regrid) ;---------------------------------------------------------------------- ; Plotting section ; ; This section creates filled contour plots of both the original ; data and the regridded data, and panels them. ;---------------------------------------------------------------------- var@lat2d = src_lat ; Needed for plotting. var_regrid var@lon2d = src_lon ; already has these attrs attached. wks = gsn_open_wks(ps,curv_to_WRF) res = True res@gsnMaximize = True res@gsnDraw = False res@gsnFrame = False res@cnFillOn = True res@cnLinesOn = False res@cnLineLabelsOn = False res@cnFillMode = RasterFill res@lbLabelBarOn = False ; Turn on later in panel res@mpMinLatF = min(src_lat) res@mpMaxLatF = max(src_lat) res@mpMinLonF = min(src_lon) res@mpMaxLonF = max(src_lon) ;;--Change (maybe) mnmxint = nice_mnmxintvl( min(var), max(var), 100, False) res@cnLevelSelectionMode = ManualLevels res@cnMinLevelValF = mnmxint(0) res@cnMaxLevelValF = mnmxint(1) res@cnLevelSpacingF = mnmxint(2) ;---Resources for plotting regridded data res@gsnAddCyclic = False ;;---Change (maybe) res@tiMainString = Data on WRF grid ( + Opt@InterpMethod + ) plot_regrid = gsn_csm_contour_map(wks,var_regrid,res) ;---Resources for plotting original data res@gsnAddCyclic = False ;;---Change (maybe) res@tiMainString = Data on original grid plot_orig = gsn_csm_contour_map(wks,som,res) ;---Compare the plots in a panel pres = True pres@gsnMaximize = True pres@gsnPanelLabelBar = True gsn_panel(wks,(/plot_orig,plot_regrid/),(/2,1/),pres) ;---------------------------------------------------------------------- ; Data writing section ; Write the regridded data to a NetCDF file ;---------------------------------------------------------------------- if(WRITE_RESULTS) then rgrdFileName = som_regrid.nc system(rm -f + rgrdFileName) rgrd_nc = addfile(rgrdFileName,c) ;---Create variable to hold global file attributes global = True copy_VarAtts(sfile, global) if (isatt(sfile,title)) then global@TITLE = REMAPPED: + sfile@title end if global@remap = NCL: ESMF_regrid_with_weights (NCL version ' + \ get_ncl_version() + ') global@remap_method = INTERP_METHOD global@creation_date = systemfunc(date) fileattdef( rgrd_nc, global ) ; copy global file attributes ; filedimdef(rgrd_nc,TIME,-1,True) ; force an unlimited dimension ;--- Write variables to file. Coordinate arrays will be written ;--- automatically ; rgrd_nc-SOM = (/var_regrid/) end if end
6932 次阅读|0 个评论
regriding the landuse for atmospheric model
cwjwang 2013-10-24 21:48
(1) To obtain the Chinese 1km landuse raster data from http://westdc.westgis.ac.cn/ (2) From the information of the raster data, knowing the projection is ALBERS. (3) However the projection from the atmospheric model is Lambert, so the projection transformation is needed. (4) Use Arcgis 10.2 extract the data what we wanted spatial analysis tool→ extract by attibutes (5) reprojecting the raster data data management tools→projection and transformation→project raster (6) in the window of project raster, defining the Lambert conformal conic projection. Seeing the table (7) Defining the polygon fishnet data management tools→feature class→creat fishnet when the creating fishnet window appeared, the most important thing is difining the fishnet origin coodinate. The formula is like: left cornel : -( west_east grid cells/2 )*grid resolution bottom : -(south_north grid cells/2)*grid resolution (8)calculate the raster areas in each grid cell spatial analysis tools→zonal→Tabute Area (9) joining the area table to grid cells' attibute table when joining the attibute table, the area table's ID is same as grid cell's (10) exporting to Excel Table of Lambert in Arcgis .VS. in WRF Lambert in Arcgis Lambert in WRF standard_parrell_1 truelat1 standard_parrell_2 truelat2 central_meridian stand_lon latitude of origin ref_lat
3234 次阅读|0 个评论

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-6-18 19:17

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部