Re: mass change when regridding rectilinear grid to a curvilinear grid

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Oct 22 2013 - 08:56:53 MDT

After looking at your data, I'm not sure what your question is.

You do have very large values that go from 0 to 37123652 before regridding, and from 0 to 36310912.87568834 after regridding.

I created a plot of both your original data and the regridded data, and it looks like the regridding worked fine.

What doesn't look quite right are your original lat/lon values. If you do a printVarSummary on s_nh3, it says:

Variable: s_nh3
Type: double
Total Size: 1559520 bytes
            194940 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 361] x [lon | 540]
Coordinates:
            lat: [-89.75..90.25]
            lon: [-180.33..179.0033333333333]

Note the latitudes go from -89.75 to 90.25, which is invalid (although the regridding still works and so does the plotting).
Your longitude values look a bit suspicious as well. It's almost like an extra delta of 0.25 got added to the latitude values.

See the attached image.

--Mary

On Oct 22, 2013, at 8:19 AM, Mary Haley <haley@ucar.edu> wrote:

> Dear Bin Zhang,
>
> I had to reject your post because it had a 25 megabyte attachment. This is too large for the ncl-talk mail list.
>
> I have your files, and will take a look soon.
>
> -Mary
>
>> .
>>
>> From: "zhangbinrc" <zhangbinrc@163.com>
>> Subject: mass change when regridding rectilinear grid to a curvilinear grid
>> Date: October 22, 2013 1:53:29 AM MDT
>> To: <ncl-talk@ucar.edu>
>>
>>
>> Hi all,
>>
>> I want to regrid global ammonia emissions (0.5 x 0.667 degree) to a lambert confromal domain (27km x 27km) covering China.
>>
>> The total ammonia mass is about ten times of that before regridding. Does anyone knows why ?
>>
>> Here are the script:
>>
>>
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>> begin
>>
>> fil = addfile("./geo_em.d01.nc","r")
>> lat2d = fil->XLAT_M(0,:,:)
>> lon2d = fil->XLONG_M(0,:,:)
>> nlat2d = dimsizes(lat2d(:,0))
>> nlon2d = dimsizes(lon2d(0,:))
>>
>>
>> nh3 = new((/nlat2d,nlon2d/),"float")
>> fil_nh3 = addfile("./Streets_NH3_FF_2000.geos5.05x0666.nc","r")
>> s_nh3 = fil_nh3->NH3
>>
>> printVarSummary(s_nh3)
>> nh3_d = rgrid2rcm(s_nh3&lat,s_nh3&lon,s_nh3,lat2d,lon2d,0)
>> nh3 = doubletofloat(nh3_d)
>>
>> ; printVarSummary(nh3)
>> print(dim_sum(dim_sum(nh3))/10^6)
>> print(dim_sum(dim_sum(s_nh3))/10^6)
>>
>> end
>>
>>
>>
>>
>> 张斌 博士生/Bin Zhang Ph.D. Candidate
>> 清华大学地球系统科学研究中心/ Center for Earth System Science, Tsinghua
>> Email:zhangbin06@mails.tsinghua.edu.cn
>> <geo_em.d01.nc><Streets_NH3_FF_2000.geos5.05x0666.nc><regrid_nh3.ncl>
>>
>>
>>
>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Oct 22 08:57:02 2013

This archive was generated by hypermail 2.1.8 : Tue Oct 22 2013 - 10:35:27 MDT