[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #QWW-497515]: IDV / p_interp



Greetings Diego!

I found the issue with the file. In order for the IDV to pickup on the
variable pressure as a vertical coordinate, the file needs to follow the
CF specification as to how one should indicate that a variable as a coordinate.

The easy way to do this is make sure the variable is one dimensional, and
the name of the dimension is the same as the name of the variable. Currently,
the pressure variable looks like this:

pressure(num_metgrid_levels)
[variable is pressure, dimension is num_metgrid_levels]

In order to make this a coordinate variable, it should look like this:

pressure(pressure)

[variable is pressure, dimension is pressure]

Once pressure is recoginized as a coordinate variable, the IDV magic kicks
in and the 3D variables appear in the list.

Luckily, there is a way to make this change without rewriting the netCDF file.
netCDF-java allows you to make very simple changes to a netCDF file using
NcML. I've attached an NcML file that simply renames the dimension 
"num_metgrid_levels" to "pressure". You can load the NcML file directly into
the IDV and everything should work nicely. The only catch is that you must
edit the NcML file to reference the original netCDF file; you will see in
the file I've attached that, in he second line,

location="file:/Users/lesserwhirls/Desktop/wrfout_d01_h06_m0008_PLEV

Change the location to the appropriate location for your file and you should
be good to go.

Let me know if you have any other questions!

Cheers!

Sean

> Dear Sean,
> 
> Of Course!! I am going to send you a netcdf, with pressure levels as
> vertical coordinate, right now!!
> 
> Many thank for your help!
> 
> Best Regards,
> 
> Diego
> 
> 
> 2014-03-10 21:09 GMT+01:00 Unidata IDV Support <address@hidden
> >:
> 
> > Greetings Diego!
> >
> > Thank you for your explanation! Would you be willing to upload
> > a sample file for me to further investigate the issue? If so,
> > you may upload it here:
> >
> > motherlode.ucar.edu/repository/alias/idvupload
> >
> > Thank you!
> >
> > Sean
> >
> > > Dear Sean,
> > >
> > > First of all, I have got WRF (Weather Forecast and Research model) output
> > > files (netcdf) with eta levels in the vertical coordinate. Then, I want
> > to
> > > interpolate eta levels to pressure levels using the program P_interp. The
> > > namelist of this program is:
> > >
> > > &io
> > > path_to_input  = '../wrfouts'
> > > input_name = 'wrfout_d01_m??_0011'
> > > path_to_output = '.'
> > > process        = 'all'
> > > fields         = 'all'
> > > ! fields         = 'PRES,TT,GHT,RH'
> > > met_em_output  = .FALSE.
> > > split_output   = .TRUE.
> > > debug          = .TRUE.
> > > bit64          = .TRUE.
> > > /
> > >
> > >
> > > ! process can be "all", "list", "all_list"
> > > ! "all" - process all fields in file
> > > ! diagnostics PRES, TT, GHT, RH are also calculated
> > > !   "list" - list fields required in "fields"
> > > !   avaliable diagnostics are PRES, TT, GHT, RH
> > >
> > >
> > > &interp_in
> > > interp_levels  =
> > > 1000.,925.,850.,800.,750.,700.,650.,600.,550.,500.,400.,300.,250.,
> > > extrapolate    = 1,
> > > interp_method  = 2,
> > > unstagger_grid = .TRUE.
> > > /
> > >
> > > ! extrapolate    = 0    ;; set values below ground and above model top to
> > > missing (default)
> > > ! extrapolate    = 1    ;; extrapolate below ground, and set above model
> > > top to model top values
> > > ! interp_method  = 1    ;; linear in p interpolation (default)
> > > ! interp_method  = 2    ;; linear in log p interpolation
> > >
> > >
> > -----------------------------------------------------------------------------------------------------------------------
> > >
> > > Finally, I obtain an output with pressure levels in the vertical
> > coordinate
> > > (netcdf), as I wanted. But, when I try to visualize it using IDV, I am
> > not
> > > able to see vertical levels of any variable, I see only surface
> > variables.
> > >
> > >
> > > Sorry for my bad english, don't hesitate to ask me If you don't
> > understand
> > > something.
> > >
> > > Best Regards,
> > >
> > > Diego
> > >
> > >
> > address@hidden
> > > >:
> > >
> > > > Greetings Diego,
> > > >
> > > > What Data Source Type were you using when you attempted
> > > > to load in the file? Can you try using "Aggregate WRF
> > > > netCDF grids by Time"?
> > > >
> > > > Cheers,
> > > >
> > > > Sean
> > > >
> > > > > Dear support team,
> > > > >
> > > > > I have convert my wrf's (sigma levels) output to wrf's (pressure
> > levels)
> > > > > outputs, using the program p_interp (
> > > > > http://www.mmm.ucar.edu/wrf/OnLineTutorial/Tools/p_interp.htm).
> > Then I
> > > > > tried to visualize with IDV, and when I amb loading the data, there
> > is an
> > > > > error:
> > > > >
> > > > > Error creating data source: file.netcdf..
> > > > > Grid data source failed making data set..
> > > > > Cant read .. not a valid CDM file
> > > > >
> > > > > Could you help me to fix this issue?
> > > > >
> > > > > Thank you very much,
> > > > >
> > > > > Diego
> > > > >
> > > > >
> > > >
> > > >
> > > > Ticket Details
> > > > ===================
> > > > Ticket ID: QWW-497515
> > > > Department: Support IDV
> > > > Priority: Normal
> > > > Status: Open
> > > >
> > > >
> > >
> > >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: QWW-497515
> > Department: Support IDV
> > Priority: Normal
> > Status: Open
> >
> >
> 
> 


Ticket Details
===================
Ticket ID: QWW-497515
Department: Support IDV
Priority: Normal
Status: Open

Attachment: wrfout_d01_h06_m0008_PLEV.ncml
Description: Binary data