⇐ ⇒

[CF-metadata] netcdf-fortran example for Example H.3 out of the cf-convention 1.6

From: Kreienkamp Frank <Frank.Kreienkamp>
Date: Wed, 19 Mar 2014 07:24:27 +0000

Hello,

i have searched throughout the unidata webpage, but haven't found a usable example to create, write and read station data with netcdf-Fortran based on the Example H.3. Time series of station data in the incomplete multidimensional array representation out of the cf-convention 1.6.
Is it possible to provide an example for the creation, writing and reading of example H3 based on netcdf-Fortran(90)?

My current working problems are:

- How to add the len of the character char station_name, the same goes for all other character variables? My current version is:
integer(kind=4), parameter :: iLenStringName=40
integer(kind=4) :: iLenStringName_ID, iStation_ID, iVarStationName_ID
call check( nf90_def_dim(iNcid, "station_name", NF90_UNLIMITED, iStation_ID) )
call check( nf90_def_dim(iNcid, "NoCharStationName", iLenStringName, iLenStringName_ID) )
call check( nf90_def_var(iNcid, "station_name", NF90_CHAR, (/ iLenStringName_ID,iStation_ID /), iVarStationName_ID) )


- How to write a entry to those variable? My current version is:
integer(kind=4) :: iPos,iStart(NF90_MAX_VAR_DIMS),iCount(NF90_MAX_VAR_DIMS)
istart=0
iCount=0
istart(1)=1
istart(2)=iPos
iCount(1)=iLenStringName
iCount(2)=1
call check(nf90_put_var(iNcid, iVarStationName_ID, "Berlin",istart,iCount))

In the current version I cannot view the data with tools like ncview. Even reading the data provides no useful result.


Thanks in advance
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cgd.ucar.edu/pipermail/cf-metadata/attachments/20140319/0666513d/attachment.html>
Received on Wed Mar 19 2014 - 01:24:27 GMT

This archive was generated by hypermail 2.3.0 : Tue Sep 13 2022 - 23:02:41 BST

⇐ ⇒