Re: Convert Hybrid Sigma to Pressure Coords and Output new Vars to NetCDF

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 23 2012 - 08:02:23 MST

[1] You do not need to preallocate space with new.
     The following can be deleted
   lev_p = new(16,typeof(lev),u@_FillValue)

[2] The following dynamically creates the lev_p variable
   lev_p =
(/30.,50.,70.,100.,150.,200.,250.,300.,400.,500.,600.,700.,775.,850.,925.,1000./)
   lev_p@units = "hPa"

[3] Define the dimension name
    lev_p!0 = "lev_p"

     I speculate that the
    getvardims(lev_p)
     was not getting a dimension name.

[4] You define sf and vp but
   ;fout->sf = (/sf/)
   ;fout->vp = (/vp/)

On 2/23/12 7:41 AM, Zachary Mangin wrote:
> Hello NCL Talk,
>
> I am attempting to convert a climate model's hybrid sigma coordinates to
> pressure coordinates for several variables: zonal wind, meridional wind,
> specific humidity, streamfunction, and velocity potential. I have done
> this in the code below using the function, /vinth2p/. Now though, I
> want to output to NetCDF these variables and their associated coordinate
> variables on the new p levels. I am having trouble outputting the
> variables because of the new pressure level array (which I call
> /lev_p/). I get a "fatal:Execute: Error occurred at or near line 131 in
> file." The original hybrid sigma levels were defined by /lev, /so I
> tried commenting this out but the same error results. Does anyone know
> how to fix this? My code is attached. Thanks.
>
> -Zac
>
>
> _______________________________________________
> 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 Thu Feb 23 08:02:34 2012

This archive was generated by hypermail 2.1.8 : Thu Feb 23 2012 - 10:01:53 MST