source: trunk/LMDZ.TITAN/libf/phytitan/def_var.F90 @ 1461

Last change on this file since 1461 was 3, checked in by slebonnois, 14 years ago

Creation de repertoires:

  • chantiers : pour communiquer sur nos projets de modifs
  • documentation : pour stocker les docs

Ajout de:

  • libf/phytitan : physique de Titan
  • libf/chimtitan: chimie de Titan
  • libf/phyvenus : physique de Venus
File size: 834 bytes
Line 
1subroutine def_var(nid,name,title,units,nbdim,dim,nvarid,ierr)
2
3implicit none
4
5include "netcdf.inc"
6
7character (len=*) :: title,units,name
8integer :: nid,nbdim,nvarid,ierr
9integer, dimension(nbdim) :: dim
10
11ierr=NF_REDEF(nid)
12#ifdef NC_DOUBLE
13ierr = NF_DEF_VAR (nid,adjustl(name),NF_DOUBLE,nbdim,dim,nvarid)
14#else
15ierr = NF_DEF_VAR (nid,adjustl(name),NF_FLOAT,nbdim,dim,nvarid)
16#endif
17if(ierr/=NF_NOERR) then
18   write(*,*) NF_STRERROR(ierr)
19   stop "in def_var"
20endif
21ierr = NF_PUT_ATT_TEXT (nid, nvarid, "title", len_trim(adjustl(title)),adjustl(title))
22if(ierr/=NF_NOERR) then
23   write(*,*) NF_STRERROR(ierr)
24   stop "in def_var"
25endif
26ierr = NF_PUT_ATT_TEXT (nid, nvarid, "units", len_trim(adjustl(units)),adjustl(units))
27if(ierr/=NF_NOERR) then
28   write(*,*) NF_STRERROR(ierr)
29   stop "in def_var"
30endif
31ierr = NF_ENDDEF(nid)
32
33end
Note: See TracBrowser for help on using the repository browser.