[ncl-talk] Regrid question

Dennis Shea shea at ucar.edu
Thu Oct 20 13:49:57 MDT 2016


[1]
The 'tems' and 'umrs'  variables have the attribute 'gaussian' on input.

       float tems(time, lat, lon) ;
                tems:code = 188 ;
                tems:table = 254 ;
                tems:grid_type = "gaussian" ;
        float umrs(time, lat, lon) ;
                umrs:code = 226 ;
                umrs:table = 254 ;
                umrs:grid_type = "gaussian" ;

I suggest deleting this upon input. This is *informational only*.

    tems = f->tems
    delete(tems at grid_type)
    umrs = f->umrs
    delete(umrs at grid_type)

+++++=====>  prevents a *_Wrap from copying it over.

===

Note:  I would suspect that area_conserve_remap_Wrap is *not* recommended
for this application.
This function was written by a model developer who created it for global
gaussian grids with no _FillValue.
It was modified to handle regional grids.

However, I'll offer a few comments:
area_conserve_remap_Wrap(in_lon,in_lat,in_wyearmean,g_lon,g_lat,False)

Your last argument is 'False'. You have regional grids. Hence, 'False' is
*not* appropriate. To use this function, I think you must have:
    opt = True
    opt at nlat  = 320
    opt at mlon= 640
area_conserve_remap_Wrap(in_lon,in_lat,in_wyearmean,g_lon,g_lat, opt)


====
I suggest using ESMF regridding

http://www.ncl.ucar.edu/Applications/ESMF.shtml

I have slightly modified e the examples. See attached.

[1] regrid.esmf_01.ncl:
Generate the weight file using one variable. This plots
'before'-and-'after' pics

[2] regrid.esmf_02.ncl
Use the weight file generated in [1] to regrid all specified variables.
Create netCDF

Dood luc;


On Wed, Oct 19, 2016 at 11:01 AM, Guilherme Martins <jgmsantos at gmail.com>
wrote:

> Hi users,
>
> I have the files mcga.nc (variables: tems and umrs) and REF_25km.AS.nc
> (vegetation map). I'd like to interpolate the mcga.nc file (gaussian
> grid) to the same spatial resolution REF_25km.AS.nc (regular grid) file.
> I wrote a script but the result (netcdf file) show me that the new
> variables still are in a gaussian grid and I want a regular grid equal to
> the REF_25km.AS.nc file.
>
> The script and dataset can be downloaded at:
>
> http://ftp-supercomputacao.inpe.br/public/jose.martins/regrid/
>
> Thanks,
>
> Guilherme Martins.
> --
> ------------------------------------------------------------
> ------------------------------------
> Instituto Nacional de Pesquisas Espaciais (INPE)
> Centro de Previsão de Tempo e Estudos Climáticos (CPTEC)
> Divisão de Satélites e Sistemas Ambientais (DSA)
> Programa de Monitoramento de Queimadas
> Telefone (INPE/CP): +55 12 3186-9205 <(12)%203186-9205> || Celular (TIM): +55
> 12 98152-8580 <(12)%2098152-8580>
> E-mail: guilherme.martins at inpe.br || jgmsantos at gmail.com
> Skype: guilherme.martins.
> Homepage: https://sites.google.com/site/jgmsantos
> Currículo Lattes: http://lattes.cnpq.br/5997657584785803
> ------------------------------------------------------------
> ------------------------------------
>
> _______________________________________________
> 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/20161020/172f40c5/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: regrid.esmf_01.ncl
Type: text/x-ncl
Size: 5393 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161020/172f40c5/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ESMF_regrid_tems.png
Type: image/png
Size: 92937 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161020/172f40c5/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: regrid.esmf_02.ncl
Type: text/x-ncl
Size: 2147 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161020/172f40c5/attachment-0001.bin 


More information about the ncl-talk mailing list