[ncl-talk] Problem with Inf(infinity) values using "vinth2p_ecmwf"

Adam Phillips asphilli at ucar.edu
Mon Apr 11 10:23:37 MDT 2022


Hi Hwa-Jin Choi,
Taking a quick look, I think the fact that your first 6 entries in your bm
array and the last value of the am array being set to @_FillValue might be
the issue. I believe these should be set to a proper value between 0 and 1,
or to 0, but they should not be missing. Looking at a CESM2 data file, the
last value of am is set to 0, and the first 14 values of bm are set to 0
for a 32 level atmospheric file. I am no expert on this however, so others
might have other thoughts and can chime in.
Hope that helps!
Adam

On Mon, Apr 11, 2022 at 10:09 AM 최화진 via ncl-talk <ncl-talk at mailman.ucar.edu>
wrote:

> Dear all,
>
> Hello.
> I am trying to convert model output variables to pressure levels using the
> "vinth2p_ecmwf" command. I am running version 6.6.2. The results came out
> as "inf(infinity)". So I checked again one by one, but I don't know which
> part was wrong. I have attached the part of the code and the variables
> summary below. Does anyone know how to fix it?
> Thank you in advance.
>
>
> var_3d_temp=vinth2p_ecmwf(temp,am,bm,lev,ps,interp,P0,1,extrap,1,tbot,zsurfg)
>
> Variable: temp
>
> Type: float
>
> Total Size: 418037760 bytes
>
>             104509440 values
>
> Number of Dimensions: 4
>
> Dimensions and sizes: [time | 336] x [pfull | 24] x [lat | 90] x [lon |
> 144]
>
> Coordinates:
>
>             time: [15.5..10211.5]
>
>             pfull: [3.650292822203918..996.1083927371856]
>
>             lat: [-89.49438202247191..89.49438202247191]
>
>             lon: [1.25..358.75]
>
> Number Of Attributes: 7
>
>   long_name : temperature
>
>   units : deg_K
>
>   valid_range : ( 100, 350 )
>
>   missing_value : -1e+10
>
>   _FillValue : -1e+10
>
>   cell_methods : time: mean
>
>   time_avg_info : average_T1,average_T2,average_DT
>
>
> Variable: am
>
> Type: float
>
> Total Size: 96 bytes
>
>             24 values
>
> Number of Dimensions: 1
>
> Dimensions and sizes: [24]
>
> Coordinates:
>
> Number Of Attributes: 1
>
>   _FillValue : 9.96921e+36
>
> (0) 0.003005739
>
> (1) 0.01771804
>
> (2) 0.05106884
>
> (3) 0.09796702
>
> (4) 0.1563271
>
> (5) 0.2043716
>
> (6) 0.2236364
>
> (7) 0.2283018
>
> (8) 0.2223992
>
> (9) 0.2087858
>
> (10) 0.1906666
>
> (11) 0.1702512
>
> (12) 0.149033
>
> (13) 0.1280352
>
> (14) 0.1079542
>
> (15) 0.08925071
>
> (16) 0.07220969
>
> (17) 0.05698349
>
> (18) 0.04362221
>
> (19) 0.03209632
>
> (20) 0.02231252
>
> (21) 0.01412098
>
> (22) 0.007290046
>
> (23) 9.96921e+36
>
>
> Variable: bm
>
> Type: float
>
> Total Size: 96 bytes
>
>             24 values
>
> Number of Dimensions: 1
>
> Dimensions and sizes: [24]
>
> Coordinates:
>
> Number Of Attributes: 1
>
>   _FillValue : 9.96921e+36
>
> (0) 9.96921e+36
>
> (1) 9.96921e+36
>
> (2) 9.96921e+36
>
> (3) 9.96921e+36
>
> (4) 9.96921e+36
>
> (5) 9.96921e+36
>
> (6) 0.0768977
>
> (7) 0.1512262
>
> (8) 0.2369952
>
> (9) 0.3256327
>
> (10) 0.4113672
>
> (11) 0.49243
>
> (12) 0.5677493
>
> (13) 0.6367145
>
> (14) 0.6990366
>
> (15) 0.7546597
>
> (16) 0.8037004
>
> (17) 0.846407
>
> (18) 0.8831277
>
> (19) 0.9142885
>
> (20) 0.9403752
>
> (21) 0.9619196
>
> (22) 0.9794887
>
> (23) 0.9936762
>
>
> Variable: lev
>
> Type: integer
>
> Total Size: 80 bytes
>
>             20 values
>
> Number of Dimensions: 1
>
> Dimensions and sizes: [lev | 20]
>
> Coordinates:
>
>             lev: [1000..1]
>
> Number Of Attributes: 3
>
>   positive : down
>
>   units : hPa
>
>   long_name : pressure
>
>
> Variable: ps
>
> Type: float
>
> Total Size: 17418240 bytes
>
>             4354560 values
>
> Number of Dimensions: 3
>
> Dimensions and sizes: [time | 336] x [lat | 90] x [lon | 144]
>
> Coordinates:
>
>             time: [15.5..10211.5]
>
>             lat: [-89.49438202247191..89.49438202247191]
>
>             lon: [1.25..358.75]
>
> Number Of Attributes: 6
>
>   long_name : surface pressure
>
>   units : Pa
>
>   missing_value : -1e+10
>
>   _FillValue : -1e+10
>
>   cell_methods : time: mean
>
>   time_avg_info : average_T1,average_T2,average_DT
>
>
>
> ;-------- set up function options
>
>   interp = 2; 1:linear 2:log 3:log log
>
>   extrap = True; extrapolation below surface pressure
>
>   P0 = 1000.0;
>
> ;---------------------------------------------------
>
>
> Variable: tbot
>
> Type: float
>
> Total Size: 17418240 bytes
>
>             4354560 values
>
> Number of Dimensions: 3
>
> Dimensions and sizes: [time | 336] x [lat | 90] x [lon | 144]
>
> Coordinates:
>
>             time: [15.5..10211.5]
>
>             lat: [-89.49438202247191..89.49438202247191]
>
>             lon: [1.25..358.75]
>
> Number Of Attributes: 6
>
>   long_name : surface temperature
>
>   units : deg_k
>
>   valid_range : ( 100, 400 )
>
>   _FillValue :  0
>
>   cell_methods : time: mean
>
>   time_avg_info : average_T1,average_T2,average_DT
>
>
> ;----- convert unit of surface height to m2/s2------
>
>   grav = 9.80655;
>
>   zsurfg = zsurf*grav;
>
> ;--------------------------------------------------
>
>
> Variable: zsurfg
>
> Type: float
>
> Total Size: 51840 bytes
>
>             12960 values
>
> Number of Dimensions: 2
>
> Dimensions and sizes: [90] x [144]
>
> Coordinates:
>
> Number Of Attributes: 1
>
>   _FillValue :  0
>
> Best Regards,
>
> Hwa-Jin Choi
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk



-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220411/1d5f2bed/attachment.html>


More information about the ncl-talk mailing list