[ncl-talk] Interpolate WRF eta levels to pressure levels

Dennis Shea shea at ucar.edu
Wed Jan 8 08:53:17 MST 2020


Yes

Sent from my iPhone

> On Jan 8, 2020, at 8:32 AM, Anahita Amiri Farahani <aamir003 at ucr.edu> wrote:
> 
> 
> Hi Dennis,
> 
> I tried this, but it gives me missing values:
> 
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl" 
> 
> ana=addfile("wrfout_d01_2015-08-13","r")
> 
> lat1=ana->XLAT(0,:,0)
> lon1=ana->XLONG(0,0,:)
> P=ana->P
> pm10=ana->PM10
> delete(ana)
> 
> printVarSummary(pm10)
>   printMinMax(pm10,0)
>   print("====")
>   printVarSummary(P)
>   printMinMax(P,0)
>   print("====")
> 
> 
> po=(/1000,925,850,700,600,500,400,300,250,200,150,100/)*100.0
> po!0  = "po"
> po at long_name = "Pressure Level"
> po at units     = "Pa"
> 
> To = int2p_n_Wrap (P,pm10,po,1,1)
>    printVarSummary(To)
>    printMinMax(To,0)
> print("====")
> 
> 
> 
> 
> 
> Variable: pm10
> Type: float
> Total Size: 13255920 bytes
>             3313980 values
> Number of Dimensions: 4
> Dimensions and sizes:	[Time | 9] x [bottom_top | 34] x [south_north | 95] x [west_east | 114]
> Coordinates: 
> Number Of Attributes: 6
>   FieldType :	104
>   MemoryOrder :	XYZ
>   description :	pm10 dry mass
>   units :	ug m^-3
>   stagger :	
>   coordinates :	XLONG XLAT XTIME
> (0)	pm10 dry mass (ug m^-3) : min=0   max=183.558
> (0)	====
> 
> Variable: P
> Type: float
> Total Size: 13255920 bytes
>             3313980 values
> Number of Dimensions: 4
> Dimensions and sizes:	[Time | 9] x [bottom_top | 34] x [south_north | 95] x [west_east | 114]
> Coordinates: 
> Number Of Attributes: 6
>   FieldType :	104
>   MemoryOrder :	XYZ
>   description :	perturbation pressure
>   units :	Pa
>   stagger :	
>   coordinates :	XLONG XLAT XTIME
> (0)	perturbation pressure (Pa) : min=0.702637   max=2079.95
> (0)	====
> 
> Variable: To
> Type: float
> Total Size: 4678560 bytes
>             1169640 values
> Number of Dimensions: 4
> Dimensions and sizes:	[Time | 9] x [po | 12] x [south_north | 95] x [west_east | 114]
> Coordinates: 
>             po: [100000..10000]
> Number Of Attributes: 7
>   _FillValue :	9.96921e+36
>   FieldType :	104
>   MemoryOrder :	XYZ
>   description :	pm10 dry mass
>   units :	ug m^-3
>   stagger :	
>   coordinates :	XLONG XLAT XTIME
> (0)	pm10 dry mass (ug m^-3) : min=9.96921e+36   max=9.96921e+36
> (0)	====
> 
> 
> P is the perturbation pressure, should I use pressure instead?
> 
> Thanks,
> Ana
> 
> 
> 
>> On Tue, Jan 7, 2020 at 11:14 PM Dennis Shea <shea at ucar.edu> wrote:
>> ***If*** the WRF file has a variable 
>>       P(Time,bottom_top,south_north,west_east)
>> then those are the pressure levels at each 'eta' coordinate at each grid point and time.
>> 
>> If say you want to interpolate the variable T(Time,bottom_top,south_north,west_east)
>>  then something like:
>>   T       = f->T
>>   P       = f->P
>>   printVarSummary(T)
>>   printMinMax(T,0)
>>   print("====")
>>   printVarSummary(P)
>>   printMinMax(P,0)
>>   print("====")
>> 
>>   po    = (/1000,900,850,700,600,500,400,300,200,100,50,10,5/)*100.0
>>   po!0  = "po"
>>   po at long_name = "Pressure Level"
>>   po at units     = "Pa"
>> 
>>   To = int2p_n_Wrap (P,T,po,1,1)
>>    printVarSummary(To)
>>    printMinMax(To,0)
>>    print("====")
>> ====
>> If P is not on the WRF file, then you will have to get help from WRF support.
>> 
>> 
>> 
>>> On Tue, Jan 7, 2020 at 9:12 AM Anahita Amiri Farahani via ncl-talk <ncl-talk at ucar.edu> wrote:
>>> Hi all,
>>> 
>>> Is there any function/command in NCL to convert WRF eta levels to pressure levels?
>>> 
>>> Thanks,
>>> Ana
>>> _______________________________________________
>>> 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/20200108/b121f33f/attachment.html>


More information about the ncl-talk mailing list