[ncl-talk] Using hyi2hyo to interpolate data from hybrid ERA-Interim to CAM4 L26
Dennis Shea
shea at ucar.edu
Mon Mar 23 16:25:31 MDT 2015
The email does not provide enough information for debugging.
I would suggest the following to facilitate debugging.
Since "horizontal resolution remains identical in this test",
pick one grid point
The reason for using {LAT:LAT},{LON:LON} is to force NCL to retain
dimensionality.
x(time,lev,lat,lon)
If you use {LAT},{LON}, NCL will eliminate the 'degenerate' dimension
x(time,lev)
-----------
LAT = 30.0 ; wherever
LON = 180.0
x = f->ERAI(:,:,{LAT:LAT},{LON:LON}) ; force NCL to retain
dimensionality
printVarSummary(x) ; x(time,level,1,1)
ps = f->PSFC(:,{LAT:LAT},{LON:LON}) ; force NCL to retain
dimensionality
printVarSummary(ps)
*system*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/system.shtml>("/bin/rm
-f test_hyi2hyo.nc <http://test.nc>") ; remove any pre-existing
file
ncdf = *addfile*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml>("test_hyi2hyo.nc
<http://test.nc>" ,"c") ; open output netCDF file
;===================================================================
; create global attributes of the file (optional)
;===================================================================
fAtt = True ; assign file attributes
fAtt at title = "TEST NCL HYI2HYO: ERA-INTERIM grid point"
fAtt at source_file = "original-file.nc"
fAtt at Conventions = "None"
fAtt at creation_date = *systemfunc*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/systemfunc.shtml>
("date")
*fileattdef*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/fileattdef.shtml>(
ncdf, fAtt ) ; copy file attributes
*filedimdef*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/filedimdef.shtml>(
ncdf,"time",-1,True)
;===================================================================
; output variables directly; NCL will call appropriate functions
; to write the meta data associated with each variable
;===================================================================
ncdf->hya_erai = hya_erai ; 1D
ncdf->hyb_erai = hyb_erai ; 1D
ncdf->hya_cam = hya_cam ; 1D
ncdf->hyb_cam = hyb_cam ; 1D
ncdf->X_ERAI = x ; 4D
ncdf->PS_ERAI = ps ; 3D
===
You can send the file and a *clean* simple version of your test script.
On Mon, Mar 23, 2015 at 2:55 PM, Mao-Lin Shen <maolin.shen at gfi.uib.no>
wrote:
> Hi,
>
>
> I interpolated data from hybrid ERA-Interim to CAM's hybrid level for
> nudging.
> But we found a big difference in between when we compared the data on
> pressure level.
>
> The results show in bellow.
>
> Left panel is the results applying hyi2hyo to get temperature on CAM's
> hybrid level first and then using vinth2p to get temperature on pressure
> level.
>
> Right panel shows the results interpolated from ERA-Interim by using
> vinth2p.
>
> Level Temperature (Degree) Temperature (Degree)
> (850hPa) 294.0318218618177 292.5374525210495
> (500hPa) 276.7536469179544 268.8364571841531
> (250hPa) 256.9609800328714 233.3842838572815
> (100hPa) 219.1232631977532 186.2120804720032
>
> Horizontal resolution remains identical in this test.
> The temperature are supposed to be identical, but it is not due to unclear
> issue.
> Does any one have similar problem?
> Or has idea how to tackle this issue?
>
>
>
> _______________________________________________
> 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/20150323/32234282/attachment.html
More information about the ncl-talk
mailing list