Changeset 2574 for trunk/LMDZ.GENERIC/libf/phystd/writediagfi.F
- Timestamp:
- Oct 25, 2021, 5:28:46 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/writediagfi.F
r1828 r2574 45 45 & is_master, gather 46 46 USE mod_grid_phy_lmdz, only : klon_glo, Grid1Dto2D_glo, 47 & nbp_lon, nbp_lat, nbp_lev 47 & nbp_lon, nbp_lat, nbp_lev, 48 & grid_type, unstructured 48 49 implicit none 49 50 … … 99 100 !$OMP THREADPRIVATE(firstcall) !diagfi_def,n_nom_def,nom_def read in diagfi.def 100 101 101 #ifndef MESOSCALE102 103 102 #ifdef CPP_PARA 104 103 ! Added to work in parallel mode … … 117 116 #endif 118 117 118 if (grid_type==unstructured) then 119 return 120 endif 121 119 122 !*************************************************************** 120 123 !Sortie des variables au rythme voulu … … 146 149 if (n.ge.n_nom_def_max) then 147 150 write(*,*)"n_nom_def_max too small in writediagfi.F:",n 148 stop 151 call abort_physic("writediagfi", 152 & "n_nom_def_max too small",1) 149 153 end if 150 154 n_nom_def=n-1 … … 179 183 write(*,*) " firstnom string not long enough!!" 180 184 write(*,*) " increase its size to at least ",len_trim(nom) 181 stop185 call abort_physic("writediagfi","firstnom too short",1) 182 186 endif 183 187 … … 283 287 ntime=ntime+1 ! increment # of stored time steps 284 288 ! compute corresponding date (in days and fractions thereof) 285 date= float (zitau +1)/float (day_step)289 date=(zitau +1.)/day_step 286 290 ! Get NetCDF ID of 'Time' variable 287 291 ierr= NF_INQ_VARID(nid,"Time",varid) … … 295 299 write(*,*) "***** PUT_VAR matter in writediagfi_nc" 296 300 write(*,*) "***** with time" 297 write(*,*) 'ierr=', ierr 301 write(*,*) 'ierr=', ierr,": ",NF_STRERROR(ierr) 298 302 c call abort 299 303 endif … … 357 361 358 362 write (*,*) "==========================" 359 write (*,*) "DIAGFI: creating variable ", nom363 write (*,*) "DIAGFI: creating variable ",trim(nom) 360 364 call def_var(nid,nom,titre,unite,4,id,varid,ierr) 361 365 366 else 367 if (ntime==0) then 368 write(*,*) "DIAGFI Error: failed creating variable ", 369 & trim(nom) 370 write(*,*) "it seems it already exists!" 371 call abort_physic("writediagfi", 372 & trim(nom)//" already exists",1) 373 endif 362 374 endif 363 375 … … 391 403 if (ierr.ne.NF_NOERR) then 392 404 write(*,*) "***** PUT_VAR problem in writediagfi" 393 write(*,*) "***** with dx3: ", nom405 write(*,*) "***** with dx3: ",trim(nom) 394 406 write(*,*) 'ierr=', ierr,": ",NF_STRERROR(ierr) 395 stop 407 call abort_physic("writediagfi", 408 & "failed writing "//trim(nom),1) 396 409 endif 397 410 … … 451 464 452 465 write (*,*) "==========================" 453 write (*,*) "DIAGFI: creating variable ", nom466 write (*,*) "DIAGFI: creating variable ",trim(nom) 454 467 455 468 call def_var(nid,nom,titre,unite,3,id,varid,ierr) 456 469 470 else 471 if (ntime==0) then 472 write(*,*) "DIAGFI Error: failed creating variable ", 473 & trim(nom) 474 write(*,*) "it seems it already exists!" 475 call abort_physic("writediagfi", 476 & trim(nom)//" already exists",1) 477 endif 457 478 endif 458 479 … … 481 502 if (ierr.ne.NF_NOERR) then 482 503 write(*,*) "***** PUT_VAR matter in writediagfi" 483 write(*,*) "***** with dx2: ", nom504 write(*,*) "***** with dx2: ",trim(nom) 484 505 write(*,*) 'ierr=', ierr,": ",NF_STRERROR(ierr) 485 stop 506 call abort_physic("writediagfi", 507 & "failed writing "//trim(nom),1) 486 508 endif 487 509 … … 494 516 if (is_parallel) then 495 517 write(*,*) "writediagfi error: dim=1 not implemented ", 496 & "in parallel mode" 497 stop 518 & "in parallel mode. Problem for ",trim(nom) 519 call abort_physic("writediagfi", 520 & "failed writing "//trim(nom),1) 498 521 endif 499 522 ! Passage variable physique --> physique dynamique … … 512 535 513 536 write (*,*) "==========================" 514 write (*,*) "DIAGFI: creating variable ", nom537 write (*,*) "DIAGFI: creating variable ",trim(nom) 515 538 516 539 call def_var(nid,nom,titre,unite,2,id,varid,ierr) 517 540 541 else 542 if (ntime==0) then 543 write(*,*) "DIAGFI Error: failed creating variable ", 544 & trim(nom) 545 write(*,*) "it seems it already exists!" 546 call abort_physic("writediagfi", 547 & trim(nom)//" already exists",1) 548 endif 518 549 endif 519 550 … … 531 562 if (ierr.ne.NF_NOERR) then 532 563 write(*,*) "***** PUT_VAR problem in writediagfi" 533 write(*,*) "***** with dx1: ", nom564 write(*,*) "***** with dx1: ",trim(nom) 534 565 write(*,*) 'ierr=', ierr,": ",NF_STRERROR(ierr) 535 stop 566 call abort_physic("writediagfi", 567 & "failed writing "//trim(nom),1) 536 568 endif 537 569 … … 553 585 554 586 write (*,*) "==========================" 555 write (*,*) "DIAGFI: creating variable ", nom587 write (*,*) "DIAGFI: creating variable ",trim(nom) 556 588 557 589 call def_var(nid,nom,titre,unite,1,id,varid,ierr) 558 590 591 else 592 if (ntime==0) then 593 write(*,*) "DIAGFI Error: failed creating variable ", 594 & trim(nom) 595 write(*,*) "it seems it already exists!" 596 call abort_physic("writediagfi", 597 & trim(nom)//" already exists",1) 598 endif 559 599 endif 560 600 … … 569 609 if (ierr.ne.NF_NOERR) then 570 610 write(*,*) "***** PUT_VAR matter in writediagfi" 571 write(*,*) "***** with dx0: ", nom611 write(*,*) "***** with dx0: ",trim(nom) 572 612 write(*,*) 'ierr=', ierr,": ",NF_STRERROR(ierr) 573 stop 613 call abort_physic("writediagfi", 614 & "failed writing "//trim(nom),1) 574 615 endif 575 616 … … 584 625 endif 585 626 586 #endif587 ! of #ifndef MESOSCALE588 627 end
Note: See TracChangeset
for help on using the changeset viewer.