Ignore:
Timestamp:
Jul 27, 2018 1:36:03 PM (6 years ago)
Author:
suehring
Message:

New Inifor features: grid stretching, improved command-interface, support start dates in different formats in both YYYYMMDD and YYYYMMDDHH, Ability to manually control input file prefixes (--radiation-prefix, --soil-preifx, --flow-prefix, --soilmoisture-prefix) for compatiblity with DWD forcast naming scheme; GNU-style short and long option; Prepared output of large-scale forcing profiles (no computation yet); Added preprocessor flag netcdf4 to switch output format between netCDF 3 and 4; Updated netCDF variable names and attributes to comply with PIDS v1.9; Inifor bugfixes: Improved compatibility with older Intel Intel compilers by avoiding implicit array allocation; Added origin_lon/_lat values and correct reference time in dynamic driver global attributes; corresponding PALM changes: adjustments to revised Inifor; variables names in dynamic driver adjusted; enable geostrophic forcing also in offline nested mode; variable names in LES-LES and COSMO offline nesting changed; lateral boundary flags for nesting, in- and outflow conditions renamed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/poismg_mod.f90

    r2939 r3182  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Rename variables in mesoscale-offline nesting mode
    2323!
    2424! Former revisions:
     
    2626! $Id$
    2727! Set lateral boundary conditions for divergence
    28 ! 
     28!
    2929! 2937 2018-03-27 14:58:33Z suehring
    3030! Corrected "Former revisions" section
     
    107107 
    108108    USE control_parameters,                                                    &
    109         ONLY:  grid_level, force_bound_l, force_bound_n, force_bound_r,        &
    110                force_bound_s, forcing, inflow_l, inflow_n, inflow_r, inflow_s, &
    111                nest_bound_l, nest_bound_n, nest_bound_r, nest_bound_s,         &
    112                outflow_l, outflow_n, outflow_r, outflow_s
     109        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,                 &
     110               bc_dirichlet_s, bc_radiation_l, bc_radiation_n, bc_radiation_r, &
     111               bc_radiation_s, grid_level, nesting_offline
    113112
    114113    USE cpulog,                                                                &
     
    206205!--    Set lateral boundary conditions in non-cyclic case
    207206       IF ( .NOT. bc_lr_cyc )  THEN
    208           IF ( inflow_l .OR. outflow_l .OR. nest_bound_l .OR. force_bound_l )  &
     207          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )                          &
    209208             d(:,:,nxl-1) = d(:,:,nxl)
    210           IF ( inflow_r .OR. outflow_r .OR. nest_bound_r .OR. force_bound_r )  &
     209          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )                          &
    211210             d(:,:,nxr+1) = d(:,:,nxr)
    212211       ENDIF
    213212       IF ( .NOT. bc_ns_cyc )  THEN
    214           IF ( inflow_n .OR. outflow_n .OR. nest_bound_n .OR. force_bound_n )  &
     213          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )                          &
    215214             d(:,nyn+1,:) = d(:,nyn,:)
    216           IF ( inflow_s .OR. outflow_s .OR. nest_bound_s .OR. force_bound_s )  &
     215          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )                          &
    217216             d(:,nys-1,:) = d(:,nys,:)
    218217       ENDIF
     
    375374
    376375       IF ( .NOT. bc_lr_cyc )  THEN
    377           IF ( inflow_l  .OR.  outflow_l  .OR.  nest_bound_l  .OR.             &
    378                force_bound_l )  THEN
     376          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
    379377             r(:,:,nxl_mg(l)-1) = r(:,:,nxl_mg(l))
    380378          ENDIF
    381           IF ( inflow_r  .OR.  outflow_r  .OR.  nest_bound_r  .OR.             &
    382                force_bound_r )  THEN
     379          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
    383380             r(:,:,nxr_mg(l)+1) = r(:,:,nxr_mg(l))
    384381          ENDIF
     
    386383
    387384       IF ( .NOT. bc_ns_cyc )  THEN
    388           IF ( inflow_n  .OR.  outflow_n  .OR.  nest_bound_n  .OR.             &
    389                force_bound_n )  THEN
     385          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
    390386             r(:,nyn_mg(l)+1,:) = r(:,nyn_mg(l),:)
    391387          ENDIF
    392           IF ( inflow_s  .OR.  outflow_s  .OR.  nest_bound_s  .OR.             &
    393                force_bound_s )  THEN
     388          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
    394389             r(:,nys_mg(l)-1,:) = r(:,nys_mg(l),:)
    395390          ENDIF
     
    510505!--    Horizontal boundary conditions
    511506       IF ( .NOT. bc_lr_cyc )  THEN
    512           IF ( inflow_l  .OR.  outflow_l  .OR.  nest_bound_l  .OR.             &
    513                force_bound_l )  THEN
     507          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
    514508             f_mg(:,:,nxl_mg(l)-1) = f_mg(:,:,nxl_mg(l))
    515509          ENDIF
    516           IF ( inflow_r  .OR.  outflow_r  .OR.  nest_bound_r  .OR.             &
    517                force_bound_r )  THEN
     510          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
    518511             f_mg(:,:,nxr_mg(l)+1) = f_mg(:,:,nxr_mg(l))
    519512          ENDIF
     
    521514
    522515       IF ( .NOT. bc_ns_cyc )  THEN
    523           IF ( inflow_n  .OR.  outflow_n  .OR.  nest_bound_n  .OR.             &
    524                force_bound_n )  THEN
     516          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
    525517             f_mg(:,nyn_mg(l)+1,:) = f_mg(:,nyn_mg(l),:)
    526518          ENDIF
    527           IF ( inflow_s  .OR.  outflow_s  .OR.  nest_bound_s  .OR.             &
    528                force_bound_s )  THEN
     519          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
    529520             f_mg(:,nys_mg(l)-1,:) = f_mg(:,nys_mg(l),:)
    530521          ENDIF
     
    681672
    682673       IF ( .NOT. bc_lr_cyc )  THEN
    683           IF ( inflow_l  .OR.  outflow_l  .OR.  nest_bound_l  .OR.             &
    684                force_bound_l )  THEN
     674          IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
    685675             temp(:,:,nxl_mg(l)-1) = temp(:,:,nxl_mg(l))
    686676          ENDIF
    687           IF ( inflow_r  .OR.  outflow_r  .OR.  nest_bound_r  .OR.             &
    688                force_bound_r )  THEN
     677          IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
    689678             temp(:,:,nxr_mg(l)+1) = temp(:,:,nxr_mg(l))
    690679          ENDIF
     
    692681
    693682       IF ( .NOT. bc_ns_cyc )  THEN
    694           IF ( inflow_n  .OR.  outflow_n  .OR.  nest_bound_n  .OR.             &
    695                force_bound_n )  THEN
     683          IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
    696684             temp(:,nyn_mg(l)+1,:) = temp(:,nyn_mg(l),:)
    697685          ENDIF
    698           IF ( inflow_s  .OR.  outflow_s  .OR.  nest_bound_s  .OR.             &
    699                force_bound_s )  THEN
     686          IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
    700687             temp(:,nys_mg(l)-1,:) = temp(:,nys_mg(l),:)
    701688          ENDIF
     
    991978
    992979             IF ( .NOT. bc_lr_cyc )  THEN
    993                 IF ( inflow_l  .OR.  outflow_l  .OR.  nest_bound_l  .OR.       &
    994                      force_bound_l )  THEN
     980                IF ( bc_dirichlet_l  .OR.  bc_radiation_l )  THEN
    995981                   p_mg(:,:,nxl_mg(l)-1) = p_mg(:,:,nxl_mg(l))
    996982                ENDIF
    997                 IF ( inflow_r  .OR.  outflow_r  .OR.  nest_bound_r  .OR.       &
    998                      force_bound_r )  THEN
     983                IF ( bc_dirichlet_r  .OR.  bc_radiation_r )  THEN
    999984                   p_mg(:,:,nxr_mg(l)+1) = p_mg(:,:,nxr_mg(l))
    1000985                ENDIF
     
    1002987
    1003988             IF ( .NOT. bc_ns_cyc )  THEN
    1004                 IF ( inflow_n  .OR.  outflow_n  .OR.  nest_bound_n  .OR.       &
    1005                      force_bound_n )  THEN
     989                IF ( bc_dirichlet_n  .OR.  bc_radiation_n )  THEN
    1006990                   p_mg(:,nyn_mg(l)+1,:) = p_mg(:,nyn_mg(l),:)
    1007991                ENDIF
    1008                 IF ( inflow_s  .OR.  outflow_s  .OR.  nest_bound_s  .OR.       &
    1009                      force_bound_s )  THEN
     992                IF ( bc_dirichlet_s  .OR.  bc_radiation_s )  THEN
    1010993                   p_mg(:,nys_mg(l)-1,:) = p_mg(:,nys_mg(l),:)
    1011994                ENDIF
     
    14231406       USE control_parameters,                                                 &
    14241407           ONLY:  bc_lr_dirrad, bc_lr_raddir, bc_ns_dirrad, bc_ns_raddir,      &
    1425                   gamma_mg, grid_level_count, ibc_p_b, ibc_p_t,                &
     1408                  child_domain, gamma_mg, grid_level_count, ibc_p_b, ibc_p_t,  &
    14261409                  maximum_grid_level,  mg_switch_to_pe0_level,                 &
    1427                   mg_switch_to_pe0, nest_domain, ngsrb
     1410                  mg_switch_to_pe0, ngsrb
    14281411
    14291412       USE indices,                                                            &
     
    15641547!--          because then they have the total domain.
    15651548             IF ( bc_lr_dirrad )  THEN
    1566                 inflow_l  = .TRUE.
    1567                 inflow_r  = .FALSE.
    1568                 outflow_l = .FALSE.
    1569                 outflow_r = .TRUE.
     1549                bc_dirichlet_l  = .TRUE.
     1550                bc_dirichlet_r  = .FALSE.
     1551                bc_radiation_l = .FALSE.
     1552                bc_radiation_r = .TRUE.
    15701553             ELSEIF ( bc_lr_raddir )  THEN
    1571                 inflow_l  = .FALSE.
    1572                 inflow_r  = .TRUE.
    1573                 outflow_l = .TRUE.
    1574                 outflow_r = .FALSE.
    1575              ELSEIF ( nest_domain )  THEN
    1576                 nest_bound_l = .TRUE.
    1577                 nest_bound_r = .TRUE.
    1578              ELSEIF ( forcing )  THEN
    1579                 force_bound_l = .TRUE.
    1580                 force_bound_r = .TRUE.
     1554                bc_dirichlet_l  = .FALSE.
     1555                bc_dirichlet_r  = .TRUE.
     1556                bc_radiation_l = .TRUE.
     1557                bc_radiation_r = .FALSE.
     1558             ELSEIF ( child_domain  .OR.  nesting_offline )  THEN
     1559                bc_dirichlet_l = .TRUE.
     1560                bc_dirichlet_r = .TRUE.
    15811561             ENDIF
    15821562
    15831563             IF ( bc_ns_dirrad )  THEN
    1584                 inflow_n  = .TRUE.
    1585                 inflow_s  = .FALSE.
    1586                 outflow_n = .FALSE.
    1587                 outflow_s = .TRUE.
     1564                bc_dirichlet_n  = .TRUE.
     1565                bc_dirichlet_s  = .FALSE.
     1566                bc_radiation_n = .FALSE.
     1567                bc_radiation_s = .TRUE.
    15881568             ELSEIF ( bc_ns_raddir )  THEN
    1589                 inflow_n  = .FALSE.
    1590                 inflow_s  = .TRUE.
    1591                 outflow_n = .TRUE.
    1592                 outflow_s = .FALSE.
    1593              ELSEIF ( nest_domain )  THEN
    1594                 nest_bound_s = .TRUE.
    1595                 nest_bound_n = .TRUE.
    1596              ELSEIF ( forcing )  THEN
    1597                 force_bound_s = .TRUE.
    1598                 force_bound_n = .TRUE.
     1569                bc_dirichlet_n  = .FALSE.
     1570                bc_dirichlet_s  = .TRUE.
     1571                bc_radiation_n = .TRUE.
     1572                bc_radiation_s = .FALSE.
     1573             ELSEIF ( child_domain  .OR.  nesting_offline)  THEN
     1574                bc_dirichlet_s = .TRUE.
     1575                bc_dirichlet_n = .TRUE.
    15991576             ENDIF
    16001577
     
    16591636!--          For non-cyclic lateral boundary conditions and in case of nesting,
    16601637!--          restore the in-/outflow conditions.
    1661              inflow_l  = .FALSE.;  inflow_r  = .FALSE.
    1662              inflow_n  = .FALSE.;  inflow_s  = .FALSE.
    1663              outflow_l = .FALSE.;  outflow_r = .FALSE.
    1664              outflow_n = .FALSE.;  outflow_s = .FALSE.
    1665 !
    1666 !--          In case of nesting or forcing, restore lateral boundary conditions
    1667              IF ( nest_domain )  THEN
    1668                 nest_bound_l = .FALSE.
    1669                 nest_bound_r = .FALSE.
    1670                 nest_bound_s = .FALSE.
    1671                 nest_bound_n = .FALSE.     
    1672              ENDIF
    1673              IF ( forcing )  THEN
    1674                 force_bound_l = .FALSE.
    1675                 force_bound_r = .FALSE.
    1676                 force_bound_s = .FALSE.
    1677                 force_bound_n = .FALSE.     
    1678              ENDIF
     1638             bc_dirichlet_l = .FALSE.;  bc_dirichlet_r = .FALSE.
     1639             bc_dirichlet_n = .FALSE.;  bc_dirichlet_s = .FALSE.
     1640             bc_radiation_l = .FALSE.;  bc_radiation_r = .FALSE.
     1641             bc_radiation_n = .FALSE.;  bc_radiation_s = .FALSE.
    16791642
    16801643             IF ( pleft == MPI_PROC_NULL )  THEN
    1681                 IF ( bc_lr_dirrad )  THEN
    1682                    inflow_l  = .TRUE.
     1644                IF ( bc_lr_dirrad  .OR.  child_domain  .OR.  nesting_offline ) &
     1645                THEN
     1646                   bc_dirichlet_l = .TRUE.
    16831647                ELSEIF ( bc_lr_raddir )  THEN
    1684                    outflow_l = .TRUE.
    1685                 ELSEIF ( nest_domain )  THEN
    1686                    nest_bound_l = .TRUE.
    1687                 ELSEIF ( forcing )  THEN
    1688                    force_bound_l = .TRUE.
     1648                   bc_radiation_l = .TRUE.
    16891649                ENDIF
    16901650             ENDIF
     
    16921652             IF ( pright == MPI_PROC_NULL )  THEN
    16931653                IF ( bc_lr_dirrad )  THEN
    1694                    outflow_r = .TRUE.
    1695                 ELSEIF ( bc_lr_raddir )  THEN
    1696                    inflow_r  = .TRUE.
    1697                 ELSEIF ( nest_domain )  THEN
    1698                    nest_bound_r = .TRUE.
    1699                 ELSEIF ( forcing )  THEN
    1700                    force_bound_r = .TRUE.
     1654                   bc_radiation_r = .TRUE.
     1655                ELSEIF ( bc_lr_raddir  .OR.  child_domain  .OR.                &
     1656                         nesting_offline )  THEN
     1657                   bc_dirichlet_r = .TRUE.
    17011658                ENDIF
    17021659             ENDIF
     
    17041661             IF ( psouth == MPI_PROC_NULL )  THEN
    17051662                IF ( bc_ns_dirrad )  THEN
    1706                    outflow_s = .TRUE.
     1663                   bc_radiation_s = .TRUE.
     1664                ELSEIF ( bc_ns_raddir  .OR.  child_domain  .OR.                &
     1665                         nesting_offline )  THEN
     1666                   bc_dirichlet_s = .TRUE.
     1667                ENDIF
     1668             ENDIF
     1669
     1670             IF ( pnorth == MPI_PROC_NULL )  THEN
     1671                IF ( bc_ns_dirrad  .OR.  child_domain  .OR.  nesting_offline ) &
     1672                THEN
     1673                   bc_dirichlet_n = .TRUE.
    17071674                ELSEIF ( bc_ns_raddir )  THEN
    1708                    inflow_s  = .TRUE.
    1709                 ELSEIF ( nest_domain )  THEN
    1710                    nest_bound_s = .TRUE.
    1711                 ELSEIF ( forcing )  THEN
    1712                    force_bound_s = .TRUE.
    1713                 ENDIF
    1714              ENDIF
    1715 
    1716              IF ( pnorth == MPI_PROC_NULL )  THEN
    1717                 IF ( bc_ns_dirrad )  THEN
    1718                    inflow_n  = .TRUE.
    1719                 ELSEIF ( bc_ns_raddir )  THEN
    1720                    outflow_n = .TRUE.
    1721                 ELSEIF ( nest_domain )  THEN
    1722                    nest_bound_n = .TRUE.
    1723                 ELSEIF ( forcing )  THEN
    1724                    force_bound_n = .TRUE.
     1675                   bc_radiation_n = .TRUE.
    17251676                ENDIF
    17261677             ENDIF
Note: See TracChangeset for help on using the changeset viewer.