[ncl-talk] Scatterplot geolocation issue

Mary Haley haley at ucar.edu
Wed Feb 17 08:37:24 MST 2016


Steven,

If I understand your question correctly, I think the issue is that in your
XY plot call, you are only providing the Y values. There are no X values.
Hence NCL is going to use 0 to n-1 as your X values, where "n" is the
number of points in the Y array.

Try calling gsn_csm_xy instead, and pass in your longitude array for the X
axis. As an example:

plot  = gsn_csm_xy (wks,lon,data,res)
​Word of caution here: I noticed you are filling in the data, deepblue, and
diff arrays with two sets of values, and I don't know if those two sets of
values have the same longitude points on the X axis. If they don't, then
you should create a "lon" array the same way you did the other arrays, and
fill in the appropriate values.  You can pass a 2D Y and X array to
"gsn_csm_xy", as long as they are the same dimensions.

See the attached script, which I just plotted data straight from your
July.nc file.

--Mary



On Tue, Feb 16, 2016 at 2:39 PM, BLIUJUS, STEVEN D CTR USAF AFMC
AFLCMC/HBAW-OL <steven.bliujus.3.ctr at us.af.mil> wrote:

> I am running a scatterplot between two different files, but I am having
> issues with indices. I have two different files, one file makes point (0,0)
> as 90 degrees south and 180deg East. The other file  sets point(0,0) as 90
> degrees south and 0 degrees east, thus when trying to plot the data as a
> comparison, in this case (see image) AOD between two different files, you
> can see there is a 180 deg phase shift. I am trying to find the easiest fix
> for this. Below is a variable summary for each value: (I do see for var1
> the
> lon is specified -179.5..179.5, whereas X2x3 specifies 0.5...359.5). Any
> help would be appreciated. I have attached the image, the script, and one
> of
> the files. The other file is too large to send by email. Basically I'm
> looking to fix the shift.
>
>
> Variable: var1
> Type: double
> Total Size: 518400 bytes
>             64800 values
> Number of Dimensions: 2
> Dimensions and sizes:   [lat | 180] x [lon | 360]
> Coordinates:
>             lat: [-89.5..89.5]
>             lon: [-179.5..179.5]
> Number Of Attributes: 19
>   _FillValue :  -9999
>   long_name :   Aerosol Optical Thickness at 0.55 microns for both Ocean
> (best) and Land (corrected): Mean of Daily Mean
>   units :       1
>   Level_2_Pixel_Values_Read_As :        Real
>   Included_Level_2_Nighttime_Data :     False
>   Quality_Assurance_Data_Set :  No_QA
>   Statistic_Type :      Simple
>   Aggregation_Data_Set :        None
>   Derived_From_Level_3_Daily_Data_Set :
> Aerosol_Optical_Depth_Land_Ocean_Mean
>   Weighting :   Unweighted
>   standard_name :       aerosol optical depth
>   quantity_type :       Aerosol Optical Depth
>   product_short_name :  MOD08_M3
>   product_version :     6
>   coordinates : lat lon
>   cell_methods :        time: mean time: mean
>   latitude_resolution :    1
>   longitude_resolution :           1
>   average_op_ncl :      dim_avg_n over dimension(s): ncl_join
>
> Variable: X2x3
> Type: float
> Total Size: 259200 bytes
>             64800 values
> Number of Dimensions: 2
> Dimensions and sizes:   [LAT | 180] x [LON | 360]
> Coordinates:
>             LAT: [-89.5..89.5]
>             LON: [0.5..359.5]
> Number Of Attributes: 13
>   sub_center :  Ocean Prediction Center
>   center :      U.S. Air Force - Global Weather Center
>   long_name :   Unknown Variable Name
>   units :       unknown
>   _FillValue :  1e+20
>   level_indicator :     200
>   gds_grid_type :       0
>   parameter_table_version :     129
>   parameter_number :    147
>   level :       0
>   forecast_time :       0
>   forecast_time_units : years
>
>
>
> Steven Bliujus, Contractor
> SEMS/16WS WXE
> 557th Weather Wing
> DNS: 232-7151
>
>
> _______________________________________________
> 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/20160217/110bbb93/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xy.png
Type: image/png
Size: 60849 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160217/110bbb93/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OneDegree_mod.ncl
Type: application/octet-stream
Size: 944 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160217/110bbb93/attachment.obj 


More information about the ncl-talk mailing list