Changeset 1488
- Timestamp:
- 2009-07-16T11:19:46+02:00 (15 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CONFIG/GYRE/EXP00/namelist
r1456 r1488 40 40 ln_dimgnnn = .false. ! DIMG file format: 1 file for all processors (F) or by processor (T) 41 41 ln_mskland = .false. ! mask land points (1.e+20) in NetCDF outputs (costly: + ~15%) 42 ln_clobber = .false. ! clobber (overwrite) an existing file 43 nn_chunksz = 0 ! chunksize (bytes) for NetCDF file (working only with iom_nf90 routines) 42 44 / 43 45 !!====================================================================== -
trunk/CONFIG/GYRE_LOBSTER/EXP00/namelist
r1456 r1488 40 40 ln_dimgnnn = .false. ! DIMG file format: 1 file for all processors (F) or by processor (T) 41 41 ln_mskland = .false. ! mask land points in NetCDF outputs (costly: + ~15%) 42 ln_clobber = .false. ! clobber (overwrite) an existing file 43 nn_chunksz = 0 ! chunksize (bytes) for NetCDF file (working only with iom_nf90 routines) 42 44 / 43 45 !!====================================================================== -
trunk/CONFIG/ORCA2_LIM/EXP00/1_namelist
r1424 r1488 40 40 ln_dimgnnn = .false. ! DIMG file format: 1 file for all processors (F) or by processor (T) 41 41 ln_mskland = .false. ! mask land points in NetCDF outputs (costly: + ~15%) 42 ln_clobber = .false. ! clobber (overwrite) an existing file 43 nn_chunksz = 0 ! chunksize (bytes) for NetCDF file (working only with iom_nf90 routines) 42 44 / 43 45 !!====================================================================== -
trunk/CONFIG/ORCA2_LIM/EXP00/namelist
r1456 r1488 40 40 ln_dimgnnn = .false. ! DIMG file format: 1 file for all processors (F) or by processor (T) 41 41 ln_mskland = .false. ! mask land points in NetCDF outputs (costly: + ~15%) 42 ln_clobber = .false. ! clobber (overwrite) an existing file 43 nn_chunksz = 0 ! chunksize (bytes) for NetCDF file (working only with iom_nf90 routines) 42 44 / 43 45 !!====================================================================== -
trunk/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist
r1456 r1488 40 40 ln_dimgnnn = .false. ! DIMG file format: 1 file for all processors (F) or by processor (T) 41 41 ln_mskland = .false. ! mask land points in NetCDF outputs (costly: + ~15%) 42 ln_clobber = .false. ! clobber (overwrite) an existing file 43 nn_chunksz = 0 ! chunksize (bytes) for NetCDF file (working only with iom_nf90 routines) 42 44 / 43 45 !!====================================================================== -
trunk/NEMO/OPA_SRC/DOM/domain.F90
r1465 r1488 129 129 NAMELIST/namrun/ no , cexper, cn_ocerst_in, cn_ocerst_out, ln_rstart, nrstdt, & 130 130 & nit000, nitend, ndate0 , nleapy , ninist , nstock, & 131 & nwrite, ln_dimgnnn, ln_mskland 131 & nwrite, ln_dimgnnn, ln_mskland, ln_clobber, nn_chunksz 132 132 133 133 NAMELIST/namdom/ ntopo , e3zps_min, e3zps_rat, nmsh , & … … 160 160 WRITE(numout,*) ' multi file dimgout ln_dimgnnn = ', ln_dimgnnn 161 161 WRITE(numout,*) ' mask land points ln_mskland = ', ln_mskland 162 WRITE(numout,*) ' overwrite an existing file ln_clobber = ', ln_clobber 163 WRITE(numout,*) ' NetCDF chunksize (bytes) nn_chunksz = ', nn_chunksz 162 164 ENDIF 163 165 -
trunk/NEMO/OPA_SRC/IOM/in_out_manager.F90
r1481 r1488 40 40 !: (T): 1 file per proc 41 41 LOGICAL :: ln_mskland = .FALSE. !: mask land points in NetCDF outputs (costly: + ~15%) 42 LOGICAL :: ln_clobber = .FALSE. !: clobber (overwrite) an existing file 43 INTEGER :: nn_chunksz = 0 !: chunksize (bytes) for NetCDF file (working only with iom_nf90 routines) 42 44 !!---------------------------------------------------------------------- 43 45 !! was in restart but moved here because of the OFF line... better solution should be found... -
trunk/NEMO/OPA_SRC/IOM/iom_ioipsl.F90
r1271 r1488 48 48 !! ** Purpose : open an input file with IOIPSL (only fliocom module) 49 49 !!--------------------------------------------------------------------- 50 CHARACTER(len=*) , INTENT(inout) :: cdname ! File name 51 INTEGER , INTENT( out) :: kiomid ! ioipsl identifier of the opened file 52 LOGICAL , INTENT(in ) :: ldwrt ! read or write the file? 53 LOGICAL , INTENT(in ) :: ldok ! check the existence 54 INTEGER, DIMENSION(2,5), INTENT(in ), OPTIONAL :: kdompar ! domain parameters: 55 56 CHARACTER(LEN=100) :: clinfo ! info character 57 INTEGER :: iln ! lengths of character 58 INTEGER :: istop ! temporary storage of nstop 59 INTEGER :: ifliodom ! model domain identifier (see flio_dom_set) 60 INTEGER :: ioipslid ! ioipsl identifier of the opened file 61 INTEGER :: jl ! loop variable 50 CHARACTER(len=*) , INTENT(inout) :: cdname ! File name 51 INTEGER , INTENT( out) :: kiomid ! ioipsl identifier of the opened file 52 LOGICAL , INTENT(in ) :: ldwrt ! read or write the file? 53 LOGICAL , INTENT(in ) :: ldok ! check the existence 54 INTEGER, DIMENSION(2,5), INTENT(in ), OPTIONAL :: kdompar ! domain parameters: 55 56 CHARACTER(LEN=100) :: clinfo ! info character 57 CHARACTER(LEN=10 ) :: clstatus ! status of opened file (REPLACE or NEW) 58 INTEGER :: iln ! lengths of character 59 INTEGER :: istop ! temporary storage of nstop 60 INTEGER :: ifliodom ! model domain identifier (see flio_dom_set) 61 INTEGER :: ioipslid ! ioipsl identifier of the opened file 62 INTEGER :: jl ! loop variable 63 LOGICAL :: llclobber ! local definition of ln_clobber 62 64 !--------------------------------------------------------------------- 63 65 … … 65 67 istop = nstop 66 68 ! 67 IF( ldok ) THEN ! Open existing file... 69 llclobber = ldwrt .AND. ln_clobber 70 IF( ldok .AND. .NOT. llclobber ) THEN ! Open existing file... 68 71 ! ! ============= 69 72 IF( ldwrt ) THEN ! ... in write mode … … 78 81 iln = INDEX( cdname, '.nc' ) 79 82 IF( ldwrt ) THEN ! the file should be open in write mode so we create it... 83 IF( llclobber ) THEN ; clstatus = 'REPLACE' 84 ELSE ; clstatus = 'NEW' 85 ENDIF 80 86 IF( jpnij > 1 ) THEN 81 87 ! define the domain position regarding to the global domain (mainly useful in mpp) … … 86 92 IF(lwp) WRITE(numout,*) TRIM(clinfo)//' create new file: '//cdname(1:iln-1)//'... in WRITE mode' 87 93 CALL fliocrfd( cdname, (/'x' , 'y' , 'z', 't'/) & 88 & , (/kdompar(1,1), kdompar(2,1), jpk, -1 /), ioipslid, ifliodom )94 & , (/kdompar(1,1), kdompar(2,1), jpk, -1 /), ioipslid, ifliodom, mode = clstatus ) 89 95 ELSE ! the file should be open for read mode so it must exist... 90 96 IF(lwp) WRITE(numout,*) TRIM(clinfo)//' create new file: '//cdname//' in WRITE mode' 91 97 CALL fliocrfd( cdname, (/'x' , 'y' , 'z', 't'/) & 92 & , (/kdompar(1,1), kdompar(2,1), jpk, -1 /), ioipslid )98 & , (/kdompar(1,1), kdompar(2,1), jpk, -1 /), ioipslid, mode = clstatus ) 93 99 ENDIF 94 100 ELSE ! the file should be open for read mode so it must exist... -
trunk/NEMO/OPA_SRC/IOM/iom_nf90.F90
r1271 r1488 49 49 !! ** Purpose : open an input file with NF90 50 50 !!--------------------------------------------------------------------- 51 CHARACTER(len=*) , INTENT(inout) :: cdname ! File name 52 INTEGER , INTENT( out) :: kiomid ! nf90 identifier of the opened file 53 LOGICAL , INTENT(in ) :: ldwrt ! read or write the file? 54 LOGICAL , INTENT(in ) :: ldok ! check the existence 55 INTEGER, DIMENSION(2,5), INTENT(in ), OPTIONAL :: kdompar ! domain parameters: 56 57 CHARACTER(LEN=100) :: clinfo ! info character 58 CHARACTER(LEN=100) :: cltmp ! temporary character 59 INTEGER :: iln ! lengths of character 60 INTEGER :: istop ! temporary storage of nstop 61 INTEGER :: if90id ! nf90 identifier of the opened file 62 INTEGER :: idmy ! dummy variable 63 INTEGER :: jl ! loop variable 51 CHARACTER(len=*) , INTENT(inout) :: cdname ! File name 52 INTEGER , INTENT( out) :: kiomid ! nf90 identifier of the opened file 53 LOGICAL , INTENT(in ) :: ldwrt ! read or write the file? 54 LOGICAL , INTENT(in ) :: ldok ! check the existence 55 INTEGER, DIMENSION(2,5), INTENT(in ), OPTIONAL :: kdompar ! domain parameters: 56 57 CHARACTER(LEN=100) :: clinfo ! info character 58 CHARACTER(LEN=100) :: cltmp ! temporary character 59 INTEGER :: iln ! lengths of character 60 INTEGER :: istop ! temporary storage of nstop 61 INTEGER :: if90id ! nf90 identifier of the opened file 62 INTEGER :: idmy ! dummy variable 63 INTEGER :: jl ! loop variable 64 INTEGER :: ichunk ! temporary storage of nn_chunksz 65 INTEGER :: imode ! creation mode flag: NF90_CLOBBER or NF90_NOCLOBBER 66 LOGICAL :: llclobber ! local definition of ln_clobber 64 67 !--------------------------------------------------------------------- 65 68 66 69 clinfo = ' iom_nf90_open ~~~ ' 67 70 istop = nstop ! store the actual value of nstop 68 ! 69 IF( ldok ) THEN ! Open existing file... 71 IF( nn_chunksz > 0 ) THEN ; ichunk = nn_chunksz 72 ELSE ; ichunk = NF90_SIZEHINT_DEFAULT 73 ENDIF 74 ! 75 llclobber = ldwrt .AND. ln_clobber 76 IF( ldok .AND. .NOT. llclobber ) THEN ! Open existing file... 70 77 ! ! ============= 71 78 IF( ldwrt ) THEN ! ... in write mode 72 79 IF(lwp) WRITE(numout,*) TRIM(clinfo)//' open existing file: '//TRIM(cdname)//' in WRITE mode' 73 CALL iom_nf90_check(NF90_OPEN( TRIM(cdname), NF90_WRITE , if90id), clinfo)74 CALL iom_nf90_check(NF90_SET_FILL( if90id, NF90_NOFILL, idmy ), clinfo)80 CALL iom_nf90_check(NF90_OPEN( TRIM(cdname), NF90_WRITE , if90id, chunksize = ichunk ), clinfo) 81 CALL iom_nf90_check(NF90_SET_FILL( if90id, NF90_NOFILL, idmy ), clinfo) 75 82 ELSE ! ... in read mode 76 83 IF(lwp) WRITE(numout,*) TRIM(clinfo)//' open existing file: '//TRIM(cdname)//' in READ mode' 77 CALL iom_nf90_check(NF90_OPEN( TRIM(cdname), NF90_NOWRITE, if90id), clinfo)78 ENDIF 79 ELSE ! the file does not exist84 CALL iom_nf90_check(NF90_OPEN( TRIM(cdname), NF90_NOWRITE, if90id, chunksize = ichunk ), clinfo) 85 ENDIF 86 ELSE ! the file does not exist (or we overwrite it) 80 87 ! ! ============= 81 88 iln = INDEX( cdname, '.nc' ) … … 86 93 ENDIF 87 94 IF(lwp) WRITE(numout,*) TRIM(clinfo)//' create new file: '//TRIM(cdname)//' in WRITE mode' 88 CALL iom_nf90_check(NF90_CREATE( TRIM(cdname), NF90_NOCLOBBER, if90id ), clinfo) 89 CALL iom_nf90_check(NF90_SET_FILL( if90id, NF90_NOFILL, idmy ), clinfo) 95 96 IF( llclobber ) THEN ; imode = NF90_CLOBBER 97 ELSE ; imode = NF90_NOCLOBBER 98 ENDIF 99 CALL iom_nf90_check(NF90_CREATE( TRIM(cdname), imode, if90id, chunksize = ichunk ), clinfo) 100 CALL iom_nf90_check(NF90_SET_FILL( if90id, NF90_NOFILL, idmy ), clinfo) 90 101 ! define dimensions 91 102 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'x', kdompar(1,1) , idmy ), clinfo) -
trunk/NEMO/OPA_SRC/IOM/iom_rstdimg.F90
r1152 r1488 48 48 !! ** Purpose : open an input file read only (return 0 if not found) 49 49 !!--------------------------------------------------------------------- 50 CHARACTER(len=*) , INTENT(inout) :: cdname ! File name51 INTEGER , INTENT( out) :: kiomid ! iom identifier of the opened file52 LOGICAL , INTENT(in ) :: ldwrt ! read or write the file?53 LOGICAL , INTENT(in ) :: ldok ! check the existence54 INTEGER, DIMENSION(2,5), INTENT(in ), OPTIONAL :: kdompar ! domain parameters:50 CHARACTER(len=*) , INTENT(inout) :: cdname ! File name 51 INTEGER , INTENT( out) :: kiomid ! iom identifier of the opened file 52 LOGICAL , INTENT(in ) :: ldwrt ! read or write the file? 53 LOGICAL , INTENT(in ) :: ldok ! check the existence 54 INTEGER, DIMENSION(2,5), INTENT(in ), OPTIONAL :: kdompar ! domain parameters: 55 55 56 56 CHARACTER(LEN=100) :: clinfo ! info character 57 57 CHARACTER(LEN=100) :: cltmp ! temporary character 58 CHARACTER(LEN=10 ) :: clstatus ! status of opened file (REPLACE or NEW) 58 59 INTEGER :: jv ! loop counter 59 60 INTEGER :: istop ! temporary storage of nstop … … 70 71 INTEGER :: iiglo, ijglo ! domain global size 71 72 INTEGER :: jl ! loop variable 73 LOGICAL :: llclobber ! local definition of ln_clobber 72 74 CHARACTER(LEN=jpvnl), DIMENSION(jpmax_vars) :: clna0d, clna1d, clna2d, clna3d ! name of 0/1/2/3D variables 73 REAL(wp), DIMENSION(jpmax_vars) :: zval0d, zval1d, zval2d, zval3d ! value of 0d variables or record74 ! ! position for 1/2/3D variables75 REAL(wp), DIMENSION(jpmax_vars) :: zval0d, zval1d, zval2d, zval3d ! value of 0d variables or record 76 ! ! position for 1/2/3D variables 75 77 !--------------------------------------------------------------------- 76 78 clinfo = ' iom_rstdimg_open ~~~ ' … … 78 80 ios = 0 ! default definition 79 81 kiomid = 0 ! default definition 82 llclobber = ldwrt .AND. ln_clobber 80 83 ! get a free unit 81 84 idrst = getunit() ! get a free logical unit for the restart file … … 85 88 ! Open the file... 86 89 ! ============= 87 IF( ldok ) THEN ! Open existing file...90 IF( ldok .AND. .NOT. llclobber ) THEN ! Open existing file... 88 91 ! find the record length 89 92 OPEN( idrst, FILE = TRIM(cdname), FORM = 'unformatted', ACCESS = 'direct' & … … 101 104 & , RECL = irecl8, STATUS = 'old', ACTION = 'read' , IOSTAT = ios, ERR = 987 ) 102 105 ENDIF 103 ELSE ! the file does not exist106 ELSE ! the file does not exist (or we overwrite it) 104 107 iln = INDEX( cdname, '.dimg' ) 105 108 IF( ldwrt ) THEN ! the file should be open in readwrite mode so we create it... … … 110 113 ENDIF 111 114 IF(lwp) WRITE(numout,*) TRIM(clinfo)//' create new file: '//TRIM(cdname)//' in READWRITE mode' 115 116 IF( llclobber ) THEN ; clstatus = 'REPLACE' 117 ELSE ; clstatus = 'NEW' 118 ENDIF 112 119 OPEN( idrst, FILE = TRIM(cdname), FORM = 'UNFORMATTED', ACCESS = 'DIRECT' & 113 & , RECL = irecl8, STATUS = 'new', ACTION = 'readwrite', IOSTAT = ios, ERR = 987 )120 & , RECL = irecl8, STATUS = TRIM(clstatus), ACTION = 'readwrite', IOSTAT = ios, ERR = 987 ) 114 121 ELSE ! the file should be open for read mode so it must exist... 115 122 CALL ctl_stop( TRIM(clinfo), ' should be impossible case...' ) … … 118 125 ! Performs checks on the file 119 126 ! ============= 120 IF( ldok ) THEN ! old file127 IF( ldok .AND. .NOT. llclobber ) THEN ! old file 121 128 READ( idrst, REC = 1 , IOSTAT = ios, ERR = 987 ) & 122 129 & irecl8, inx, iny, inz, in0d, in1d, in2d, in3d, irhd, &
Note: See TracChangeset
for help on using the changeset viewer.