Changeset 752 for IOIPSL/trunk/src


Ignore:
Timestamp:
10/06/09 15:20:26 (15 years ago)
Author:
bellier
Message:

Added the possibility to choose the kind of NETCDF variables (R4/R8) by calling histdef

File:
1 edited

Legend:

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

    r740 r752  
    7676 &                     nb_hax_max=5,nb_zax_max=10,nbopp_max=10 
    7777  REAL,PARAMETER :: missing_val=nf90_fill_real 
     78  INTEGER,PARAMETER,PUBLIC :: & 
     79 &  hist_r4=nf90_real4, hist_r8=nf90_real8 
    7880!- 
    7981  INTEGER :: bufftmp_max(nb_files_max) = 1 
     
    116118! Informations on each variable 
    117119!- 
    118   INTEGER,DIMENSION(nb_files_max,nb_var_max),SAVE :: & 
    119  &  nbopp 
     120  INTEGER,DIMENSION(nb_files_max,nb_var_max),SAVE :: v_typ 
    120121  CHARACTER(LEN=20),DIMENSION(nb_files_max,nb_var_max),SAVE :: & 
    121122 &  name,unit_name 
     
    142143 &  freq_opp,freq_wrt 
    143144  INTEGER,DIMENSION(nb_files_max,nb_var_max),SAVE :: & 
    144  &  last_opp,last_wrt,last_opp_chk,last_wrt_chk,nb_opp,nb_wrt,point 
     145 &  nbopp,last_opp,last_wrt,last_opp_chk,last_wrt_chk,nb_opp,nb_wrt,point 
    145146!- 
    146147! Book keeping for the buffers 
     
    11041105!- pzid     : ID of the vertical axis to use. It has to have 
    11051106!-            the size of the zoom. 
    1106 !- pnbbyt   : Number of bytes on which to store in netCDF (Not opp.) 
     1107!- pnbbyt   : External netCDF type (hist_r4/hist_r8) 
    11071108!- popp     : Operation to be performed. The following options 
    11081109!-            exist today : 
     
    11971198    sopps(pfileid,iv,nbopp(pfileid,iv)) = 'ident' 
    11981199    scal(pfileid,iv,nbopp(pfileid,iv)) = missing_val 
     1200  ENDIF 
     1201!- 
     1202! 1.3 External type of the variable 
     1203!- 
     1204  IF (pnbbyt == hist_r8) THEN 
     1205    v_typ(pfileid,iv) = hist_r8 
     1206  ELSE 
     1207    v_typ(pfileid,iv) = hist_r4 
    11991208  ENDIF 
    12001209!- 
     
    16131622      ENDIF 
    16141623!- 
    1615       iret = NF90_DEF_VAR (ncid,TRIM(name(pfileid,iv)),NF90_FLOAT, & 
    1616  &                         dims(1:ABS(ndim)),ncvarid) 
     1624      iret = NF90_DEF_VAR (ncid,TRIM(name(pfileid,iv)), & 
     1625 &                         v_typ(pfileid,iv),dims(1:ABS(ndim)),ncvarid) 
    16171626!- 
    16181627      ncvar_ids(pfileid,iv) = ncvarid 
Note: See TracChangeset for help on using the changeset viewer.