Re: Vertical interpolation: sigma to pressure levels

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon May 05 2014 - 09:51:53 MDT

The vertical ordering for the 'vinth2p' function is that
output by the CAM (Community Atmosphere Model). It is
inconsistent BUT that what is expected by the underlying
fortran code used by NCL.

[1] datai: top-to-bottom
[2] hbcofa/hbcofb: bottom-to-top
[3] plevo: top-to-bottom *or* bottom-to-top

delete: hybm = sigma(::-1)

   ps = f1->PRES_GDS4_SFC ; Surf. pressure in Pa
   data = f2->MIXR_GDS4_HYBL(:,:,:,:)
   datai = data(:,::-1,:,:) ; Top-to-Bottom

   plevs =
(/1000,975,950,925,900,875,850,800,700,600,500,400,300,250,200,150,100/)

   sigma = (/.99733, .99165, .98521, .97794, .96973, .96049, .95011,
.93849,\
              .92551, .91107, .89506, .87739, .85797, .83674, .81366,
.78872,\
              .76194, .73340, .70319, .67148, .63846, .60437, .56950,
.53415,\
              .49863, .46329, .42843, .39437, .36138, .32970, .29953,
.27102,\
              .24429, .21939, .19635, .17517, .15579, .13815, .12218,
.10778,\
              .09483, .08324, .07289, .06367, .05549, .04823, .04182,
.03615,\
              .03115, .02675, .02288, .01948, .01649, .01387, .01157,
.00956,\
              .00780, .00625, .00490, .00372, .00269, .00179, .00099,
.00027 \
             /)

;;;hybm = sigma(::-1) ;
    hyam = hybm*0.0

    x = vinth2p(datai,hyam,hybm,plevs,ps,1,1000,1,True)

On 5/4/14, 11:27 PM, Abhik Santra wrote:
>
> Thanks for your reply.
> But the problem remains even after arranging the plevs from top-to-bottom.
> What else can be changed?
>
> Regards,
> Abhik
>
>
> ----- Original Message -----
> From: "Dennis Shea" <shea@ucar.edu>
> To: "Abhik Santra" <abhiksantra@tropmet.res.in>, "ncl-talk" <ncl-talk@ucar.edu>
> Sent: Saturday, May 3, 2014 7:40:33 PM
> Subject: Re: Vertical interpolation: sigma to pressure levels
>
> See Example 5 at:
> http://www.ncl.ucar.edu/Document/Functions/Built-in/vinth2p.shtml
>
> ===
> Your plevs must be top-to-bottom
>
> plevs = (/100, 150,...,1000/)
>
> On 5/3/14, 2:37 AM, Abhik Santra wrote:
>>
>> Dear NCL-Users,
>>
>> I am trying to use vertical interpolation (vinth2p) for the CFS output variables, having 64 sigma levels.
>> My code is as follows:
>>
>> ps = f1->PRES_GDS4_SFC ; Surf. pressure in Pa
>>
>> data = f2->MIXR_GDS4_HYBL(:,:,:,:)
>> datai = data(:,::-1,:,:) ; Top-to-Bottom
>>
>> plevs = (/1000,975,950,925,900,875,850,800,700,600,500,400,300,250,200,150,100/)
>>
>> sigma = (/.99733, .99165, .98521, .97794, .96973, .96049, .95011, .93849,\
>> .92551, .91107, .89506, .87739, .85797, .83674, .81366, .78872,\
>> .76194, .73340, .70319, .67148, .63846, .60437, .56950, .53415,\
>> .49863, .46329, .42843, .39437, .36138, .32970, .29953, .27102,\
>> .24429, .21939, .19635, .17517, .15579, .13815, .12218, .10778,\
>> .09483, .08324, .07289, .06367, .05549, .04823, .04182, .03615,\
>> .03115, .02675, .02288, .01948, .01649, .01387, .01157, .00956,\
>> .00780, .00625, .00490, .00372, .00269, .00179, .00099, .00027 \
>> /)
>>
>> hybm = sigma(::-1) ; Reversing Top-to-Bottom
>> hyam = hybm*0.0
>>
>> x = vinth2p(datai,hyam,hybm,plevs,ps,1,1000,1,True)
>>
>> But the output variable (x) contains some -ve values, while actual data is always +ve.
>> Is there any problem in the code?
>> Or is it because of assumed "hyam" = 0.0?
>>
>> Thanks in advance for your kind suggestion.
>>
>> Regards,
>> Abhik.
>>
>> ___________________________________________
>>
>> Abhik Santra
>> CSIR Research Fellow,
>> Indian Institute of Tropical Meteorology,
>> Pune - 411008.
>> India
>> ___________________________________________
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon May 5 09:52:18 2014

This archive was generated by hypermail 2.1.8 : Fri May 09 2014 - 15:23:18 MDT