Dear Corey and David,
Thank you for your suggestions and comments. Keeping things simple is
the best way to go to have more operability. However, for my curiosity
and something else I cannot identify right now, I will skip netCDF API
and try pure HDF5 API and its compound type before giving up. I
sincerely thank you for your valuable advices.
Cheers,
Ekin
On 02/23/2012 05:39 PM, Corey Bettenhausen wrote:
Ekin,
Regarding the namespace collisions, you could also wade into the dangerous
"enhanced" netCDF waters and use groups to differentiate your biomass data --
/ep_data/biomass and /mp_data/biomass. This might make more sense if you have a lot of
variables in the groups e.g. ep_data_biomass, ep_data_var1, ep_data_var2,
mp_data_biomass, mp_data_var1, mp_data_var2 gets a bit redundant after a while.
However, David's interoperability warning still applies. Some applications do not yet
support "enhanced" features of netCDF very well. YMMV.
Cheers,
-Corey
On Thu, 23 Feb 2012 06:39:33 -0800
David William Pierce<dpierce@xxxxxxxx> wrote:
Hi Ekin,
if I could give you some advice based on having used netcdf for many
years, it would be to avoid going the route you seem to have taken
with using fortran compound types. The reason being that I think you
will find that it greatly reduces the ease, speed, and portability of
your output files across different applications, since support for
compound types in applications is not well advanced yet. And
presumably easy interoperability is the whole reason you are using
netcdf in the first place.
Instead, the best solution is to keep things simple. Just name your
output variables "ep_data_biomass" and "ms_data_biomass" and write
them as regular variables, not compound types. Then, no namespace
collision.
Regards,
--Dave
On Wed, Feb 22, 2012 at 12:03 PM, Ekin Akoglu<ekin@xxxxxxxxxxxxxxx> wrote:
Dear all,
I am quite inexperienced in using netCDF FORTRAN API and netCDF format in
storing data. Currently I am struggling on a problem. I have user derived
data types in FORTRAN with multiple components, i.e. fields, such as:
ep_data%biomass
ep_data%pob
....
ms_data%biomass
ms_data%age
...
Is there a way to envelope the fields (after % sign) under e.g. "ms_data"
and "ep_data" defined types when writing in a single netcdf file so that the
"biomass" field of "ms_data" does not interfere with the "biomass" field of
"ep_data" while reading it from the .nc file? I would be glad to hear if you
have suggestions on the matter.
Regards,
--
Ekin Akoglu
Research Assistant
Institute of Marine Sciences
Middle East Technical University
P.O. Box 28, 33731
Erdemli, Mersin
Turkey
Web: www.ims.metu.edu.tr
Email: ekin@xxxxxxxxxxxxxxx
Phone: +90 324 521 34 34
GSM: +90 506 554 03 90
Fax: +90 324 521 23 27
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/
--
David W. Pierce
Division of Climate, Atmospheric Science, and Physical Oceanography
Scripps Institution of Oceanography, La Jolla, California, USA
(858) 534-8276 (voice) / (858) 534-8561 (fax) dpierce@xxxxxxxx
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/
*************************************
Corey Bettenhausen
Science System and Applications, Inc
Goddard Space Flight Center
301 614 5383
corey_bettenhausen@xxxxxxxxxx
*************************************
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/
--
*Ekin Akoglu*
Research Assistant
Institute of Marine Sciences
Middle East Technical University
P.O. Box 28, 33731
Erdemli, Mersin
Turkey
Web: www.ims.metu.edu.tr
Email: ekin@xxxxxxxxxxxxxxx <mailto:ekin@xxxxxxxxxxxxxxx>
Phone: +90 324 521 34 34
GSM: +90 506 554 03 90
Fax: +90 324 521 23 27