[ncl-talk] Difference plot contour map emply

Debasish Hazra debasish.hazra5 at gmail.com
Fri Apr 15 08:42:09 MDT 2016


Many thanks Mary.

Deba

On Thu, Apr 14, 2016 at 5:23 PM, Mary Haley <haley at ucar.edu> wrote:

> If you do a difference plot between two variables that have differently
> ordered latitudes, this will definitely be an issue unless you reverse the
> latitudes of one of the dimensions. NCL doesn't look at coordinate arrays
> when you simply subtract two arrays. Also, when you think about what this
> means for the coordinates of the differenced array, then you really have
> problems.
>
> See the attached script which illustrates this.
>
> You need to make sure you reverse the latitude dimension (assuming xarray1
> is the one with the reversed latitudes):
>
>    xdiff = xarray1(::-1,:) - xarray2
>    copy_VarMeta(xarray2,xdiff)        ;
>
> --Mary
>
> On Wed, Apr 13, 2016 at 2:53 PM, Debasish Hazra <debasish.hazra5 at gmail.com
> > wrote:
>
>> Hi,
>>
>> I have attached the code I used to calculate difference between two
>> models at a single time step. Model 1 (grib2 file) dimension is [lat | 181]
>> x [lon | 360]  and coordinates are  lat_0: [90..-90], lon_0: [
>> 0..359].  _FillValue :   1e+20
>>
>> second one (netcdf) dimension [lat | 180] x [lon | 360] and coordinates
>> are lat: [-89.5..89.5] , lon: [-179.5..179.5].  _FillValue :   -9999
>>
>>   I regrid the 2nd to the first one co-ordinate and make a difference
>> plot over different regions.
>>
>> Q1. If the 1st model latitude is [90..-90] and regrided 2nd model
>> latitude coordinates are latitude is [-90..90], does it have any impact on
>> the difference plot ?
>>
>> I have attached the code, model 1 output. I ftp the second model output
>> (icap_2015091500_MME_modeaod550.nc) as that is of larger size.
>>
>> Thanks.
>> Debasish
>>
>>
>> On Tue, Apr 12, 2016 at 1:57 PM, Mary Haley <haley at ucar.edu> wrote:
>>
>>> Debasish,
>>>
>>> Without seeing your code, we have no way of helping you debug it.
>>>
>>> I recommend using print statements to verify that your data after
>>> interpolation is correct. If your interpolated data array is called
>>> (data_interp):
>>>
>>> printVarSummary(data_interp)
>>> printMinMax(data_interp,0)
>>> print(num(ismissing(data_interp)))    ; count the number of missing
>>> values
>>>
>>> If you continue to have problems, it would help if we could see a plot
>>> or some code.
>>>
>>> --Mary
>>>
>>>
>>> On Mon, Apr 11, 2016 at 6:57 AM, Debasish Hazra <
>>> debasish.hazra5 at gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>>  I am using NCL (v6.3) to make a difference plot between two model
>>>> outputs. First one (grib2 file) dimension is [lat | 181] x [lon | 360]  and
>>>> coordinates are  lat_0: [90..-90], lon_0: [ 0..359].  _FillValue :   1e+20
>>>>
>>>> second one (netcdf) dimension [lat | 180] x [lon | 360] and coordinates
>>>> are lat: [-89.5..89.5] , lon: [-179.5..179.5].  _FillValue :   -9999
>>>>
>>>> To make both of them equal dimension before doing differences, I used "linint2"
>>>> function to interpolate 2nd one to the dimension of first. However, after
>>>> doing simple difference plot between the interpolated one and the first
>>>> output, I am getting all constant value and map plot remains empty.
>>>> Individual plot of these 2 dataset show lot of differences. Is it because I
>>>> did not assign fillvalue after interpolation , or something else ? Any
>>>> suggestions.
>>>>
>>>> Thanks
>>>> Debasish
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160415/81e93137/attachment.html 


More information about the ncl-talk mailing list