[ncl-talk] all nan after dim_avg_n_Wrap

xiaoming Hu yuanfangcan at hotmail.com
Fri Apr 23 11:01:02 MDT 2021


4-dimension array summary is actually before applying dim_avg_n_Wrap

See more detailed diagnose, code:
  printVarSummary(wetland_CH4_emissions_ens)
  printMinMax(wetland_CH4_emissions_ens,0)
  wetland_CH4_emissions = dim_avg_n_Wrap(wetland_CH4_emissions_ens,0) ; [model | 18] x [time | 228] x [lat | 360] x [lon | 720]
  print("got ensembe everage")
      printMinMax(wetland_CH4_emissions,0)
  printVarSummary(wetland_CH4_emissions)

Output:
Variable: wetland_CH4_emissions_ens
Type: double
Total Size: 8510054400 bytes
            1063756800 values
Number of Dimensions: 4
Dimensions and sizes: [model | 18] x [time | 228] x [lat | 360] x [lon | 720]
Coordinates:
            model: [1913..3934]
            time: [   1.. 228]
Number Of Attributes: 1
  units : mg CH4 m-2 day-1
(0) min=-0   max=535.915259495705
(0) got ensembe everage
(0) min=-nan   max=-nan

Variable: wetland_CH4_emissions
Type: double
Total Size: 472780800 bytes
            59097600 values
Number of Dimensions: 3
Dimensions and sizes: [time | 228] x [lat | 360] x [lon | 720]
Coordinates:
            time: [   1.. 228]
Number Of Attributes: 2
  units : mg CH4 m-2 day-1
  average_op_ncl : dim_avg_n over dimension(s): model


________________________________
From: Dennis Shea <shea at ucar.edu>
Sent: Friday, April 23, 2021 11:53 AM
To: xiaoming Hu <yuanfangcan at hotmail.com>
Cc: ncl-talk at ucar.edu <ncl-talk at ucar.edu>
Subject: Re: [ncl-talk] all nan after dim_avg_n_Wrap

The source array is:  [model | 18] x [time | 228] x [lat | 360] x [lon | 720]

The output array from:

wetland_CH4_emissions = dim_avg_n_Wrap(wetland_CH4_emissions_ens,0)

should be 3-dimensions: [time | 228] x [lat | 360] x [lon | 720]

You show 4-dimensions.


On Fri, Apr 23, 2021 at 10:07 AM xiaoming Hu via ncl-talk <ncl-talk at mailman.ucar.edu<mailto:ncl-talk at mailman.ucar.edu>> wrote:
I have used dim_avg_n_Wrap for a long time and never had issues. But today it led to all nan, any idea? Thanks,
xiaoming

See my code:
  printVarSummary(wetland_CH4_emissions_ens)
  printMinMax(wetland_CH4_emissions_ens,0)
  wetland_CH4_emissions = dim_avg_n_Wrap(wetland_CH4_emissions_ens,0) ; [model | 18] x [time | 228] x [lat | 360] x [lon | 720]
  print("got ensembe everage")
      printMinMax(wetland_CH4_emissions,0)

and output:
Variable: wetland_CH4_emissions_ens
Type: double
Total Size: 8510054400 bytes
            1063756800 values
Number of Dimensions: 4
Dimensions and sizes: [model | 18] x [time | 228] x [lat | 360] x [lon | 720]
Coordinates:
            model: [1913..3934]
            time: [   1.. 228]
Number Of Attributes: 1
  units : mg CH4 m-2 day-1
(0) min=-0   max=535.915259495705
(0) got ensembe everage
(0) min=-nan   max=-nan


_______________________________________________
ncl-talk mailing list
ncl-talk at mailman.ucar.edu<mailto:ncl-talk at mailman.ucar.edu>
List instructions, subscriber options, unsubscribe:
https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210423/ce941ef3/attachment.html>


More information about the ncl-talk mailing list