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