[ncl-talk] unable to plot correctly

Mary Haley haley at ucar.edu
Thu Aug 16 20:21:56 MDT 2018


Geeta,

I don't know if you ever resolved this, but part of the problem is if you
are drawing contour lines of a very high-res plot, it is not a surprise
that you would get a lot of black lines.

To make the plotting go faster, I suggest:

res at cnFillOn = True
res at cnFillMode = "RasterFill"

Dennis suggested that you use this:

   MIRF = MIR*MIR at lab_radiance_scale_factor + MIR at lab_radiance_add_offset

but then in the script that you sent, MIRF is not used for plotting.
However, I think there would be an issue with plotting anyway, because when
you do a calculation like the above, all the metadata that was attached to
MIR is going to be stripped off, and MIRF will not have anything but a
_FillValue attribute. To fix something like that, we suggest:

   MIRF = MIR*MIR at lab_radiance_scale_factor + MIR at lab_radiance_add_offset

  copy_VarMeta(MIR,MIRF)

before you try to plot MIRF.

If you are still having problems, it would help if you include a
printVarSummary output of various variables in your script, especially the
MIR variables and the lat/lon variables. Even better, if you could provide
the file on ftp.

Thanks,

--Mary




On Wed, Aug 1, 2018 at 12:18 PM, Geeta Geeta <geetag54 at yahoo.com> wrote:

