Changeset 2368
- Timestamp:
- 2010-11-09T16:38:45+01:00 (14 years ago)
- Location:
- branches/nemo_v3_3_beta/NEMOGCM
- Files:
-
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/nemo_v3_3_beta/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm
r2365 r2368 1 bld::tool::fppkeys key_trabbl key_vectopt_loop key_orca_r2 key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_dtatem key_dtasal key_tradmp key_zdftke key_zdfddm key_iomput key_nproci=1 key_nprocj=1 1 bld::tool::fppkeys key_trabbl key_vectopt_loop key_orca_r2 key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_dtatem key_dtasal key_tradmp key_zdftke key_zdfddm key_iomput key_nproci=1 key_nprocj=1 key_netcdf4 -
branches/nemo_v3_3_beta/NEMOGCM/EXTERNAL/IOIPSL/src/histcom.f90
r2364 r2368 7 7 !- 8 8 USE netcdf 9 USE nc4 dummy! needed to allow compilation with netcdf3 libraries9 USE nc4interface ! needed to allow compilation with netcdf3 libraries 10 10 !- 11 11 USE stringop, ONLY : nocomma,cmpblank,findpos,find_str,strlowercase … … 36 36 !- to describe the grid, just two vectors. 37 37 !--------------------------------------------------------------------- 38 !-39 TYPE, PUBLIC :: snc4_ctl !: netcdf4 chunking control structure40 !: (optional on histbeg and histend calls)41 SEQUENCE42 INTEGER :: ni43 INTEGER :: nj44 INTEGER :: nk45 LOGICAL :: luse46 END TYPE snc4_ctl47 38 !- 48 39 INTERFACE histbeg … … 428 419 !- 429 420 IF (PRESENT(snc4chunks)) THEN 430 IF (snc4chunks%luse) m_c = NF90_HDF5 ! will conflict if compiling with netcdf4 libraries without "key_netcdf4"421 IF (snc4chunks%luse) CALL get_nf90_symbol("NF90_HDF5", m_c) 431 422 ENDIF 432 423 !- … … 1564 1555 ichunksz(3) = MIN(ichunksz(3), MAX((ichunksz(3)-1)/snc4chunks%nk + 1, 1)) 1565 1556 ! Always use a chunk size of 1 for the unlimited dimension 1566 iret = NF90_DEF_VAR_CHUNKING(nfid, nvid, ichunkalg, ichunksz) ! will conflict if compiling with netcdf4 libraries without "key_netcdf4" 1567 1568 iret = NF90_DEF_VAR_DEFLATE(nfid, nvid, ishuffle, ideflate, ideflate_level) ! will conflict if compiling with netcdf4 libraries without "key_netcdf4" 1569 1557 iret = SET_NF90_DEF_VAR_CHUNKING(nfid, nvid, ichunkalg, ichunksz) 1558 iret = SET_NF90_DEF_VAR_DEFLATE(nfid, nvid, ishuffle, ideflate, ideflate_level) 1570 1559 ENDIF 1571 1560 ENDIF -
branches/nemo_v3_3_beta/NEMOGCM/EXTERNAL/IOIPSL/src/nc4interface.F90
r2366 r2368 1 MODULE nc4 dummy1 MODULE nc4interface 2 2 !- 3 3 !- … … 10 10 !! calls when compiling without netcdf4 libraries 11 11 !!-------------------------------------------------------------------- 12 INTEGER, PUBLIC :: NF90_HDF5 12 !- netcdf4 chunking control structure 13 !- (optional on histbeg and histend calls) 14 TYPE, PUBLIC :: snc4_ctl 15 SEQUENCE 16 INTEGER :: ni 17 INTEGER :: nj 18 INTEGER :: nk 19 LOGICAL :: luse 20 END TYPE snc4_ctl 21 13 22 CONTAINS 14 23 !=== 15 INTEGER FUNCTION NF90_DEF_VAR_CHUNKING(idum1, idum2, idum3, iarr1) 24 SUBROUTINE GET_NF90_SYMBOL(sym_name, ivalue) 25 CHARACTER(len=*), INTENT(in) :: sym_name 26 INTEGER, INTENT(out) :: ivalue 27 ivalue = -999 28 END SUBROUTINE GET_NF90_SYMBOL 29 INTEGER FUNCTION SET_NF90_DEF_VAR_CHUNKING(idum1, idum2, idum3, iarr1) 16 30 !!-------------------------------------------------------------------- 17 31 !! *** SUBROUTINE NF90_DEF_VAR_CHUNKING *** … … 21 35 INTEGER, INTENT(in) :: idum1, idum2, idum3 22 36 INTEGER, DIMENSION(4), INTENT(in) :: iarr1 23 IF(lwp) WRITE(numout,*) 'Warning: Attempt to chunk output variable without NetCDF4 support'24 NF90_DEF_VAR_CHUNKING = -125 END FUNCTION NF90_DEF_VAR_CHUNKING37 WRITE(*,*) 'Warning: Attempt to chunk output variable without NetCDF4 support' 38 SET_NF90_DEF_VAR_CHUNKING = -1 39 END FUNCTION SET_NF90_DEF_VAR_CHUNKING 26 40 27 INTEGER FUNCTION NF90_DEF_VAR_DEFLATE(idum1, idum2, idum3, idum4, idum5)41 INTEGER FUNCTION SET_NF90_DEF_VAR_DEFLATE(idum1, idum2, idum3, idum4, idum5) 28 42 !!-------------------------------------------------------------------- 29 43 !! *** SUBROUTINE NF90_DEF_VAR_DEFLATE *** … … 32 46 !!-------------------------------------------------------------------- 33 47 INTEGER, INTENT(in) :: idum1, idum2, idum3, idum4, idum5 34 IF(lwp) WRITE(numout,*) 'Warning: Attempt to compress output variable without NetCDF4 support'35 NF90_DEF_VAR_DEFLATE = -136 END FUNCTION NF90_DEF_VAR_DEFLATE48 WRITE(*,*) 'Warning: Attempt to compress output variable without NetCDF4 support' 49 SET_NF90_DEF_VAR_DEFLATE = -1 50 END FUNCTION SET_NF90_DEF_VAR_DEFLATE 37 51 #else 38 52 !!-------------------------------------------------------------------- … … 40 54 !! calls when compiling without netcdf4 libraries 41 55 !!-------------------------------------------------------------------- 56 57 USE netcdf 58 59 !- netcdf4 chunking control structure 60 !- (optional on histbeg and histend calls) 61 !$AGRIF_DO_NOT_TREAT 62 TYPE, PUBLIC :: snc4_ctl 63 SEQUENCE 64 INTEGER :: ni 65 INTEGER :: nj 66 INTEGER :: nk 67 LOGICAL :: luse 68 END TYPE snc4_ctl 69 !$AGRIF_END_DO_NOT_TREAT 70 71 CONTAINS 72 INTEGER FUNCTION SET_NF90_DEF_VAR_CHUNKING(nfid, nvid, ichunkalg, ichunksz) 73 !!-------------------------------------------------------------------- 74 !! *** SUBROUTINE NF90_DEF_VAR_CHUNKING *** 75 !! 76 !! ** Purpose : Interface NetCDF4 routine to enable compiling with NetCDF4 libraries 77 !! but no key_netcdf4 78 !!-------------------------------------------------------------------- 79 INTEGER, INTENT(in) :: nfid 80 INTEGER, INTENT(in) :: nvid 81 INTEGER, INTENT(in) :: ichunkalg 82 INTEGER, DIMENSION(:), INTENT(in) :: ichunksz 83 !! 84 INTEGER :: iret 85 !! 86 iret = NF90_DEF_VAR_CHUNKING(nfid, nvid, ichunkalg, ichunksz) 87 SET_NF90_DEF_VAR_CHUNKING = iret 88 END FUNCTION SET_NF90_DEF_VAR_CHUNKING 89 90 INTEGER FUNCTION SET_NF90_DEF_VAR_DEFLATE(nfid, nvid, ishuffle, ideflate, ideflate_level) 91 !!-------------------------------------------------------------------- 92 !! *** SUBROUTINE NF90_DEF_VAR_DEFLATE *** 93 !! 94 !! ** Purpose : Interface NetCDF4 routine to enable compiling with NetCDF4 libraries 95 !! but no key_netcdf4 96 !!-------------------------------------------------------------------- 97 INTEGER, INTENT(in) :: nfid 98 INTEGER, INTENT(in) :: nvid 99 INTEGER, INTENT(in) :: ishuffle 100 INTEGER, INTENT(in) :: ideflate 101 INTEGER, INTENT(in) :: ideflate_level 102 !! 103 INTEGER :: iret 104 !! 105 iret = NF90_DEF_VAR_DEFLATE(nfid, nvid, ishuffle, ideflate, ideflate_level) 106 SET_NF90_DEF_VAR_DEFLATE = iret 107 END FUNCTION SET_NF90_DEF_VAR_DEFLATE 108 109 SUBROUTINE GET_NF90_SYMBOL(sym_name, ivalue) 110 CHARACTER(len=*), INTENT(in) :: sym_name 111 INTEGER, INTENT(out) :: ivalue 112 SELECT CASE (sym_name) 113 CASE ("NF90_HDF5") 114 ivalue = NF90_HDF5 115 CASE DEFAULT 116 WRITE(*,*) "Warning: unknown case in GET_NF90_SYMBOL" 117 END SELECT 118 END SUBROUTINE GET_NF90_SYMBOL 42 119 #endif 43 120 44 121 !------------------ 45 END MODULE nc4 dummy122 END MODULE nc4interface -
branches/nemo_v3_3_beta/NEMOGCM/EXTERNAL/XMLIO_SERVER/src/IOSERVER/mod_ioserver_namelist.f90
r2364 r2368 1 1 MODULE mod_ioserver_namelist 2 2 3 USE nc4interface 3 4 LOGICAL,SAVE :: using_server 4 5 LOGICAL,SAVE :: using_oasis … … 11 12 12 13 INTEGER,PARAMETER,PRIVATE :: starting_unit=356 13 TYPE, PUBLIC :: snc4_ctl !: netcdf4 chunking control structure14 !: (optional on histbeg and histend calls)15 SEQUENCE16 INTEGER :: ni17 INTEGER :: nj18 INTEGER :: nk19 LOGICAL :: luse20 END TYPE snc4_ctl21 14 TYPE(snc4_ctl), SAVE :: snc4ioset 22 15 INTEGER :: nn_nchunks_i, nn_nchunks_j, nn_nchunks_k -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
r2364 r2368 19 19 USE par_oce ! ocean parameter 20 20 USE lib_print ! formated print library 21 USE nc4interface 21 22 22 23 IMPLICIT NONE … … 62 63 #endif 63 64 64 !$AGRIF_DO_NOT_TREAT 65 TYPE, PUBLIC :: snc4_ctl !: netcdf4 chunking control structure (always needed for decision making) 66 SEQUENCE 67 INTEGER :: ni 68 INTEGER :: nj 69 INTEGER :: nk 70 LOGICAL :: luse 71 END TYPE snc4_ctl 72 73 TYPE(snc4_ctl) :: snc4set !: netcdf4 chunking control structure (always needed for decision making) 74 !$AGRIF_END_DO_NOT_TREAT 65 TYPE(snc4_ctl) :: snc4set !: netcdf4 chunking control structure (always needed for decision making) 75 66 76 67 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/IOM/iom_nf90.F90
r2364 r2368 40 40 END INTERFACE 41 41 42 #if ! defined key_netcdf443 !!--------------------------------------------------------------------44 !! NOT 'key_netcdf4' Defines dummy routines for netcdf445 !! calls when compiling without netcdf4 libraries46 !!--------------------------------------------------------------------47 PUBLIC NF90_DEF_VAR_CHUNKING, NF90_DEF_VAR_DEFLATE ! contained below48 INTEGER :: NF90_HDF549 #endif50 42 !!---------------------------------------------------------------------- 51 43 !! NEMO/OPA 3.3 , NEMO Consortium (2010) … … 77 69 INTEGER :: ichunk ! temporary storage of nn_chunksz 78 70 INTEGER :: imode ! creation mode flag: NF90_CLOBBER or NF90_NOCLOBBER or NF90_HDF5 71 INTEGER :: ihdf5 ! local variable for retrieval of value for NF90_HDF5 79 72 LOGICAL :: llclobber ! local definition of ln_clobber 80 73 !--------------------------------------------------------------------- … … 116 109 IF( snc4set%luse ) THEN 117 110 IF(lwp) WRITE(numout,*) TRIM(clinfo)//' creating file: '//TRIM(cdname)//' in hdf5 (netcdf4) mode' 118 IF( llclobber ) THEN ; imode = IOR(NF90_HDF5, NF90_CLOBBER) 119 ELSE ; imode = IOR(NF90_HDF5, NF90_NOCLOBBER) 111 CALL GET_NF90_SYMBOL("NF90_HDF5", ihdf5) 112 IF( llclobber ) THEN ; imode = IOR(ihdf5, NF90_CLOBBER) 113 ELSE ; imode = IOR(ihdf5, NF90_NOCLOBBER) 120 114 ENDIF 121 115 CALL iom_nf90_check(NF90_CREATE( TRIM(cdname), imode, if90id ), clinfo) … … 496 490 ichunksz(4) = 1 ! Do not allow chunks to span the 497 491 ! unlimited dimension 498 CALL iom_nf90_check( NF90_DEF_VAR_CHUNKING(if90id, idvar, ichunkalg, ichunksz), clinfo)499 CALL iom_nf90_check( NF90_DEF_VAR_DEFLATE(if90id, idvar, ishuffle, ideflate, ideflate_level), clinfo)492 CALL iom_nf90_check(SET_NF90_DEF_VAR_CHUNKING(if90id, idvar, ichunkalg, ichunksz), clinfo) 493 CALL iom_nf90_check(SET_NF90_DEF_VAR_DEFLATE(if90id, idvar, ishuffle, ideflate, ideflate_level), clinfo) 500 494 IF(lwp) WRITE(numout,*) TRIM(clinfo)//' chunked ok. Chunks sizes: ', ichunksz 501 495 ENDIF … … 579 573 END SUBROUTINE iom_nf90_check 580 574 581 #if ! defined key_netcdf4582 583 !!--------------------------------------------------------------------584 !! NOT 'key_netcdf4' Defines dummy routines for netcdf4585 !! calls when compiling without netcdf4 libraries586 !!--------------------------------------------------------------------587 588 INTEGER FUNCTION NF90_DEF_VAR_CHUNKING(idum1, idum2, idum3, iarr1)589 !!--------------------------------------------------------------------590 !! *** SUBROUTINE NF90_DEF_VAR_CHUNKING ***591 !!592 !! ** Purpose : Dummy NetCDF4 routine to enable compiling with NetCDF3 libraries593 !!--------------------------------------------------------------------594 INTEGER, INTENT(in) :: idum1, idum2, idum3595 INTEGER, DIMENSION(4), INTENT(in) :: iarr1596 IF(lwp) WRITE(numout,*) 'Warning: Attempt to chunk output variable without NetCDF4 support'597 NF90_DEF_VAR_CHUNKING = -1598 END FUNCTION NF90_DEF_VAR_CHUNKING599 600 INTEGER FUNCTION NF90_DEF_VAR_DEFLATE(idum1, idum2, idum3, idum4, idum5)601 !!--------------------------------------------------------------------602 !! *** SUBROUTINE NF90_DEF_VAR_DEFLATE ***603 !!604 !! ** Purpose : Dummy NetCDF4 routine to enable compiling with NetCDF3 libraries605 !!--------------------------------------------------------------------606 INTEGER, INTENT(in) :: idum1, idum2, idum3, idum4, idum5607 IF(lwp) WRITE(numout,*) 'Warning: Attempt to compress output variable without NetCDF4 support'608 NF90_DEF_VAR_DEFLATE = -1609 END FUNCTION NF90_DEF_VAR_DEFLATE610 #endif611 612 575 !!====================================================================== 613 576 END MODULE iom_nf90
Note: See TracChangeset
for help on using the changeset viewer.