[ncl-talk] Interpolation error

Sunmin Park mireiyue at gmail.com
Thu Aug 7 10:51:53 MDT 2014


Hi, Mary

I uploaded the data files (start with “ec550aer_aero_NorESM1”) and script (CMIP5_ec,ncl). I checked the FillValue which is 1e+20 I tried with and without this part but the results showed same.

Thank you 
Sun-

On Aug 7, 2014, at 8:44 AM, Mary Haley <haley at ucar.edu> wrote:

> My first thought this looked like a _FillValue issue, but I can't tell simply from the output.
> 
> Can you provide the data file for this script? You can use our ftp:
> 
> http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP
> 
> Thanks,
> 
> --Mary
> 
> 
> 
> On Wed, Aug 6, 2014 at 3:16 PM, Sunmin Park <mireiyue at gmail.com> wrote:
> Dear NCL users,
> 
> I have a problem to do interpolation using NorESM1 model results. I am using extinction coefficient values and when I read the data from the files, the MIN and MAX values are
> "(0)    Ambient Aerosol Extinction at 550 nm: min=0   max=0.00242234 “
> But after interpolation the values are
> "(0)    min=-2.58212e+22   max=0.0127834”
> 
> I do not understand why the values are changing and the MIN value shows minus. How can I fix it?
> 
> Thank you for any help!!
> 
> Sun-
> 
> ; ==============================================================
> ; Open the file:
> ; ==============================================================
>   fili    = "ec550aer_aero_NorESM1-M_historicalExt_r1i1p1_200601-201212.nc"
> ;  fili    = "ec550aer_aero_NorESM1-M_historicalExt_"+version(ii)+"i1p1_200601-201212.nc"
>   varname = "ec550aer"
>   varname1 = "a"
>   varname2 = "b"
>   varname3 = "ps"
>   varname4 = "p0"
>   filenc       = addfile (diri+fili+".nc", "r")      ; entire file
> ;  printMinMax(varname,0)
> ;  print(varname1)
> ;  print(varname2)
> ;  print(varname3)
> ;  print(varname4)
> ;  print (filenc)
> ;  return
> 
>   data   = filenc->$varname$                          ; (time, ver, lat, lon)
> ;  print (dimsizes(data))
>   time =filenc->time
>   lev =filenc->lev
>   lat =filenc->lat
>   printMinMax(data,0)
>   printVarSummary(data)
> ;return
>   lon =filenc->lon
> ;  print(time)
> ;  print(lev)
> ;  print(lat)
> ;  print(lon)
> ;  data at _FillValue=1e+20
> ;  newlev =lev*1000
> ;  print(newlev)
> 
> ;return
> 
> ;############Converting from hybrid levels to standard pressure levels######################################
> hyam = filenc->a
> hybm = filenc->b
> plev0 = (/1000,925,850,700,600,500,400,300,250,200,150,100,70,50,30,20,10/)
> psfc = filenc->ps
> p0=1000.
> 
> ;printVarSummary(psfc)
> ;printVarSummary(hyam)
> 
> ec550aer = data;filenc->ec550aer                ; read ec550aer from all files
> ec550aerNEW=vinth2p(ec550aer,hyam,hybm,plev0,psfc,1,p0,1,True)
> delete(ec550aer)
> ec550aer=ec550aerNEW
> delete(ec550aerNEW)
> printVarSummary(ec550aer)
> printMinMax(ec550aer,0)
> return
> ;###################################################################################
> 
> 
> RESULTS
> 
> (0)     Ambient Aerosol Extinction at 550 nm: min=0   max=0.00242234
> 
> Variable: data
> Type: float
> Total Size: 120766464 bytes
>             30191616 values
> Number of Dimensions: 4
> Dimensions and sizes:   [time | 84] x [lev | 26] x [lat | 96] x [lon | 144]
> Coordinates:
>             time: [15.5..2539.5]
>             lev: [0.9925560999999998..0.00354463800000001]
>             lat: [ -90..  90]
>             lon: [   0..357.5]
> Number Of Attributes: 12
>   standard_name :       volume_extinction_coefficient_in_air_due_to_ambient_aerosol
>   long_name :   Ambient Aerosol Extinction at 550 nm
>   comment :     """ambient"" means ""wetted"".  "
>   units :       m-1
>   original_name :       BAK
>   original_units :      1/km
> 
> 
> Variable: ec550aer
> Type: float
> Total Size: 78962688 bytes
>             19740672 values
> Number of Dimensions: 4
> Dimensions and sizes:   [time | 84] x [lev_p | 17] x [lat | 96] x [lon | 144]
> Coordinates:
>             time: [15.5..2539.5]
>             lev_p: [1000..10]
>             lat: [ -90..  90]
>             lon: [   0..357.5]
> Number Of Attributes: 1
>   _FillValue :  1e+20
> (0)     min=-2.58212e+22   max=0.0127834
> 
> _______________________________________________
> 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/20140807/35e13b5a/attachment.html 


More information about the ncl-talk mailing list