Changeset 5088 for LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d
- Timestamp:
- Jul 20, 2024, 4:30:31 PM (4 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/1DUTILS.h
r5075 r5088 673 673 USE logic_mod, ONLY: fxyhypb, ysinus 674 674 USE temps_mod, ONLY: annee_ref, day_ini, day_ref, itau_dyn 675 USE lmdz_netcdf, ONLY:nf_open,nf_write,nf_noerr675 USE netcdf, ONLY:nf90_open,nf90_write,nf90_noerr 676 676 677 677 IMPLICIT NONE … … 820 820 USE logic_mod, ONLY: fxyhypb, ysinus 821 821 USE temps_mod, ONLY: annee_ref,day_end,day_ref,itau_dyn,itaufin 822 USE lmdz_netcdf, ONLY:nf_open,nf_write,nf_noerr822 USE netcdf, ONLY:nf90_open,nf90_write,nf90_noerr 823 823 824 824 IMPLICIT NONE … … 868 868 869 869 ! modname = 'dyn1dredem' 870 ! ierr = NF_OPEN(fichnom, NF_WRITE, nid)871 ! IF (ierr .NE. NF_NOERR) THEN870 ! ierr = nf90_open(fichnom, nf90_write, nid) 871 ! IF (ierr .NE. nf90_noerr) THEN 872 872 ! abort_message="Pb. d ouverture "//fichnom 873 873 ! CALL abort_gcm('Modele 1D',abort_message,1) -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_amma_read.F90
r5087 r5088 1 1 MODULE mod_1D_amma_read 2 USE lmdz_netcdf, ONLY: nf90_get_var,nf_open,nf_noerr,nf_open,nf_nowrite,&3 nf _inq_dimid,nf_inq_dimlen,nf_strerror,nf_inq_varid2 USE netcdf, ONLY: nf90_get_var,nf90_open,nf90_noerr,nf90_open,nf90_nowrite,& 3 nf90_inq_dimid,nf90_inquire_dimension,nf90_strerror,nf90_inq_varid 4 4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5 5 !Declarations specifiques au cas AMMA … … 63 63 fich_amma='amma.nc' 64 64 print*,'fich_amma ',fich_amma 65 ierr = NF_OPEN(fich_amma,NF_NOWRITE,nid)66 print*,'fich_amma, NF_NOWRITE,nid ',fich_amma,NF_NOWRITE,nid67 if (ierr/= NF_NOERR) then65 ierr = nf90_open(fich_amma,nf90_nowrite,nid) 66 print*,'fich_amma,nf90_nowrite,nid ',fich_amma,nf90_nowrite,nid 67 if (ierr/=nf90_noerr) then 68 68 write(*,*) 'ERROR: GROS Pb opening forcings nc file ' 69 write(*,*) NF_STRERROR(ierr)69 write(*,*) nf90_strerror(ierr) 70 70 stop "" 71 71 endif 72 72 !....................................................................... 73 ierr= NF_INQ_DIMID(nid,'lev',rid)74 IF (ierr/= NF_NOERR) THEN73 ierr=nf90_inq_dimid(nid,'lev',rid) 74 IF (ierr/=nf90_noerr) THEN 75 75 print*, 'Oh probleme lecture dimension zz' 76 76 ENDIF 77 ierr= NF_INQ_DIMLEN(nid,rid,nlev_amma)77 ierr=nf90_inquire_dimension(nid,rid,len=nlev_amma) 78 78 print*,'OK nid,rid,nlev_amma',nid,rid,nlev_amma 79 79 !....................................................................... 80 ierr= NF_INQ_DIMID(nid,'time',rid)80 ierr=nf90_inq_dimid(nid,'time',rid) 81 81 print*,'nid,rid',nid,rid 82 82 nt_amma=0 83 IF (ierr/= NF_NOERR) THEN83 IF (ierr/=nf90_noerr) THEN 84 84 stop 'probleme lecture dimension sens' 85 85 ENDIF 86 ierr= NF_INQ_DIMLEN(nid,rid,nt_amma)86 ierr=nf90_inquire_dimension(nid,rid,len=nt_amma) 87 87 print*,'nid,rid,nlev_amma',nid,rid,nt_amma 88 88 … … 195 195 integer var3didin(nbvar3d) 196 196 197 ierr= NF_INQ_VARID(nid,"zz",var3didin(1))198 if(ierr/= NF_NOERR) then199 write(*,*) NF_STRERROR(ierr)197 ierr=nf90_inq_varid(nid,"zz",var3didin(1)) 198 if(ierr/=nf90_noerr) then 199 write(*,*) nf90_strerror(ierr) 200 200 stop 'lev' 201 201 endif 202 202 203 203 204 ierr= NF_INQ_VARID(nid,"temp",var3didin(2))205 if(ierr/= NF_NOERR) then206 write(*,*) NF_STRERROR(ierr)204 ierr=nf90_inq_varid(nid,"temp",var3didin(2)) 205 if(ierr/=nf90_noerr) then 206 write(*,*) nf90_strerror(ierr) 207 207 stop 'temp' 208 208 endif 209 209 210 ierr= NF_INQ_VARID(nid,"qv",var3didin(3))211 if(ierr/= NF_NOERR) then212 write(*,*) NF_STRERROR(ierr)210 ierr=nf90_inq_varid(nid,"qv",var3didin(3)) 211 if(ierr/=nf90_noerr) then 212 write(*,*) nf90_strerror(ierr) 213 213 stop 'qv' 214 214 endif 215 215 216 ierr= NF_INQ_VARID(nid,"u",var3didin(4))217 if(ierr/= NF_NOERR) then218 write(*,*) NF_STRERROR(ierr)216 ierr=nf90_inq_varid(nid,"u",var3didin(4)) 217 if(ierr/=nf90_noerr) then 218 write(*,*) nf90_strerror(ierr) 219 219 stop 'u' 220 220 endif 221 221 222 ierr= NF_INQ_VARID(nid,"v",var3didin(5))223 if(ierr/= NF_NOERR) then224 write(*,*) NF_STRERROR(ierr)222 ierr=nf90_inq_varid(nid,"v",var3didin(5)) 223 if(ierr/=nf90_noerr) then 224 write(*,*) nf90_strerror(ierr) 225 225 stop 'v' 226 226 endif 227 227 228 ierr= NF_INQ_VARID(nid,"dw",var3didin(6))229 if(ierr/= NF_NOERR) then230 write(*,*) NF_STRERROR(ierr)228 ierr=nf90_inq_varid(nid,"dw",var3didin(6)) 229 if(ierr/=nf90_noerr) then 230 write(*,*) nf90_strerror(ierr) 231 231 stop 'dw' 232 232 endif 233 233 234 ierr= NF_INQ_VARID(nid,"dt",var3didin(7))235 if(ierr/= NF_NOERR) then236 write(*,*) NF_STRERROR(ierr)234 ierr=nf90_inq_varid(nid,"dt",var3didin(7)) 235 if(ierr/=nf90_noerr) then 236 write(*,*) nf90_strerror(ierr) 237 237 stop 'dt' 238 238 endif 239 239 240 ierr= NF_INQ_VARID(nid,"dq",var3didin(8))241 if(ierr/= NF_NOERR) then242 write(*,*) NF_STRERROR(ierr)240 ierr=nf90_inq_varid(nid,"dq",var3didin(8)) 241 if(ierr/=nf90_noerr) then 242 write(*,*) nf90_strerror(ierr) 243 243 stop 'dq' 244 244 endif 245 245 246 ierr= NF_INQ_VARID(nid,"sens",var3didin(9))247 if(ierr/= NF_NOERR) then248 write(*,*) NF_STRERROR(ierr)246 ierr=nf90_inq_varid(nid,"sens",var3didin(9)) 247 if(ierr/=nf90_noerr) then 248 write(*,*) nf90_strerror(ierr) 249 249 stop 'sens' 250 250 endif 251 251 252 ierr= NF_INQ_VARID(nid,"flat",var3didin(10))253 if(ierr/= NF_NOERR) then254 write(*,*) NF_STRERROR(ierr)252 ierr=nf90_inq_varid(nid,"flat",var3didin(10)) 253 if(ierr/=nf90_noerr) then 254 write(*,*) nf90_strerror(ierr) 255 255 stop 'flat' 256 256 endif 257 257 258 ierr= NF_INQ_VARID(nid,"pp",var3didin(11))259 if(ierr/= NF_NOERR) then260 write(*,*) NF_STRERROR(ierr)258 ierr=nf90_inq_varid(nid,"pp",var3didin(11)) 259 if(ierr/=nf90_noerr) then 260 write(*,*) nf90_strerror(ierr) 261 261 endif 262 262 … … 265 265 266 266 ierr = nf90_get_var(nid,var3didin(1),zz) 267 if(ierr/= NF_NOERR) then268 write(*,*) NF_STRERROR(ierr)267 if(ierr/=nf90_noerr) then 268 write(*,*) nf90_strerror(ierr) 269 269 stop "getvarup" 270 270 endif … … 272 272 273 273 ierr = nf90_get_var(nid,var3didin(2),temp) 274 if(ierr/= NF_NOERR) then275 write(*,*) NF_STRERROR(ierr)274 if(ierr/=nf90_noerr) then 275 write(*,*) nf90_strerror(ierr) 276 276 stop "getvarup" 277 277 endif … … 279 279 280 280 ierr = nf90_get_var(nid,var3didin(3),qv) 281 if(ierr/= NF_NOERR) then282 write(*,*) NF_STRERROR(ierr)281 if(ierr/=nf90_noerr) then 282 write(*,*) nf90_strerror(ierr) 283 283 stop "getvarup" 284 284 endif … … 286 286 287 287 ierr = nf90_get_var(nid,var3didin(4),u) 288 if(ierr/= NF_NOERR) then289 write(*,*) NF_STRERROR(ierr)288 if(ierr/=nf90_noerr) then 289 write(*,*) nf90_strerror(ierr) 290 290 stop "getvarup" 291 291 endif … … 293 293 294 294 ierr = nf90_get_var(nid,var3didin(5),v) 295 if(ierr/= NF_NOERR) then296 write(*,*) NF_STRERROR(ierr)295 if(ierr/=nf90_noerr) then 296 write(*,*) nf90_strerror(ierr) 297 297 stop "getvarup" 298 298 endif … … 300 300 301 301 ierr = nf90_get_var(nid,var3didin(6),dw) 302 if(ierr/= NF_NOERR) then303 write(*,*) NF_STRERROR(ierr)302 if(ierr/=nf90_noerr) then 303 write(*,*) nf90_strerror(ierr) 304 304 stop "getvarup" 305 305 endif … … 307 307 308 308 ierr = nf90_get_var(nid,var3didin(7),dt) 309 if(ierr/= NF_NOERR) then310 write(*,*) NF_STRERROR(ierr)309 if(ierr/=nf90_noerr) then 310 write(*,*) nf90_strerror(ierr) 311 311 stop "getvarup" 312 312 endif … … 314 314 315 315 ierr = nf90_get_var(nid,var3didin(8),dq) 316 if(ierr/= NF_NOERR) then317 write(*,*) NF_STRERROR(ierr)316 if(ierr/=nf90_noerr) then 317 write(*,*) nf90_strerror(ierr) 318 318 stop "getvarup" 319 319 endif … … 321 321 322 322 ierr = nf90_get_var(nid,var3didin(9),sens) 323 if(ierr/= NF_NOERR) then324 write(*,*) NF_STRERROR(ierr)323 if(ierr/=nf90_noerr) then 324 write(*,*) nf90_strerror(ierr) 325 325 stop "getvarup" 326 326 endif … … 328 328 329 329 ierr = nf90_get_var(nid,var3didin(10),flat) 330 if(ierr/= NF_NOERR) then331 write(*,*) NF_STRERROR(ierr)330 if(ierr/=nf90_noerr) then 331 write(*,*) nf90_strerror(ierr) 332 332 stop "getvarup" 333 333 endif … … 335 335 336 336 ierr = nf90_get_var(nid,var3didin(11),pp) 337 if(ierr/= NF_NOERR) then338 write(*,*) NF_STRERROR(ierr)337 if(ierr/=nf90_noerr) then 338 write(*,*) nf90_strerror(ierr) 339 339 stop "getvarup" 340 340 endif -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read.F90
r5087 r5088 1 1 MODULE mod_1D_cases_read 2 USE lmdz_netcdf, ONLY: nf_noerr,nf_strerror,nf_inq_varid,nf_inq_dimlen,nf_inq_dimid,&3 nf _nowrite,nf_open,nf90_get_var2 USE netcdf, ONLY: nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_inquire_dimension,nf90_inq_dimid,& 3 nf90_nowrite,nf90_open,nf90_get_var 4 4 5 5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 93 93 fich_cas='setup/cas.nc' 94 94 print*,'fich_cas ',fich_cas 95 ierr = NF_OPEN(fich_cas,NF_NOWRITE,nid)96 print*,'fich_cas, NF_NOWRITE,nid ',fich_cas,NF_NOWRITE,nid97 if (ierr/= NF_NOERR) then95 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 96 print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 97 if (ierr/=nf90_noerr) then 98 98 write(*,*) 'ERROR: GROS Pb opening forcings nc file ' 99 write(*,*) NF_STRERROR(ierr)99 write(*,*) nf90_strerror(ierr) 100 100 stop "" 101 101 endif 102 102 !....................................................................... 103 ierr= NF_INQ_DIMID(nid,'lat',rid)104 IF (ierr/= NF_NOERR) THEN103 ierr=nf90_inq_dimid(nid,'lat',rid) 104 IF (ierr/=nf90_noerr) THEN 105 105 print*, 'Oh probleme lecture dimension lat' 106 106 ENDIF 107 ierr= NF_INQ_DIMLEN(nid,rid,ii)107 ierr=nf90_inquire_dimension(nid,rid,len=ii) 108 108 print*,'OK1 nid,rid,lat',nid,rid,ii 109 109 !....................................................................... 110 ierr= NF_INQ_DIMID(nid,'lon',rid)111 IF (ierr/= NF_NOERR) THEN110 ierr=nf90_inq_dimid(nid,'lon',rid) 111 IF (ierr/=nf90_noerr) THEN 112 112 print*, 'Oh probleme lecture dimension lon' 113 113 ENDIF 114 ierr= NF_INQ_DIMLEN(nid,rid,jj)114 ierr=nf90_inquire_dimension(nid,rid,len=jj) 115 115 print*,'OK2 nid,rid,lat',nid,rid,jj 116 116 !....................................................................... 117 ierr= NF_INQ_DIMID(nid,'lev',rid)118 IF (ierr/= NF_NOERR) THEN117 ierr=nf90_inq_dimid(nid,'lev',rid) 118 IF (ierr/=nf90_noerr) THEN 119 119 print*, 'Oh probleme lecture dimension zz' 120 120 ENDIF 121 ierr= NF_INQ_DIMLEN(nid,rid,nlev_cas)121 ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas) 122 122 print*,'OK3 nid,rid,nlev_cas',nid,rid,nlev_cas 123 123 !....................................................................... 124 ierr= NF_INQ_DIMID(nid,'time',rid)124 ierr=nf90_inq_dimid(nid,'time',rid) 125 125 print*,'nid,rid',nid,rid 126 126 nt_cas=0 127 IF (ierr/= NF_NOERR) THEN127 IF (ierr/=nf90_noerr) THEN 128 128 stop 'probleme lecture dimension sens' 129 129 ENDIF 130 ierr= NF_INQ_DIMLEN(nid,rid,nt_cas)130 ierr=nf90_inquire_dimension(nid,rid,len=nt_cas) 131 131 print*,'OK4 nid,rid,nt_cas',nid,rid,nt_cas 132 132 … … 288 288 integer var3didin(nbvar3d) 289 289 290 ierr= NF_INQ_VARID(nid,"zz",var3didin(1))291 if(ierr/= NF_NOERR) then292 write(*,*) NF_STRERROR(ierr)290 ierr=nf90_inq_varid(nid,"zz",var3didin(1)) 291 if(ierr/=nf90_noerr) then 292 write(*,*) nf90_strerror(ierr) 293 293 stop 'lev' 294 294 endif 295 295 296 ierr= NF_INQ_VARID(nid,"pp",var3didin(2))297 if(ierr/= NF_NOERR) then298 write(*,*) NF_STRERROR(ierr)296 ierr=nf90_inq_varid(nid,"pp",var3didin(2)) 297 if(ierr/=nf90_noerr) then 298 write(*,*) nf90_strerror(ierr) 299 299 stop 'plev' 300 300 endif 301 301 302 302 303 ierr= NF_INQ_VARID(nid,"temp",var3didin(3))304 if(ierr/= NF_NOERR) then305 write(*,*) NF_STRERROR(ierr)303 ierr=nf90_inq_varid(nid,"temp",var3didin(3)) 304 if(ierr/=nf90_noerr) then 305 write(*,*) nf90_strerror(ierr) 306 306 stop 'temp' 307 307 endif 308 308 309 ierr= NF_INQ_VARID(nid,"qv",var3didin(4))310 if(ierr/= NF_NOERR) then311 write(*,*) NF_STRERROR(ierr)309 ierr=nf90_inq_varid(nid,"qv",var3didin(4)) 310 if(ierr/=nf90_noerr) then 311 write(*,*) nf90_strerror(ierr) 312 312 stop 'qv' 313 313 endif 314 314 315 ierr= NF_INQ_VARID(nid,"rh",var3didin(5))316 if(ierr/= NF_NOERR) then317 write(*,*) NF_STRERROR(ierr)315 ierr=nf90_inq_varid(nid,"rh",var3didin(5)) 316 if(ierr/=nf90_noerr) then 317 write(*,*) nf90_strerror(ierr) 318 318 stop 'rh' 319 319 endif 320 320 321 ierr= NF_INQ_VARID(nid,"theta",var3didin(6))322 if(ierr/= NF_NOERR) then323 write(*,*) NF_STRERROR(ierr)321 ierr=nf90_inq_varid(nid,"theta",var3didin(6)) 322 if(ierr/=nf90_noerr) then 323 write(*,*) nf90_strerror(ierr) 324 324 stop 'theta' 325 325 endif 326 326 327 ierr= NF_INQ_VARID(nid,"rv",var3didin(7))328 if(ierr/= NF_NOERR) then329 write(*,*) NF_STRERROR(ierr)327 ierr=nf90_inq_varid(nid,"rv",var3didin(7)) 328 if(ierr/=nf90_noerr) then 329 write(*,*) nf90_strerror(ierr) 330 330 stop 'rv' 331 331 endif 332 332 333 333 334 ierr= NF_INQ_VARID(nid,"u",var3didin(8))335 if(ierr/= NF_NOERR) then336 write(*,*) NF_STRERROR(ierr)334 ierr=nf90_inq_varid(nid,"u",var3didin(8)) 335 if(ierr/=nf90_noerr) then 336 write(*,*) nf90_strerror(ierr) 337 337 stop 'u' 338 338 endif 339 339 340 ierr= NF_INQ_VARID(nid,"v",var3didin(9))341 if(ierr/= NF_NOERR) then342 write(*,*) NF_STRERROR(ierr)340 ierr=nf90_inq_varid(nid,"v",var3didin(9)) 341 if(ierr/=nf90_noerr) then 342 write(*,*) nf90_strerror(ierr) 343 343 stop 'v' 344 344 endif 345 345 346 ierr= NF_INQ_VARID(nid,"ug",var3didin(10))347 if(ierr/= NF_NOERR) then348 write(*,*) NF_STRERROR(ierr)346 ierr=nf90_inq_varid(nid,"ug",var3didin(10)) 347 if(ierr/=nf90_noerr) then 348 write(*,*) nf90_strerror(ierr) 349 349 stop 'ug' 350 350 endif 351 351 352 ierr= NF_INQ_VARID(nid,"vg",var3didin(11))353 if(ierr/= NF_NOERR) then354 write(*,*) NF_STRERROR(ierr)352 ierr=nf90_inq_varid(nid,"vg",var3didin(11)) 353 if(ierr/=nf90_noerr) then 354 write(*,*) nf90_strerror(ierr) 355 355 stop 'vg' 356 356 endif 357 357 358 ierr= NF_INQ_VARID(nid,"w",var3didin(12))359 if(ierr/= NF_NOERR) then360 write(*,*) NF_STRERROR(ierr)358 ierr=nf90_inq_varid(nid,"w",var3didin(12)) 359 if(ierr/=nf90_noerr) then 360 write(*,*) nf90_strerror(ierr) 361 361 stop 'w' 362 362 endif 363 363 364 ierr= NF_INQ_VARID(nid,"advu",var3didin(13))365 if(ierr/= NF_NOERR) then366 write(*,*) NF_STRERROR(ierr)364 ierr=nf90_inq_varid(nid,"advu",var3didin(13)) 365 if(ierr/=nf90_noerr) then 366 write(*,*) nf90_strerror(ierr) 367 367 stop 'advu' 368 368 endif 369 369 370 ierr= NF_INQ_VARID(nid,"hu",var3didin(14))371 if(ierr/= NF_NOERR) then372 write(*,*) NF_STRERROR(ierr)370 ierr=nf90_inq_varid(nid,"hu",var3didin(14)) 371 if(ierr/=nf90_noerr) then 372 write(*,*) nf90_strerror(ierr) 373 373 stop 'hu' 374 374 endif 375 375 376 ierr= NF_INQ_VARID(nid,"vu",var3didin(15))377 if(ierr/= NF_NOERR) then378 write(*,*) NF_STRERROR(ierr)376 ierr=nf90_inq_varid(nid,"vu",var3didin(15)) 377 if(ierr/=nf90_noerr) then 378 write(*,*) nf90_strerror(ierr) 379 379 stop 'vu' 380 380 endif 381 381 382 ierr= NF_INQ_VARID(nid,"advv",var3didin(16))383 if(ierr/= NF_NOERR) then384 write(*,*) NF_STRERROR(ierr)382 ierr=nf90_inq_varid(nid,"advv",var3didin(16)) 383 if(ierr/=nf90_noerr) then 384 write(*,*) nf90_strerror(ierr) 385 385 stop 'advv' 386 386 endif 387 387 388 ierr= NF_INQ_VARID(nid,"hv",var3didin(17))389 if(ierr/= NF_NOERR) then390 write(*,*) NF_STRERROR(ierr)388 ierr=nf90_inq_varid(nid,"hv",var3didin(17)) 389 if(ierr/=nf90_noerr) then 390 write(*,*) nf90_strerror(ierr) 391 391 stop 'hv' 392 392 endif 393 393 394 ierr= NF_INQ_VARID(nid,"vv",var3didin(18))395 if(ierr/= NF_NOERR) then396 write(*,*) NF_STRERROR(ierr)394 ierr=nf90_inq_varid(nid,"vv",var3didin(18)) 395 if(ierr/=nf90_noerr) then 396 write(*,*) nf90_strerror(ierr) 397 397 stop 'vv' 398 398 endif 399 399 400 ierr= NF_INQ_VARID(nid,"advT",var3didin(19))401 if(ierr/= NF_NOERR) then402 write(*,*) NF_STRERROR(ierr)400 ierr=nf90_inq_varid(nid,"advT",var3didin(19)) 401 if(ierr/=nf90_noerr) then 402 write(*,*) nf90_strerror(ierr) 403 403 stop 'advT' 404 404 endif 405 405 406 ierr= NF_INQ_VARID(nid,"hT",var3didin(20))407 if(ierr/= NF_NOERR) then408 write(*,*) NF_STRERROR(ierr)406 ierr=nf90_inq_varid(nid,"hT",var3didin(20)) 407 if(ierr/=nf90_noerr) then 408 write(*,*) nf90_strerror(ierr) 409 409 stop 'hT' 410 410 endif 411 411 412 ierr= NF_INQ_VARID(nid,"vT",var3didin(21))413 if(ierr/= NF_NOERR) then414 write(*,*) NF_STRERROR(ierr)412 ierr=nf90_inq_varid(nid,"vT",var3didin(21)) 413 if(ierr/=nf90_noerr) then 414 write(*,*) nf90_strerror(ierr) 415 415 stop 'vT' 416 416 endif 417 417 418 ierr= NF_INQ_VARID(nid,"advq",var3didin(22))419 if(ierr/= NF_NOERR) then420 write(*,*) NF_STRERROR(ierr)418 ierr=nf90_inq_varid(nid,"advq",var3didin(22)) 419 if(ierr/=nf90_noerr) then 420 write(*,*) nf90_strerror(ierr) 421 421 stop 'advq' 422 422 endif 423 423 424 ierr= NF_INQ_VARID(nid,"hq",var3didin(23))425 if(ierr/= NF_NOERR) then426 write(*,*) NF_STRERROR(ierr)424 ierr=nf90_inq_varid(nid,"hq",var3didin(23)) 425 if(ierr/=nf90_noerr) then 426 write(*,*) nf90_strerror(ierr) 427 427 stop 'hq' 428 428 endif 429 429 430 ierr= NF_INQ_VARID(nid,"vq",var3didin(24))431 if(ierr/= NF_NOERR) then432 write(*,*) NF_STRERROR(ierr)430 ierr=nf90_inq_varid(nid,"vq",var3didin(24)) 431 if(ierr/=nf90_noerr) then 432 write(*,*) nf90_strerror(ierr) 433 433 stop 'vq' 434 434 endif 435 435 436 ierr= NF_INQ_VARID(nid,"advth",var3didin(25))437 if(ierr/= NF_NOERR) then438 write(*,*) NF_STRERROR(ierr)436 ierr=nf90_inq_varid(nid,"advth",var3didin(25)) 437 if(ierr/=nf90_noerr) then 438 write(*,*) nf90_strerror(ierr) 439 439 stop 'advth' 440 440 endif 441 441 442 ierr= NF_INQ_VARID(nid,"hth",var3didin(26))443 if(ierr/= NF_NOERR) then444 write(*,*) NF_STRERROR(ierr)442 ierr=nf90_inq_varid(nid,"hth",var3didin(26)) 443 if(ierr/=nf90_noerr) then 444 write(*,*) nf90_strerror(ierr) 445 445 stop 'hth' 446 446 endif 447 447 448 ierr= NF_INQ_VARID(nid,"vth",var3didin(27))449 if(ierr/= NF_NOERR) then450 write(*,*) NF_STRERROR(ierr)448 ierr=nf90_inq_varid(nid,"vth",var3didin(27)) 449 if(ierr/=nf90_noerr) then 450 write(*,*) nf90_strerror(ierr) 451 451 stop 'vth' 452 452 endif 453 453 454 ierr= NF_INQ_VARID(nid,"advr",var3didin(28))455 if(ierr/= NF_NOERR) then456 write(*,*) NF_STRERROR(ierr)454 ierr=nf90_inq_varid(nid,"advr",var3didin(28)) 455 if(ierr/=nf90_noerr) then 456 write(*,*) nf90_strerror(ierr) 457 457 stop 'advr' 458 458 endif 459 459 460 ierr= NF_INQ_VARID(nid,"hr",var3didin(29))461 if(ierr/= NF_NOERR) then462 write(*,*) NF_STRERROR(ierr)460 ierr=nf90_inq_varid(nid,"hr",var3didin(29)) 461 if(ierr/=nf90_noerr) then 462 write(*,*) nf90_strerror(ierr) 463 463 stop 'hr' 464 464 endif 465 465 466 ierr= NF_INQ_VARID(nid,"vr",var3didin(30))467 if(ierr/= NF_NOERR) then468 write(*,*) NF_STRERROR(ierr)466 ierr=nf90_inq_varid(nid,"vr",var3didin(30)) 467 if(ierr/=nf90_noerr) then 468 write(*,*) nf90_strerror(ierr) 469 469 stop 'vr' 470 470 endif 471 471 472 ierr= NF_INQ_VARID(nid,"radT",var3didin(31))473 if(ierr/= NF_NOERR) then474 write(*,*) NF_STRERROR(ierr)472 ierr=nf90_inq_varid(nid,"radT",var3didin(31)) 473 if(ierr/=nf90_noerr) then 474 write(*,*) nf90_strerror(ierr) 475 475 stop 'radT' 476 476 endif 477 477 478 ierr= NF_INQ_VARID(nid,"sens",var3didin(32))479 if(ierr/= NF_NOERR) then480 write(*,*) NF_STRERROR(ierr)478 ierr=nf90_inq_varid(nid,"sens",var3didin(32)) 479 if(ierr/=nf90_noerr) then 480 write(*,*) nf90_strerror(ierr) 481 481 stop 'sens' 482 482 endif 483 483 484 ierr= NF_INQ_VARID(nid,"flat",var3didin(33))485 if(ierr/= NF_NOERR) then486 write(*,*) NF_STRERROR(ierr)484 ierr=nf90_inq_varid(nid,"flat",var3didin(33)) 485 if(ierr/=nf90_noerr) then 486 write(*,*) nf90_strerror(ierr) 487 487 stop 'flat' 488 488 endif 489 489 490 ierr= NF_INQ_VARID(nid,"ts",var3didin(34))491 if(ierr/= NF_NOERR) then492 write(*,*) NF_STRERROR(ierr)490 ierr=nf90_inq_varid(nid,"ts",var3didin(34)) 491 if(ierr/=nf90_noerr) then 492 write(*,*) nf90_strerror(ierr) 493 493 stop 'ts' 494 494 endif 495 495 496 ierr= NF_INQ_VARID(nid,"ustar",var3didin(35))497 if(ierr/= NF_NOERR) then498 write(*,*) NF_STRERROR(ierr)496 ierr=nf90_inq_varid(nid,"ustar",var3didin(35)) 497 if(ierr/=nf90_noerr) then 498 write(*,*) nf90_strerror(ierr) 499 499 stop 'ustar' 500 500 endif 501 501 502 ierr= NF_INQ_VARID(nid,"uw",var3didin(36))503 if(ierr/= NF_NOERR) then504 write(*,*) NF_STRERROR(ierr)502 ierr=nf90_inq_varid(nid,"uw",var3didin(36)) 503 if(ierr/=nf90_noerr) then 504 write(*,*) nf90_strerror(ierr) 505 505 stop 'uw' 506 506 endif 507 507 508 ierr= NF_INQ_VARID(nid,"vw",var3didin(37))509 if(ierr/= NF_NOERR) then510 write(*,*) NF_STRERROR(ierr)508 ierr=nf90_inq_varid(nid,"vw",var3didin(37)) 509 if(ierr/=nf90_noerr) then 510 write(*,*) nf90_strerror(ierr) 511 511 stop 'vw' 512 512 endif 513 513 514 ierr= NF_INQ_VARID(nid,"q1",var3didin(38))515 if(ierr/= NF_NOERR) then516 write(*,*) NF_STRERROR(ierr)514 ierr=nf90_inq_varid(nid,"q1",var3didin(38)) 515 if(ierr/=nf90_noerr) then 516 write(*,*) nf90_strerror(ierr) 517 517 stop 'q1' 518 518 endif 519 519 520 ierr= NF_INQ_VARID(nid,"q2",var3didin(39))521 if(ierr/= NF_NOERR) then522 write(*,*) NF_STRERROR(ierr)520 ierr=nf90_inq_varid(nid,"q2",var3didin(39)) 521 if(ierr/=nf90_noerr) then 522 write(*,*) nf90_strerror(ierr) 523 523 stop 'q2' 524 524 endif 525 525 526 526 ierr = nf90_get_var(nid,var3didin(1),zz) 527 if(ierr/= NF_NOERR) then528 write(*,*) NF_STRERROR(ierr)527 if(ierr/=nf90_noerr) then 528 write(*,*) nf90_strerror(ierr) 529 529 stop "getvarup" 530 530 endif … … 532 532 533 533 ierr = nf90_get_var(nid,var3didin(2),pp) 534 if(ierr/= NF_NOERR) then535 write(*,*) NF_STRERROR(ierr)534 if(ierr/=nf90_noerr) then 535 write(*,*) nf90_strerror(ierr) 536 536 stop "getvarup" 537 537 endif … … 540 540 541 541 ierr = nf90_get_var(nid,var3didin(3),temp) 542 if(ierr/= NF_NOERR) then543 write(*,*) NF_STRERROR(ierr)542 if(ierr/=nf90_noerr) then 543 write(*,*) nf90_strerror(ierr) 544 544 stop "getvarup" 545 545 endif … … 547 547 548 548 ierr = nf90_get_var(nid,var3didin(4),qv) 549 if(ierr/= NF_NOERR) then550 write(*,*) NF_STRERROR(ierr)549 if(ierr/=nf90_noerr) then 550 write(*,*) nf90_strerror(ierr) 551 551 stop "getvarup" 552 552 endif … … 554 554 555 555 ierr = nf90_get_var(nid,var3didin(5),rh) 556 if(ierr/= NF_NOERR) then557 write(*,*) NF_STRERROR(ierr)556 if(ierr/=nf90_noerr) then 557 write(*,*) nf90_strerror(ierr) 558 558 stop "getvarup" 559 559 endif … … 561 561 562 562 ierr = nf90_get_var(nid,var3didin(6),theta) 563 if(ierr/= NF_NOERR) then564 write(*,*) NF_STRERROR(ierr)563 if(ierr/=nf90_noerr) then 564 write(*,*) nf90_strerror(ierr) 565 565 stop "getvarup" 566 566 endif … … 568 568 569 569 ierr = nf90_get_var(nid,var3didin(7),rv) 570 if(ierr/= NF_NOERR) then571 write(*,*) NF_STRERROR(ierr)570 if(ierr/=nf90_noerr) then 571 write(*,*) nf90_strerror(ierr) 572 572 stop "getvarup" 573 573 endif … … 575 575 576 576 ierr = nf90_get_var(nid,var3didin(8),u) 577 if(ierr/= NF_NOERR) then578 write(*,*) NF_STRERROR(ierr)577 if(ierr/=nf90_noerr) then 578 write(*,*) nf90_strerror(ierr) 579 579 stop "getvarup" 580 580 endif … … 582 582 583 583 ierr = nf90_get_var(nid,var3didin(9),v) 584 if(ierr/= NF_NOERR) then585 write(*,*) NF_STRERROR(ierr)584 if(ierr/=nf90_noerr) then 585 write(*,*) nf90_strerror(ierr) 586 586 stop "getvarup" 587 587 endif … … 589 589 590 590 ierr = nf90_get_var(nid,var3didin(10),ug) 591 if(ierr/= NF_NOERR) then592 write(*,*) NF_STRERROR(ierr)591 if(ierr/=nf90_noerr) then 592 write(*,*) nf90_strerror(ierr) 593 593 stop "getvarup" 594 594 endif … … 596 596 597 597 ierr = nf90_get_var(nid,var3didin(11),vg) 598 if(ierr/= NF_NOERR) then599 write(*,*) NF_STRERROR(ierr)598 if(ierr/=nf90_noerr) then 599 write(*,*) nf90_strerror(ierr) 600 600 stop "getvarup" 601 601 endif … … 603 603 604 604 ierr = nf90_get_var(nid,var3didin(12),w) 605 if(ierr/= NF_NOERR) then606 write(*,*) NF_STRERROR(ierr)605 if(ierr/=nf90_noerr) then 606 write(*,*) nf90_strerror(ierr) 607 607 stop "getvarup" 608 608 endif … … 610 610 611 611 ierr = nf90_get_var(nid,var3didin(13),du) 612 if(ierr/= NF_NOERR) then613 write(*,*) NF_STRERROR(ierr)612 if(ierr/=nf90_noerr) then 613 write(*,*) nf90_strerror(ierr) 614 614 stop "getvarup" 615 615 endif … … 617 617 618 618 ierr = nf90_get_var(nid,var3didin(14),hu) 619 if(ierr/= NF_NOERR) then620 write(*,*) NF_STRERROR(ierr)619 if(ierr/=nf90_noerr) then 620 write(*,*) nf90_strerror(ierr) 621 621 stop "getvarup" 622 622 endif … … 624 624 625 625 ierr = nf90_get_var(nid,var3didin(15),vu) 626 if(ierr/= NF_NOERR) then627 write(*,*) NF_STRERROR(ierr)626 if(ierr/=nf90_noerr) then 627 write(*,*) nf90_strerror(ierr) 628 628 stop "getvarup" 629 629 endif … … 631 631 632 632 ierr = nf90_get_var(nid,var3didin(16),dv) 633 if(ierr/= NF_NOERR) then634 write(*,*) NF_STRERROR(ierr)633 if(ierr/=nf90_noerr) then 634 write(*,*) nf90_strerror(ierr) 635 635 stop "getvarup" 636 636 endif … … 638 638 639 639 ierr = nf90_get_var(nid,var3didin(17),hv) 640 if(ierr/= NF_NOERR) then641 write(*,*) NF_STRERROR(ierr)640 if(ierr/=nf90_noerr) then 641 write(*,*) nf90_strerror(ierr) 642 642 stop "getvarup" 643 643 endif … … 645 645 646 646 ierr = nf90_get_var(nid,var3didin(18),vv) 647 if(ierr/= NF_NOERR) then648 write(*,*) NF_STRERROR(ierr)647 if(ierr/=nf90_noerr) then 648 write(*,*) nf90_strerror(ierr) 649 649 stop "getvarup" 650 650 endif … … 652 652 653 653 ierr = nf90_get_var(nid,var3didin(19),dt) 654 if(ierr/= NF_NOERR) then655 write(*,*) NF_STRERROR(ierr)654 if(ierr/=nf90_noerr) then 655 write(*,*) nf90_strerror(ierr) 656 656 stop "getvarup" 657 657 endif … … 659 659 660 660 ierr = nf90_get_var(nid,var3didin(20),ht) 661 if(ierr/= NF_NOERR) then662 write(*,*) NF_STRERROR(ierr)661 if(ierr/=nf90_noerr) then 662 write(*,*) nf90_strerror(ierr) 663 663 stop "getvarup" 664 664 endif … … 666 666 667 667 ierr = nf90_get_var(nid,var3didin(21),vt) 668 if(ierr/= NF_NOERR) then669 write(*,*) NF_STRERROR(ierr)668 if(ierr/=nf90_noerr) then 669 write(*,*) nf90_strerror(ierr) 670 670 stop "getvarup" 671 671 endif … … 673 673 674 674 ierr = nf90_get_var(nid,var3didin(22),dq) 675 if(ierr/= NF_NOERR) then676 write(*,*) NF_STRERROR(ierr)675 if(ierr/=nf90_noerr) then 676 write(*,*) nf90_strerror(ierr) 677 677 stop "getvarup" 678 678 endif … … 680 680 681 681 ierr = nf90_get_var(nid,var3didin(23),hq) 682 if(ierr/= NF_NOERR) then683 write(*,*) NF_STRERROR(ierr)682 if(ierr/=nf90_noerr) then 683 write(*,*) nf90_strerror(ierr) 684 684 stop "getvarup" 685 685 endif … … 687 687 688 688 ierr = nf90_get_var(nid,var3didin(24),vq) 689 if(ierr/= NF_NOERR) then690 write(*,*) NF_STRERROR(ierr)689 if(ierr/=nf90_noerr) then 690 write(*,*) nf90_strerror(ierr) 691 691 stop "getvarup" 692 692 endif … … 694 694 695 695 ierr = nf90_get_var(nid,var3didin(25),dth) 696 if(ierr/= NF_NOERR) then697 write(*,*) NF_STRERROR(ierr)696 if(ierr/=nf90_noerr) then 697 write(*,*) nf90_strerror(ierr) 698 698 stop "getvarup" 699 699 endif … … 701 701 702 702 ierr = nf90_get_var(nid,var3didin(26),hth) 703 if(ierr/= NF_NOERR) then704 write(*,*) NF_STRERROR(ierr)703 if(ierr/=nf90_noerr) then 704 write(*,*) nf90_strerror(ierr) 705 705 stop "getvarup" 706 706 endif … … 708 708 709 709 ierr = nf90_get_var(nid,var3didin(27),vth) 710 if(ierr/= NF_NOERR) then711 write(*,*) NF_STRERROR(ierr)710 if(ierr/=nf90_noerr) then 711 write(*,*) nf90_strerror(ierr) 712 712 stop "getvarup" 713 713 endif … … 715 715 716 716 ierr = nf90_get_var(nid,var3didin(28),dr) 717 if(ierr/= NF_NOERR) then718 write(*,*) NF_STRERROR(ierr)717 if(ierr/=nf90_noerr) then 718 write(*,*) nf90_strerror(ierr) 719 719 stop "getvarup" 720 720 endif … … 722 722 723 723 ierr = nf90_get_var(nid,var3didin(29),hr) 724 if(ierr/= NF_NOERR) then725 write(*,*) NF_STRERROR(ierr)724 if(ierr/=nf90_noerr) then 725 write(*,*) nf90_strerror(ierr) 726 726 stop "getvarup" 727 727 endif … … 729 729 730 730 ierr = nf90_get_var(nid,var3didin(30),vr) 731 if(ierr/= NF_NOERR) then732 write(*,*) NF_STRERROR(ierr)731 if(ierr/=nf90_noerr) then 732 write(*,*) nf90_strerror(ierr) 733 733 stop "getvarup" 734 734 endif … … 736 736 737 737 ierr = nf90_get_var(nid,var3didin(31),dtrad) 738 if(ierr/= NF_NOERR) then739 write(*,*) NF_STRERROR(ierr)738 if(ierr/=nf90_noerr) then 739 write(*,*) nf90_strerror(ierr) 740 740 stop "getvarup" 741 741 endif … … 743 743 744 744 ierr = nf90_get_var(nid,var3didin(32),sens) 745 if(ierr/= NF_NOERR) then746 write(*,*) NF_STRERROR(ierr)745 if(ierr/=nf90_noerr) then 746 write(*,*) nf90_strerror(ierr) 747 747 stop "getvarup" 748 748 endif … … 750 750 751 751 ierr = nf90_get_var(nid,var3didin(33),flat) 752 if(ierr/= NF_NOERR) then753 write(*,*) NF_STRERROR(ierr)752 if(ierr/=nf90_noerr) then 753 write(*,*) nf90_strerror(ierr) 754 754 stop "getvarup" 755 755 endif … … 757 757 758 758 ierr = nf90_get_var(nid,var3didin(34),ts) 759 if(ierr/= NF_NOERR) then760 write(*,*) NF_STRERROR(ierr)759 if(ierr/=nf90_noerr) then 760 write(*,*) nf90_strerror(ierr) 761 761 stop "getvarup" 762 762 endif … … 764 764 765 765 ierr = nf90_get_var(nid,var3didin(35),ustar) 766 if(ierr/= NF_NOERR) then767 write(*,*) NF_STRERROR(ierr)766 if(ierr/=nf90_noerr) then 767 write(*,*) nf90_strerror(ierr) 768 768 stop "getvarup" 769 769 endif … … 771 771 772 772 ierr = nf90_get_var(nid,var3didin(36),uw) 773 if(ierr/= NF_NOERR) then774 write(*,*) NF_STRERROR(ierr)773 if(ierr/=nf90_noerr) then 774 write(*,*) nf90_strerror(ierr) 775 775 stop "getvarup" 776 776 endif … … 778 778 779 779 ierr = nf90_get_var(nid,var3didin(37),vw) 780 if(ierr/= NF_NOERR) then781 write(*,*) NF_STRERROR(ierr)780 if(ierr/=nf90_noerr) then 781 write(*,*) nf90_strerror(ierr) 782 782 stop "getvarup" 783 783 endif … … 785 785 786 786 ierr = nf90_get_var(nid,var3didin(38),q1) 787 if(ierr/= NF_NOERR) then788 write(*,*) NF_STRERROR(ierr)787 if(ierr/=nf90_noerr) then 788 write(*,*) nf90_strerror(ierr) 789 789 stop "getvarup" 790 790 endif … … 792 792 793 793 ierr = nf90_get_var(nid,var3didin(39),q2) 794 if(ierr/= NF_NOERR) then795 write(*,*) NF_STRERROR(ierr)794 if(ierr/=nf90_noerr) then 795 write(*,*) nf90_strerror(ierr) 796 796 stop "getvarup" 797 797 endif -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read2.F90
r5075 r5088 3 3 ! 4 4 MODULE mod_1D_cases_read2 5 USE lmdz_netcdf, ONLY: nf90_get_var,nf_noerr,nf_inq_varid,nf_inq_dimlen,nf_strerror,nf_open,&6 nf _nowrite,nf_inq_dimid5 USE netcdf, ONLY: nf90_get_var,nf90_noerr,nf90_inq_varid,nf90_inquire_dimension,nf90_strerror,nf90_open,& 6 nf90_nowrite,nf90_inq_dimid 7 7 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8 8 !Declarations specifiques au cas standard … … 87 87 fich_cas='setup/cas.nc' 88 88 print*,'fich_cas ',fich_cas 89 ierr = NF_OPEN(fich_cas,NF_NOWRITE,nid)90 print*,'fich_cas, NF_NOWRITE,nid ',fich_cas,NF_NOWRITE,nid91 if (ierr/= NF_NOERR) then89 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 90 print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 91 if (ierr/=nf90_noerr) then 92 92 write(*,*) 'ERROR: GROS Pb opening forcings nc file ' 93 write(*,*) NF_STRERROR(ierr)93 write(*,*) nf90_strerror(ierr) 94 94 stop "" 95 95 endif 96 96 !....................................................................... 97 ierr= NF_INQ_DIMID(nid,'lat',rid)98 IF (ierr/= NF_NOERR) THEN97 ierr=nf90_inq_dimid(nid,'lat',rid) 98 IF (ierr/=nf90_noerr) THEN 99 99 print*, 'Oh probleme lecture dimension lat' 100 100 ENDIF 101 ierr= NF_INQ_DIMLEN(nid,rid,ii)101 ierr=nf90_inquire_dimension(nid,rid,len=ii) 102 102 print*,'OK1 nid,rid,lat',nid,rid,ii 103 103 !....................................................................... 104 ierr= NF_INQ_DIMID(nid,'lon',rid)105 IF (ierr/= NF_NOERR) THEN104 ierr=nf90_inq_dimid(nid,'lon',rid) 105 IF (ierr/=nf90_noerr) THEN 106 106 print*, 'Oh probleme lecture dimension lon' 107 107 ENDIF 108 ierr= NF_INQ_DIMLEN(nid,rid,jj)108 ierr=nf90_inquire_dimension(nid,rid,len=jj) 109 109 print*,'OK2 nid,rid,lat',nid,rid,jj 110 110 !....................................................................... 111 ierr= NF_INQ_DIMID(nid,'lev',rid)112 IF (ierr/= NF_NOERR) THEN111 ierr=nf90_inq_dimid(nid,'lev',rid) 112 IF (ierr/=nf90_noerr) THEN 113 113 print*, 'Oh probleme lecture dimension zz' 114 114 ENDIF 115 ierr= NF_INQ_DIMLEN(nid,rid,nlev_cas)115 ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas) 116 116 print*,'OK3 nid,rid,nlev_cas',nid,rid,nlev_cas 117 117 !....................................................................... 118 ierr= NF_INQ_DIMID(nid,'time',rid)118 ierr=nf90_inq_dimid(nid,'time',rid) 119 119 print*,'nid,rid',nid,rid 120 120 nt_cas=0 121 IF (ierr/= NF_NOERR) THEN121 IF (ierr/=nf90_noerr) THEN 122 122 stop 'probleme lecture dimension sens' 123 123 ENDIF 124 ierr= NF_INQ_DIMLEN(nid,rid,nt_cas)124 ierr=nf90_inquire_dimension(nid,rid,len=nt_cas) 125 125 print*,'OK4 nid,rid,nt_cas',nid,rid,nt_cas 126 126 … … 196 196 fich_cas='setup/cas.nc' 197 197 print*,'fich_cas ',fich_cas 198 ierr = NF_OPEN(fich_cas,NF_NOWRITE,nid)199 print*,'fich_cas, NF_NOWRITE,nid ',fich_cas,NF_NOWRITE,nid200 if (ierr/= NF_NOERR) then198 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 199 print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 200 if (ierr/=nf90_noerr) then 201 201 write(*,*) 'ERROR: GROS Pb opening forcings nc file ' 202 write(*,*) NF_STRERROR(ierr)202 write(*,*) nf90_strerror(ierr) 203 203 stop "" 204 204 endif 205 205 !....................................................................... 206 ierr= NF_INQ_DIMID(nid,'lat',rid)207 IF (ierr/= NF_NOERR) THEN206 ierr=nf90_inq_dimid(nid,'lat',rid) 207 IF (ierr/=nf90_noerr) THEN 208 208 print*, 'Oh probleme lecture dimension lat' 209 209 ENDIF 210 ierr= NF_INQ_DIMLEN(nid,rid,ii)210 ierr=nf90_inquire_dimension(nid,rid,len=ii) 211 211 print*,'OK1 read2: nid,rid,lat',nid,rid,ii 212 212 !....................................................................... 213 ierr= NF_INQ_DIMID(nid,'lon',rid)214 IF (ierr/= NF_NOERR) THEN213 ierr=nf90_inq_dimid(nid,'lon',rid) 214 IF (ierr/=nf90_noerr) THEN 215 215 print*, 'Oh probleme lecture dimension lon' 216 216 ENDIF 217 ierr= NF_INQ_DIMLEN(nid,rid,jj)217 ierr=nf90_inquire_dimension(nid,rid,len=jj) 218 218 print*,'OK2 read2: nid,rid,lat',nid,rid,jj 219 219 !....................................................................... 220 ierr= NF_INQ_DIMID(nid,'nlev',rid)221 IF (ierr/= NF_NOERR) THEN220 ierr=nf90_inq_dimid(nid,'nlev',rid) 221 IF (ierr/=nf90_noerr) THEN 222 222 print*, 'Oh probleme lecture dimension nlev' 223 223 ENDIF 224 ierr= NF_INQ_DIMLEN(nid,rid,nlev_cas)224 ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas) 225 225 print*,'OK3 read2: nid,rid,nlev_cas',nid,rid,nlev_cas 226 226 !....................................................................... 227 ierr= NF_INQ_DIMID(nid,'time',rid)227 ierr=nf90_inq_dimid(nid,'time',rid) 228 228 nt_cas=0 229 IF (ierr/= NF_NOERR) THEN229 IF (ierr/=nf90_noerr) THEN 230 230 stop 'Oh probleme lecture dimension time' 231 231 ENDIF 232 ierr= NF_INQ_DIMLEN(nid,rid,nt_cas)232 ierr=nf90_inquire_dimension(nid,rid,len=nt_cas) 233 233 print*,'OK4 read2: nid,rid,nt_cas',nid,rid,nt_cas 234 234 … … 324 324 fich_cas='cas.nc' 325 325 print*,'fich_cas ',fich_cas 326 ierr = NF_OPEN(fich_cas,NF_NOWRITE,nid)327 print*,'fich_cas, NF_NOWRITE,nid ',fich_cas,NF_NOWRITE,nid328 if (ierr/= NF_NOERR) then326 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 327 print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 328 if (ierr/=nf90_noerr) then 329 329 write(*,*) 'ERROR: GROS Pb opening forcings nc file ' 330 write(*,*) NF_STRERROR(ierr)330 write(*,*) nf90_strerror(ierr) 331 331 stop "" 332 332 endif 333 333 !....................................................................... 334 ierr= NF_INQ_DIMID(nid,'lat',rid)335 IF (ierr/= NF_NOERR) THEN334 ierr=nf90_inq_dimid(nid,'lat',rid) 335 IF (ierr/=nf90_noerr) THEN 336 336 print*, 'Oh probleme lecture dimension lat' 337 337 ENDIF 338 ierr= NF_INQ_DIMLEN(nid,rid,ii)338 ierr=nf90_inquire_dimension(nid,rid,len=ii) 339 339 print*,'OK1 read2: nid,rid,lat',nid,rid,ii 340 340 !....................................................................... 341 ierr= NF_INQ_DIMID(nid,'lon',rid)342 IF (ierr/= NF_NOERR) THEN341 ierr=nf90_inq_dimid(nid,'lon',rid) 342 IF (ierr/=nf90_noerr) THEN 343 343 print*, 'Oh probleme lecture dimension lon' 344 344 ENDIF 345 ierr= NF_INQ_DIMLEN(nid,rid,jj)345 ierr=nf90_inquire_dimension(nid,rid,len=jj) 346 346 print*,'OK2 read2: nid,rid,lat',nid,rid,jj 347 347 !....................................................................... 348 ierr= NF_INQ_DIMID(nid,'lev',rid)349 IF (ierr/= NF_NOERR) THEN348 ierr=nf90_inq_dimid(nid,'lev',rid) 349 IF (ierr/=nf90_noerr) THEN 350 350 print*, 'Oh probleme lecture dimension nlev' 351 351 ENDIF 352 ierr= NF_INQ_DIMLEN(nid,rid,nlev_cas)352 ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas) 353 353 print*,'OK3 read2: nid,rid,nlev_cas',nid,rid,nlev_cas 354 354 IF ( .NOT. ( nlev_cas > 10 .AND. nlev_cas < 1000 )) THEN … … 357 357 ENDIF 358 358 !....................................................................... 359 ierr= NF_INQ_DIMID(nid,'time',rid)359 ierr=nf90_inq_dimid(nid,'time',rid) 360 360 nt_cas=0 361 IF (ierr/= NF_NOERR) THEN361 IF (ierr/=nf90_noerr) THEN 362 362 stop 'Oh probleme lecture dimension time' 363 363 ENDIF 364 ierr= NF_INQ_DIMLEN(nid,rid,nt_cas)364 ierr=nf90_inquire_dimension(nid,rid,len=nt_cas) 365 365 print*,'OK4 read2: nid,rid,nt_cas',nid,rid,nt_cas 366 366 ! Lecture de l'axe des temps 367 367 print*,'LECTURE DU TEMPS' 368 ierr= NF_INQ_VARID(nid,'time',timeid)369 if(ierr/= NF_NOERR) then368 ierr=nf90_inq_varid(nid,'time',timeid) 369 if(ierr/=nf90_noerr) then 370 370 print *,'Variable time manquante dans cas.nc:' 371 ierr= NF_NOERR371 ierr=nf90_noerr 372 372 else 373 373 allocate(time_val(nt_cas)) 374 374 ierr = NF90_GET_VAR(nid,timeid,time_val) 375 if(ierr/= NF_NOERR) then375 if(ierr/=nf90_noerr) then 376 376 print *,'Pb a la lecture de time cas.nc: ' 377 377 endif … … 573 573 enddo 574 574 do i=1,nbvar3d 575 ierr= NF_INQ_VARID(nid,name_var(i),var3didin(i))575 ierr=nf90_inq_varid(nid,name_var(i),var3didin(i)) 576 576 print *,'ierr=',i,ierr,name_var(i),var3didin(i) 577 if(ierr/= NF_NOERR) then577 if(ierr/=nf90_noerr) then 578 578 print *,'Variable manquante dans cas.nc:',name_var(i) 579 579 endif … … 584 584 ierr = NF90_GET_VAR(nid,var3didin(i),resul, count = [1, 1, nlevel, ntime]) 585 585 print *,'Dans read_cas2, on a lu ',ierr,var3didin(i),name_var(i) 586 if(ierr/= NF_NOERR) then586 if(ierr/=nf90_noerr) then 587 587 print *,'Pb a la lecture de cas.nc: ',name_var(i) 588 588 stop "getvarup" … … 591 591 print *,'Dans read_cas2, on a lu ',ierr,var3didin(i),name_var(i) 592 592 ierr = NF90_GET_VAR(nid,var3didin(i),resul1, count = [1, 1, ntime]) 593 if(ierr/= NF_NOERR) then593 if(ierr/=nf90_noerr) then 594 594 print *,'Pb a la lecture de cas.nc: ',name_var(i) 595 595 stop "getvarup" … … 694 694 !----------------------------------------------------------------------- 695 695 do i=1,nbvar3d 696 ierr= NF_INQ_VARID(nid,name_var(i),var3didin(i))697 if(ierr/= NF_NOERR) then696 ierr=nf90_inq_varid(nid,name_var(i),var3didin(i)) 697 if(ierr/=nf90_noerr) then 698 698 print *,'Variable manquante dans cas.nc:',i,name_var(i) 699 ierr= NF_NOERR699 ierr=nf90_noerr 700 700 missing_var(i)=1 701 701 else … … 704 704 ierr = NF90_GET_VAR(nid,var3didin(i),apbp, count = [1, 1, nlevel + 1]) 705 705 print *,'read2_cas(apbp), on a lu ',i,name_var(i) 706 if(ierr/= NF_NOERR) then706 if(ierr/=nf90_noerr) then 707 707 print *,'Pb a la lecture de cas.nc: ',name_var(i) 708 708 stop "getvarup" … … 712 712 ierr = NF90_GET_VAR(nid,var3didin(i),resul, count = [1, 1, nlevel, ntime]) 713 713 print *,'read2_cas(resul), on a lu ',i,name_var(i) 714 if(ierr/= NF_NOERR) then714 if(ierr/=nf90_noerr) then 715 715 print *,'Pb a la lecture de cas.nc: ',name_var(i) 716 716 stop "getvarup" … … 720 720 ierr = NF90_GET_VAR(nid,var3didin(i),resul2, count = [1, 1, ntime]) 721 721 print *,'read2_cas(resul2), on a lu ',i,name_var(i) 722 if(ierr/= NF_NOERR) then722 if(ierr/=nf90_noerr) then 723 723 print *,'Pb a la lecture de cas.nc: ',name_var(i) 724 724 stop "getvarup" … … 728 728 ierr = NF90_GET_VAR(nid,var3didin(i),resul3) 729 729 print *,'read2_cas(resul3), on a lu ',i,name_var(i) 730 if(ierr/= NF_NOERR) then730 if(ierr/=nf90_noerr) then 731 731 print *,'Pb a la lecture de cas.nc: ',name_var(i) 732 732 stop "getvarup" … … 869 869 print*,'ON EST LA' 870 870 do i=1,nbvar3d 871 ierr= NF_INQ_VARID(nid,name_var(i),var3didin(i))872 if(ierr/= NF_NOERR) then871 ierr=nf90_inq_varid(nid,name_var(i),var3didin(i)) 872 if(ierr/=nf90_noerr) then 873 873 print *,'Variable manquante dans cas.nc:',i,name_var(i) 874 ierr= NF_NOERR874 ierr=nf90_noerr 875 875 missing_var(i)=1 876 876 else … … 879 879 ierr = NF90_GET_VAR(nid,var3didin(i),apbp) 880 880 print *,'read2_cas(apbp), on a lu ',i,name_var(i) 881 if(ierr/= NF_NOERR) then881 if(ierr/=nf90_noerr) then 882 882 print *,'Pb a la lecture de cas.nc: ',name_var(i) 883 883 stop "getvarup" … … 887 887 ierr = NF90_GET_VAR(nid,var3didin(i),resul1) 888 888 print *,'read2_cas(resul1), on a lu ',i,name_var(i) 889 if(ierr/= NF_NOERR) then889 if(ierr/=nf90_noerr) then 890 890 print *,'Pb a la lecture de cas.nc: ',name_var(i) 891 891 stop "getvarup" … … 896 896 ierr = NF90_GET_VAR(nid,var3didin(i),resul) 897 897 print *,'read2_cas(resul), on a lu ',i,name_var(i) 898 if(ierr/= NF_NOERR) then898 if(ierr/=nf90_noerr) then 899 899 print *,'Pb a la lecture de cas.nc: ',name_var(i) 900 900 stop "getvarup" … … 905 905 ierr = NF90_GET_VAR(nid,var3didin(i),resul2) 906 906 print *,'read2_cas(resul2), on a lu ',i,name_var(i) 907 if(ierr/= NF_NOERR) then907 if(ierr/=nf90_noerr) then 908 908 print *,'Pb a la lecture de cas.nc: ',name_var(i) 909 909 stop "getvarup" … … 914 914 ierr = NF90_GET_VAR(nid,var3didin(i),resul3) 915 915 print *,'read2_cas(resul3), on a lu ',i,name_var(i) 916 if(ierr/= NF_NOERR) then916 if(ierr/=nf90_noerr) then 917 917 print *,'Pb a la lecture de cas.nc: ',name_var(i) 918 918 stop "getvarup" -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/mod_1D_cases_read_std.F90
r5075 r5088 3 3 ! 4 4 MODULE mod_1D_cases_read_std 5 USE lmdz_netcdf, ONLY:nf_noerr,nf_inq_varid,nf_inq_dimid,nf_inq_dimlen,nf_open,nf_nowrite,&6 nf _strerror,nf90_get_var5 USE netcdf, ONLY:nf90_noerr,nf90_inq_varid,nf90_inq_dimid,nf90_inquire_dimension,nf90_open,nf90_nowrite,& 6 nf90_strerror,nf90_get_var 7 7 8 8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 99 99 fich_cas='cas.nc' 100 100 print*,'fich_cas ',fich_cas 101 ierr = NF_OPEN(fich_cas,NF_NOWRITE,nid)102 print*,'fich_cas, NF_NOWRITE,nid ',fich_cas,NF_NOWRITE,nid103 if (ierr/= NF_NOERR) then101 ierr = nf90_open(fich_cas,nf90_nowrite,nid) 102 print*,'fich_cas,nf90_nowrite,nid ',fich_cas,nf90_nowrite,nid 103 if (ierr/=nf90_noerr) then 104 104 write(*,*) 'ERROR: GROS Pb opening forcings nc file ' 105 write(*,*) NF_STRERROR(ierr)105 write(*,*) nf90_strerror(ierr) 106 106 stop "" 107 107 endif 108 108 !....................................................................... 109 ierr= NF_INQ_DIMID(nid,'lat',rid)110 IF (ierr/= NF_NOERR) THEN109 ierr=nf90_inq_dimid(nid,'lat',rid) 110 IF (ierr/=nf90_noerr) THEN 111 111 print*, 'Oh probleme lecture dimension lat' 112 112 ENDIF 113 ierr= NF_INQ_DIMLEN(nid,rid,ii)113 ierr=nf90_inquire_dimension(nid,rid,len=ii) 114 114 print*,'OK1 read_SCM_cas: nid,rid,lat',nid,rid,ii 115 115 !....................................................................... 116 ierr= NF_INQ_DIMID(nid,'lon',rid)117 IF (ierr/= NF_NOERR) THEN116 ierr=nf90_inq_dimid(nid,'lon',rid) 117 IF (ierr/=nf90_noerr) THEN 118 118 print*, 'Oh probleme lecture dimension lon' 119 119 ENDIF 120 ierr= NF_INQ_DIMLEN(nid,rid,jj)120 ierr=nf90_inquire_dimension(nid,rid,len=jj) 121 121 print*,'OK2 read_SCM_cas: nid,rid,lat',nid,rid,jj 122 122 !....................................................................... 123 ierr= NF_INQ_DIMID(nid,'lev',rid)124 IF (ierr/= NF_NOERR) THEN123 ierr=nf90_inq_dimid(nid,'lev',rid) 124 IF (ierr/=nf90_noerr) THEN 125 125 print*, 'Oh probleme lecture dimension nlev' 126 126 ENDIF 127 ierr= NF_INQ_DIMLEN(nid,rid,nlev_cas)127 ierr=nf90_inquire_dimension(nid,rid,len=nlev_cas) 128 128 print*,'OK3 read_SCM_cas: nid,rid,nlev_cas',nid,rid,nlev_cas 129 129 IF ( .NOT. ( nlev_cas > 10 .AND. nlev_cas < 200000 )) THEN … … 132 132 ENDIF 133 133 !....................................................................... 134 ierr= NF_INQ_DIMID(nid,'time',rid)134 ierr=nf90_inq_dimid(nid,'time',rid) 135 135 nt_cas=0 136 IF (ierr/= NF_NOERR) THEN136 IF (ierr/=nf90_noerr) THEN 137 137 stop 'Oh probleme lecture dimension time' 138 138 ENDIF 139 ierr= NF_INQ_DIMLEN(nid,rid,nt_cas)139 ierr=nf90_inquire_dimension(nid,rid,len=nt_cas) 140 140 print*,'OK4 read_SCM_cas: nid,rid,nt_cas',nid,rid,nt_cas 141 141 ! Lecture de l'axe des temps 142 142 print*,'LECTURE DU TEMPS' 143 ierr= NF_INQ_VARID(nid,'time',timeid)144 if(ierr/= NF_NOERR) then143 ierr=nf90_inq_varid(nid,'time',timeid) 144 if(ierr/=nf90_noerr) then 145 145 print *,'Variable time manquante dans cas.nc:' 146 ierr= NF_NOERR146 ierr=nf90_noerr 147 147 else 148 148 allocate(time_val(nt_cas)) 149 149 ierr = NF90_GET_VAR(nid,timeid,time_val) 150 if(ierr/= NF_NOERR) then150 if(ierr/=nf90_noerr) then 151 151 print *,'A Pb a la lecture de time cas.nc: ' 152 152 endif … … 412 412 413 413 414 ierr= NF_INQ_VARID(nid,'ta',int_test)415 if(ierr/= NF_NOERR) then414 ierr=nf90_inq_varid(nid,'ta',int_test) 415 if(ierr/=nf90_noerr) then 416 416 print*, '++++++++++++++++++++++++++++++' 417 417 print*, 'variable ta missing in cas.nc ' … … 429 429 do i=1,nbvar3d 430 430 missing_var(i)=0. 431 ierr= NF_INQ_VARID(nid,name_var(i),var3didin(i))431 ierr=nf90_inq_varid(nid,name_var(i),var3didin(i)) 432 432 print*, 'name_var(i)', name_var(i), var3didin(i) 433 if(ierr/= NF_NOERR) then433 if(ierr/=nf90_noerr) then 434 434 print *,'Variable manquante dans cas.nc:',i,name_var(i) 435 ierr= NF_NOERR435 ierr=nf90_noerr 436 436 missing_var(i)=1 437 437 else … … 456 456 ierr = NF90_GET_VAR(nid,var3didin(i),apbp) 457 457 print *,'read_SCM(apbp), on a lu ',i,name_var(i) 458 if(ierr/= NF_NOERR) then458 if(ierr/=nf90_noerr) then 459 459 print *,'B Pb a la lecture de cas.nc: ',name_var(i) 460 460 stop "getvarup" … … 467 467 ierr = NF90_GET_VAR(nid,var3didin(i),resul1) 468 468 print *,'read_SCM(resul1), on a lu ',i,name_var(i) 469 if(ierr/= NF_NOERR) then469 if(ierr/=nf90_noerr) then 470 470 print *,'C Pb a la lecture de cas.nc: ',name_var(i) 471 471 stop "getvarup" … … 480 480 ierr = NF90_GET_VAR(nid,var3didin(i),resul) 481 481 print *,'read_SCM(resul), on a lu ',i,name_var(i) 482 if(ierr/= NF_NOERR) then482 if(ierr/=nf90_noerr) then 483 483 print *,'D Pb a la lecture de cas.nc: ',name_var(i) 484 484 stop "getvarup" … … 492 492 ierr = NF90_GET_VAR(nid,var3didin(i),resul2) 493 493 print *,'read_SCM(resul2), on a lu ',i,name_var(i) 494 if(ierr/= NF_NOERR) then494 if(ierr/=nf90_noerr) then 495 495 print *,'E Pb a la lecture de cas.nc: ',name_var(i) 496 496 stop "getvarup" … … 504 504 ierr = NF90_GET_VAR(nid,var3didin(i),resul3) 505 505 print *,'read_SCM(resul3), on a lu ',i,name_var(i) 506 if(ierr/= NF_NOERR) then506 if(ierr/=nf90_noerr) then 507 507 print *,'F Pb a la lecture de cas.nc: ',name_var(i) 508 508 stop "getvarup" -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/old_1DUTILS_read_interp.h
r5086 r5088 146 146 !program reading forcings of the TWP-ICE experiment 147 147 148 use lmdz_netcdf, ONLY: nf_open,nf_nowrite,nf_noerr,nf_strerror,nf_inq_varid,nf90_get_var,&149 nf _inq_dimid,nf_inq_dimlen148 use netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 149 nf90_inq_dimid,nf90_inquire_dimension 150 150 151 151 … … 177 177 integer var3didin(nbvar3d) 178 178 179 ierr = NF_OPEN(fich_twpice,NF_NOWRITE,nid)180 if (ierr.NE. NF_NOERR) then179 ierr = nf90_open(fich_twpice,nf90_nowrite,nid) 180 if (ierr.NE.nf90_noerr) then 181 181 write(*,*) 'ERROR: Pb opening forcings cdf file ' 182 write(*,*) NF_STRERROR(ierr)182 write(*,*) nf90_strerror(ierr) 183 183 stop "" 184 184 endif 185 185 186 ierr= NF_INQ_VARID(nid,"lat",var3didin(1))187 if(ierr/= NF_NOERR) then188 write(*,*) NF_STRERROR(ierr)186 ierr=nf90_inq_varid(nid,"lat",var3didin(1)) 187 if(ierr/=nf90_noerr) then 188 write(*,*) nf90_strerror(ierr) 189 189 stop 'lat' 190 190 endif 191 191 192 ierr= NF_INQ_VARID(nid,"lon",var3didin(2))193 if(ierr/= NF_NOERR) then194 write(*,*) NF_STRERROR(ierr)192 ierr=nf90_inq_varid(nid,"lon",var3didin(2)) 193 if(ierr/=nf90_noerr) then 194 write(*,*) nf90_strerror(ierr) 195 195 stop 'lon' 196 196 endif 197 197 198 ierr= NF_INQ_VARID(nid,"alt",var3didin(3))199 if(ierr/= NF_NOERR) then200 write(*,*) NF_STRERROR(ierr)198 ierr=nf90_inq_varid(nid,"alt",var3didin(3)) 199 if(ierr/=nf90_noerr) then 200 write(*,*) nf90_strerror(ierr) 201 201 stop 'alt' 202 202 endif 203 203 204 ierr= NF_INQ_VARID(nid,"phis",var3didin(4))205 if(ierr/= NF_NOERR) then206 write(*,*) NF_STRERROR(ierr)204 ierr=nf90_inq_varid(nid,"phis",var3didin(4)) 205 if(ierr/=nf90_noerr) then 206 write(*,*) nf90_strerror(ierr) 207 207 stop 'phis' 208 208 endif 209 209 210 ierr= NF_INQ_VARID(nid,"T",var3didin(5))211 if(ierr/= NF_NOERR) then212 write(*,*) NF_STRERROR(ierr)210 ierr=nf90_inq_varid(nid,"T",var3didin(5)) 211 if(ierr/=nf90_noerr) then 212 write(*,*) nf90_strerror(ierr) 213 213 stop 'T' 214 214 endif 215 215 216 ierr= NF_INQ_VARID(nid,"q",var3didin(6))217 if(ierr/= NF_NOERR) then218 write(*,*) NF_STRERROR(ierr)216 ierr=nf90_inq_varid(nid,"q",var3didin(6)) 217 if(ierr/=nf90_noerr) then 218 write(*,*) nf90_strerror(ierr) 219 219 stop 'q' 220 220 endif 221 221 222 ierr= NF_INQ_VARID(nid,"u",var3didin(7))223 if(ierr/= NF_NOERR) then224 write(*,*) NF_STRERROR(ierr)222 ierr=nf90_inq_varid(nid,"u",var3didin(7)) 223 if(ierr/=nf90_noerr) then 224 write(*,*) nf90_strerror(ierr) 225 225 stop 'u' 226 226 endif 227 227 228 ierr= NF_INQ_VARID(nid,"v",var3didin(8))229 if(ierr/= NF_NOERR) then230 write(*,*) NF_STRERROR(ierr)228 ierr=nf90_inq_varid(nid,"v",var3didin(8)) 229 if(ierr/=nf90_noerr) then 230 write(*,*) nf90_strerror(ierr) 231 231 stop 'v' 232 232 endif 233 233 234 ierr= NF_INQ_VARID(nid,"omega",var3didin(9))235 if(ierr/= NF_NOERR) then236 write(*,*) NF_STRERROR(ierr)234 ierr=nf90_inq_varid(nid,"omega",var3didin(9)) 235 if(ierr/=nf90_noerr) then 236 write(*,*) nf90_strerror(ierr) 237 237 stop 'omega' 238 238 endif 239 239 240 ierr= NF_INQ_VARID(nid,"div",var3didin(10))241 if(ierr/= NF_NOERR) then242 write(*,*) NF_STRERROR(ierr)240 ierr=nf90_inq_varid(nid,"div",var3didin(10)) 241 if(ierr/=nf90_noerr) then 242 write(*,*) nf90_strerror(ierr) 243 243 stop 'div' 244 244 endif 245 245 246 ierr= NF_INQ_VARID(nid,"T_adv_h",var3didin(11))247 if(ierr/= NF_NOERR) then248 write(*,*) NF_STRERROR(ierr)246 ierr=nf90_inq_varid(nid,"T_adv_h",var3didin(11)) 247 if(ierr/=nf90_noerr) then 248 write(*,*) nf90_strerror(ierr) 249 249 stop 'T_adv_h' 250 250 endif 251 251 252 ierr= NF_INQ_VARID(nid,"T_adv_v",var3didin(12))253 if(ierr/= NF_NOERR) then254 write(*,*) NF_STRERROR(ierr)252 ierr=nf90_inq_varid(nid,"T_adv_v",var3didin(12)) 253 if(ierr/=nf90_noerr) then 254 write(*,*) nf90_strerror(ierr) 255 255 stop 'T_adv_v' 256 256 endif 257 257 258 ierr= NF_INQ_VARID(nid,"q_adv_h",var3didin(13))259 if(ierr/= NF_NOERR) then260 write(*,*) NF_STRERROR(ierr)258 ierr=nf90_inq_varid(nid,"q_adv_h",var3didin(13)) 259 if(ierr/=nf90_noerr) then 260 write(*,*) nf90_strerror(ierr) 261 261 stop 'q_adv_h' 262 262 endif 263 263 264 ierr= NF_INQ_VARID(nid,"q_adv_v",var3didin(14))265 if(ierr/= NF_NOERR) then266 write(*,*) NF_STRERROR(ierr)264 ierr=nf90_inq_varid(nid,"q_adv_v",var3didin(14)) 265 if(ierr/=nf90_noerr) then 266 write(*,*) nf90_strerror(ierr) 267 267 stop 'q_adv_v' 268 268 endif 269 269 270 ierr= NF_INQ_VARID(nid,"s",var3didin(15))271 if(ierr/= NF_NOERR) then272 write(*,*) NF_STRERROR(ierr)270 ierr=nf90_inq_varid(nid,"s",var3didin(15)) 271 if(ierr/=nf90_noerr) then 272 write(*,*) nf90_strerror(ierr) 273 273 stop 's' 274 274 endif 275 275 276 ierr= NF_INQ_VARID(nid,"s_adv_h",var3didin(16))277 if(ierr/= NF_NOERR) then278 write(*,*) NF_STRERROR(ierr)276 ierr=nf90_inq_varid(nid,"s_adv_h",var3didin(16)) 277 if(ierr/=nf90_noerr) then 278 write(*,*) nf90_strerror(ierr) 279 279 stop 's_adv_h' 280 280 endif 281 281 282 ierr= NF_INQ_VARID(nid,"s_adv_v",var3didin(17))283 if(ierr/= NF_NOERR) then284 write(*,*) NF_STRERROR(ierr)282 ierr=nf90_inq_varid(nid,"s_adv_v",var3didin(17)) 283 if(ierr/=nf90_noerr) then 284 write(*,*) nf90_strerror(ierr) 285 285 stop 's_adv_v' 286 286 endif 287 287 288 ierr= NF_INQ_VARID(nid,"p_srf_aver",var3didin(18))289 if(ierr/= NF_NOERR) then290 write(*,*) NF_STRERROR(ierr)288 ierr=nf90_inq_varid(nid,"p_srf_aver",var3didin(18)) 289 if(ierr/=nf90_noerr) then 290 write(*,*) nf90_strerror(ierr) 291 291 stop 'p_srf_aver' 292 292 endif 293 293 294 ierr= NF_INQ_VARID(nid,"p_srf_center",var3didin(19))295 if(ierr/= NF_NOERR) then296 write(*,*) NF_STRERROR(ierr)294 ierr=nf90_inq_varid(nid,"p_srf_center",var3didin(19)) 295 if(ierr/=nf90_noerr) then 296 write(*,*) nf90_strerror(ierr) 297 297 stop 'p_srf_center' 298 298 endif 299 299 300 ierr= NF_INQ_VARID(nid,"T_srf",var3didin(20))301 if(ierr/= NF_NOERR) then302 write(*,*) NF_STRERROR(ierr)300 ierr=nf90_inq_varid(nid,"T_srf",var3didin(20)) 301 if(ierr/=nf90_noerr) then 302 write(*,*) nf90_strerror(ierr) 303 303 stop 'T_srf' 304 304 endif … … 315 315 316 316 ierr = NF90_GET_VAR(nid,var3didin(1),lat) 317 if(ierr/= NF_NOERR) then318 write(*,*) NF_STRERROR(ierr)317 if(ierr/=nf90_noerr) then 318 write(*,*) nf90_strerror(ierr) 319 319 stop "getvarup" 320 320 endif … … 322 322 323 323 ierr = NF90_GET_VAR(nid,var3didin(2),lon) 324 if(ierr/= NF_NOERR) then325 write(*,*) NF_STRERROR(ierr)324 if(ierr/=nf90_noerr) then 325 write(*,*) nf90_strerror(ierr) 326 326 stop "getvarup" 327 327 endif … … 329 329 330 330 ierr = NF90_GET_VAR(nid,var3didin(3),alt) 331 if(ierr/= NF_NOERR) then332 write(*,*) NF_STRERROR(ierr)331 if(ierr/=nf90_noerr) then 332 write(*,*) nf90_strerror(ierr) 333 333 stop "getvarup" 334 334 endif … … 336 336 337 337 ierr = NF90_GET_VAR(nid,var3didin(4),phis) 338 if(ierr/= NF_NOERR) then339 write(*,*) NF_STRERROR(ierr)338 if(ierr/=nf90_noerr) then 339 write(*,*) nf90_strerror(ierr) 340 340 stop "getvarup" 341 341 endif … … 343 343 344 344 ierr = NF90_GET_VAR(nid,var3didin(5),T) 345 if(ierr/= NF_NOERR) then346 write(*,*) NF_STRERROR(ierr)345 if(ierr/=nf90_noerr) then 346 write(*,*) nf90_strerror(ierr) 347 347 stop "getvarup" 348 348 endif … … 350 350 351 351 ierr = NF90_GET_VAR(nid,var3didin(6),q) 352 if(ierr/= NF_NOERR) then353 write(*,*) NF_STRERROR(ierr)352 if(ierr/=nf90_noerr) then 353 write(*,*) nf90_strerror(ierr) 354 354 stop "getvarup" 355 355 endif … … 362 362 enddo 363 363 ierr = NF90_GET_VAR(nid,var3didin(7),u) 364 if(ierr/= NF_NOERR) then365 write(*,*) NF_STRERROR(ierr)364 if(ierr/=nf90_noerr) then 365 write(*,*) nf90_strerror(ierr) 366 366 stop "getvarup" 367 367 endif … … 369 369 370 370 ierr = NF90_GET_VAR(nid,var3didin(8),v) 371 if(ierr/= NF_NOERR) then372 write(*,*) NF_STRERROR(ierr)371 if(ierr/=nf90_noerr) then 372 write(*,*) nf90_strerror(ierr) 373 373 stop "getvarup" 374 374 endif … … 376 376 377 377 ierr = NF90_GET_VAR(nid,var3didin(9),omega) 378 if(ierr/= NF_NOERR) then379 write(*,*) NF_STRERROR(ierr)378 if(ierr/=nf90_noerr) then 379 write(*,*) nf90_strerror(ierr) 380 380 stop "getvarup" 381 381 endif … … 389 389 390 390 ierr = NF90_GET_VAR(nid,var3didin(10),div) 391 if(ierr/= NF_NOERR) then392 write(*,*) NF_STRERROR(ierr)391 if(ierr/=nf90_noerr) then 392 write(*,*) nf90_strerror(ierr) 393 393 stop "getvarup" 394 394 endif … … 396 396 397 397 ierr = NF90_GET_VAR(nid,var3didin(11),T_adv_h) 398 if(ierr/= NF_NOERR) then399 write(*,*) NF_STRERROR(ierr)398 if(ierr/=nf90_noerr) then 399 write(*,*) nf90_strerror(ierr) 400 400 stop "getvarup" 401 401 endif … … 410 410 411 411 ierr = NF90_GET_VAR(nid,var3didin(12),T_adv_v) 412 if(ierr/= NF_NOERR) then413 write(*,*) NF_STRERROR(ierr)412 if(ierr/=nf90_noerr) then 413 write(*,*) nf90_strerror(ierr) 414 414 stop "getvarup" 415 415 endif … … 423 423 424 424 ierr = NF90_GET_VAR(nid,var3didin(13),q_adv_h) 425 if(ierr/= NF_NOERR) then426 write(*,*) NF_STRERROR(ierr)425 if(ierr/=nf90_noerr) then 426 write(*,*) nf90_strerror(ierr) 427 427 stop "getvarup" 428 428 endif … … 437 437 438 438 ierr = NF90_GET_VAR(nid,var3didin(14),q_adv_v) 439 if(ierr/= NF_NOERR) then440 write(*,*) NF_STRERROR(ierr)439 if(ierr/=nf90_noerr) then 440 write(*,*) nf90_strerror(ierr) 441 441 stop "getvarup" 442 442 endif … … 451 451 452 452 ierr = NF90_GET_VAR(nid,var3didin(15),s) 453 if(ierr/= NF_NOERR) then454 write(*,*) NF_STRERROR(ierr)453 if(ierr/=nf90_noerr) then 454 write(*,*) nf90_strerror(ierr) 455 455 stop "getvarup" 456 456 endif 457 457 458 458 ierr = NF90_GET_VAR(nid,var3didin(16),s_adv_h) 459 if(ierr/= NF_NOERR) then460 write(*,*) NF_STRERROR(ierr)459 if(ierr/=nf90_noerr) then 460 write(*,*) nf90_strerror(ierr) 461 461 stop "getvarup" 462 462 endif 463 463 464 464 ierr = NF90_GET_VAR(nid,var3didin(17),s_adv_v) 465 if(ierr/= NF_NOERR) then466 write(*,*) NF_STRERROR(ierr)465 if(ierr/=nf90_noerr) then 466 write(*,*) nf90_strerror(ierr) 467 467 stop "getvarup" 468 468 endif 469 469 470 470 ierr = NF90_GET_VAR(nid,var3didin(18),p_srf_aver) 471 if(ierr/= NF_NOERR) then472 write(*,*) NF_STRERROR(ierr)471 if(ierr/=nf90_noerr) then 472 write(*,*) nf90_strerror(ierr) 473 473 stop "getvarup" 474 474 endif 475 475 476 476 ierr = NF90_GET_VAR(nid,var3didin(19),p_srf_center) 477 if(ierr/= NF_NOERR) then478 write(*,*) NF_STRERROR(ierr)477 if(ierr/=nf90_noerr) then 478 write(*,*) nf90_strerror(ierr) 479 479 stop "getvarup" 480 480 endif 481 481 482 482 ierr = NF90_GET_VAR(nid,var3didin(20),T_srf) 483 if(ierr/= NF_NOERR) then484 write(*,*) NF_STRERROR(ierr)483 if(ierr/=nf90_noerr) then 484 write(*,*) nf90_strerror(ierr) 485 485 stop "getvarup" 486 486 endif … … 492 492 subroutine catchaxis(nid,ttm,llm,time,lev,ierr) 493 493 494 use lmdz_netcdf, ONLY: nf_open,nf_nowrite,nf_noerr,nf_strerror,nf_inq_varid,nf90_get_var,&495 nf _inq_dimid,nf_inq_dimlen494 use netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 495 nf90_inq_dimid,nf90_inquire_dimension 496 496 497 497 implicit none … … 507 507 ! Control & lecture on dimensions 508 508 ! =============================== 509 ierr= NF_INQ_DIMID(nid,"time",timedimin)510 ierr= NF_INQ_VARID(nid,"time",timevar)511 if (ierr.NE. NF_NOERR) then509 ierr=nf90_inq_dimid(nid,"time",timedimin) 510 ierr=nf90_inq_varid(nid,"time",timevar) 511 if (ierr.NE.nf90_noerr) then 512 512 write(*,*) 'ERROR: Field <time> is missing' 513 513 stop "" 514 514 endif 515 ierr= NF_INQ_DIMLEN(nid,timedimin,timelen)516 517 ierr= NF_INQ_DIMID(nid,"lev",levdimin)518 ierr= NF_INQ_VARID(nid,"lev",levvar)519 if (ierr.NE. NF_NOERR) then515 ierr=nf90_inquire_dimension(nid,timedimin,len=timelen) 516 517 ierr=nf90_inq_dimid(nid,"lev",levdimin) 518 ierr=nf90_inq_varid(nid,"lev",levvar) 519 if (ierr.NE.nf90_noerr) then 520 520 write(*,*) 'ERROR: Field <lev> is lacking' 521 521 stop "" 522 522 endif 523 ierr= NF_INQ_DIMLEN(nid,levdimin,levlen)523 ierr=nf90_inquire_dimension(nid,levdimin,len=levlen) 524 524 525 525 if((timelen/=ttm).or.(levlen/=llm)) then … … 2170 2170 2171 2171 2172 use lmdz_netcdf, ONLY: nf_open,nf_nowrite,nf_noerr,nf_strerror,nf_inq_varid,nf90_get_var,&2173 nf _inq_dimid,nf_inq_dimlen2172 use netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 2173 nf90_inq_dimid,nf90_inquire_dimension 2174 2174 implicit none 2175 2175 … … 2190 2190 integer var3didin(nbvar3d) 2191 2191 2192 ierr = NF_OPEN(fich_fire,NF_NOWRITE,nid)2193 if (ierr.NE. NF_NOERR) then2192 ierr = nf90_open(fich_fire,nf90_nowrite,nid) 2193 if (ierr.NE.nf90_noerr) then 2194 2194 write(*,*) 'ERROR: Pb opening forcings nc file ' 2195 write(*,*) NF_STRERROR(ierr)2195 write(*,*) nf90_strerror(ierr) 2196 2196 stop "" 2197 2197 endif 2198 2198 2199 2199 2200 ierr= NF_INQ_VARID(nid,"zz",var3didin(1))2201 if(ierr/= NF_NOERR) then2202 write(*,*) NF_STRERROR(ierr)2200 ierr=nf90_inq_varid(nid,"zz",var3didin(1)) 2201 if(ierr/=nf90_noerr) then 2202 write(*,*) nf90_strerror(ierr) 2203 2203 stop 'lev' 2204 2204 endif 2205 2205 2206 2206 2207 ierr= NF_INQ_VARID(nid,"thetal",var3didin(2))2208 if(ierr/= NF_NOERR) then2209 write(*,*) NF_STRERROR(ierr)2207 ierr=nf90_inq_varid(nid,"thetal",var3didin(2)) 2208 if(ierr/=nf90_noerr) then 2209 write(*,*) nf90_strerror(ierr) 2210 2210 stop 'temp' 2211 2211 endif 2212 2212 2213 ierr= NF_INQ_VARID(nid,"qt",var3didin(3))2214 if(ierr/= NF_NOERR) then2215 write(*,*) NF_STRERROR(ierr)2213 ierr=nf90_inq_varid(nid,"qt",var3didin(3)) 2214 if(ierr/=nf90_noerr) then 2215 write(*,*) nf90_strerror(ierr) 2216 2216 stop 'qv' 2217 2217 endif 2218 2218 2219 ierr= NF_INQ_VARID(nid,"u",var3didin(4))2220 if(ierr/= NF_NOERR) then2221 write(*,*) NF_STRERROR(ierr)2219 ierr=nf90_inq_varid(nid,"u",var3didin(4)) 2220 if(ierr/=nf90_noerr) then 2221 write(*,*) nf90_strerror(ierr) 2222 2222 stop 'u' 2223 2223 endif 2224 2224 2225 ierr= NF_INQ_VARID(nid,"v",var3didin(5))2226 if(ierr/= NF_NOERR) then2227 write(*,*) NF_STRERROR(ierr)2225 ierr=nf90_inq_varid(nid,"v",var3didin(5)) 2226 if(ierr/=nf90_noerr) then 2227 write(*,*) nf90_strerror(ierr) 2228 2228 stop 'v' 2229 2229 endif 2230 2230 2231 ierr= NF_INQ_VARID(nid,"tke",var3didin(6))2232 if(ierr/= NF_NOERR) then2233 write(*,*) NF_STRERROR(ierr)2231 ierr=nf90_inq_varid(nid,"tke",var3didin(6)) 2232 if(ierr/=nf90_noerr) then 2233 write(*,*) nf90_strerror(ierr) 2234 2234 stop 'tke' 2235 2235 endif 2236 2236 2237 ierr= NF_INQ_VARID(nid,"ugeo",var3didin(7))2238 if(ierr/= NF_NOERR) then2239 write(*,*) NF_STRERROR(ierr)2237 ierr=nf90_inq_varid(nid,"ugeo",var3didin(7)) 2238 if(ierr/=nf90_noerr) then 2239 write(*,*) nf90_strerror(ierr) 2240 2240 stop 'ug' 2241 2241 endif 2242 2242 2243 ierr= NF_INQ_VARID(nid,"vgeo",var3didin(8))2244 if(ierr/= NF_NOERR) then2245 write(*,*) NF_STRERROR(ierr)2243 ierr=nf90_inq_varid(nid,"vgeo",var3didin(8)) 2244 if(ierr/=nf90_noerr) then 2245 write(*,*) nf90_strerror(ierr) 2246 2246 stop 'vg' 2247 2247 endif 2248 2248 2249 ierr= NF_INQ_VARID(nid,"wls",var3didin(9))2250 if(ierr/= NF_NOERR) then2251 write(*,*) NF_STRERROR(ierr)2249 ierr=nf90_inq_varid(nid,"wls",var3didin(9)) 2250 if(ierr/=nf90_noerr) then 2251 write(*,*) nf90_strerror(ierr) 2252 2252 stop 'wls' 2253 2253 endif 2254 2254 2255 ierr= NF_INQ_VARID(nid,"dqtdx",var3didin(10))2256 if(ierr/= NF_NOERR) then2257 write(*,*) NF_STRERROR(ierr)2255 ierr=nf90_inq_varid(nid,"dqtdx",var3didin(10)) 2256 if(ierr/=nf90_noerr) then 2257 write(*,*) nf90_strerror(ierr) 2258 2258 stop 'dqtdx' 2259 2259 endif 2260 2260 2261 ierr= NF_INQ_VARID(nid,"dqtdy",var3didin(11))2262 if(ierr/= NF_NOERR) then2263 write(*,*) NF_STRERROR(ierr)2261 ierr=nf90_inq_varid(nid,"dqtdy",var3didin(11)) 2262 if(ierr/=nf90_noerr) then 2263 write(*,*) nf90_strerror(ierr) 2264 2264 stop 'dqtdy' 2265 2265 endif 2266 2266 2267 ierr= NF_INQ_VARID(nid,"dqtdt",var3didin(12))2268 if(ierr/= NF_NOERR) then2269 write(*,*) NF_STRERROR(ierr)2267 ierr=nf90_inq_varid(nid,"dqtdt",var3didin(12)) 2268 if(ierr/=nf90_noerr) then 2269 write(*,*) nf90_strerror(ierr) 2270 2270 stop 'dqtdt' 2271 2271 endif 2272 2272 2273 ierr= NF_INQ_VARID(nid,"thl_rad",var3didin(13))2274 if(ierr/= NF_NOERR) then2275 write(*,*) NF_STRERROR(ierr)2273 ierr=nf90_inq_varid(nid,"thl_rad",var3didin(13)) 2274 if(ierr/=nf90_noerr) then 2275 write(*,*) nf90_strerror(ierr) 2276 2276 stop 'thl_rad' 2277 2277 endif … … 2280 2280 2281 2281 ierr = NF90_GET_VAR(nid,var3didin(1),zz) 2282 if(ierr/= NF_NOERR) then2283 write(*,*) NF_STRERROR(ierr)2282 if(ierr/=nf90_noerr) then 2283 write(*,*) nf90_strerror(ierr) 2284 2284 stop "getvarup" 2285 2285 endif … … 2287 2287 2288 2288 ierr = NF90_GET_VAR(nid,var3didin(2),thl) 2289 if(ierr/= NF_NOERR) then2290 write(*,*) NF_STRERROR(ierr)2289 if(ierr/=nf90_noerr) then 2290 write(*,*) nf90_strerror(ierr) 2291 2291 stop "getvarup" 2292 2292 endif … … 2294 2294 2295 2295 ierr = NF90_GET_VAR(nid,var3didin(3),qt) 2296 if(ierr/= NF_NOERR) then2297 write(*,*) NF_STRERROR(ierr)2296 if(ierr/=nf90_noerr) then 2297 write(*,*) nf90_strerror(ierr) 2298 2298 stop "getvarup" 2299 2299 endif … … 2301 2301 2302 2302 ierr = NF90_GET_VAR(nid,var3didin(4),u) 2303 if(ierr/= NF_NOERR) then2304 write(*,*) NF_STRERROR(ierr)2303 if(ierr/=nf90_noerr) then 2304 write(*,*) nf90_strerror(ierr) 2305 2305 stop "getvarup" 2306 2306 endif … … 2308 2308 2309 2309 ierr = NF90_GET_VAR(nid,var3didin(5),v) 2310 if(ierr/= NF_NOERR) then2311 write(*,*) NF_STRERROR(ierr)2310 if(ierr/=nf90_noerr) then 2311 write(*,*) nf90_strerror(ierr) 2312 2312 stop "getvarup" 2313 2313 endif … … 2315 2315 2316 2316 ierr = NF90_GET_VAR(nid,var3didin(6),tke) 2317 if(ierr/= NF_NOERR) then2318 write(*,*) NF_STRERROR(ierr)2317 if(ierr/=nf90_noerr) then 2318 write(*,*) nf90_strerror(ierr) 2319 2319 stop "getvarup" 2320 2320 endif … … 2322 2322 2323 2323 ierr = NF90_GET_VAR(nid,var3didin(7),ug) 2324 if(ierr/= NF_NOERR) then2325 write(*,*) NF_STRERROR(ierr)2324 if(ierr/=nf90_noerr) then 2325 write(*,*) nf90_strerror(ierr) 2326 2326 stop "getvarup" 2327 2327 endif … … 2329 2329 2330 2330 ierr = NF90_GET_VAR(nid,var3didin(8),vg) 2331 if(ierr/= NF_NOERR) then2332 write(*,*) NF_STRERROR(ierr)2331 if(ierr/=nf90_noerr) then 2332 write(*,*) nf90_strerror(ierr) 2333 2333 stop "getvarup" 2334 2334 endif … … 2336 2336 2337 2337 ierr = NF90_GET_VAR(nid,var3didin(9),wls) 2338 if(ierr/= NF_NOERR) then2339 write(*,*) NF_STRERROR(ierr)2338 if(ierr/=nf90_noerr) then 2339 write(*,*) nf90_strerror(ierr) 2340 2340 stop "getvarup" 2341 2341 endif … … 2343 2343 2344 2344 ierr = NF90_GET_VAR(nid,var3didin(10),dqtdx) 2345 if(ierr/= NF_NOERR) then2346 write(*,*) NF_STRERROR(ierr)2345 if(ierr/=nf90_noerr) then 2346 write(*,*) nf90_strerror(ierr) 2347 2347 stop "getvarup" 2348 2348 endif … … 2350 2350 2351 2351 ierr = NF90_GET_VAR(nid,var3didin(11),dqtdy) 2352 if(ierr/= NF_NOERR) then2353 write(*,*) NF_STRERROR(ierr)2352 if(ierr/=nf90_noerr) then 2353 write(*,*) nf90_strerror(ierr) 2354 2354 stop "getvarup" 2355 2355 endif … … 2357 2357 2358 2358 ierr = NF90_GET_VAR(nid,var3didin(12),dqtdt) 2359 if(ierr/= NF_NOERR) then2360 write(*,*) NF_STRERROR(ierr)2359 if(ierr/=nf90_noerr) then 2360 write(*,*) nf90_strerror(ierr) 2361 2361 stop "getvarup" 2362 2362 endif … … 2364 2364 2365 2365 ierr = NF90_GET_VAR(nid,var3didin(13),thl_rad) 2366 if(ierr/= NF_NOERR) then2367 write(*,*) NF_STRERROR(ierr)2366 if(ierr/=nf90_noerr) then 2367 write(*,*) nf90_strerror(ierr) 2368 2368 stop "getvarup" 2369 2369 endif … … 2380 2380 !program reading initial profils and forcings of the Dice case study 2381 2381 2382 use lmdz_netcdf, ONLY: nf_open,nf_nowrite,nf_noerr,nf_strerror,nf_inq_varid,nf90_get_var,&2383 nf _inq_dimid,nf_inq_dimlen2382 use netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 2383 nf90_inq_dimid,nf90_inquire_dimension 2384 2384 2385 2385 implicit none … … 2407 2407 2408 2408 pzero=100000. 2409 ierr = NF_OPEN(fich_dice,NF_NOWRITE,nid)2410 if (ierr.NE. NF_NOERR) then2409 ierr = nf90_open(fich_dice,nf90_nowrite,nid) 2410 if (ierr.NE.nf90_noerr) then 2411 2411 write(*,*) 'ERROR: Pb opening forcings nc file ' 2412 write(*,*) NF_STRERROR(ierr)2412 write(*,*) nf90_strerror(ierr) 2413 2413 stop "" 2414 2414 endif 2415 2415 2416 2416 2417 ierr= NF_INQ_VARID(nid,"height",var3didin(1))2418 if(ierr/= NF_NOERR) then2419 write(*,*) NF_STRERROR(ierr)2417 ierr=nf90_inq_varid(nid,"height",var3didin(1)) 2418 if(ierr/=nf90_noerr) then 2419 write(*,*) nf90_strerror(ierr) 2420 2420 stop 'height' 2421 2421 endif 2422 2422 2423 ierr= NF_INQ_VARID(nid,"pf",var3didin(11))2424 if(ierr/= NF_NOERR) then2425 write(*,*) NF_STRERROR(ierr)2423 ierr=nf90_inq_varid(nid,"pf",var3didin(11)) 2424 if(ierr/=nf90_noerr) then 2425 write(*,*) nf90_strerror(ierr) 2426 2426 stop 'pf' 2427 2427 endif 2428 2428 2429 ierr= NF_INQ_VARID(nid,"theta",var3didin(12))2430 if(ierr/= NF_NOERR) then2431 write(*,*) NF_STRERROR(ierr)2429 ierr=nf90_inq_varid(nid,"theta",var3didin(12)) 2430 if(ierr/=nf90_noerr) then 2431 write(*,*) nf90_strerror(ierr) 2432 2432 stop 'theta' 2433 2433 endif 2434 2434 2435 ierr= NF_INQ_VARID(nid,"qv",var3didin(13))2436 if(ierr/= NF_NOERR) then2437 write(*,*) NF_STRERROR(ierr)2435 ierr=nf90_inq_varid(nid,"qv",var3didin(13)) 2436 if(ierr/=nf90_noerr) then 2437 write(*,*) nf90_strerror(ierr) 2438 2438 stop 'qv' 2439 2439 endif 2440 2440 2441 ierr= NF_INQ_VARID(nid,"u",var3didin(14))2442 if(ierr/= NF_NOERR) then2443 write(*,*) NF_STRERROR(ierr)2441 ierr=nf90_inq_varid(nid,"u",var3didin(14)) 2442 if(ierr/=nf90_noerr) then 2443 write(*,*) nf90_strerror(ierr) 2444 2444 stop 'u' 2445 2445 endif 2446 2446 2447 ierr= NF_INQ_VARID(nid,"v",var3didin(15))2448 if(ierr/= NF_NOERR) then2449 write(*,*) NF_STRERROR(ierr)2447 ierr=nf90_inq_varid(nid,"v",var3didin(15)) 2448 if(ierr/=nf90_noerr) then 2449 write(*,*) nf90_strerror(ierr) 2450 2450 stop 'v' 2451 2451 endif 2452 2452 2453 ierr= NF_INQ_VARID(nid,"o3mmr",var3didin(16))2454 if(ierr/= NF_NOERR) then2455 write(*,*) NF_STRERROR(ierr)2453 ierr=nf90_inq_varid(nid,"o3mmr",var3didin(16)) 2454 if(ierr/=nf90_noerr) then 2455 write(*,*) nf90_strerror(ierr) 2456 2456 stop 'o3' 2457 2457 endif 2458 2458 2459 ierr= NF_INQ_VARID(nid,"shf",var3didin(2))2460 if(ierr/= NF_NOERR) then2461 write(*,*) NF_STRERROR(ierr)2459 ierr=nf90_inq_varid(nid,"shf",var3didin(2)) 2460 if(ierr/=nf90_noerr) then 2461 write(*,*) nf90_strerror(ierr) 2462 2462 stop 'shf' 2463 2463 endif 2464 2464 2465 ierr= NF_INQ_VARID(nid,"lhf",var3didin(3))2466 if(ierr/= NF_NOERR) then2467 write(*,*) NF_STRERROR(ierr)2465 ierr=nf90_inq_varid(nid,"lhf",var3didin(3)) 2466 if(ierr/=nf90_noerr) then 2467 write(*,*) nf90_strerror(ierr) 2468 2468 stop 'lhf' 2469 2469 endif 2470 2470 2471 ierr= NF_INQ_VARID(nid,"lwup",var3didin(4))2472 if(ierr/= NF_NOERR) then2473 write(*,*) NF_STRERROR(ierr)2471 ierr=nf90_inq_varid(nid,"lwup",var3didin(4)) 2472 if(ierr/=nf90_noerr) then 2473 write(*,*) nf90_strerror(ierr) 2474 2474 stop 'lwup' 2475 2475 endif 2476 2476 2477 ierr= NF_INQ_VARID(nid,"swup",var3didin(5))2478 if(ierr/= NF_NOERR) then2479 write(*,*) NF_STRERROR(ierr)2477 ierr=nf90_inq_varid(nid,"swup",var3didin(5)) 2478 if(ierr/=nf90_noerr) then 2479 write(*,*) nf90_strerror(ierr) 2480 2480 stop 'dqtdx' 2481 2481 endif 2482 2482 2483 ierr= NF_INQ_VARID(nid,"Tg",var3didin(6))2484 if(ierr/= NF_NOERR) then2485 write(*,*) NF_STRERROR(ierr)2483 ierr=nf90_inq_varid(nid,"Tg",var3didin(6)) 2484 if(ierr/=nf90_noerr) then 2485 write(*,*) nf90_strerror(ierr) 2486 2486 stop 'Tg' 2487 2487 endif 2488 2488 2489 ierr= NF_INQ_VARID(nid,"ustar",var3didin(7))2490 if(ierr/= NF_NOERR) then2491 write(*,*) NF_STRERROR(ierr)2489 ierr=nf90_inq_varid(nid,"ustar",var3didin(7)) 2490 if(ierr/=nf90_noerr) then 2491 write(*,*) nf90_strerror(ierr) 2492 2492 stop 'ustar' 2493 2493 endif 2494 2494 2495 ierr= NF_INQ_VARID(nid,"psurf",var3didin(8))2496 if(ierr/= NF_NOERR) then2497 write(*,*) NF_STRERROR(ierr)2495 ierr=nf90_inq_varid(nid,"psurf",var3didin(8)) 2496 if(ierr/=nf90_noerr) then 2497 write(*,*) nf90_strerror(ierr) 2498 2498 stop 'psurf' 2499 2499 endif 2500 2500 2501 ierr= NF_INQ_VARID(nid,"Ug",var3didin(9))2502 if(ierr/= NF_NOERR) then2503 write(*,*) NF_STRERROR(ierr)2501 ierr=nf90_inq_varid(nid,"Ug",var3didin(9)) 2502 if(ierr/=nf90_noerr) then 2503 write(*,*) nf90_strerror(ierr) 2504 2504 stop 'Ug' 2505 2505 endif 2506 2506 2507 ierr= NF_INQ_VARID(nid,"Vg",var3didin(10))2508 if(ierr/= NF_NOERR) then2509 write(*,*) NF_STRERROR(ierr)2507 ierr=nf90_inq_varid(nid,"Vg",var3didin(10)) 2508 if(ierr/=nf90_noerr) then 2509 write(*,*) nf90_strerror(ierr) 2510 2510 stop 'Vg' 2511 2511 endif 2512 2512 2513 ierr= NF_INQ_VARID(nid,"hadvT",var3didin(17))2514 if(ierr/= NF_NOERR) then2515 write(*,*) NF_STRERROR(ierr)2513 ierr=nf90_inq_varid(nid,"hadvT",var3didin(17)) 2514 if(ierr/=nf90_noerr) then 2515 write(*,*) nf90_strerror(ierr) 2516 2516 stop 'hadvT' 2517 2517 endif 2518 2518 2519 ierr= NF_INQ_VARID(nid,"hadvq",var3didin(18))2520 if(ierr/= NF_NOERR) then2521 write(*,*) NF_STRERROR(ierr)2519 ierr=nf90_inq_varid(nid,"hadvq",var3didin(18)) 2520 if(ierr/=nf90_noerr) then 2521 write(*,*) nf90_strerror(ierr) 2522 2522 stop 'hadvq' 2523 2523 endif 2524 2524 2525 ierr= NF_INQ_VARID(nid,"hadvu",var3didin(19))2526 if(ierr/= NF_NOERR) then2527 write(*,*) NF_STRERROR(ierr)2525 ierr=nf90_inq_varid(nid,"hadvu",var3didin(19)) 2526 if(ierr/=nf90_noerr) then 2527 write(*,*) nf90_strerror(ierr) 2528 2528 stop 'hadvu' 2529 2529 endif 2530 2530 2531 ierr= NF_INQ_VARID(nid,"hadvv",var3didin(20))2532 if(ierr/= NF_NOERR) then2533 write(*,*) NF_STRERROR(ierr)2531 ierr=nf90_inq_varid(nid,"hadvv",var3didin(20)) 2532 if(ierr/=nf90_noerr) then 2533 write(*,*) nf90_strerror(ierr) 2534 2534 stop 'hadvv' 2535 2535 endif 2536 2536 2537 ierr= NF_INQ_VARID(nid,"w",var3didin(21))2538 if(ierr/= NF_NOERR) then2539 write(*,*) NF_STRERROR(ierr)2537 ierr=nf90_inq_varid(nid,"w",var3didin(21)) 2538 if(ierr/=nf90_noerr) then 2539 write(*,*) nf90_strerror(ierr) 2540 2540 stop 'w' 2541 2541 endif 2542 2542 2543 ierr= NF_INQ_VARID(nid,"omega",var3didin(22))2544 if(ierr/= NF_NOERR) then2545 write(*,*) NF_STRERROR(ierr)2543 ierr=nf90_inq_varid(nid,"omega",var3didin(22)) 2544 if(ierr/=nf90_noerr) then 2545 write(*,*) nf90_strerror(ierr) 2546 2546 stop 'omega' 2547 2547 endif … … 2550 2550 2551 2551 ierr = NF90_GET_VAR(nid,var3didin(1),zz) 2552 if(ierr/= NF_NOERR) then2553 write(*,*) NF_STRERROR(ierr)2552 if(ierr/=nf90_noerr) then 2553 write(*,*) nf90_strerror(ierr) 2554 2554 stop "getvarup" 2555 2555 endif … … 2557 2557 2558 2558 ierr = NF90_GET_VAR(nid,var3didin(11),pres) 2559 if(ierr/= NF_NOERR) then2560 write(*,*) NF_STRERROR(ierr)2559 if(ierr/=nf90_noerr) then 2560 write(*,*) nf90_strerror(ierr) 2561 2561 stop "getvarup" 2562 2562 endif … … 2564 2564 2565 2565 ierr = NF90_GET_VAR(nid,var3didin(12),th) 2566 if(ierr/= NF_NOERR) then2567 write(*,*) NF_STRERROR(ierr)2566 if(ierr/=nf90_noerr) then 2567 write(*,*) nf90_strerror(ierr) 2568 2568 stop "getvarup" 2569 2569 endif … … 2574 2574 2575 2575 ierr = NF90_GET_VAR(nid,var3didin(13),qv) 2576 if(ierr/= NF_NOERR) then2577 write(*,*) NF_STRERROR(ierr)2576 if(ierr/=nf90_noerr) then 2577 write(*,*) nf90_strerror(ierr) 2578 2578 stop "getvarup" 2579 2579 endif … … 2581 2581 2582 2582 ierr = NF90_GET_VAR(nid,var3didin(14),u) 2583 if(ierr/= NF_NOERR) then2584 write(*,*) NF_STRERROR(ierr)2583 if(ierr/=nf90_noerr) then 2584 write(*,*) nf90_strerror(ierr) 2585 2585 stop "getvarup" 2586 2586 endif … … 2588 2588 2589 2589 ierr = NF90_GET_VAR(nid,var3didin(15),v) 2590 if(ierr/= NF_NOERR) then2591 write(*,*) NF_STRERROR(ierr)2590 if(ierr/=nf90_noerr) then 2591 write(*,*) nf90_strerror(ierr) 2592 2592 stop "getvarup" 2593 2593 endif … … 2595 2595 2596 2596 ierr = NF90_GET_VAR(nid,var3didin(16),o3) 2597 if(ierr/= NF_NOERR) then2598 write(*,*) NF_STRERROR(ierr)2597 if(ierr/=nf90_noerr) then 2598 write(*,*) nf90_strerror(ierr) 2599 2599 stop "getvarup" 2600 2600 endif … … 2602 2602 2603 2603 ierr = NF90_GET_VAR(nid,var3didin(2),shf) 2604 if(ierr/= NF_NOERR) then2605 write(*,*) NF_STRERROR(ierr)2604 if(ierr/=nf90_noerr) then 2605 write(*,*) nf90_strerror(ierr) 2606 2606 stop "getvarup" 2607 2607 endif … … 2609 2609 2610 2610 ierr = NF90_GET_VAR(nid,var3didin(3),lhf) 2611 if(ierr/= NF_NOERR) then2612 write(*,*) NF_STRERROR(ierr)2611 if(ierr/=nf90_noerr) then 2612 write(*,*) nf90_strerror(ierr) 2613 2613 stop "getvarup" 2614 2614 endif … … 2616 2616 2617 2617 ierr = NF90_GET_VAR(nid,var3didin(4),lwup) 2618 if(ierr/= NF_NOERR) then2619 write(*,*) NF_STRERROR(ierr)2618 if(ierr/=nf90_noerr) then 2619 write(*,*) nf90_strerror(ierr) 2620 2620 stop "getvarup" 2621 2621 endif … … 2623 2623 2624 2624 ierr = NF90_GET_VAR(nid,var3didin(5),swup) 2625 if(ierr/= NF_NOERR) then2626 write(*,*) NF_STRERROR(ierr)2625 if(ierr/=nf90_noerr) then 2626 write(*,*) nf90_strerror(ierr) 2627 2627 stop "getvarup" 2628 2628 endif … … 2630 2630 2631 2631 ierr = NF90_GET_VAR(nid,var3didin(6),tg) 2632 if(ierr/= NF_NOERR) then2633 write(*,*) NF_STRERROR(ierr)2632 if(ierr/=nf90_noerr) then 2633 write(*,*) nf90_strerror(ierr) 2634 2634 stop "getvarup" 2635 2635 endif … … 2637 2637 2638 2638 ierr = NF90_GET_VAR(nid,var3didin(7),ustar) 2639 if(ierr/= NF_NOERR) then2640 write(*,*) NF_STRERROR(ierr)2639 if(ierr/=nf90_noerr) then 2640 write(*,*) nf90_strerror(ierr) 2641 2641 stop "getvarup" 2642 2642 endif … … 2644 2644 2645 2645 ierr = NF90_GET_VAR(nid,var3didin(8),psurf) 2646 if(ierr/= NF_NOERR) then2647 write(*,*) NF_STRERROR(ierr)2646 if(ierr/=nf90_noerr) then 2647 write(*,*) nf90_strerror(ierr) 2648 2648 stop "getvarup" 2649 2649 endif … … 2651 2651 2652 2652 ierr = NF90_GET_VAR(nid,var3didin(9),ug) 2653 if(ierr/= NF_NOERR) then2654 write(*,*) NF_STRERROR(ierr)2653 if(ierr/=nf90_noerr) then 2654 write(*,*) nf90_strerror(ierr) 2655 2655 stop "getvarup" 2656 2656 endif … … 2658 2658 2659 2659 ierr = NF90_GET_VAR(nid,var3didin(10),vg) 2660 if(ierr/= NF_NOERR) then2661 write(*,*) NF_STRERROR(ierr)2660 if(ierr/=nf90_noerr) then 2661 write(*,*) nf90_strerror(ierr) 2662 2662 stop "getvarup" 2663 2663 endif … … 2665 2665 2666 2666 ierr = NF90_GET_VAR(nid,var3didin(17),hadvt) 2667 if(ierr/= NF_NOERR) then2668 write(*,*) NF_STRERROR(ierr)2667 if(ierr/=nf90_noerr) then 2668 write(*,*) nf90_strerror(ierr) 2669 2669 stop "getvarup" 2670 2670 endif … … 2672 2672 2673 2673 ierr = NF90_GET_VAR(nid,var3didin(18),hadvq) 2674 if(ierr/= NF_NOERR) then2675 write(*,*) NF_STRERROR(ierr)2674 if(ierr/=nf90_noerr) then 2675 write(*,*) nf90_strerror(ierr) 2676 2676 stop "getvarup" 2677 2677 endif … … 2679 2679 2680 2680 ierr = NF90_GET_VAR(nid,var3didin(19),hadvu) 2681 if(ierr/= NF_NOERR) then2682 write(*,*) NF_STRERROR(ierr)2681 if(ierr/=nf90_noerr) then 2682 write(*,*) nf90_strerror(ierr) 2683 2683 stop "getvarup" 2684 2684 endif … … 2686 2686 2687 2687 ierr = NF90_GET_VAR(nid,var3didin(20),hadvv) 2688 if(ierr/= NF_NOERR) then2689 write(*,*) NF_STRERROR(ierr)2688 if(ierr/=nf90_noerr) then 2689 write(*,*) nf90_strerror(ierr) 2690 2690 stop "getvarup" 2691 2691 endif … … 2693 2693 2694 2694 ierr = NF90_GET_VAR(nid,var3didin(21),w) 2695 if(ierr/= NF_NOERR) then2696 write(*,*) NF_STRERROR(ierr)2695 if(ierr/=nf90_noerr) then 2696 write(*,*) nf90_strerror(ierr) 2697 2697 stop "getvarup" 2698 2698 endif … … 2700 2700 2701 2701 ierr = NF90_GET_VAR(nid,var3didin(22),omega) 2702 if(ierr/= NF_NOERR) then2703 write(*,*) NF_STRERROR(ierr)2702 if(ierr/=nf90_noerr) then 2703 write(*,*) nf90_strerror(ierr) 2704 2704 stop "getvarup" 2705 2705 endif … … 2714 2714 !program reading initial profils and forcings of the Gabls4 case study 2715 2715 2716 use lmdz_netcdf, ONLY: nf_open,nf_nowrite,nf_noerr,nf_strerror,nf_inq_varid,nf90_get_var,&2717 nf _inq_dimid,nf_inq_dimlen2716 use netcdf, ONLY: nf90_open,nf90_nowrite,nf90_noerr,nf90_strerror,nf90_inq_varid,nf90_get_var,& 2717 nf90_inq_dimid,nf90_inquire_dimension 2718 2718 2719 2719 implicit none … … 2743 2743 integer var3didin(nbvar3d) 2744 2744 2745 ierr = NF_OPEN(fich_gabls4,NF_NOWRITE,nid)2746 if (ierr.NE. NF_NOERR) then2745 ierr = nf90_open(fich_gabls4,nf90_nowrite,nid) 2746 if (ierr.NE.nf90_noerr) then 2747 2747 write(*,*) 'ERROR: Pb opening forcings nc file ' 2748 write(*,*) NF_STRERROR(ierr)2748 write(*,*) nf90_strerror(ierr) 2749 2749 stop "" 2750 2750 endif 2751 2751 2752 2752 2753 ierr= NF_INQ_VARID(nid,"height",var3didin(1))2754 if(ierr/= NF_NOERR) then2755 write(*,*) NF_STRERROR(ierr)2753 ierr=nf90_inq_varid(nid,"height",var3didin(1)) 2754 if(ierr/=nf90_noerr) then 2755 write(*,*) nf90_strerror(ierr) 2756 2756 stop 'height' 2757 2757 endif 2758 2758 2759 ierr= NF_INQ_VARID(nid,"depth_sn",var3didin(2))2760 if(ierr/= NF_NOERR) then2761 write(*,*) NF_STRERROR(ierr)2759 ierr=nf90_inq_varid(nid,"depth_sn",var3didin(2)) 2760 if(ierr/=nf90_noerr) then 2761 write(*,*) nf90_strerror(ierr) 2762 2762 stop 'depth_sn' 2763 2763 endif 2764 2764 2765 ierr= NF_INQ_VARID(nid,"Ug",var3didin(3))2766 if(ierr/= NF_NOERR) then2767 write(*,*) NF_STRERROR(ierr)2765 ierr=nf90_inq_varid(nid,"Ug",var3didin(3)) 2766 if(ierr/=nf90_noerr) then 2767 write(*,*) nf90_strerror(ierr) 2768 2768 stop 'Ug' 2769 2769 endif 2770 2770 2771 ierr= NF_INQ_VARID(nid,"Vg",var3didin(4))2772 if(ierr/= NF_NOERR) then2773 write(*,*) NF_STRERROR(ierr)2771 ierr=nf90_inq_varid(nid,"Vg",var3didin(4)) 2772 if(ierr/=nf90_noerr) then 2773 write(*,*) nf90_strerror(ierr) 2774 2774 stop 'Vg' 2775 2775 endif 2776 ierr= NF_INQ_VARID(nid,"pf",var3didin(5))2777 if(ierr/= NF_NOERR) then2778 write(*,*) NF_STRERROR(ierr)2776 ierr=nf90_inq_varid(nid,"pf",var3didin(5)) 2777 if(ierr/=nf90_noerr) then 2778 write(*,*) nf90_strerror(ierr) 2779 2779 stop 'pf' 2780 2780 endif 2781 2781 2782 ierr= NF_INQ_VARID(nid,"theta",var3didin(6))2783 if(ierr/= NF_NOERR) then2784 write(*,*) NF_STRERROR(ierr)2782 ierr=nf90_inq_varid(nid,"theta",var3didin(6)) 2783 if(ierr/=nf90_noerr) then 2784 write(*,*) nf90_strerror(ierr) 2785 2785 stop 'theta' 2786 2786 endif 2787 2787 2788 ierr= NF_INQ_VARID(nid,"tempe",var3didin(7))2789 if(ierr/= NF_NOERR) then2790 write(*,*) NF_STRERROR(ierr)2788 ierr=nf90_inq_varid(nid,"tempe",var3didin(7)) 2789 if(ierr/=nf90_noerr) then 2790 write(*,*) nf90_strerror(ierr) 2791 2791 stop 'tempe' 2792 2792 endif 2793 2793 2794 ierr= NF_INQ_VARID(nid,"qv",var3didin(8))2795 if(ierr/= NF_NOERR) then2796 write(*,*) NF_STRERROR(ierr)2794 ierr=nf90_inq_varid(nid,"qv",var3didin(8)) 2795 if(ierr/=nf90_noerr) then 2796 write(*,*) nf90_strerror(ierr) 2797 2797 stop 'qv' 2798 2798 endif 2799 2799 2800 ierr= NF_INQ_VARID(nid,"u",var3didin(9))2801 if(ierr/= NF_NOERR) then2802 write(*,*) NF_STRERROR(ierr)2800 ierr=nf90_inq_varid(nid,"u",var3didin(9)) 2801 if(ierr/=nf90_noerr) then 2802 write(*,*) nf90_strerror(ierr) 2803 2803 stop 'u' 2804 2804 endif 2805 2805 2806 ierr= NF_INQ_VARID(nid,"v",var3didin(10))2807 if(ierr/= NF_NOERR) then2808 write(*,*) NF_STRERROR(ierr)2806 ierr=nf90_inq_varid(nid,"v",var3didin(10)) 2807 if(ierr/=nf90_noerr) then 2808 write(*,*) nf90_strerror(ierr) 2809 2809 stop 'v' 2810 2810 endif 2811 2811 2812 ierr= NF_INQ_VARID(nid,"hadvT",var3didin(11))2813 if(ierr/= NF_NOERR) then2814 write(*,*) NF_STRERROR(ierr)2812 ierr=nf90_inq_varid(nid,"hadvT",var3didin(11)) 2813 if(ierr/=nf90_noerr) then 2814 write(*,*) nf90_strerror(ierr) 2815 2815 stop 'hadvt' 2816 2816 endif 2817 2817 2818 ierr= NF_INQ_VARID(nid,"hadvQ",var3didin(12))2819 if(ierr/= NF_NOERR) then2820 write(*,*) NF_STRERROR(ierr)2818 ierr=nf90_inq_varid(nid,"hadvQ",var3didin(12)) 2819 if(ierr/=nf90_noerr) then 2820 write(*,*) nf90_strerror(ierr) 2821 2821 stop 'hadvq' 2822 2822 endif 2823 2823 2824 ierr= NF_INQ_VARID(nid,"Tsnow",var3didin(14))2825 if(ierr/= NF_NOERR) then2826 write(*,*) NF_STRERROR(ierr)2824 ierr=nf90_inq_varid(nid,"Tsnow",var3didin(14)) 2825 if(ierr/=nf90_noerr) then 2826 write(*,*) nf90_strerror(ierr) 2827 2827 stop 'tsnow' 2828 2828 endif 2829 2829 2830 ierr= NF_INQ_VARID(nid,"snow_density",var3didin(15))2831 if(ierr/= NF_NOERR) then2832 write(*,*) NF_STRERROR(ierr)2830 ierr=nf90_inq_varid(nid,"snow_density",var3didin(15)) 2831 if(ierr/=nf90_noerr) then 2832 write(*,*) nf90_strerror(ierr) 2833 2833 stop 'snow_density' 2834 2834 endif 2835 2835 2836 ierr= NF_INQ_VARID(nid,"Tg",var3didin(16))2837 if(ierr/= NF_NOERR) then2838 write(*,*) NF_STRERROR(ierr)2836 ierr=nf90_inq_varid(nid,"Tg",var3didin(16)) 2837 if(ierr/=nf90_noerr) then 2838 write(*,*) nf90_strerror(ierr) 2839 2839 stop 'Tg' 2840 2840 endif … … 2845 2845 2846 2846 ierr = NF90_GET_VAR(nid,var3didin(1),zz_i) 2847 if(ierr/= NF_NOERR) then2848 write(*,*) NF_STRERROR(ierr)2847 if(ierr/=nf90_noerr) then 2848 write(*,*) nf90_strerror(ierr) 2849 2849 stop "getvarup" 2850 2850 endif 2851 2851 2852 2852 ierr = NF90_GET_VAR(nid,var3didin(2),depth_sn) 2853 if(ierr/= NF_NOERR) then2854 write(*,*) NF_STRERROR(ierr)2853 if(ierr/=nf90_noerr) then 2854 write(*,*) nf90_strerror(ierr) 2855 2855 stop "getvarup" 2856 2856 endif 2857 2857 2858 2858 ierr = NF90_GET_VAR(nid,var3didin(3),ug_i) 2859 if(ierr/= NF_NOERR) then2860 write(*,*) NF_STRERROR(ierr)2859 if(ierr/=nf90_noerr) then 2860 write(*,*) nf90_strerror(ierr) 2861 2861 stop "getvarup" 2862 2862 endif 2863 2863 2864 2864 ierr = NF90_GET_VAR(nid,var3didin(4),vg_i) 2865 if(ierr/= NF_NOERR) then2866 write(*,*) NF_STRERROR(ierr)2865 if(ierr/=nf90_noerr) then 2866 write(*,*) nf90_strerror(ierr) 2867 2867 stop "getvarup" 2868 2868 endif 2869 2869 2870 2870 ierr = NF90_GET_VAR(nid,var3didin(5),pf_i) 2871 if(ierr/= NF_NOERR) then2872 write(*,*) NF_STRERROR(ierr)2871 if(ierr/=nf90_noerr) then 2872 write(*,*) nf90_strerror(ierr) 2873 2873 stop "getvarup" 2874 2874 endif 2875 2875 2876 2876 ierr = NF90_GET_VAR(nid,var3didin(6),th_i) 2877 if(ierr/= NF_NOERR) then2878 write(*,*) NF_STRERROR(ierr)2877 if(ierr/=nf90_noerr) then 2878 write(*,*) nf90_strerror(ierr) 2879 2879 stop "getvarup" 2880 2880 endif 2881 2881 2882 2882 ierr = NF90_GET_VAR(nid,var3didin(7),t_i) 2883 if(ierr/= NF_NOERR) then2884 write(*,*) NF_STRERROR(ierr)2883 if(ierr/=nf90_noerr) then 2884 write(*,*) nf90_strerror(ierr) 2885 2885 stop "getvarup" 2886 2886 endif 2887 2887 2888 2888 ierr = NF90_GET_VAR(nid,var3didin(8),qv_i) 2889 if(ierr/= NF_NOERR) then2890 write(*,*) NF_STRERROR(ierr)2889 if(ierr/=nf90_noerr) then 2890 write(*,*) nf90_strerror(ierr) 2891 2891 stop "getvarup" 2892 2892 endif 2893 2893 2894 2894 ierr = NF90_GET_VAR(nid,var3didin(9),u_i) 2895 if(ierr/= NF_NOERR) then2896 write(*,*) NF_STRERROR(ierr)2895 if(ierr/=nf90_noerr) then 2896 write(*,*) nf90_strerror(ierr) 2897 2897 stop "getvarup" 2898 2898 endif 2899 2899 2900 2900 ierr = NF90_GET_VAR(nid,var3didin(10),v_i) 2901 if(ierr/= NF_NOERR) then2902 write(*,*) NF_STRERROR(ierr)2901 if(ierr/=nf90_noerr) then 2902 write(*,*) nf90_strerror(ierr) 2903 2903 stop "getvarup" 2904 2904 endif 2905 2905 2906 2906 ierr = NF90_GET_VAR(nid,var3didin(11),hadvt_i) 2907 if(ierr/= NF_NOERR) then2908 write(*,*) NF_STRERROR(ierr)2907 if(ierr/=nf90_noerr) then 2908 write(*,*) nf90_strerror(ierr) 2909 2909 stop "getvarup" 2910 2910 endif 2911 2911 2912 2912 ierr = NF90_GET_VAR(nid,var3didin(12),hadvq_i) 2913 if(ierr/= NF_NOERR) then2914 write(*,*) NF_STRERROR(ierr)2913 if(ierr/=nf90_noerr) then 2914 write(*,*) nf90_strerror(ierr) 2915 2915 stop "getvarup" 2916 2916 endif 2917 2917 2918 2918 ierr = NF90_GET_VAR(nid,var3didin(14),tsnow) 2919 if(ierr/= NF_NOERR) then2920 write(*,*) NF_STRERROR(ierr)2919 if(ierr/=nf90_noerr) then 2920 write(*,*) nf90_strerror(ierr) 2921 2921 stop "getvarup" 2922 2922 endif 2923 2923 2924 2924 ierr = NF90_GET_VAR(nid,var3didin(15),snow_dens) 2925 if(ierr/= NF_NOERR) then2926 write(*,*) NF_STRERROR(ierr)2925 if(ierr/=nf90_noerr) then 2926 write(*,*) nf90_strerror(ierr) 2927 2927 stop "getvarup" 2928 2928 endif 2929 2929 2930 2930 ierr = NF90_GET_VAR(nid,var3didin(16),tg) 2931 if(ierr/= NF_NOERR) then2932 write(*,*) NF_STRERROR(ierr)2931 if(ierr/=nf90_noerr) then 2932 write(*,*) nf90_strerror(ierr) 2933 2933 stop "getvarup" 2934 2934 endif
Note: See TracChangeset
for help on using the changeset viewer.