> thanks Dennis.
> I have to plot the count value only which is between 0-1001. (MinMax MIR).
> the plotting is over but the plot shows small white dots and is fully black
> on careful examination.
> I could not understand why should that be (i mean black with white dots)
> because below the plot, it is shown "Contour from 0-1001".
>
> If I ON the contour resources, the code runs forever.
>
>
> thanks
> Geeta.
>
>
> On Wednesday, 1 August 2018 5:05 AM, Dennis Shea <shea at ucar.edu> wrote:
>
>
> I think this has been mentioned to you before:
>
> *The most important rule in data processing is look at your data.'*---
> T*he 2nd-most important rule is* *read the documentation of the project.*
>
> Note: It is not ncl-talk's job to read the documentation. It is your job.
> ---
>
> Variable: MIR
> Type: *ushort*
> Dimensions and sizes: [DIM_000 | 1] x [DIM_001 | 1616] x [DIM_002 | 1618]
>
>  * lab_radiance_add_offset *: -0.00413433
>   lab_radiance_add_offset_gsics : -0.0110259
>   lab_radiance_quad : -1.31797e-07
>   lab_radiance_quad_gsics : -1.88751e-07
>   *lab_radiance_scale_factor *: 0.000281346
>   lab_radiance_scale_factor_ gsics : 0.000402925
>
> I *speculate* that to get correct values you would have to use something
> like:
>
>    MIRF = MIR***MIR@*lab_radiance_scale_factor + MIR@*
>
> *lab_radiance_add_offset*
> or
>
>
>    MIRF = *(*MIR* + **MIR at lab_radiance_add_offset**)**MIR@
> *lab_radiance_scale_factor*
>
> or
>
>
> *   ????*
> Again, this is your responsibility.
>
> Good Luck
>
> On Tue, Jul 31, 2018 at 11:27 AM, Geeta Geeta <geetag54 at yahoo.com> wrote:
>
> Hi all.
> I am trying to plot MIR_int (variable defined in the ncl code), but it is
> not being plotted properly. the output is without any error
>
>
> aditya at agniilap:~/geeta/ncl/ h5$ ../bin/ncl readh5.v2.ncl
>  Copyright (C) 1995-2014 - All Rights Reserved
>  University Corporation for Atmospheric Research
>  NCAR Command Language Version 6.2.1
>  The use of this software is governed by a License Agreement.
>  See http://www.ncl.ucar.edu/ for more details.
>
> Variable: f
> Type: file
> File path: /home/aditya/geeta/ncl/h5/ 3DIMG_23JUN2018_0300_L1C_ASIA_
> MER.h5
> Number of global attributes: 38
> Number of dimensions: 4
> Number of variables: 27
>
>
> Variable: var
> Type: string
> Total Size: 108 bytes
>             27 values
> Number of Dimensions: 1
> Dimensions and sizes: [27]
> Coordinates:
> (0) /GreyCount
> (1) /IMG_MIR
> (2) /IMG_MIR_RADIANCE
> (3) /IMG_MIR_TEMP
> (4) /IMG_SWIR
> (5) /IMG_SWIR_RADIANCE
> (6) /IMG_TIR1
> (7) /IMG_TIR1_RADIANCE
> (8) /IMG_TIR1_TEMP
> (9) /IMG_TIR2
> (10) /IMG_TIR2_RADIANCE
> (11) /IMG_TIR2_TEMP
> (12) /IMG_VIS
> (13) /IMG_VIS_ALBEDO
> (14) /IMG_VIS_RADIANCE
> (15) /IMG_WV
> (16) /IMG_WV_RADIANCE
> (17) /IMG_WV_TEMP
> (18) /Projection_Information
> (19) /Sat_Azimuth
> (20) /Sat_Elevation
> (21) /Sun_Azimuth
> (22) /Sun_Elevation
> (23) /X
> (24) /Y
> (25) /proj_dim
> (26) /time
>
> Variable: MIR
> Type: ushort
> Total Size: 5229376 bytes
>             2614688 values
> Number of Dimensions: 3
> Dimensions and sizes: [DIM_000 | 1] x [DIM_001 | 1616] x [DIM_002 | 1618]
> Coordinates:
> Number Of Attributes: 18
>   DIMENSION_LIST : <ARRAY of 0 elements>
>   _FillValue : 1023
>   bandwidth : 0.2
>   bits_per_pixel : 10
>   central_wavelength : 3.9313
>   grid_mapping : Projection_Information
>   invert : trueection_Information
>   lab_radiance_add_offset : -0.00413433
>   lab_radiance_add_offset_gsics : -0.0110259
>   lab_radiance_quad : -1.31797e-07
>   lab_radiance_quad_gsics : -1.88751e-07
>   lab_radiance_scale_factor : 0.000281346
>   lab_radiance_scale_factor_ gsics : 0.000402925
>   long_name : Middle Infrared Countn
>   radiance_units : mW.cm-2.sr-1.micron-1n
>   resolution : 4
>   resolution_unit : km.cm-2.sr-1.micron-1n
>   wavelength_unit : micron2.sr-1.micron-1n
>
> Variable: MIR_int
> Type: integer
> Total Size: 10458752 bytes
>             2614688 values
> Number of Dimensions: 2
> Dimensions and sizes: [1616] x [1618]
> Coordinates:
> Number Of Attributes: 1
>   _FillValue : 1023
> (0)
> (0) Middle Infrared Countn: min=0   max=1001
>
> Variable: longi
> Type: double
> Total Size: 12944 bytes
>             1618 values
> Number of Dimensions: 1
> Dimensions and sizes: [DIM_002 | 1618]
> Coordinates:
> Number Of Attributes: 5
>   CLASS : DIMENSION_SCALE
>   REFERENCE_LIST : <ARRAY of 0 elements>
>   long_name : x coordinate of projectionperaturerature
>   standard_name : projection_x_ coordinateionperaturerature
>   units : mrojection_x_ coordinateionperaturerature
> (0)
> (0) x coordinate of projectionperaturerature: min=-3234623.003937
> max=3234623.003937
>
> Variable: lati
> Type: double
> Total Size: 12928 bytes
>             1616 values
> Number of Dimensions: 1
> Dimensions and sizes: [DIM_001 | 1616]
> Coordinates:
> Number Of Attributes: 5
>   CLASS : DIMENSION_SCALE
>   REFERENCE_LIST : <ARRAY of 0 elements>
>   long_name : y coordinate of projectionperaturerature
>   standard_name : projection_y_ coordinateionperaturerature
>   units : mrojection_y_ coordinateionperaturerature
> (0)
> (0) y coordinate of projectionperaturerature: min=-1058893.687497
> max=5401854.420193
>
> Variable: TIME
> Type: double
> Total Size: 8 bytes
>             1 values
> Number of Dimensions: 1
> Dimensions and sizes: [DIM_000 | 1]
> Coordinates:
> Number Of Attributes: 3
>   CLASS : DIMENSION_SCALE
>   REFERENCE_LIST : <ARRAY of 0 elements>
>   units : minutes since 2000-01-01 00:00:00erature
>
> Variable: proj
> Type: integer
> Total Size: 4 bytes
>             1 values
> Number of Dimensions: 1
> Dimensions and sizes: [DIM_000 | 1]
> Coordinates:
> Number Of Attributes: 13
>   DIMENSION_LIST : <ARRAY of 0 elements>
>   false_easting :   0
>   false_northing :   0
>   grid_mapping_name : mercatorpor Brightness Temperaturerature
>   longitude_of_projection_origin :  75
>   lower_left_lat_lon(degrees) : (  -10, 44.5 )
>   lower_right_lat_lon(degrees) : (  -10, 105.5 )
>   semi_major_axis : 6378137
>   semi_minor_axis : 6356752.3142
>   standard_parallel : 17.75
>   upper_left_lat_lon(degrees) : ( 45.5, 44.5 )
>   upper_left_xy(meters) : ( -3234623.003937, 5401854.420193 )
>   upper_right_lat_lon(degrees) : ( 45.5, 105.5 )
> (0)
> (0) min=1461309144   max=1461309144
> (0) check_for_y_lat_coord: Warning: Data either does not contain a valid
> latitude coordinate array or doesn't contain one at all.
> (0) A valid latitude coordinate array should have a 'units' attribute
> equal to one of the following values:
> (0)    'degrees_north' 'degrees-north' 'degree_north' 'degrees north'
> 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
> (0) check_for_lon_coord: Warning: Data either does not contain a valid
> longitude coordinate array or doesn't contain one at all.
> (0) A valid longitude coordinate array should have a 'units' attribute
> equal to one of the following values:
> (0)    'degrees_east' 'degrees-east' 'degree_east' 'degrees east'
> 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
> aditya at agniilap:~/geeta/ncl/ h5$
>
>
> thanks
>
> Geeta.
>
> ______________________________ _________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/ mailman/listinfo/ncl-talk
> <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>
>
>
>
>
> _______________________________________________
> 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/20180816/4fc5039b/attachment.html>


More information about the ncl-talk mailing list