Changeset 142 for trunk/SOURCES/Ant40_files/output_anta40_mod-0.4.f90
- Timestamp:
- 10/17/17 17:03:23 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SOURCES/Ant40_files/output_anta40_mod-0.4.f90
r139 r142 95 95 do k=1,nvar 96 96 read(568,'(a100)') namevar(k) 97 print*,trim(namevar(k))98 97 read(568,'(a100)') standard_name(k) 99 print*,trim(standard_name(k))100 98 read(568,'(a100)') long_name(k) 101 print*,trim(long_name(k))102 99 read(568,'(a100)') units(k) 103 print*,trim(units(k))104 100 read(568,*) 105 101 enddo 106 102 close(568) 107 print*,'apres lecture fichier descriptions variables'108 103 ! Fichier Netcdf initMIP 109 104 ! creation du fichier Netcdf : 110 105 status=nf90_create(path = 'short'//runname//'.nc', cmode = nf90_clobber, ncid = ncid) 111 106 if (status /= nf90_noerr) call handle_err(status) 112 print*,'apres nf90_create'113 107 114 108 ! definition des dimension : 115 109 status=nf90_def_dim(ncid, name="time", len=NF90_UNLIMITED, dimid=timeDimID) 116 110 if (status /= nf90_noerr) call handle_err(status) 117 print*,'apres 2'118 111 status=nf90_def_var(ncid, name="time", xtype=nf90_float, dimids=(/ timeDimID/), varid=timeVarID) 119 112 if (status /= nf90_noerr) call handle_err(status) 120 113 status=nf90_put_att(ncid, timeVarID, "standard_name", "time") 121 114 if (status /= nf90_noerr) call handle_err(status) 122 print*,'apres 3'123 115 status=nf90_put_att(ncid, timeVarID,"units", "years since 2007-01-01 00:00:00") 124 116 if (status /= nf90_noerr) call handle_err(status) 125 print*,'apres 4'126 117 127 118 ! definition des variables de sortie : … … 129 120 status=nf90_def_var(ncid, name=trim(namevar(k)), xtype=nf90_float, dimids= & 130 121 (/ timeDimID /), varid=varID(k)) 131 print*,'apres 5'132 122 if (status /= nf90_noerr) call handle_err(status) 133 123 status=nf90_put_att(ncid, varID(k), "standard_name", trim(standard_name(k))) 134 print*,'apres 6',trim(standard_name(k))135 124 if (status /= nf90_noerr) call handle_err(status) 136 125 status=nf90_put_att(ncid, varID(k), "long_name", trim(long_name(k))) 137 print*,'apres 7',trim(long_name(k))138 126 if (status /= nf90_noerr) call handle_err(status) 139 127 status=nf90_put_att(ncid, varID(k), "units", trim(units(k))) 140 print*,'apres 8', trim(units(k))141 128 if (status /= nf90_noerr) call handle_err(status) 142 129 enddo 143 print*,'apres boucle'144 130 145 131 ! fin de la definition du fchier : … … 284 270 !940 format('%%%% ',a,' time=',f8.0,' %%%%') 285 271 286 print*, 'dans shortoutput avant netcdf ncshortout', ncshortout287 272 288 273 if (ncshortout.eq.1) then ! ecriture netcdf … … 305 290 306 291 nbtimeout=nbtimeout+1 307 print*,'ecriture shortnc', nbtimeout292 308 293 status=nf90_put_var(ncid, timeVarID, time, start=(/nbtimeout/)) 309 294 if (status /= nf90_noerr) call handle_err(status)
Note: See TracChangeset
for help on using the changeset viewer.