[ncl-talk] Possible bug in linint2_Wrap function

Guilherme Martins jgmsantos at gmail.com
Mon Apr 4 05:34:22 MDT 2016


Hi Dennis,

Thank you for the explanation.

Guilherme.

Em dom, 3 de abr de 2016 às 22:00, Dennis Shea <shea at ucar.edu> escreveu:

> Hello Guilherme,
>
> That is not an error.
>
> The function changes the case of the named dimensions to avoid naming
> conflicts.
>
>   xin(...,lat,lon)
>
>   xnew = lintin2_Wrap(xin
>
> fo = *linint2_Wrap* (lon,lat,fi, True, lon_out,lat_out, 0)
>
> 'fo' can not have the same named spatial dimension as 'fi' because
> they are different coordinates!  :-)
>
> So  if lon_out/lat_out  have no named dimensions, linint2_Wrap will assign
> "X" and "Y" as the named dimensions; if lon_out/lat_out have named dimensions,
> the function changes the case to be unique.
>
> D
>
>
>
>
> eg: if you were
>
> On Sun, Apr 3, 2016 at 5:01 PM, Guilherme Martins <jgmsantos at gmail.com>
> wrote:
>
>> Dear users,
>>
>> My original file contain the follow informations:
>>
>> Variable: *prec*
>> Type: float
>> Total Size: 27648000 bytes
>>             6912000 values
>> Number of Dimensions: 3
>> Dimensions and sizes: [time | 12] x [*lat* | 400] x [*lon* | 1440]
>> Coordinates:
>>             time: [96432..104448]
>>             *lat*: [-49.875..49.875]
>>             *lon*: [-179.875..179.875]
>>
>> But when I use the linint2_Wrap function:
>>
>> prec_interp = linint2_Wrap(prec&lon,prec&lat,prec,True,new_lon,new_lat,0)
>>
>> I realized that the name of the dimensions change to uppercase.
>>
>> Variable: prec_interp
>> Type: float
>> Total Size: 497664 bytes
>>             124416 values
>> Number of Dimensions: 3
>> Dimensions and sizes: [time | 12] x [*LAT* | 72] x [*LON* | 144]
>> Coordinates:
>>             time: [96432..104448]
>>             *LAT*: [-49.875..49.875]
>>             *LON*: [-178.75..178.75]
>>
>> The NCL do not like this name in capital letters. Please, someone could
>> look that?
>>
>> I solved my problem by using the "!" to change the name of my dimensions.
>> I do not know if this is some kind of bug.
>>
>> Thanks,
>>
>> Guilherme.
>>
>> --
>>
>> ------------------------------------------------------------------------------------------
>> Dr. Guilherme Martins
>> Instituto Nacional de Pesquisas Espaciais (INPE)
>> Centro de Ciência do Sistema Terrestre (CCST) - Prédio CES
>> Grupo de Superfície-Biosfera-Atmosfera (GSBA)
>> Telefone (INPE/CP): +55 12 3186-9520 || Celular (TIM): +55 12 98152-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
>>
>>
> --
------------------------------------------------------------------------------------------
Dr. Guilherme Martins
Instituto Nacional de Pesquisas Espaciais (INPE)
Centro de Ciência do Sistema Terrestre (CCST) - Prédio CES
Grupo de Superfície-Biosfera-Atmosfera (GSBA)
Telefone (INPE/CP): +55 12 3186-9520 || Celular (TIM): +55 12 98152-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
------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160404/8f1c9f1c/attachment.html 


More information about the ncl-talk mailing list