[ncl-talk] Using hyi2hyo to interpolate data from hybrid ERA-Interim to CAM4 L26

Mao-Lin Shen maolin.shen at gfi.uib.no
Tue Mar 24 05:41:53 MDT 2015


Hi Dennis,

Thanks for your reply.
I do hope this might be a common issue in the community so that I can get a
quick answer.

I attached the file you asked (test_hyi2hyo.nc) and my script
(check_ERAint_vert_4.ncl).
Also the files used in my test script.

Note that for the test_hyi2hyo I don't know how to write a nc file with
different vertical resolution (ERAI vs. CAM).
So for hya_cam and hyb_cam, only (34:59) contains useful information.

Thanks for your time again, and see if we can identify the problem.




Cheers,
Mao-Lin
=================================
Dr. Mao-Lin Shen
Researcher
Geophysical Institute
Faculty of Mathematics and Natural Sciences
University of Bergen
Allégaten 70, 5007 Bergen, Norway
Tel: (Office)  +47 55 58 46 54
Tel: (mobile) +47 94 42 54 55
E-mail: earnestshen at gmail.com
            Maolin.Shen at gfi.uib.no
Homepage: http://www.uib.no/persons/Maolin.Shen
                    http://folk.uib.no/msh065/
=================================

2015-03-23 23:25 GMT+01:00 Dennis Shea <shea at ucar.edu>:

> 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/20150324/93af75a4/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_hybab_ERA_Interim_L60.nc
Type: application/x-netcdf
Size: 2956 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150324/93af75a4/attachment.nc 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_hyi2hyo.nc
Type: application/x-netcdf
Size: 4812 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150324/93af75a4/attachment-0001.nc 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_SP.p134.6hrly.1dRigional.199502.nc
Type: application/x-netcdf
Size: 3288 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150324/93af75a4/attachment-0002.nc 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_T.p130.hbl.6hrly.1dRigional.199502.nc
Type: application/x-netcdf
Size: 96408 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150324/93af75a4/attachment-0003.nc 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_GEOS5_1tTref.nc
Type: application/x-netcdf
Size: 7052 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150324/93af75a4/attachment-0004.nc 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_ERAint_vert_4.ncl
Type: application/octet-stream
Size: 2781 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150324/93af75a4/attachment.obj 


More information about the ncl-talk mailing list