Ignore:
Timestamp:
Dec 14, 2017 5:12:51 PM (4 years ago)
Author:
kanani
Message:

Merge of branch palm4u into trunk

Location:
palm/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk

  • palm/trunk/SOURCE

  • palm/trunk/SOURCE/palm.f90

    r2512 r2696  
    11!> @file palm.f90
    22!------------------------------------------------------------------------------!
    3 ! This file is part of PALM.
     3! This file is part of the PALM model system.
    44!
    55! PALM is free software: you can redistribute it and/or modify it under the
     
    2525! -----------------
    2626! $Id$
     27! Implementation of chemistry module (FK)
     28! Introduce input-data standard
     29! Rename lsm_last_actions into lsm_write_restart_data
     30! Move usm_write_restart_data into io_blocks loop (MS)
     31!
     32! 2512 2017-10-04 08:26:59Z raasch
    2733! user interface required revision updated
    2834!
     
    185191!> @todo create routine last_actions instead of calling lsm_last_actions etc.
    186192!> @todo eventually move CALL usm_write_restart_data to suitable location
     193!> @todo move chem_init call to init_3d_model or to check_parameters
    187194!------------------------------------------------------------------------------!
    188195 PROGRAM palm
     
    191198    USE arrays_3d
    192199
     200#if defined( __chem )
     201    USE chemistry_model_mod,                                                   &
     202        ONLY:  chem_init, chem_last_actions
     203    USE chem_photolysis_mod,                                                   &
     204        ONLY:  photolysis_init
     205#endif
     206
    193207    USE control_parameters,                                                    &
    194         ONLY:  cloud_physics, constant_diffusion, coupling_char, coupling_mode,&
     208        ONLY:  air_chemistry,                                                  &
     209               cloud_physics, constant_diffusion, coupling_char, coupling_mode,&
    195210               do2d_at_begin, do3d_at_begin, humidity, initializing_actions,   &
    196211               io_blocks, io_group, land_surface, large_scale_forcing,         &
     
    208223        ONLY:  nbgp
    209224
     225    USE netcdf_data_input_mod,                                                 &
     226        ONLY:  netcdf_data_input_inquire_file, netcdf_data_input_init,         &
     227               netcdf_data_input_surface_data, netcdf_data_input_topo
     228
    210229    USE kinds
    211230
    212231    USE land_surface_model_mod,                                                &
    213         ONLY:  lsm_last_actions
     232        ONLY:  lsm_write_restart_data
    214233
    215234    USE particle_attributes,                                                   &
     
    326345!-- Determine processor topology and local array indices
    327346    CALL init_pegrid
    328 
    329 !
    330 !-- Generate grid parameters
     347!
     348!-- Check if input file according to input-data standard exists
     349    CALL netcdf_data_input_inquire_file
     350!
     351!-- Read topography input data if required. This is required before the
     352!-- numerical grid is finally created in init_grid
     353    CALL netcdf_data_input_topo 
     354!
     355!-- Generate grid parameters, initialize generic topography and further process
     356!-- topography information if required
    331357    CALL init_grid
    332 
     358!
     359!-- Read global attributes if available. 
     360    CALL netcdf_data_input_init
     361!
     362!-- Read surface classification data, e.g. vegetation and soil types, water
     363!-- surfaces, etc., if available. Some of these data is required before
     364!-- check parameters is invoked.     
     365    CALL netcdf_data_input_surface_data
     366!
     367!-- Initialize chemistry (called before check_parameters due to dependencies)
     368!-- --> Needs to be moved!! What is the dependency about?
     369#if defined( __chem )
     370! IF (  TRIM( initializing_actions ) /= 'read_restart_data' )  THEN
     371    IF ( air_chemistry )  THEN
     372       CALL chem_init
     373       CALL photolysis_init   ! probably also required for restart
     374    ENDIF
     375! END IF
     376#endif
    333377!
    334378!-- Check control parameters and deduce further quantities
     
    443487!--    If required, write particle data
    444488       IF ( particle_advection )  CALL lpm_write_restart_file
    445 !
    446 !--    If required, write urban surface data
    447        IF (urban_surface)  CALL usm_write_restart_data
    448489       
    449490    ENDIF
     
    460501    DO  i = 0, io_blocks-1
    461502       IF ( i == io_group )  THEN
     503
     504          IF ( urban_surface )  THEN
     505             CALL usm_write_restart_data
     506          ENDIF
    462507          IF ( land_surface )  THEN
    463              CALL lsm_last_actions
     508             CALL lsm_write_restart_data
    464509          ENDIF
    465510          IF ( radiation )  THEN
    466511             CALL radiation_last_actions
    467512          ENDIF
     513#if defined( __chem )
     514          IF ( air_chemistry )  THEN
     515             CALL chem_last_actions
     516          ENDIF
     517#endif
     518         
    468519          CALL user_last_actions
    469520          IF ( write_binary )  CALL close_file( 14 )
Note: See TracChangeset for help on using the changeset viewer.