Changeset 806 for IOIPSL


Ignore:
Timestamp:
11/23/09 13:10:35 (13 years ago)
Author:
bellier
Message:

Added optional argument "standard_name" to histdef

File:
1 edited

Legend:

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

    r760 r806  
    8686  INTEGER :: nbopp 
    8787  CHARACTER(LEN=20) :: v_name,unit_name 
    88   CHARACTER(LEN=80) :: title,fullop 
     88  CHARACTER(LEN=80) :: title,std_name,fullop 
    8989  CHARACTER(LEN=7)  :: topp 
    9090  CHARACTER(LEN=7),DIMENSION(nbopp_max) :: sopps 
     
    10921092END SUBROUTINE histvert 
    10931093!=== 
    1094 SUBROUTINE histdef (pfileid,pvarname,ptitle,punit, & 
    1095  &                  pxsize,pysize,phoriid,pzsize, & 
    1096  &                  par_oriz,par_szz,pzid,        & 
    1097  &                  pnbbyt,popp,pfreq_opp,pfreq_wrt,var_range) 
     1094SUBROUTINE histdef & 
     1095 &  (pfileid,pvarname,ptitle,punit, & 
     1096 &   pxsize,pysize,phoriid,pzsize,par_oriz,par_szz,pzid, & 
     1097 &   xtype,popp,pfreq_opp,pfreq_wrt,var_range,standard_name) 
    10981098!--------------------------------------------------------------------- 
    10991099!- With this subroutine each variable to be archived on the history 
     
    11301130!- pzid     : ID of the vertical axis to use. It has to have 
    11311131!-            the size of the zoom. 
    1132 !- pnbbyt   : External netCDF type (hist_r4/hist_r8) 
     1132!- xtype    : External netCDF type (hist_r4/hist_r8) 
    11331133!- popp     : Operation to be performed. The following options 
    11341134!-            exist today : 
     
    11471147!- 
    11481148  INTEGER,INTENT(IN) :: pfileid,pxsize,pysize,pzsize,pzid 
    1149   INTEGER,INTENT(IN) :: par_oriz,par_szz,pnbbyt,phoriid 
     1149  INTEGER,INTENT(IN) :: par_oriz,par_szz,xtype,phoriid 
    11501150  CHARACTER(LEN=*),INTENT(IN) :: pvarname,punit,popp,ptitle 
    11511151  REAL,INTENT(IN) :: pfreq_opp,pfreq_wrt 
    11521152  REAL,DIMENSION(2),OPTIONAL,INTENT(IN) :: var_range 
     1153  CHARACTER(LEN=*),OPTIONAL,INTENT(IN) :: standard_name 
    11531154!- 
    11541155  INTEGER :: iv,i 
     
    12001201  W_F(pfileid)%W_V(iv)%title = ptitle 
    12011202  W_F(pfileid)%W_V(iv)%unit_name = punit 
     1203  IF (PRESENT(standard_name)) THEN 
     1204    W_F(pfileid)%W_V(iv)%std_name = standard_name 
     1205  ELSE 
     1206    W_F(pfileid)%W_V(iv)%std_name = ptitle 
     1207  ENDIF 
    12021208  tmp_name = W_F(pfileid)%W_V(iv)%v_name 
    12031209!- 
     
    12281234! 1.3 External type of the variable 
    12291235!- 
    1230   IF (pnbbyt == hist_r8) THEN 
     1236  IF (xtype == hist_r8) THEN 
    12311237    W_F(pfileid)%W_V(iv)%v_typ = hist_r8 
    12321238  ELSE 
     
    16641670      ENDIF 
    16651671      iret = NF90_PUT_ATT (nfid,nvid,'standard_name', & 
    1666  &                         TRIM(W_F(pfileid)%W_V(iv)%title)) 
     1672 &                         TRIM(W_F(pfileid)%W_V(iv)%std_name)) 
    16671673!- 
    16681674      iret = NF90_PUT_ATT (nfid,nvid,'_FillValue', & 
Note: See TracChangeset for help on using the changeset viewer.