Changeset 358 for IOIPSL


Ignore:
Timestamp:
07/17/08 12:27:56 (14 years ago)
Author:
bellier
Message:

A little step towards the CF Metadata Convention

File:
1 edited

Legend:

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

    r295 r358  
    6161!- 
    6262  INTERFACE histbeg 
    63 !!  MODULE PROCEDURE histbeg_regular,histbeg_irregular 
    6463    MODULE PROCEDURE histbeg_totreg,histbeg_regular,histbeg_irregular 
    6564  END INTERFACE 
     
    8584!- 
    8685  INTEGER,SAVE :: nb_files=0 
    87   INTEGER,DIMENSION(nb_files_max),SAVE :: nb_var=0, nb_tax=0 
     86  INTEGER,DIMENSION(nb_files_max),SAVE :: nb_var=0,nb_tax=0 
    8887!- 
    8988! DOMAIN IDs for files 
     
    316315  INTEGER,INTENT(IN) :: pim,pjm 
    317316  REAL,DIMENSION(pim,pjm),INTENT(IN) :: plon,plat 
    318   INTEGER,INTENT(IN):: par_orix, par_szx, par_oriy, par_szy 
     317  INTEGER,INTENT(IN):: par_orix,par_szx,par_oriy,par_szy 
    319318  INTEGER,INTENT(IN) :: pitau0 
    320   REAL,INTENT(IN) :: pdate0, pdeltat 
    321   INTEGER,INTENT(OUT) :: pfileid, phoriid 
     319  REAL,INTENT(IN) :: pdate0,pdeltat 
     320  INTEGER,INTENT(OUT) :: pfileid,phoriid 
    322321  LOGICAL,INTENT(IN),OPTIONAL :: opt_rectilinear 
    323322  INTEGER,INTENT(IN),OPTIONAL :: domain_id 
    324323!- 
    325   INTEGER :: ncid, iret 
     324  INTEGER :: ncid,iret 
    326325  CHARACTER(LEN=120) :: file 
    327326  CHARACTER(LEN=30) :: timenow 
     
    354353    CALL ipslerr (3,"histbeg", & 
    355354   &  'Table of files too small. You should increase nb_files_max', & 
    356    &  'in M_HISTCOM.f90 in order to accomodate all these files', ' ') 
     355   &  'in histcom.f90 in order to accomodate all these files', ' ') 
    357356  ENDIF 
    358357!- 
     
    371370! Add DOMAIN number and ".nc" suffix in file name if needed 
    372371!- 
    373   file  = pfilename 
     372  file = pfilename 
    374373  CALL flio_dom_file (file,domain_id) 
    375374!- 
    376   iret = NF90_CREATE (file, NF90_CLOBBER, ncid) 
     375  iret = NF90_CREATE (file,NF90_CLOBBER,ncid) 
    377376!- 
    378377  IF (rectilinear) THEN 
     
    390389! 4.3 Global attributes 
    391390!- 
    392   iret = NF90_PUT_ATT (ncid,NF90_GLOBAL,'Conventions','CF-1.1') 
     391  iret = NF90_PUT_ATT (ncid,NF90_GLOBAL,'Conventions','CF-1.3') 
    393392  iret = NF90_PUT_ATT (ncid,NF90_GLOBAL,'file_name',TRIM(file)) 
    394393  iret = NF90_PUT_ATT (ncid,NF90_GLOBAL,'production',TRIM(model_name)) 
     
    409408! 6.0 storing the geographical coordinates 
    410409!- 
    411   IF ( (pim /= par_szx).OR.(pjm /= par_szy) )   zoom(pfileid)=.TRUE. 
     410  zoom(pfileid) = (pim /= par_szx).OR.(pjm /= par_szy) 
    412411  regular(pfileid)=.TRUE. 
    413412!- 
     
    468467  REAL,DIMENSION(:,:),INTENT(IN) :: plon_bounds,plat_bounds 
    469468  INTEGER,INTENT(IN) :: pitau0 
    470   REAL,INTENT(IN) :: pdate0, pdeltat 
    471   INTEGER,INTENT(OUT) :: pfileid, phoriid 
     469  REAL,INTENT(IN) :: pdate0,pdeltat 
     470  INTEGER,INTENT(OUT) :: pfileid,phoriid 
    472471  INTEGER,INTENT(IN),OPTIONAL :: domain_id 
    473472!- 
    474   INTEGER :: ncid, iret 
     473  INTEGER :: ncid,iret 
    475474  CHARACTER(LEN=120) :: file 
    476475  CHARACTER(LEN=30) :: timenow 
     
    496495    CALL ipslerr (3,"histbeg", & 
    497496   &  'Table of files too small. You should increase nb_files_max', & 
    498    &  'in M_HISTCOM.f90 in order to accomodate all these files', ' ') 
     497   &  'in histcom.f90 in order to accomodate all these files',' ') 
    499498  ENDIF 
    500499!- 
     
    527526! 4.3 Global attributes 
    528527!- 
    529   iret = NF90_PUT_ATT (ncid,NF90_GLOBAL,'Conventions','CF-1.1') 
     528  iret = NF90_PUT_ATT (ncid,NF90_GLOBAL,'Conventions','CF-1.3') 
    530529  iret = NF90_PUT_ATT (ncid,NF90_GLOBAL,'file_name',TRIM(file)) 
    531530  iret = NF90_PUT_ATT (ncid,NF90_GLOBAL,'production',TRIM(model_name)) 
     
    596595  CHARACTER(LEN=80) :: tmp_title, tmp_name 
    597596  INTEGER :: ndim 
    598   INTEGER,DIMENSION(2) :: dims(2) 
     597  INTEGER,DIMENSION(2) :: dims 
    599598  INTEGER :: nlonid, nlatid 
    600599  INTEGER :: orix, oriy, par_szx, par_szy 
     
    715714! Transfer the latitude 
    716715!- 
    717   IF ( rectilinear ) THEN 
     716  IF (rectilinear) THEN 
    718717    iret = NF90_PUT_VAR (ncid,nlatid,plat(1,oriy:oriy+par_szy-1)) 
    719718  ELSE 
     
    791790  ncid = ncdf_ids(pfileid) 
    792791!- 
    793   IF     ( SIZE(plon_bounds,DIM=1) == pim ) THEN 
     792  IF     (SIZE(plon_bounds,DIM=1) == pim) THEN 
    794793    nbbounds = SIZE(plon_bounds,DIM=2) 
    795794    transp = .TRUE. 
    796   ELSEIF ( SIZE(plon_bounds,DIM=2) == pim ) THEN 
     795  ELSEIF (SIZE(plon_bounds,DIM=2) == pim) THEN 
    797796    nbbounds = SIZE(plon_bounds,DIM=1) 
    798797    transp = .FALSE. 
     
    913912END SUBROUTINE histhori_irregular 
    914913!=== 
    915 SUBROUTINE histvert (pfileid, pzaxname, pzaxtitle, & 
    916  &                   pzaxunit, pzsize, pzvalues, pzaxid, pdirect) 
     914SUBROUTINE histvert (pfileid,pzaxname,pzaxtitle,pzaxunit, & 
     915 &                   pzsize,pzvalues,pzaxid,pdirect) 
    917916!--------------------------------------------------------------------- 
    918917!- This subroutine defines a vertical axis and returns it s id. 
     
    926925!- pzaxname : Name of the vertical axis 
    927926!- pzaxtitle: title of the vertical axis 
    928 !- pzaxunit : Units of the vertical axis 
     927!- pzaxunit : Units of the vertical axis (no units ih blank string) 
    929928!- pzsize   : size of the vertical axis 
    930929!- pzvalues : Coordinate values of the vetical axis 
     
    948947  CHARACTER(LEN=*),INTENT(IN),OPTIONAL :: pdirect 
    949948!- 
    950   INTEGER :: pos, iv, nb, zdimid, zaxid_tmp 
    951   CHARACTER(LEN=20) :: str20 
    952   CHARACTER(LEN=70) :: str70, str71, str72 
     949  INTEGER :: pos,iv,zdimid,zaxid_tmp 
     950  CHARACTER(LEN=70) :: str71 
    953951  CHARACTER(LEN=80) :: str80 
    954952  CHARACTER(LEN=20) :: direction 
     
    986984  ENDIF 
    987985!- 
    988   IF ( nb_zax(pfileid)+1 > nb_zax_max) THEN 
     986  IF (nb_zax(pfileid)+1 > nb_zax_max) THEN 
    989987    CALL ipslerr (3,"histvert", & 
    990988   &  'Table of vertical axes too small. You should increase ',& 
    991    &  'nb_zax_max in M_HISTCOM.f90 in order to accomodate all ', & 
     989   &  'nb_zax_max in histcom.f90 in order to accomodate all ', & 
    992990   &  'these variables ') 
    993991  ENDIF 
    994992!- 
    995993  iv = nb_zax(pfileid) 
    996   IF ( iv > 1) THEN 
    997     str20 = pzaxname 
    998     nb = iv-1 
    999     CALL find_str (zax_name(pfileid,1:nb),str20,pos) 
     994  IF (iv > 1) THEN 
     995    CALL find_str (zax_name(pfileid,1:iv-1),pzaxname,pos) 
    1000996  ELSE 
    1001997    pos = 0 
    1002998  ENDIF 
    1003999!- 
    1004   IF ( pos > 0) THEN 
    1005     str70 = "Vertical axis already exists" 
    1006     WRITE(str71,'("Check variable ",A," in file",I3)') str20,pfileid 
    1007     str72 = "Can also be a wrong file ID in another declaration" 
    1008     CALL ipslerr (3,"histvert", str70, str71, str72) 
     1000  IF (pos > 0) THEN 
     1001    WRITE(str71,'("Check variable ",A," in file",I3)') & 
     1002 &    TRIM(pzaxname),pfileid 
     1003    CALL ipslerr (3,"histvert", & 
     1004 &    "Vertical axis already exists",TRIM(str71), & 
     1005 &    "Can also be a wrong file ID in another declaration") 
    10091006  ENDIF 
    10101007!- 
     
    10221019  iret = NF90_DEF_VAR (ncid,pzaxname(1:leng),NF90_FLOAT, & 
    10231020 &                     zaxid_tmp,zdimid) 
    1024 !- 
    10251021  iret = NF90_PUT_ATT (ncid,zdimid,'axis',"Z") 
    10261022  leng = MIN(LEN_TRIM(pzaxunit),20) 
    1027   iret = NF90_PUT_ATT (ncid,zdimid,'units',pzaxunit(1:leng)) 
     1023  IF (leng > 0) THEN 
     1024    iret = NF90_PUT_ATT (ncid,zdimid,'units',pzaxunit(1:leng)) 
     1025  ENDIF 
    10281026  iret = NF90_PUT_ATT (ncid,zdimid,'positive',TRIM(direction)) 
    10291027  iret = NF90_PUT_ATT (ncid,zdimid,'valid_min', & 
     
    10441042!- 3.0 add the information to the common 
    10451043!- 
    1046   IF ( check) & 
     1044  IF (check) & 
    10471045  &  WRITE(*,*) "histvert : 3.0 add the information to the common" 
    10481046!- 
     
    10721070!- pvarname : Name of the variable, short and easy to remember 
    10731071!- ptitle   : Full name of the variable 
    1074 !- punit    : Units of the variable 
     1072!- punit    : Units of the variable (no units if blank string) 
    10751073!- 
    10761074!- The next 3 arguments give the size of that data 
     
    11161114  REAL,DIMENSION(2),OPTIONAL,INTENT(IN) :: var_range 
    11171115!- 
    1118   INTEGER :: iv, i, nb 
     1116  INTEGER :: iv,i 
    11191117  CHARACTER(LEN=70) :: str70, str71, str72 
    11201118  CHARACTER(LEN=20) :: tmp_name 
    1121   CHARACTER(LEN=20) :: str20 
    1122   CHARACTER(LEN=40) :: str40, tab_str40(nb_var_max) 
     1119  CHARACTER(LEN=40) :: str40 
    11231120  CHARACTER(LEN=10) :: str10 
    11241121  CHARACTER(LEN=80) :: tmp_str80 
     
    11351132  iv = nb_var(pfileid) 
    11361133!- 
    1137   IF ( iv > nb_var_max) THEN 
     1134  IF (iv > nb_var_max) THEN 
    11381135    CALL ipslerr (3,"histdef", & 
    11391136   &  'Table of variables too small. You should increase nb_var_max',& 
    1140    &  'in M_HISTCOM.f90 in order to accomodate all these variables', & 
     1137   &  'in histcom.f90 in order to accomodate all these variables', & 
    11411138   &  ' ') 
    11421139  ENDIF 
     
    11481145!- 
    11491146  IF (iv > 1) THEN 
    1150     str20 = pvarname 
    1151     nb = iv-1 
    1152     CALL find_str (name(pfileid,1:nb),str20,pos) 
     1147    CALL find_str (name(pfileid,1:iv-1),pvarname,pos) 
    11531148  ELSE 
    11541149    pos = 0 
     
    11571152  IF (pos > 0) THEN 
    11581153    str70 = "Variable already exists" 
    1159     WRITE(str71,'("Check variable  ",a," in file",I3)') str20,pfileid 
     1154    WRITE(str71,'("Check variable  ",a," in file",I3)') & 
     1155 &    TRIM(pvarname),pfileid 
    11601156    str72 = "Can also be a wrong file ID in another declaration" 
    11611157    CALL ipslerr (3,"histdef", str70, str71, str72) 
     
    12351231!     and a fall back onto the default grid 
    12361232!- 
    1237   IF ( phoriid > 0 .AND. phoriid <= nb_hax(pfileid)) THEN 
     1233  IF ( (phoriid > 0).AND.(phoriid <= nb_hax(pfileid)) ) THEN 
    12381234    var_haxid(pfileid,iv) = phoriid 
    12391235  ELSE 
     
    12501246!-- Does the vertical coordinate exist ? 
    12511247!- 
    1252     IF ( pzid > nb_zax(pfileid)) THEN 
     1248    IF (pzid > nb_zax(pfileid)) THEN 
    12531249      WRITE(str70, & 
    12541250 &    '("The vertical coordinate chosen for variable ",a)') & 
     
    12611257!- 
    12621258    IF (par_szz /= zax_size(pfileid,pzid)) THEN 
    1263       str20 = zax_name(pfileid,pzid) 
    12641259      str70 = "The size of the zoom does not correspond "// & 
    12651260 &            "to the size of the chosen vertical axis" 
    12661261      WRITE(str71,'("Size of zoom in z :", I4)') par_szz 
    12671262      WRITE(str72,'("Size declared for axis ",A," :",I4)') & 
    1268  &     TRIM(str20), zax_size(pfileid,pzid) 
     1263 &     TRIM(zax_name(pfileid,pzid)),zax_size(pfileid,pzid) 
    12691264      CALL ipslerr (3,"histdef", str70, str71, str72) 
    12701265    ENDIF 
     
    12721267!-- Is the zoom smaler that the total size of the variable ? 
    12731268!- 
    1274     IF ( pzsize < par_szz ) THEN 
    1275       str20 = zax_name(pfileid,pzid) 
     1269    IF (pzsize < par_szz) THEN 
    12761270      str70 = "The vertical size of variable "// & 
    12771271 &            "is smaller than that of the zoom." 
     
    13211315!- 
    13221316  CALL ioget_calendar(un_an, un_jour) 
    1323   IF ( pfreq_opp < 0) THEN 
     1317  IF (pfreq_opp < 0) THEN 
    13241318    CALL ioget_calendar(un_an) 
    13251319    test_fopp = pfreq_opp*(-1.)*un_an/12.*un_jour 
     
    13271321    test_fopp = pfreq_opp 
    13281322  ENDIF 
    1329   IF ( pfreq_wrt < 0) THEN 
     1323  IF (pfreq_wrt < 0) THEN 
    13301324    CALL ioget_calendar(un_an) 
    13311325    test_fwrt = pfreq_wrt*(-1.)*un_an/12.*un_jour 
     
    13701364      str72 = "PATCH : The smalest frequency of both is used" 
    13711365      CALL ipslerr (2,"histdef", str70, str71, str72) 
    1372       IF ( test_fopp < test_fwrt) THEN 
     1366      IF (test_fopp < test_fwrt) THEN 
    13731367        freq_opp(pfileid,iv) = pfreq_opp 
    13741368        freq_wrt(pfileid,iv) = pfreq_opp 
     
    14271421  IF (check) WRITE(*,*) "histdef : 6.0" 
    14281422!- 
    1429   IF ( freq_wrt(pfileid,iv) > 0 ) THEN 
     1423  IF (freq_wrt(pfileid,iv) > 0) THEN 
    14301424    WRITE(str10,'(I8.8)') INT(freq_wrt(pfileid,iv)) 
    14311425    str40 = TRIM(tmp_topp)//"_"//TRIM(str10) 
     
    14341428    str40 = TRIM(tmp_topp)//"_"//TRIM(str10) 
    14351429  ENDIF 
    1436 !- 
    1437   tab_str40(1:nb_tax(pfileid)) = tax_name(pfileid,1:nb_tax(pfileid)) 
    1438   CALL find_str (tab_str40(1:nb_tax(pfileid)),str40,pos) 
     1430  CALL find_str (tax_name(pfileid,1:nb_tax(pfileid)),str40,pos) 
    14391431!- 
    14401432! No time axis for once, l_max, l_min or never operation 
     
    14441436 &    .AND.(TRIM(tmp_topp) /= 'l_max') & 
    14451437 &    .AND.(TRIM(tmp_topp) /= 'l_min') ) THEN 
    1446     IF ( pos < 0) THEN 
     1438    IF (pos < 0) THEN 
    14471439      nb_tax(pfileid) = nb_tax(pfileid)+1 
    14481440      tax_name(pfileid,nb_tax(pfileid)) = str40 
     
    15781570    ttitle = title(pfileid,iv) 
    15791571!--- 
    1580     IF ( regular(pfileid) ) THEN 
     1572    IF (regular(pfileid) ) THEN 
    15811573      dims(1:2) = (/ xid(pfileid), yid(pfileid) /) 
    15821574      dim_cnt = 2 
     
    15911583!   2.1 dimension of field 
    15921584!--- 
    1593     IF ( (TRIM(tmp_opp) /= 'never')) THEN 
     1585    IF ((TRIM(tmp_opp) /= 'never')) THEN 
    15941586      IF (     (TRIM(tmp_opp) /= 'once')  & 
    15951587     &    .AND.(TRIM(tmp_opp) /= 'l_max') & 
     
    16171609      ncvar_ids(pfileid,iv) = ncvarid 
    16181610!- 
    1619       iret = NF90_PUT_ATT (ncid,ncvarid,'units',TRIM(tunit)) 
     1611      IF (LEN_TRIM(tunit) > 0) THEN 
     1612        iret = NF90_PUT_ATT (ncid,ncvarid,'units',TRIM(tunit)) 
     1613      ENDIF 
    16201614!- 
    16211615      iret = NF90_PUT_ATT (ncid,ncvarid,'missing_value', & 
     
    16511645!- 
    16521646      IF (itax > 0) THEN 
    1653         IF ( nb_tax(pfileid) > 1) THEN 
     1647        IF (nb_tax(pfileid) > 1) THEN 
    16541648          str30 = "t_"//tax_name(pfileid,itax) 
    16551649        ELSE 
     
    16681662 &                           REAL(freq_wrt(pfileid,iv),KIND=4)) 
    16691663      ENDIF 
    1670       iret = NF90_PUT_ATT (ncid,ncvarid,'associate',TRIM(assoc)) 
     1664      iret = NF90_PUT_ATT (ncid,ncvarid,'coordinates',TRIM(assoc)) 
    16711665    ENDIF 
    16721666  ENDDO 
     
    16781672  ENDIF 
    16791673!- 
    1680 ! 3.0 Put the netcdf file into wrte mode 
     1674! 3.0 Put the netcdf file into write mode 
    16811675!- 
    16821676  IF (check) WRITE(*,*) "histend : 3.0" 
     
    21992193    ALLOCATE (buff_tmp2(datasz_max(pfileid,varid))) 
    22002194    buff_tmp2_sz = datasz_max(pfileid,varid) 
    2201   ELSE IF ( datasz_max(pfileid,varid) > buff_tmp2_sz) THEN 
     2195  ELSE IF (datasz_max(pfileid,varid) > buff_tmp2_sz) THEN 
    22022196    IF (check) THEN 
    22032197      WRITE(*,*) "histwrite_real 1.2 re-allocate buff_tmp2 : ", & 
     
    22182212! 3.1 DO the Operations only if needed 
    22192213!- 
    2220   IF ( do_oper ) THEN 
     2214  IF (do_oper) THEN 
    22212215    i = pfileid 
    22222216    nbout = nbdpt 
     
    23052299  IF (check) WRITE(*,*) "histwrite: 6.0", pfileid 
    23062300!- 
    2307   IF ( do_write ) THEN 
     2301  IF (do_write) THEN 
    23082302!- 
    23092303    ncvarid = ncvar_ids(pfileid,varid) 
     
    23272321      IF (check) WRITE(*,*) "histwrite: 6.2", pfileid 
    23282322!- 
    2329       itax = var_axid(pfileid, varid) 
    2330       itime = nb_wrt(pfileid, varid)+1 
     2323      itax = var_axid(pfileid,varid) 
     2324      itime = nb_wrt(pfileid,varid)+1 
    23312325!- 
    23322326      IF (tax_last(pfileid, itax) < itime) THEN 
     
    23572351      ENDIF 
    23582352    ELSE 
    2359       IF ( regular(pfileid) ) THEN 
     2353      IF (regular(pfileid)) THEN 
    23602354        corner(1:4) = (/ 1, 1, 1, itime /) 
    23612355        edges(1:4) = (/ zsize(pfileid,varid,1), & 
     
    24172411  LOGICAL,SAVE :: learning(nb_files_max)=.TRUE. 
    24182412  INTEGER,SAVE :: overlap(nb_files_max) = -1 
    2419   INTEGER,SAVE :: varseq(nb_files_max, nb_var_max*3) 
     2413  INTEGER,SAVE :: varseq(nb_files_max,nb_var_max*3) 
    24202414  INTEGER,SAVE :: varseq_len(nb_files_max) = 0 
    24212415  INTEGER,SAVE :: varseq_pos(nb_files_max) 
    24222416  INTEGER,SAVE :: varseq_err(nb_files_max) = 0 
    2423   INTEGER      :: ib, nb, sp, nx, pos 
    2424   CHARACTER(LEN=20) :: str20 
     2417  INTEGER      :: ib,sp,nx,pos 
    24252418  CHARACTER(LEN=70) :: str70 
    24262419!- 
    24272420  LOGICAL :: check = .FALSE. 
    24282421!--------------------------------------------------------------------- 
    2429   nb = nb_var(pfid) 
    2430 !- 
    24312422  IF (check) THEN 
    24322423    WRITE(*,*) 'histvar_seq, start of the subroutine :',learning(pfid) 
     
    24482439!-- 1.1 Find the position of this string 
    24492440!- 
    2450     str20 = pvarname 
    2451     CALL find_str (name(pfid,1:nb),str20,pos) 
    2452 !- 
     2441    CALL find_str (name(pfid,1:nb_var(pfid)),pvarname,pos) 
    24532442    IF (pos > 0) THEN 
    24542443      pvid = pos 
     
    24572446 &      'The name of the variable you gave has not been declared', & 
    24582447 &      'You should use subroutine histdef for declaring variable', & 
    2459  &      TRIM(str20)) 
     2448 &      TRIM(pvarname)) 
    24602449    ENDIF 
    24612450!- 
     
    24632452!--     in the sequence of calls 
    24642453!- 
    2465     IF ( varseq_err(pfid) .GE. 0 ) THEN 
     2454    IF (varseq_err(pfid) >= 0) THEN 
    24662455      sp = varseq_len(pfid)+1 
    24672456      IF (sp <= nb_var_max*3) THEN 
     
    25092498    IF (nx > varseq_len(pfid)) nx = 1 
    25102499!- 
    2511     pvid = varseq(pfid, nx) 
    2512 !- 
    2513     IF ( TRIM(name(pfid,pvid)) /= TRIM(pvarname) ) THEN 
    2514       str20 = pvarname 
    2515       CALL find_str (name(pfid,1:nb),str20,pos) 
     2500    pvid = varseq(pfid,nx) 
     2501!- 
     2502    IF (TRIM(name(pfid,pvid)) /= TRIM(pvarname)) THEN 
     2503      CALL find_str (name(pfid,1:nb_var(pfid)),pvarname,pos) 
    25162504      IF (pos > 0) THEN 
    25172505        pvid = pos 
     
    25192507        CALL ipslerr (3,"histvar_seq", & 
    25202508 &  'The name of the variable you gave has not been declared',& 
    2521  &  'You should use subroutine histdef for declaring variable',str20) 
     2509 &  'You should use subroutine histdef for declaring variable', & 
     2510 &  TRIM(pvarname)) 
    25222511      ENDIF 
    25232512      varseq_err(pfid) = varseq_err(pfid)+1 
     
    25772566    ENDIF 
    25782567!- 
    2579     IF ( file_exists ) THEN 
     2568    IF (file_exists) THEN 
    25802569      IF (check) THEN 
    25812570        WRITE(*,*) 'Synchronising specified file number :', file 
     
    26242613!-- 1. Loop on the number of variables to add some final information 
    26252614!--- 
    2626     IF ( check ) WRITE(*,*) 'Entering loop on vars :', nb_var(ifile) 
     2615    IF (check) WRITE(*,*) 'Entering loop on vars :', nb_var(ifile) 
    26272616    DO iv=1,nb_var(ifile) 
    26282617      IF (hist_wrt_rng(ifile,iv)) THEN 
     
    26432632    ENDDO 
    26442633!--- 
    2645 !-- 2.0 Close the file 
     2634!-- 2. Close the file 
    26462635!--- 
    2647     IF (check) WRITE(*,*) 'close file :', ncid 
     2636    IF (check) WRITE(*,*) 'close file :',ncid 
    26482637    iret = NF90_CLOSE (ncid) 
    26492638    IF (iret /= NF90_NOERR) THEN 
    26502639      WRITE(str70,'("This file has been already closed :",I3)') ifile 
    2651       CALL ipslerr (2,'histclo',str70,'',' ') 
     2640      CALL ipslerr (2,'histclo',str70,'','') 
    26522641    ENDIF 
    26532642  ENDDO 
Note: See TracChangeset for help on using the changeset viewer.