Changeset 881
- Timestamp:
- 02/03/10 16:54:51 (15 years ago)
- Location:
- IOIPSL/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
IOIPSL/trunk/src/fliocom.f90
r760 r881 1380 1380 !--- 1381 1381 IF (PRESENT(v_t)) THEN 1382 IF (v_t == flio_i) THEN 1382 SELECT CASE (v_t) 1383 CASE(flio_i) 1383 1384 IF (i_std == i_8) THEN 1384 !-------- Not yet supported by NETCDF1385 !-------- I8 not yet supported by NETCDF 1385 1386 !-------- m_k = flio_i8 1386 1387 m_k = flio_i4 … … 1388 1389 m_k = flio_i4 1389 1390 ENDIF 1390 ELSE IF (v_t == flio_r) THEN1391 CASE(flio_r) 1391 1392 IF (r_std == r_8) THEN 1392 1393 m_k = flio_r8 … … 1394 1395 m_k = flio_r4 1395 1396 ENDIF 1396 ELSE1397 CASE(flio_c,flio_i1,flio_i2,flio_i4,flio_r4,flio_r8) 1397 1398 m_k = v_t 1398 ENDIF 1399 CASE DEFAULT 1400 CALL ipslerr (3,'fliodefv', & 1401 & 'Variable '//TRIM(v_n),'External type','not supported') 1402 END SELECT 1399 1403 ELSE IF (r_std == r_8) THEN 1400 1404 m_k = flio_r8 … … 1402 1406 m_k = flio_r4 1403 1407 ENDIF 1408 !--- 1404 1409 IF (n_d > 0) THEN 1405 1410 i_rc = NF90_DEF_VAR(f_e,v_n,m_k,a_i(1:n_d),i_v) … … 1427 1432 ENDIF 1428 1433 IF (PRESENT(valid_min)) THEN 1429 i_rc = NF90_PUT_ATT(f_e,i_v,'valid_min',valid_min) 1434 SELECT CASE (m_k) 1435 CASE(flio_i1,flio_i2) 1436 i_rc = NF90_PUT_ATT(f_e,i_v,'valid_min',NINT(valid_min,KIND=i_2)) 1437 CASE(flio_i4) 1438 i_rc = NF90_PUT_ATT(f_e,i_v,'valid_min',NINT(valid_min,KIND=i_4)) 1439 CASE(flio_r4) 1440 i_rc = NF90_PUT_ATT(f_e,i_v,'valid_min',REAL(valid_min,KIND=r_4)) 1441 CASE(flio_r8) 1442 i_rc = NF90_PUT_ATT(f_e,i_v,'valid_min',REAL(valid_min,KIND=r_8)) 1443 CASE DEFAULT 1444 CALL ipslerr (2,'fliodefv', & 1445 & 'Variable '//TRIM(v_n),'attribute valid_min', & 1446 & 'not supported for this external type') 1447 END SELECT 1430 1448 ENDIF 1431 1449 IF (PRESENT(valid_max)) THEN 1432 i_rc = NF90_PUT_ATT(f_e,i_v,'valid_max',valid_max) 1450 SELECT CASE (m_k) 1451 CASE(flio_i1,flio_i2) 1452 i_rc = NF90_PUT_ATT(f_e,i_v,'valid_max',NINT(valid_max,KIND=i_2)) 1453 CASE(flio_i4) 1454 i_rc = NF90_PUT_ATT(f_e,i_v,'valid_max',NINT(valid_max,KIND=i_4)) 1455 CASE(flio_r4) 1456 i_rc = NF90_PUT_ATT(f_e,i_v,'valid_max',REAL(valid_max,KIND=r_4)) 1457 CASE(flio_r8) 1458 i_rc = NF90_PUT_ATT(f_e,i_v,'valid_max',REAL(valid_max,KIND=r_8)) 1459 CASE DEFAULT 1460 CALL ipslerr (2,'fliodefv', & 1461 & 'Variable '//TRIM(v_n),'attribute valid_max', & 1462 & 'not supported for this external type') 1463 END SELECT 1433 1464 ENDIF 1434 1465 !--- -
IOIPSL/trunk/src/histcom.f90
r879 r881 110 110 & last_opp,last_wrt,last_opp_chk,last_wrt_chk,nb_opp,nb_wrt 111 111 !- For future optimization 112 REAL, ALLOCATABLE,DIMENSION(:) :: t_bf112 REAL,POINTER,DIMENSION(:) :: t_bf 113 113 !# REAL,ALLOCATABLE,DIMENSION(:) :: V_1_D 114 114 !# REAL,ALLOCATABLE,DIMENSION(:,:) :: V_2_D … … 692 692 dims(1:1) = (/ W_F(idf)%xid /) 693 693 ENDIF 694 iret = NF90_DEF_VAR (nfid,lon_name,NF90_ FLOAT,dims(1:ndim),nlonid)694 iret = NF90_DEF_VAR (nfid,lon_name,NF90_REAL4,dims(1:ndim),nlonid) 695 695 IF (rectilinear) THEN 696 696 iret = NF90_PUT_ATT (nfid,nlonid,'axis',"X") … … 713 713 dims(1:1) = (/ W_F(idf)%yid /) 714 714 ENDIF 715 iret = NF90_DEF_VAR (nfid,lat_name,NF90_ FLOAT,dims(1:ndim),nlatid)715 iret = NF90_DEF_VAR (nfid,lat_name,NF90_REAL4,dims(1:ndim),nlatid) 716 716 IF (rectilinear) THEN 717 717 iret = NF90_PUT_ATT (nfid,nlatid,'axis',"Y") … … 867 867 IF (l_dbg) WRITE(*,*) "histhori_irregular 2.0" 868 868 !- 869 iret = NF90_DEF_VAR (nfid,lon_name,NF90_ FLOAT,dims(1:ndim),nlonid)869 iret = NF90_DEF_VAR (nfid,lon_name,NF90_REAL4,dims(1:ndim),nlonid) 870 870 iret = NF90_PUT_ATT (nfid,nlonid,'standard_name',"longitude") 871 871 iret = NF90_PUT_ATT (nfid,nlonid,'units',"degrees_east") … … 880 880 !- 881 881 iret = NF90_PUT_ATT (nfid,nlonid,'bounds',TRIM(lonbound_name)) 882 iret = NF90_DEF_VAR (nfid,lonbound_name,NF90_ FLOAT, &882 iret = NF90_DEF_VAR (nfid,lonbound_name,NF90_REAL4, & 883 883 & dimsb(1:ndimb),nlonidb) 884 884 longname = 'Boundaries for coordinate variable '//TRIM(lon_name) … … 889 889 IF (l_dbg) WRITE(*,*) "histhori_irregular 3.0" 890 890 !- 891 iret = NF90_DEF_VAR (nfid,lat_name,NF90_ FLOAT,dims(1:ndim),nlatid)891 iret = NF90_DEF_VAR (nfid,lat_name,NF90_REAL4,dims(1:ndim),nlatid) 892 892 iret = NF90_PUT_ATT (nfid,nlatid,'standard_name',"latitude") 893 893 iret = NF90_PUT_ATT (nfid,nlatid,'units',"degrees_north") … … 902 902 !- 903 903 iret = NF90_PUT_ATT (nfid,nlatid,'bounds',TRIM(latbound_name)) 904 iret = NF90_DEF_VAR (nfid,latbound_name,NF90_ FLOAT, &904 iret = NF90_DEF_VAR (nfid,latbound_name,NF90_REAL4, & 905 905 & dimsb(1:ndimb),nlatidb) 906 906 longname = 'Boundaries for coordinate variable '//TRIM(lat_name) … … 1051 1051 leng = MIN(LEN_TRIM(pzaxname),20) 1052 1052 iret = NF90_DEF_DIM (nfid,pzaxname(1:leng),pzsize,zaxid_tmp) 1053 iret = NF90_DEF_VAR (nfid,pzaxname(1:leng),NF90_ FLOAT, &1053 iret = NF90_DEF_VAR (nfid,pzaxname(1:leng),NF90_REAL4, & 1054 1054 & zaxid_tmp,zdimid) 1055 1055 iret = NF90_PUT_ATT (nfid,zdimid,'axis',"Z") … … 1551 1551 str30 = "time_counter" 1552 1552 ENDIF 1553 iret = NF90_DEF_VAR (nfid,str30,NF90_ DOUBLE, &1553 iret = NF90_DEF_VAR (nfid,str30,NF90_REAL8, & 1554 1554 & dims(1),W_F(idf)%W_V(itx)%tdimid) 1555 1555 IF (W_F(idf)%n_tax <= 1) THEN … … 1664 1664 ENDIF 1665 1665 IF (W_F(idf)%W_V(iv)%hist_wrt_rng) THEN 1666 iret = NF90_PUT_ATT (nfid,nvid,'valid_min', & 1667 & REAL(W_F(idf)%W_V(iv)%hist_minmax(1),KIND=4)) 1668 iret = NF90_PUT_ATT (nfid,nvid,'valid_max', & 1669 & REAL(W_F(idf)%W_V(iv)%hist_minmax(2),KIND=4)) 1666 IF (W_F(idf)%W_V(iv)%v_typ == hist_r8) THEN 1667 iret = NF90_PUT_ATT (nfid,nvid,'valid_min', & 1668 & REAL(W_F(idf)%W_V(iv)%hist_minmax(1),KIND=8)) 1669 iret = NF90_PUT_ATT (nfid,nvid,'valid_max', & 1670 & REAL(W_F(idf)%W_V(iv)%hist_minmax(2),KIND=8)) 1671 ELSE 1672 iret = NF90_PUT_ATT (nfid,nvid,'valid_min', & 1673 & REAL(W_F(idf)%W_V(iv)%hist_minmax(1),KIND=4)) 1674 iret = NF90_PUT_ATT (nfid,nvid,'valid_max', & 1675 & REAL(W_F(idf)%W_V(iv)%hist_minmax(2),KIND=4)) 1676 ENDIF 1670 1677 ENDIF 1671 1678 iret = NF90_PUT_ATT (nfid,nvid,'long_name', & … … 2482 2489 !-------- Put the min and max values on the file 2483 2490 nvid = W_F(ifile)%W_V(iv)%ncvid 2484 iret = NF90_PUT_ATT (nfid,nvid,'valid_min', & 2485 & REAL(W_F(ifile)%W_V(iv)%hist_minmax(1),KIND=4)) 2486 iret = NF90_PUT_ATT (nfid,nvid,'valid_max', & 2487 & REAL(W_F(ifile)%W_V(iv)%hist_minmax(2),KIND=4)) 2491 IF (W_F(ifile)%W_V(iv)%v_typ == hist_r8) THEN 2492 iret = NF90_PUT_ATT (nfid,nvid,'valid_min', & 2493 & REAL(W_F(ifile)%W_V(iv)%hist_minmax(1),KIND=8)) 2494 iret = NF90_PUT_ATT (nfid,nvid,'valid_max', & 2495 & REAL(W_F(ifile)%W_V(iv)%hist_minmax(2),KIND=8)) 2496 ELSE 2497 iret = NF90_PUT_ATT (nfid,nvid,'valid_min', & 2498 & REAL(W_F(ifile)%W_V(iv)%hist_minmax(1),KIND=4)) 2499 iret = NF90_PUT_ATT (nfid,nvid,'valid_max', & 2500 & REAL(W_F(ifile)%W_V(iv)%hist_minmax(2),KIND=4)) 2501 ENDIF 2488 2502 ENDIF 2489 2503 ENDIF 2490 2504 !---- Time-Buffers 2491 IF (A LLOCATED(W_F(ifile)%W_V(iv)%t_bf)) THEN2505 IF (ASSOCIATED(W_F(ifile)%W_V(iv)%t_bf)) THEN 2492 2506 DEALLOCATE(W_F(ifile)%W_V(iv)%t_bf) 2493 2507 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.