[ncl-talk] Regridding Multiple Moving Nests into One Domain
Mansur Ali Jisan
jisan.mansur at gmail.com
Fri Jan 18 12:48:50 MST 2019
Thanks a lot, Dennis. It worked perfectly. Following is the final code and
printVarSummary
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
f1 = addfile("input.nc","r")
f2 = addfile("dst_grd2.nc","r")
ncdf = addfile("output.nc" ,"c")
ws = f1->ws
printVarSummary(ws)
latGrid = f2->lat
lonGrid = f2->lon
ntim = 80
nLatGrid = dimsizes(latGrid)
nLonGrid = dimsizes(lonGrid)
stdGrid = new( (/ntim,nLatGrid,nLonGrid/),
typeof(ws),getVarFillValue(ws))
do nt=0,ntim-1
lat = f1->lat
lon = f1->lon
stdGrid(nt,:,:) = linint2_Wrap (lon, lat, ws(nt,:,:), False, lonGrid,
latGrid, 0)
end do
printVarSummary(stdGrid)
ncdf->stdGrid=stdGrid
*Variable: ws*
*Type: float*
*Total Size: 462337280 bytes*
* 115584320 values*
*Number of Dimensions: 3*
*Dimensions and sizes: [time | 80] x [lat | 1202] x [lon | 1202]*
*Coordinates:*
* lat: [16.70408..27.50491]*
* lon: [-83.0238..-71.36649]*
*Number Of Attributes: 0*
*Variable: stdGrid*
*Type: float*
*Total Size: 1566720000 bytes*
* 391680000 values*
*Number of Dimensions: 3*
*Dimensions and sizes: [80] x [lat | 4080] x [lon | 6000]*
*Coordinates:*
* lat: [18.00208332523518..34.99791665857011]*
* lon: [-89.99791666469852..-65.00208333138792]*
*Number Of Attributes: 1*
* _FillValue : 9.96921e+36*
Regards,
Mansur
On Thu, Jan 17, 2019 at 4:05 PM Dennis Shea <shea at ucar.edu> wrote:
> Yes. Details are necessary.
> You should *always *include a printVarSummary or information from
> ncl_filedump or 'ncdump -h'
>
> This is an outline. You will have to alter for your use.
>
> If the source variable [say, 'x' ] generically looks looks like:
> Dimensions and sizes: [time | 318] x [lat | 1202] x [lon | 1202]
> Coordinates:
> time: [? ] ; ?ine time
> lat: [ latMin ... latMax] ; units degrees_north ; lat(lat)
> lon: [ lonMin...lonMax] ; units degrees east ; lon(lon)
>
> ===
> latGrid = ; destination latitudes
> lonGrid = ; destination longitudes
> nLatGrid = dimsizes(latGrid)
> nLonGrid = dimsizes(lonGrid)
> stdGrid = new( (/ntim,nLatGrid,nLonGrid/),
> typeof(x),getVarFillValue(x)) ; destination grid
>
> do nt=0,ntim-1
> lat_nt = ... ; rectilinear latitudes for current (nt) time
> lon_nt = ; longitudes
> stdGrid(nt,:,:) = *linint2_Wrap*
> <http://www.ncl.ucar.edu/Document/Functions/Contributed/linint2_Wrap.shtml>
> (lon_nt, lat_nt, x_nt(nt,:,:), False, lonGrid, latGrid, 0)
> end do
>
> printVarSummary(stdGrid)
>
>
> On Thu, Jan 17, 2019 at 11:36 AM Mansur Ali Jisan <jisan.mansur at gmail.com>
> wrote:
>
>> Hello,
>>
>> I need a suggestion in projecting multiple moving nest data into one
>> standard grid. I'm not sure which regridding function I should use. A few
>> details about the data:
>>
>> It's a dimensional wind speed data attached with lat-long dimension.
>> There are total 318 timesteps and every 15 minutes the domain moves to a
>> newer position. It's currently projected in a rectilinear grid with 1202
>> grid cells X-direction and 1202 grid cells in Y-direction. The data file is
>> in NetCDF format. Any suggestion will be very helpful. Please let me know
>> if I need to add details.
>>
>> Best Regards,
>> Mansur
>>
>> --
>> *Mansur Ali Jisan*
>> Ph.D. Student
>> URI Graduate School of Oceanography, RI 02882
>> http://jisan-mansur.com/
>>
>> <hasancee at iut-dhaka.edu>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
--
*Mansur Ali Jisan*
Ph.D. Student
URI Graduate School of Oceanography, RI 02882
http://jisan-mansur.com/
<hasancee at iut-dhaka.edu>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190118/704b30ca/attachment.html>
More information about the ncl-talk
mailing list