Ignore:
Timestamp:
Sep 19, 2018, 10:53:15 AM (6 years ago)
Author:
emillour
Message:

Dynamico-physics interfaces:

  • some OpenMP fixes.
  • small bug fix: in Dynamico vertical flux is positive when upwards, but in the physics positive is downwards, so change the sign when sending values to the physics.

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ICOSA_LMDZ/src/phyvenus/interface_icosa_lmdz.f90

    r1982 r2000  
    3838 
    3939  CHARACTER(len=30),SAVE,ALLOCATABLE :: tname(:) ! tracer names
     40  CHARACTER(len=33),SAVE,ALLOCATABLE :: ttext(:) ! tracer long name for diagnostics
    4041  REAL,SAVE :: pday ! number of ellapsed sols since Ls=0
    4142  REAL,SAVE :: ptime ! "universal time" as fraction of sol (e.g. 0.5 for noon)
     
    213214  CHARACTER(len=4)              :: type_trac
    214215!  CHARACTER(len=30),ALLOCATABLE :: tname(:)    ! tracer short name for restart and diagnostics
    215   CHARACTER(len=33),ALLOCATABLE :: ttext(:)     ! tracer long name for diagnostics
     216!  CHARACTER(len=33),ALLOCATABLE :: ttext(:)     ! tracer long name for diagnostics
    216217  TYPE(t_field),POINTER,SAVE    :: f_ind_cell_glo(:)
    217218 
     
    259260    ENDDO
    260261
    261 !$OMP BARRIER
    262262     
    263263    CALL transfer_icosa_to_lmdz(f_ind_cell_glo,ind_cell_glo)
     
    284284
    285285    ! Initialize tracer names, numbers, etc. for physics
     286
     287! init tracers model for standard lmdz case
    286288!$OMP MASTER
    287 
    288 ! init tracers model for standard lmdz case
    289289    ALLOCATE(tname(nqtot))
    290290    ALLOCATE(ttext(nqtot))
     291!$OMP END MASTER
     292!$OMP BARRIER
    291293
    292294! read tname() from traceur.def file
     295    IF (is_mpi_root) THEN
     296!$OMP MASTER
    293297    OPEN(unit=42,file="traceur.def",form="formatted",status="old",iostat=ierr)
    294298    IF (ierr==0) THEN
     
    306310!$OMP END MASTER
    307311!$OMP BARRIER
     312    ENDIF ! of (is_mpi_root)
     313
     314    DO i=1,nqtot
     315      CALL bcast(tname(i))
     316      CALL bcast(ttext(i))
     317    ENDDO
    308318
    309319   ! Get/set some constants for the physics
    310320
    311 !$OMP MASTER
    312321
    313322    startphy_file=.true.
     
    326335      ! Read in some information from the startphy.nc file
    327336
     337      IF (is_mpi_root) THEN
     338!$OMP MASTER     
    328339      status=nf90_open('startphy.nc',NF90_NOWRITE,ncid)
    329340      if (status.ne.nf90_noerr) then
     
    347358
    348359      status=nf90_close(ncid)
     360!$OMP END MASTER     
     361!$OMP BARRIER
     362      ENDIF ! of !IF (is_mpi_root)
     363     
     364      CALL bcast(day_ini)
     365      CALL bcast(annee_ref)
     366      CALL bcast(ptime)
    349367
    350368    ELSE
     
    365383    CALL getin('iflag_trac',iflag_trac)
    366384
    367 !$OMP END MASTER
    368 !$OMP BARRIER
    369385
    370386    ! Initialize some physical constants
     
    597613
    598614    DO l=1,llm
    599       wflux_phy(:,l)=wflux_phy(:,l)*cell_area(:)
     615      ! Warning: In the physics, vertical flux convention is positive if downwards!
     616      wflux_phy(:,l)= - wflux_phy(:,l)*cell_area(:)
     617      ! Compute relative geopotential
    600618      phi_phy(:,l)=phi_phy(:,l)-phis_phy(:)
    601619    ENDDO
Note: See TracChangeset for help on using the changeset viewer.