Re: weighted area average of arctic

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 10 2013 - 15:51:23 MDT

The following indicates rectilinear grid.
Your approach should be ok.

> Coordinates:
> time: [15.5..34659.5]
> lat: [-87.86380004882812..87.86380004882812]
> lon: [ 0..357.1875]

On 06/10/2013 03:47 PM, Mira Berdahl wrote:
> Hi there,
> The following is the variable summary for the two variables in question. I
> don't believe this is on a curvilinear grid since it has only 1d lat and
> lon coordinates - is that right? (FYI, I'm using ncl version 5.1.0 on
> linux).
> Thanks and cheers,
> MB
>
>
> Variable: tas_bnu_rcp45
> Type: float
> Total Size: 37355520 bytes
> 9338880 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 1140] x [lat | 64] x [lon | 128]
> Coordinates:
> time: [15.5..34659.5]
> lat: [-87.86380004882812..87.86380004882812]
> lon: [ 0..357.1875]
> Number Of Attributes: 10
> standard_name : air_temperature
> long_name : Near-Surface Air Temperature
> units : K
> cell_methods : time: mean
> cell_measures : area: areacella
> history : 2012-03-23T08:34:14Z altered by CMOR: Treated scalar
> dimension: 'height'.
> coordinates : height
> missing_value : 1e+20
> _FillValue : 1e+20
> associated_files : baseURL:
> http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile:
> gridspec_atmos_fx_BNU-ESM_rcp45_r0i0p0.nc areacella:
> areacella_fx_BNU-ESM_rcp45_r0i0p0.nc
>
>
>
>
> Variable: cellarea_bnu
> Total Size: 32768 bytes
> 8192 values
> Number of Dimensions: 2
> Dimensions and sizes: [lat | 64] x [lon | 128]
> Coordinates:
> lat: [-87.86380004882812..87.86380004882812]
> lon: [ 0..357.1875]
> Number Of Attributes: 7
> standard_name : cell_area
> long_name : Atmosphere Grid-Cell Area
> units : m2
> history : 2013-04-27T01:46
>
>> Speculation: the answer is "no" this is not correct.
>> Likely you have a curvilinear grid. You are using {...} which
>> applies to rectilinear grids
>>
>> cellarea_bnu = in->areacella
>> wgty = cellarea_bnu(:,1)
>>
>> The areacella variable is rank 2 .. characterisic of curvilinear grid.
>>
>> Howevr, you should include
>>
>> cellarea_bnu = in->areacella
>> printVarSummary(cellarea_bnu)
>>
>> tas_bnu_rcp45 = in->tas
>>
>> printVarSummary(tas_bnu_rcp45)
>>
>> On 06/07/2013 05:14 PM, Mira Berdahl wrote:
>>> Hi everyone,
>>> I was just wondering if someone could confirm for me that I am properly
> taking the area average of the Arctic in the below script. Thank you
> very
>>> much in advance!
>>> Cheers,
>>> MB
>>> ;***************
>>> ; Start script
>>> ;***************
>>> begin
>>> in = addfile("tas_Amon_BNU-ESM_rcp45_r1i1p1_200601-210012.nc","r")
> tas_bnu_rcp45 = in->tas
>>> ;%%%%% read in the weights (area of grid cells %%%%%%%%%%%%%%%% in =
> addfile("areacella_fx_BNU-ESM_G1_r0i0p0_new.nc","r"); area of each grid
> cell
>>> cellarea_bnu = in->areacella
>>> wgty = cellarea_bnu(:,1)
>>> printVarSummary(wgty)
>>> ;%%% calculate the area weighted Arctic temperature --- based on area
> of
>>> grid cells.
>>> Arctic_tas_bnu_rcp45 =
>>> wgt_areaave(tas_bnu_rcp45(:,{60:90},:),wgty({60:90}),1.0,0)
>>> ;print("Arctic Average TAS BNU="+Arctic_tas_bnu)
>>> ; write out the Arctic average data for bcc into an ascii file
>>> asciiwrite("Arctic.tas.rcp45.BNU.asc",Arctic_tas_bnu_rcp45)
>>> end
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jun 10 15:51:29 2013

This archive was generated by hypermail 2.1.8 : Tue Jun 11 2013 - 12:03:57 MDT