Changeset 3311 for trunk/LMDZ.GENERIC
- Timestamp:
- Apr 22, 2024, 4:42:50 PM (7 months ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/changelog.txt
r3309 r3311 1907 1907 (see routine "read_volcano" in volcano.F90) 1908 1908 1909 == 2 0/11/2023== YJ1909 == 22/04/2024 == YJ 1910 1910 - Cosmetic + clarifying some variables and comments in chemistry 1911 1911 - add controle variable for actinique UV flux in photochemistry 1912 1912 and output surface UV flux in diagspecUV.nc 1913 1914 == 22/04/2024 == YJ 1915 Split open_startphy to create_restartphy and only open_startphy 1916 will before open_startphy was doing both by create_restartphy 1917 at firstcall -
trunk/LMDZ.GENERIC/libf/phystd/iostart.F90
r3100 r3311 40 40 PUBLIC inquire_dimension, inquire_dimension_length 41 41 PUBLIC inquire_field, inquire_field_ndims 42 PUBLIC open_startphy,close_startphy, open_restartphy,close_restartphy42 PUBLIC open_startphy,close_startphy,create_restartphy,open_restartphy,close_restartphy 43 43 44 44 CONTAINS … … 458 458 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 459 459 460 SUBROUTINE open_restartphy(filename)460 SUBROUTINE create_restartphy(filename) 461 461 USE netcdf, only: NF90_CREATE, NF90_CLOBBER, NF90_64BIT_OFFSET, & 462 462 NF90_NOERR, nf90_strerror, & 463 463 NF90_PUT_ATT, NF90_GLOBAL, NF90_DEF_DIM, & 464 NF90_UNLIMITED, NF90_ENDDEF, & 465 NF90_WRITE, NF90_OPEN 464 NF90_UNLIMITED, NF90_ENDDEF 466 465 USE mod_phys_lmdz_para, only: is_master 467 466 USE mod_grid_phy_lmdz, only: klon_glo … … 475 474 CHARACTER(LEN=*),INTENT(IN) :: filename 476 475 INTEGER :: ierr 477 LOGICAL,SAVE :: already_created=.false. 478 !$OMP THREADPRIVATE(already_created) 479 480 IF (is_master) THEN 481 if (.not.already_created) then 482 ! At the very first call, create the file 476 477 IF (is_master) THEN 478 483 479 ierr=NF90_CREATE(filename,IOR(NF90_CLOBBER,NF90_64BIT_OFFSET), & 484 480 nid_restart) … … 488 484 CALL ABORT 489 485 ENDIF 490 already_created=.true.491 else492 ! Just open the file493 ierr=NF90_OPEN(filename,NF90_WRITE,nid_restart)494 IF (ierr/=NF90_NOERR) THEN495 write(*,*)'open_restartphy: problem opening file '//trim(filename)496 write(*,*)trim(nf90_strerror(ierr))497 CALL ABORT498 ENDIF499 return500 endif ! of if (.not.already_created)501 486 502 487 ierr=NF90_PUT_ATT(nid_restart,NF90_GLOBAL,"title",& … … 573 558 CALL ABORT 574 559 ENDIF 560 ENDIF 561 562 END SUBROUTINE create_restartphy 563 564 SUBROUTINE open_restartphy(filename) 565 USE netcdf, only: NF90_OPEN, NF90_NOERR, NF90_WRITE, nf90_strerror 566 USE mod_phys_lmdz_para, only: is_master 567 568 IMPLICIT NONE 569 CHARACTER(LEN=*),INTENT(IN) :: filename 570 INTEGER :: ierr 571 572 IF (is_master) THEN 573 ierr=NF90_OPEN(filename,NF90_WRITE,nid_restart) 574 IF (ierr/=NF90_NOERR) THEN 575 write(*,*)'open_restartphy: problem opening file '//trim(filename) 576 write(*,*)trim(nf90_strerror(ierr)) 577 CALL ABORT 578 ENDIF 575 579 ENDIF 576 580 -
trunk/LMDZ.GENERIC/libf/phystd/phyredem.F90
r3100 r3311 14 14 emisice, emissiv, & 15 15 iceradius, dtemisice, phisfi 16 use iostart, only : open_restartphy, close_restartphy, &16 use iostart, only : create_restartphy, close_restartphy, & 17 17 put_var, put_field, length 18 18 use mod_grid_phy_lmdz, only : klon_glo … … 46 46 47 47 ! Create physics start file 48 call open_restartphy(filename)48 call create_restartphy(filename) 49 49 50 50 ! tab_cntrl() contains run parameters
Note: See TracChangeset
for help on using the changeset viewer.