Changeset 1896 for trunk/LMDZ.TITAN/libf
- Timestamp:
- Jan 17, 2018, 4:20:00 PM (7 years ago)
- Location:
- trunk/LMDZ.TITAN/libf
- Files:
-
- 11 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/dynphy_lonlat/inigeomphy_mod.F90
-
Property
svn:mergeinfo
set to
/trunk/LMDZ.GENERIC/libf/dynphy_lonlat/inigeomphy_mod.F90 merged eligible
r1621 r1896 73 73 REAL,ALLOCATABLE,SAVE :: boundslonfi(:,:) 74 74 REAL,ALLOCATABLE,SAVE :: boundslatfi(:,:) 75 !$OMP THREADPRIVATE (latfi,lonfi,cufi,cvfi,airefi,boundslonfi,boundslatfi) 75 INTEGER,ALLOCATABLE,SAVE :: ind_cell_glo_fi(:) 76 !$OMP THREADPRIVATE (latfi,lonfi,cufi,cvfi,airefi,boundslonfi,boundslatfi,ind_cell_glo_fi) 76 77 77 78 ! Initialize Physics distibution and parameters and interface with dynamics … … 201 202 ALLOCATE(boundslonfi(klon_omp,4)) 202 203 ALLOCATE(boundslatfi(klon_omp,4)) 203 ! CALL initcomgeomphy 204 ALLOCATE(ind_cell_glo_fi(klon_omp)) 205 204 206 205 207 offset = klon_mpi_begin - 1 … … 211 213 boundslonfi(1:klon_omp,:) = boundslonfi_glo(offset+klon_omp_begin:offset+klon_omp_end,:) 212 214 boundslatfi(1:klon_omp,:) = boundslatfi_glo(offset+klon_omp_begin:offset+klon_omp_end,:) 215 ind_cell_glo_fi(1:klon_omp)=(/ (i,i=offset+klon_omp_begin,offset+klon_omp_end) /) 213 216 214 217 ! copy over local grid longitudes and latitudes 215 218 CALL init_geometry(klon_omp,lonfi,latfi,boundslonfi,boundslatfi, & 216 airefi, cufi,cvfi)219 airefi,ind_cell_glo_fi,cufi,cvfi) 217 220 218 221 ! copy over preff , ap(), bp(), etc -
Property
svn:mergeinfo
set to
-
trunk/LMDZ.TITAN/libf/dynphy_lonlat/mod_interface_dyn_phys.F90
-
Property
svn:mergeinfo
set to
/trunk/LMDZ.GENERIC/libf/dynphy_lonlat/mod_interface_dyn_phys.F90 merged eligible
r1543 r1896 22 22 23 23 k=1 24 IF (is_north_pole ) THEN24 IF (is_north_pole_dyn) THEN 25 25 index_i(k)=1 26 26 index_j(k)=1 … … 42 42 ENDDO 43 43 44 IF (is_south_pole ) THEN44 IF (is_south_pole_dyn) THEN 45 45 index_i(k)=1 46 46 index_j(k)=jj_end -
Property
svn:mergeinfo
set to
-
trunk/LMDZ.TITAN/libf/phy_common
-
Property
svn:mergeinfo
set to
/trunk/LMDZ.GENERIC/libf/phy_common merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/LMDZ.TITAN/libf/phy_common/geometry_mod.F90
r1543 r1896 30 30 !$OMP THREADPRIVATE(cell_area) 31 31 32 INTEGER,SAVE,ALLOCATABLE :: ind_cell_glo(:) ! global index of a local cell 33 !$OMP THREADPRIVATE(ind_cell_glo) 32 34 33 35 CONTAINS … … 35 37 SUBROUTINE init_geometry(klon,longitude_,latitude_, & 36 38 boundslon_,boundslat_, & 37 cell_area_, dx_,dy_)39 cell_area_,ind_cell_glo_,dx_,dy_) 38 40 USE mod_grid_phy_lmdz, ONLY: nvertex 39 41 USE nrtype, ONLY : PI … … 45 47 REAL,INTENT(IN) :: boundslat_(klon,nvertex) 46 48 REAL,INTENT(IN) :: cell_area_(klon) 49 INTEGER,OPTIONAL,INTENT(IN) :: ind_cell_glo_(klon) 47 50 REAL,OPTIONAL,INTENT(IN) :: dx_(klon) 48 51 REAL,OPTIONAL,INTENT(IN) :: dy_(klon) … … 55 58 ALLOCATE(boundslat(klon,nvertex)) 56 59 ALLOCATE(cell_area(klon)) 60 IF (PRESENT(ind_cell_glo_)) ALLOCATE(ind_cell_glo(klon)) 57 61 IF (PRESENT(dx_)) ALLOCATE(dx(klon)) 58 62 IF (PRESENT(dy_))ALLOCATE(dy(klon)) … … 65 69 boundslat(:,:) = boundslat_(:,:) 66 70 cell_area(:) = cell_area_(:) 71 IF (PRESENT(ind_cell_glo_)) ind_cell_glo(:) = ind_cell_glo_(:) 67 72 IF (PRESENT(dx_)) dx(:) = dx_(:) 68 73 IF (PRESENT(dy_)) dy(:) = dy_(:) -
trunk/LMDZ.TITAN/libf/phy_common/mod_phys_lmdz_mpi_data.F90
r1543 r1896 1 1 ! 2 !$ Header$2 !$Id$ 3 3 ! 4 4 MODULE mod_phys_lmdz_mpi_data 5 ! USE mod_const_mpi6 5 7 6 INTEGER,SAVE :: ii_begin … … 36 35 INTEGER,SAVE :: mpi_size 37 36 INTEGER,SAVE :: mpi_master 38 ! INTEGER,SAVE :: mpi_root39 37 LOGICAL,SAVE :: is_mpi_root 40 38 LOGICAL,SAVE :: is_using_mpi 41 39 42 40 43 LOGICAL,SAVE :: is_north_pole 44 LOGICAL,SAVE :: is_south_pole 41 LOGICAL,SAVE :: is_north_pole_dyn 42 LOGICAL,SAVE :: is_south_pole_dyn 45 43 INTEGER,SAVE :: COMM_LMDZ_PHY 46 44 INTEGER,SAVE :: MPI_REAL_LMDZ ! MPI_REAL8 … … 48 46 CONTAINS 49 47 50 ! SUBROUTINE Init_phys_lmdz_mpi_data(iim,jjp1,nb_proc,distrib)51 48 SUBROUTINE init_phys_lmdz_mpi_data(nbp, nbp_lon, nbp_lat, communicator) 52 ! USE mod_const_mpi, ONLY : COMM_LMDZ53 49 IMPLICIT NONE 54 50 #ifdef CPP_MPI 55 51 INCLUDE 'mpif.h' 56 52 #endif 57 INTEGER,INTENT( in) :: nbp58 INTEGER,INTENT( in) :: nbp_lon59 INTEGER,INTENT( in) :: nbp_lat60 INTEGER,INTENT( in) :: communicator53 INTEGER,INTENT(IN) :: nbp 54 INTEGER,INTENT(IN) :: nbp_lon 55 INTEGER,INTENT(IN) :: nbp_lat 56 INTEGER,INTENT(IN) :: communicator 61 57 62 58 INTEGER,ALLOCATABLE :: distrib(:) … … 109 105 110 106 IF (mpi_rank == 0) THEN 111 is_north_pole = .TRUE.112 ELSE 113 is_north_pole = .FALSE.107 is_north_pole_dyn = .TRUE. 108 ELSE 109 is_north_pole_dyn = .FALSE. 114 110 ENDIF 115 111 116 112 IF (mpi_rank == mpi_size-1) THEN 117 is_south_pole = .TRUE.118 ELSE 119 is_south_pole = .FALSE.113 is_south_pole_dyn = .TRUE. 114 ELSE 115 is_south_pole_dyn = .FALSE. 120 116 ENDIF 121 117 … … 187 183 188 184 SUBROUTINE print_module_data 189 !USE print_control_mod, ONLY: lunout185 USE print_control_mod, ONLY: lunout 190 186 IMPLICIT NONE 191 INCLUDE "iniprint.h"192 187 193 188 WRITE(lunout,*) 'ii_begin =', ii_begin … … 217 212 WRITE(lunout,*) 'mpi_master =', mpi_master 218 213 WRITE(lunout,*) 'is_mpi_root =', is_mpi_root 219 WRITE(lunout,*) 'is_north_pole =', is_north_pole220 WRITE(lunout,*) 'is_south_pole =', is_south_pole214 WRITE(lunout,*) 'is_north_pole_dyn =', is_north_pole_dyn 215 WRITE(lunout,*) 'is_south_pole_dyn =', is_south_pole_dyn 221 216 WRITE(lunout,*) 'COMM_LMDZ_PHY =', COMM_LMDZ_PHY 222 217 -
trunk/LMDZ.TITAN/libf/phy_common/mod_phys_lmdz_mpi_transfert.F90
r1543 r1896 1 1 ! 2 !$ Header$2 !$Id$ 3 3 ! 4 4 MODULE mod_phys_lmdz_mpi_transfert … … 1693 1693 1694 1694 offset=ii_begin 1695 IF (is_north_pole ) Offset=nbp_lon1695 IF (is_north_pole_dyn) Offset=nbp_lon 1696 1696 1697 1697 … … 1703 1703 1704 1704 1705 IF (is_north_pole ) THEN1705 IF (is_north_pole_dyn) THEN 1706 1706 DO i=1,dimsize 1707 1707 DO ij=1,nbp_lon … … 1711 1711 ENDIF 1712 1712 1713 IF (is_south_pole ) THEN1713 IF (is_south_pole_dyn) THEN 1714 1714 DO i=1,dimsize 1715 1715 DO ij=nbp_lon*(jj_nb-1)+1,nbp_lon*jj_nb … … 1737 1737 1738 1738 offset=ii_begin 1739 IF (is_north_pole ) Offset=nbp_lon1739 IF (is_north_pole_dyn) Offset=nbp_lon 1740 1740 1741 1741 … … 1747 1747 1748 1748 1749 IF (is_north_pole ) THEN1749 IF (is_north_pole_dyn) THEN 1750 1750 DO i=1,dimsize 1751 1751 DO ij=1,nbp_lon … … 1755 1755 ENDIF 1756 1756 1757 IF (is_south_pole ) THEN1757 IF (is_south_pole_dyn) THEN 1758 1758 DO i=1,dimsize 1759 1759 DO ij=nbp_lon*(jj_nb-1)+1,nbp_lon*jj_nb … … 1782 1782 1783 1783 offset=ii_begin 1784 IF (is_north_pole ) Offset=nbp_lon1784 IF (is_north_pole_dyn) Offset=nbp_lon 1785 1785 1786 1786 … … 1792 1792 1793 1793 1794 IF (is_north_pole ) THEN1794 IF (is_north_pole_dyn) THEN 1795 1795 DO i=1,dimsize 1796 1796 DO ij=1,nbp_lon … … 1800 1800 ENDIF 1801 1801 1802 IF (is_south_pole ) THEN1802 IF (is_south_pole_dyn) THEN 1803 1803 DO i=1,dimsize 1804 1804 DO ij=nbp_lon*(jj_nb-1)+1,nbp_lon*jj_nb … … 1824 1824 1825 1825 offset=ii_begin 1826 IF (is_north_pole ) offset=nbp_lon1826 IF (is_north_pole_dyn) offset=nbp_lon 1827 1827 1828 1828 DO i=1,dimsize … … 1832 1832 ENDDO 1833 1833 1834 IF (is_north_pole ) THEN1834 IF (is_north_pole_dyn) THEN 1835 1835 DO i=1,dimsize 1836 1836 VarOut(1,i)=VarIn(1,i) … … 1854 1854 1855 1855 offset=ii_begin 1856 IF (is_north_pole ) offset=nbp_lon1856 IF (is_north_pole_dyn) offset=nbp_lon 1857 1857 1858 1858 DO i=1,dimsize … … 1862 1862 ENDDO 1863 1863 1864 IF (is_north_pole ) THEN1864 IF (is_north_pole_dyn) THEN 1865 1865 DO i=1,dimsize 1866 1866 VarOut(1,i)=VarIn(1,i) … … 1883 1883 1884 1884 offset=ii_begin 1885 IF (is_north_pole ) offset=nbp_lon1885 IF (is_north_pole_dyn) offset=nbp_lon 1886 1886 1887 1887 DO i=1,dimsize … … 1891 1891 ENDDO 1892 1892 1893 IF (is_north_pole ) THEN1893 IF (is_north_pole_dyn) THEN 1894 1894 DO i=1,dimsize 1895 1895 VarOut(1,i)=VarIn(1,i) -
trunk/LMDZ.TITAN/libf/phy_common/mod_phys_lmdz_omp_data.F90
r1543 r1896 1 1 ! 2 !$Id: mod_phys_lmdz_omp_data.F90 2 326 2015-07-10 12:24:29Z emillour$2 !$Id: mod_phys_lmdz_omp_data.F90 2429 2016-01-27 12:43:09Z fairhead $ 3 3 ! 4 4 MODULE mod_phys_lmdz_omp_data … … 7 7 INTEGER,SAVE :: omp_rank 8 8 LOGICAL,SAVE :: is_omp_root 9 LOGICAL,SAVE :: is_omp_master ! alias of is_omp_root 9 10 LOGICAL,SAVE :: is_using_omp 11 LOGICAL,SAVE :: is_north_pole_phy, is_south_pole_phy 10 12 11 13 INTEGER,SAVE,DIMENSION(:),ALLOCATABLE :: klon_omp_para_nb … … 16 18 INTEGER,SAVE :: klon_omp_begin 17 19 INTEGER,SAVE :: klon_omp_end 18 !$OMP THREADPRIVATE(omp_rank,klon_omp,is_omp_root,klon_omp_begin,klon_omp_end) 20 !$OMP THREADPRIVATE(omp_rank,klon_omp,is_omp_root,is_omp_master,klon_omp_begin,klon_omp_end) 21 !$OMP THREADPRIVATE(is_north_pole_phy, is_south_pole_phy) 19 22 20 23 CONTAINS 21 24 22 25 SUBROUTINE Init_phys_lmdz_omp_data(klon_mpi) 23 USE dimphy 26 USE dimphy 27 USE mod_phys_lmdz_mpi_data, ONLY : is_north_pole_dyn, is_south_pole_dyn 24 28 IMPLICIT NONE 25 29 INTEGER, INTENT(in) :: klon_mpi … … 43 47 omp_size=OMP_GET_NUM_THREADS() 44 48 !$OMP END MASTER 49 !$OMP BARRIER 45 50 omp_rank=OMP_GET_THREAD_NUM() 46 51 #else … … 56 61 ELSE 57 62 abort_message = 'ANORMAL : OMP_MASTER /= 0' 58 CALL abort_ gcm(modname,abort_message,1)63 CALL abort_physic (modname,abort_message,1) 59 64 ENDIF 60 65 !$OMP END MASTER 61 66 is_omp_master=is_omp_root 62 67 63 68 !$OMP MASTER 69 64 70 ALLOCATE(klon_omp_para_nb(0:omp_size-1)) 65 71 ALLOCATE(klon_omp_para_begin(0:omp_size-1)) … … 80 86 !$OMP END MASTER 81 87 !$OMP BARRIER 88 89 if ((is_north_pole_dyn) .AND. (omp_rank == 0 )) then 90 is_north_pole_phy = .TRUE. 91 else 92 is_north_pole_phy = .FALSE. 93 endif 94 if ((is_south_pole_dyn) .AND. (omp_rank == omp_size-1)) then 95 is_south_pole_phy = .TRUE. 96 else 97 is_south_pole_phy = .FALSE. 98 endif 82 99 83 100 klon_omp=klon_omp_para_nb(omp_rank) … … 90 107 91 108 SUBROUTINE Print_module_data 109 USE print_control_mod, ONLY: lunout 92 110 IMPLICIT NONE 93 INCLUDE "iniprint.h"94 111 95 112 !$OMP CRITICAL -
trunk/LMDZ.TITAN/libf/phy_common/physics_distribution_mod.F90
r1543 r1896 10 10 nbp, nbp_lon, nbp_lat, nbp_lev, & 11 11 communicator) 12 USE mod_phys_lmdz_para, ONLY: init_phys_lmdz_para 12 USE mod_phys_lmdz_para, ONLY: init_phys_lmdz_para, klon_omp 13 13 USE mod_grid_phy_lmdz, ONLY: init_grid_phy_lmdz 14 USE dimphy, ONLY : Init_dimphy 15 14 16 IMPLICIT NONE 15 17 INTEGER,INTENT(IN) :: grid_type … … 24 26 CALL init_grid_phy_lmdz(grid_type,nvertex, nbp_lon,nbp_lat,nbp_lev) 25 27 CALL init_phys_lmdz_para(nbp,nbp_lon, nbp_lat, communicator) 28 !$OMP PARALLEL 29 CALL init_dimphy(klon_omp,nbp_lev) 30 !$OMP END PARALLEL 26 31 27 32 END SUBROUTINE init_physics_distribution -
trunk/LMDZ.TITAN/libf/phytitan/inifis_mod.F90
-
Property
svn:mergeinfo
set to
/trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90 merged eligible
r1843 r1896 9 9 prad,pg,pr,pcpp) 10 10 11 use init_print_control_mod, only: init_print_control 11 12 use radinc_h, only: ini_radinc_h 12 13 use datafile_mod … … 74 75 REAL SSUM 75 76 77 ! Initialize flags lunout, prt_level, debug (in print_control_mod) 78 CALL init_print_control 79 76 80 ! initialize constants in comcstfi_mod 77 81 rad=prad -
Property
svn:mergeinfo
set to
-
trunk/LMDZ.TITAN/libf/phytitan/physiq_mod.F90
-
Property
svn:mergeinfo
set to
/trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90 merged eligible
r1844 r1896 39 39 use vertical_layers_mod, only: presnivs, pseudoalt 40 40 use ioipsl_getin_p_mod, only: getin_p 41 use mod_phys_lmdz_omp_data, ONLY: is_omp_master 41 42 #ifdef CPP_XIOS 42 43 use xios_output_mod, only: initialize_xios_output, & 43 44 update_xios_timestep, & 44 45 send_xios_field 46 use wxios, only: wxios_context_init, xios_context_finalize 45 47 #endif 46 48 implicit none … … 520 522 521 523 524 #ifdef CPP_XIOS 525 ! Initialize XIOS context 526 write(*,*) "physiq: call wxios_context_init" 527 CALL wxios_context_init 528 #endif 529 522 530 ! Read 'startfi.nc' file. 523 531 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 625 633 presnivs,pseudoalt) 626 634 #endif 635 write(*,*) "physiq: end of firstcall" 627 636 endif ! end of 'firstcall' 628 637 … … 1328 1337 tsurf,tsoil,emis,q2,qsurf_hist,tankCH4) 1329 1338 endif 1330 1331 endif ! end of 'lastcall' 1339 endif ! end of 'lastcall' 1332 1340 1333 1341 … … 1519 1527 CALL send_xios_field("u",zu) 1520 1528 CALL send_xios_field("v",zv) 1521 1529 1530 if (lastcall.and.is_omp_master) then 1531 write(*,*) "physiq: call xios_context_finalize" 1532 call xios_context_finalize 1533 endif 1522 1534 #endif 1523 1535 -
Property
svn:mergeinfo
set to
-
trunk/LMDZ.TITAN/libf/phytitan/xios_output_mod.F90
-
Property
svn:mergeinfo
set to
/trunk/LMDZ.GENERIC/libf/phystd/xios_output_mod.F90 merged eligible
r1626 r1896 26 26 mpi_size, mpi_rank, klon_mpi, & 27 27 is_sequential, is_south_pole_dyn 28 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo 28 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo, grid_type, unstructured 29 29 USE print_control_mod, ONLY: lunout, prt_level 30 30 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat 31 31 USE regular_lonlat_mod, ONLY: lon_reg, lat_reg 32 32 USE nrtype, ONLY: pi 33 USE wxios 33 #ifdef CPP_XIOS 34 USE xios 35 #endif 36 USE wxios, ONLY: wxios_domain_param, wxios_domain_param_unstructured, wxios_closedef 34 37 IMPLICIT NONE 35 38 … … 60 63 ! 2. Declare horizontal domain 61 64 ! Set values for the mask: 62 IF (mpi_rank == 0) THEN 63 data_ibegin = 0 64 ELSE 65 data_ibegin = ii_begin - 1 66 END IF 67 68 IF (mpi_rank == mpi_size-1) THEN 69 data_iend = nbp_lon 70 ELSE 71 data_iend = ii_end + 1 72 END IF 73 74 if (prt_level>=10) then 75 write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," iibegin=",ii_begin , " ii_end=",ii_end," jjbegin=",jj_begin," jj_nb=",jj_nb," jj_end=",jj_end 76 write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," nbp_lon=",nbp_lon," nbp_lat=",nbp_lat 77 write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend 78 write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend 79 write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," is_south_pole=",is_south_pole_dyn 80 endif 81 65 ! IF (mpi_rank == 0) THEN 66 ! data_ibegin = 0 67 ! ELSE 68 ! data_ibegin = ii_begin - 1 69 ! END IF 70 71 ! IF (mpi_rank == mpi_size-1) THEN 72 ! data_iend = nbp_lon 73 ! ELSE 74 ! data_iend = ii_end + 1 75 ! END IF 76 77 ! if (prt_level>=10) then 78 ! write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," iibegin=",ii_begin , " ii_end=",ii_end," jjbegin=",jj_begin," jj_nb=",jj_nb," jj_end=",jj_end 79 ! write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," nbp_lon=",nbp_lon," nbp_lat=",nbp_lat 80 ! write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend 81 ! write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend 82 ! write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," is_south_pole=",is_south_pole_dyn 83 ! endif 84 85 !$OMP END MASTER 86 !$OMP BARRIER 82 87 ! Initialize the XIOS domain coreesponding to this process: 83 88 if (prt_level>=10) write(lunout,*) "initialize_xios_output: call wxios_domain_param" 84 CALL wxios_domain_param("dom_glo", is_sequential, nbp_lon, jj_nb, nbp_lon, nbp_lat, & 85 1, nbp_lon, ii_begin, ii_end, jj_begin, jj_end, & 86 klon_mpi+2*(nbp_lon-1), data_ibegin, data_iend, & 87 lat_reg*(180./pi), lon_reg*(180./pi), & 88 is_south_pole_dyn,mpi_rank) 89 89 ! CALL wxios_domain_param("dom_glo", is_sequential, nbp_lon, jj_nb, nbp_lon, nbp_lat, & 90 ! 1, nbp_lon, ii_begin, ii_end, jj_begin, jj_end, & 91 ! klon_mpi+2*(nbp_lon-1), data_ibegin, data_iend, & 92 ! lat_reg*(180./pi), lon_reg*(180./pi), & 93 ! is_south_pole_dyn,mpi_rank) 94 95 IF (grid_type==unstructured) THEN 96 CALL wxios_domain_param_unstructured("dom_glo") 97 ELSE 98 CALL wxios_domain_param("dom_glo") 99 ENDIF 100 101 !$OMP MASTER 90 102 ! 3. Declare calendar and time step 91 if (prt_level>=10) write(lunout,*) "initialize_xios_output: build calendar" 103 if (prt_level>=10) then 104 write(lunout,*) "initialize_xios_output: build calendar" 105 endif 92 106 timestep%second=dtphys 93 ! time origin of the simulation (default: 1st year/1st month/1st day, Ls=0) 94 time_origin=xios_date(1,1,1,0,0,0) 95 ! start date of the simulation (i.e time elapsed since last Ls=0) 96 start_date=xios_date(1,1,1,0,0,nint((day+timeofday)*daysec)) 107 if (nint(dtphys).ne.dtphys) then 108 write(*,*) "initialize_xios_output: warning physics timestep is not an integer!" 109 endif 110 if (nint(daysec).ne.daysec) then 111 write(*,*) "initialize_xios_output: warning day length is not an integer!" 112 endif 113 ! Important: do no operations involving dates and calendars 114 ! before defining the calendar! 97 115 CALL xios_define_calendar(type="user_defined", & 98 116 timestep=timestep, & 99 117 day_length=nint(daysec), & 100 start_date=start_date, &101 time_origin=time_origin, &102 118 month_lengths=[30,30,30,30,30,30,30,30,30,30,30,30]) 103 119 !NB: it would make more sense to define months and their length in the 120 ! xml files and not to have them hard coded here.... to be improved... 121 122 ! time origin of the simulation (default: 1st year/1st month/1st day, Ls=0) 123 time_origin=xios_date(1,1,1,0,0,0) 124 CALL xios_set_time_origin(time_origin=time_origin) 125 ! if (prt_level>=10) then 126 write(lunout,*) "initialize_xios_output: time_origin=",time_origin 127 ! endif 128 129 ! Now define the start time of this simulation 130 ! NB: we substract dtphys because we want to set the origin of the time axis 131 start_date=time_origin+xios_duration(0,0,day,0,0,timeofday*daysec-dtphys) 132 call xios_set_start_date(start_date=start_date) 133 if (prt_level>=10) then 134 write(lunout,*) "initialize_xios_output: start_date=",start_date 135 endif 136 104 137 ! 4. Finalize the context: 105 138 if (prt_level>=10) write(*,*) "initialize_xios_output: call wxios_closedef" -
Property
svn:mergeinfo
set to
Note: See TracChangeset
for help on using the changeset viewer.