[ncl-talk] problems with rtest

Mary Haley haley at ucar.edu
Fri Sep 19 07:37:54 MDT 2014


Hi,

I am not familiar with rtest and unfortunately I can't find any examples
that use this function.

Can you provide your script and data so I can try running it here?  You can
use ftp to upload the data:

http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP

--Mary

On Fri, Sep 19, 2014 at 6:35 AM, Vanúcia Schumacher <
vanucia-schumacher at hotmail.com> wrote:

> Hi Mary,
>
>
> I did what you suggested, ccr values ​​have changed, but the graphic
> remains the same, I do not understand why the ghraphical does not show
> anything, just a few points (attached).
>
> What I want to do is calculate the correlation between data model with
> reanalysis, and calculate the level of statistically significance between
> the two sets of data, with 95% of confidence.
>
> I believe it is just as I am calculating (attached), but do not understand
> why it does not generate anything in the graph of statistically significant
> results, if you could help me clarify what is happening I am grateful.
>
> Variable: tmp1
> Type: double
> Total Size: 46656000 bytes
>             5832000 values
> Number of Dimensions: 3
> Dimensions and sizes: [TIME | 360] x [lat | 90] x [lon | 180]
> Coordinates:
>             TIME: [527040..16260480]
>             lat: [-89.69999694824219..89.69999694824219]
>             lon: [   0..359.7000122070312]
> Number Of Attributes: 5
>   remap : remapped via ESMF_regrid_with_weights: Bilinear remapping
>   missing_value : -9.999999999999999e+33
>   _FillValue : -9.999999999999999e+33
>   long_name : SST[GX=X2DEG,GY=Y2DEG]
>   history : From sst
>
> Variable: tmp2
> Type: float
> Total Size: 23328000 bytes
>             5832000 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 360] x [lat | 90] x [lon | 180]
> Coordinates:
>             time: [15.5..10934.5]
>             lat: [ -89..  89]
>             lon: [   0.. 358]
> Number Of Attributes: 11
>   standard_name : sea_surface_temperature
>   long_name : Sea Surface Temperature
>   units : K
>   _FillValue : 1e+20
>   missing_value : 1e+20
>   comment : "this may differ from ""surface temperature"" in regions of
> sea ice."
>   original_name : sosstsst
>   original_units : degC
>   history : 2011-11-09T14:11:22Z altered by CMOR: Converted units from
> 'degC' to 'K'. 2011-11-09T14:11:22Z altered by CMOR: replaced missing value
> flag (9.96921e+36) with standard missing value (1e+20).
>   cell_methods : time: mean (interval: 30 minutes)
>   associated_files : baseURL:
> http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile:
> gridspec_ocean_fx_IPSL-CM5A-LR_decadal1980_r0i0p0.nc areacello:
> areacello_fx_IPSL-CM5A-LR_decadal1980_r0i0p0.nc
>
> (0) tmp2: min=271.211 max=305.396
> (0) tmp1: min=231.963 max=304.787
>
> Variable: ts1
> Type: double
> Total Size: 46656000 bytes
>             5832000 values
> Number of Dimensions: 3
> Dimensions and sizes: [lat | 90] x [lon | 180] x [TIME | 360]
> Coordinates:
>             lat: [-89.69999694824219..89.69999694824219]
>             lon: [   0..359.7000122070312]
>             TIME: [527040..16260480]
> Number Of Attributes: 5
>   history : From sst
>   long_name : SST[GX=X2DEG,GY=Y2DEG]
>   _FillValue : -9.999999999999999e+33
>   missing_value : -9.999999999999999e+33
>   remap : remapped via ESMF_regrid_with_weights: Bilinear remapping
>
> Variable: ts2
> Type: float
> Total Size: 23328000 bytes
>             5832000 values
> Number of Dimensions: 3
> Dimensions and sizes: [lat | 90] x [lon | 180] x [time | 360]
> Coordinates:
>             lat: [ -89..  89]
>             lon: [   0.. 358]
>             time: [15.5..10934.5]
> Number Of Attributes: 11
>   associated_files : baseURL:
> http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile:
> gridspec_ocean_fx_IPSL-CM5A-LR_decadal1980_r0i0p0.nc areacello:
> areacello_fx_IPSL-CM5A-LR_decadal1980_r0i0p0.nc
>   cell_methods : time: mean (interval: 30 minutes)
>   history : 2011-11-09T14:11:22Z altered by CMOR: Converted units from
> 'degC' to 'K'. 2011-11-09T14:11:22Z altered by CMOR: replaced missing value
> flag (9.96921e+36) with standard missing value (1e+20).
>   original_units : degC
>   original_name : sosstsst
>   comment : "this may differ from ""surface temperature"" in regions of
> sea ice."
>   missing_value : 1e+20
>   _FillValue : 1e+20
>   units : K
>   long_name : Sea Surface Temperature
>   standard_name : sea_surface_temperature
>
> (0) ts1: min=231.963 max=304.787
> (0) ts2: min=271.211 max=305.396
>
> Variable: ccr
> Type: double
> Total Size: 129600 bytes
>             16200 values
> Number of Dimensions: 2
> Dimensions and sizes: [lat | 90] x [lon | 180]
> Coordinates:
>             lat: [-89.69999694824219..89.69999694824219]
>             lon: [   0..359.7000122070312]
> Number Of Attributes: 5
>   remap : remapped via ESMF_regrid_with_weights: Bilinear remapping
>   missing_value : -9.999999999999999e+33
>   _FillValue : 1.000000020040877e+20
>   long_name : SST[GX=X2DEG,GY=Y2DEG]
>   history : From sst
>
> (0) ccr: min=-0.344626 max=0.988159
>
> Variable: Nx
> Type: integer
> Total Size: 4 bytes
>             1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
>
> Variable: prob
> Type: double
> Total Size: 129600 bytes
>             16200 values
> Number of Dimensions: 2
> Dimensions and sizes: [lat | 90] x [lon | 180]
> Coordinates:
>             lat: [-89.69999694824219..89.69999694824219]
>             lon: [   0..359.7000122070312]
> Number Of Attributes: 5
>   remap : remapped via ESMF_regrid_with_weights: Bilinear remapping
>   missing_value : -9.999999999999999e+33
>   _FillValue : 1.000000020040877e+20
>   long_name : SST[GX=X2DEG,GY=Y2DEG]
>   history : From sst
>
> (0) prob: min=0 max=0.844997
>
>
>
>
> ---
> Vanúcia Schumacher
> Mestranda em Meteorologia - UFV
> Meteorologista -UFPel
> Departamento de Meteorologia Agrícola - DEA
> Cel: (31) 9978 2522
> DEA: (31) 3899 1890
>
>
> ------------------------------
> Date: Thu, 18 Sep 2014 17:37:22 -0600
> Subject: Re: [ncl-talk] problems with rtest
> From: haley at ucar.edu
> To: vanucia-schumacher at hotmail.com
> CC: ncl-talk at ucar.edu
>
>
> It seems that nobody answered this question, so I'll take a stab at it.
>
> Did you notice that "ccr" has a maximum value of 1e20?  This indicates
> that something is likely wrong with a _FillValue attribute somewhere.
>
> You included a bunch of "printVarSummary" output which is helpful, but it
> would also help to see the min/max of the ts1 and ts2 values.  I noticed
> that each of these variables have different _FillValue attribute values,
> which makes me a little suspicious.  It's almost like the escorc routine is
> using the same _FillValue for both sets of arrays.
>
> As a test, you could try setting the _FillValue of ts1 and ts2 to the same
> value, before calling escorc, to see if this helps. For example:
>
> ts1 at _FillValue = 1e20
> ts2 at _FillValue = 1e20
> ccr    =   escorc(ts2,ts1)
>
> Also, before you do the above, can you include a printMinMax of both ts1
> and ts2 to make sure the values look reasonable?
>
> --Mary
>
>
> On Tue, Sep 9, 2014 at 1:27 PM, Vanúcia Schumacher <
> vanucia-schumacher at hotmail.com> wrote:
>
> I calculated the correlation between the variable sst to 2 different
> models, with same size lat, lon and time for both, and now I want to plot
> the test of significance, using the rtest. But my plot is very strange,
> does not plot anything (attached), someone can help?
>
> I used this function:
>
> ...
>
> ccr    =   escorc(ts2,ts1)
>
>   copy_VarAtts(ts1, ccr)
>   copy_VarCoords_1(ts1,ccr)
>
> ....
>
> ;  statistical significance of ccr
> ;*************************************************
>
>   Nx    = num(.not.ismissing(ts1))
>
>   prob  = rtest(ccr,Nx, 0)
>
>   copy_VarAtts(ccr, prob)
>   copy_VarCoords_1(ccr,prob)
>
> prob!0="lat"
> prob!1="lon"
> prob&lat=ccr&lat
> prob&lon=ccr&lon
>
>
> Variable: tmp1
> Type: double
> Total Size: 46656000 bytes
>             5832000 values
> Number of Dimensions: 3
> Dimensions and sizes: [TIME | 360] x [lat | 90] x [lon | 180]
> Coordinates:
>             TIME: [527040..16260480]
>             lat: [-89.69999694824219..89.69999694824219]
>             lon: [   0..359.7000122070312]
> Number Of Attributes: 5
>   remap : remapped via ESMF_regrid_with_weights: Bilinear remapping
>   missing_value : -9.999999999999999e+33
>   _FillValue : -9.999999999999999e+33
>   long_name : SST[GX=X2DEG,GY=Y2DEG]
>   history : From sst
>
> Variable: tmp2
> Type: float
> Total Size: 23328000 bytes
>             5832000 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 360] x [lat | 90] x [lon | 180]
> Coordinates:
>             time: [15.5..10934.5]
>             lat: [-87.86..87.86]
>             lon: [ 0..358]
> Number Of Attributes: 13
>   remap : remapped via ESMF_regrid_with_weights: Bilinear remapping
>   associated_files : baseURL:
> http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile:
> gridspec_ocean_fx_IPSL-CM5A-LR_decadal1980_r0i0p0.nc areacello:
> areacello_fx_IPSL-CM5A-LR_decadal1980_r0i0p0.nc
>   _FillValue : 1e+20
>   missing_value : 1e+20
>   cell_measures : area: areacello
>   cell_methods : time: mean (interval: 30 minutes)
>   history : 2011-11-09T14:11:22Z altered by CMOR: Converted units from
> 'degC' to 'K'. 2011-11-09T14:11:22Z altered by CMOR: replaced missing value
> flag (9.96921e+36) with standard missing value (1e+20).
>   original_units : degC
>   original_name : sosstsst
>   units : K
>   comment : "this may differ from ""surface temperature"" in regions of
> sea ice."
>   long_name : Sea Surface Temperature
>   standard_name : sea_surface_temperature
>
> (0) tmp2: min=3.88894 max=305.118
> (0) tmp1: min=231.963 max=304.787
>
> Variable: ts1
> Type: double
> Total Size: 46656000 bytes
>             5832000 values
> Number of Dimensions: 3
> Dimensions and sizes: [lat | 90] x [lon | 180] x [TIME | 360]
> Coordinates:
>             lat: [-89.69999694824219..89.69999694824219]
>             lon: [   0..359.7000122070312]
>             TIME: [527040..16260480]
> Number Of Attributes: 5
>   history : From sst
>   long_name : SST[GX=X2DEG,GY=Y2DEG]
>   _FillValue : -9.999999999999999e+33
>   missing_value : -9.999999999999999e+33
>   remap : remapped via ESMF_regrid_with_weights: Bilinear remapping
>
> Variable: ts2
> Type: float
> Total Size: 23328000 bytes
>             5832000 values
> Number of Dimensions: 3
> Dimensions and sizes: [lat | 90] x [lon | 180] x [time | 360]
> Coordinates:
>             lat: [-87.86..87.86]
>             lon: [ 0..358]
>             time: [15.5..10934.5]
> Number Of Attributes: 13
>   standard_name : sea_surface_temperature
>   long_name : Sea Surface Temperature
>   comment : "this may differ from ""surface temperature"" in regions of
> sea ice."
>   units : K
>   original_name : sosstsst
>   original_units : degC
>   history : 2011-11-09T14:11:22Z altered by CMOR: Converted units from
> 'degC' to 'K'. 2011-11-09T14:11:22Z altered by CMOR: replaced missing value
> flag (9.96921e+36) with standard missing value (1e+20).
>   cell_methods : time: mean (interval: 30 minutes)
>   cell_measures : area: areacello
>   missing_value : 1e+20
>   _FillValue : 1e+20
>   associated_files : baseURL:
> http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile:
> gridspec_ocean_fx_IPSL-CM5A-LR_decadal1980_r0i0p0.nc areacello:
> areacello_fx_IPSL-CM5A-LR_decadal1980_r0i0p0.nc
>   remap : remapped via ESMF_regrid_with_weights: Bilinear remapping
>
> Variable: ccr
> Type: double
> Total Size: 129600 bytes
>             16200 values
> Number of Dimensions: 2
> Dimensions and sizes: [lat | 90] x [lon | 180]
> Coordinates:
>             lat: [-89.69999694824219..89.69999694824219]
>             lon: [   0..359.7000122070312]
> Number Of Attributes: 5
>   remap : remapped via ESMF_regrid_with_weights: Bilinear remapping
>   missing_value : -9.999999999999999e+33
>   _FillValue : -9.999999999999999e+33
>   long_name : SST[GX=X2DEG,GY=Y2DEG]
>   history : From sst
> (0) ccr: min=-0.35971 max=1e+20
>
> Variable: Nx
> Type: integer
> Total Size: 4 bytes
>             1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
>
> Variable: prob
> Type: double
> Total Size: 129600 bytes
>             16200 values
> Number of Dimensions: 2
> Dimensions and sizes: [lat | 90] x [lon | 180]
> Coordinates:
>             lat: [-89.69999694824219..89.69999694824219]
>             lon: [   0..359.7000122070312]
> Number Of Attributes: 5
>   remap : remapped via ESMF_regrid_with_weights: Bilinear remapping
>   missing_value : -9.999999999999999e+33
>   _FillValue : -9.999999999999999e+33
>   long_name : SST[GX=X2DEG,GY=Y2DEG]
>   history : From sst
> (0) prob: min=0 max=0.862573
>
> ---
> Vanúcia Schumacher
> Mestranda em Meteorologia - UFV
> Meteorologista -UFPel
> Departamento de Meteorologia Agrícola - DEA
> Cel: (31) 9978 2522
> DEA: (31) 3899 1890
>
> _______________________________________________
> ncl-talk mailing list
> 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/20140919/0e84adf4/attachment.html 


More information about the ncl-talk mailing list