Changeset 1517 for IOIPSL


Ignore:
Timestamp:
08/01/11 11:31:05 (11 years ago)
Author:
mmaipsl
Message:

Add new function histglobal_attr to give GLOBAL ATTRIBUTES in history files.
Use this function before histend call.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • IOIPSL/trunk/src/histcom.f90

    r1378 r1517  
    1818  PRIVATE 
    1919  PUBLIC :: histbeg,histdef,histhori,histvert,histend, & 
    20  &          histwrite,histclo,histsync,ioconf_modname 
     20 &          histwrite,histclo,histsync,ioconf_modname, histglobal_attr 
    2121!--------------------------------------------------------------------- 
    2222!- Some confusing vocabulary in this code ! 
     
    467467!----------------------- 
    468468END SUBROUTINE histb_all 
     469!=== 
     470SUBROUTINE histglobal_attr & 
     471 & (idf,string_attr,glob_attr) 
     472!--------------------------------------------------------------------- 
     473!- Definition of GLOBAL attribute for history files. 
     474!- 
     475!- INPUT 
     476!- 
     477!- idf     : The id of the file to which the grid should be added 
     478!- string_attr : name of the global attribute to be added 
     479!- glob_attr : global_attribute to be added 
     480!--------------------------------------------------------------------- 
     481  IMPLICIT NONE 
     482!- 
     483  INTEGER,INTENT(IN) :: idf 
     484  CHARACTER(len=*),INTENT(IN) :: string_attr 
     485  CHARACTER(len=*),INTENT(IN) :: glob_attr 
     486 
     487  INTEGER :: iret,nfid 
     488  LOGICAL :: l_dbg 
     489!--------------------------------------------------------------------- 
     490  CALL ipsldbg (old_status=l_dbg) 
     491 
     492  nfid = W_F(idf)%ncfid 
     493  IF (l_dbg) WRITE(ipslout,*) "New global attribute : ",glob_attr 
     494  iret = NF90_PUT_ATT(nfid,NF90_GLOBAL,string_attr,glob_attr) 
     495!----------------------- 
     496END SUBROUTINE histglobal_attr 
    469497!=== 
    470498SUBROUTINE histh_reg1d & 
Note: See TracChangeset for help on using the changeset viewer.