I've tried to figure out why I did not get the same data from nctoolbox and ncview. However, I did get identical results at some locations.
(1) identical result:
-- using nctoolbox
dir = '/Users/changks/IBIS/canada-10km/normals_wetd/wetd_sensitivity';
wetd_x100 = 'original/wetd.mon.nc';
ds_wetd_x100 = ncgeodataset('wetd.mon.nc'); obj_ds_wetd_x100 = ds_wetd_x100.geovariable('wetd');
SK_OA.lat = 147; SK_OA.lon = - (360 - 188);
SK_OBS.lat = 149; SK_OBS.lon = - (360 - 196);
SK_OJP.lat = 148; SK_OJP.lon = -(360 - 198);
wetd_x100_SK_OA = obj_ds_wetd_x100.geosubset(SK_OA).data;
wetd_x100_SK_OBS = obj_ds_wetd_x100.geosubset(SK_OBS).data;
wetd_x100_SK_OJP = obj_ds_wetd_x100.geosubset(SK_OJP).data;
plot(wetd_x100_SK_OA,'LineWidth',2,'LineStyle','--','Color',[0 0 0]); hold on
plot(wetd_x100_SK_OBS,'LineWidth',2,'LineStyle','--','Color',[0 0 0]); hold on
plot(wetd_x100_SK_OJP,'LineWidth',2,'LineStyle','--','Color',[0 0 0]); hold on
-- using ncview
$ ncview wetd.mon.nc
--> move your cursor to (x = 188, y = 147), (x = 196, y = 149) and (x = 198, y = 148)
--> double click to show the trend line at that location
--> you will see the results are identical with that in nctoolbox.
- different results:
try locations : (x = 383, y = 32), (x = 410, y = 117) and (x = 406, y = 120)
I also attached the nc file that I'm trying to solve this puzzle at http://db.tt/WIqIt2u1
Are there anyone can help me to figure it out why I did not get the same trend lines at some locations in nctoolbox?
Thank you for your help.
Cheers,
Michael
nc = ncgeodataset('c:/users/rsignell/downloads/wetd.mon.nc');
wetd_var = nc.geovariable('wetd');
wetd = squeeze(wetd_var.data(1,1,:,:));
% plot with explicitly referenced lon,lat grid
subplot(121)
lon = nc.data('longitude');
lat = nc.data('latitude');
pcolorjw(lon,lat,wetd)
title('Explicit lon,lat values')
% plot using geovariable method for extracting grid
subplot(122)
wetd_grid = squeeze(wetd_var.grid_interop(1,1,:,:));
pcolorjw(wetd_grid.lon,wetd_grid.lat,wetd)
title('Using geovariable-derived lon,lat values')
--
You received this message because you are subscribed to a topic in the Google Groups "nctoolbox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nctoolbox/lbnFlC_2Bw8/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to nctoolbox+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<4-25-2013 8-58-57 AM.png>
--
You received this message because you are subscribed to the Google Groups "nctoolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nctoolbox+...@googlegroups.com.