1 MODULE module_alloc_space
3 SUBROUTINE alloc_space_field_core ( grid, id, setinitval_in , tl_in , inter_domain_in , &
4 sd31, ed31, sd32, ed32, sd33, ed33, &
5 sm31 , em31 , sm32 , em32 , sm33 , em33 , &
6 sm31x, em31x, sm32x, em32x, sm33x, em33x, &
7 sm31y, em31y, sm32y, em32y, sm33y, em33y )
10 USE module_configure, ONLY : model_config_rec, in_use_for_config
11 USE module_state_description
17 TYPE(domain) , POINTER :: grid
18 INTEGER , INTENT(IN) :: id
19 INTEGER , INTENT(IN) :: setinitval_in ! 3 = everything, 1 = arrays only, 0 = none
20 INTEGER , INTENT(IN) :: sd31, ed31, sd32, ed32, sd33, ed33
21 INTEGER , INTENT(IN) :: sm31, em31, sm32, em32, sm33, em33
22 INTEGER , INTENT(IN) :: sm31x, em31x, sm32x, em32x, sm33x, em33x
23 INTEGER , INTENT(IN) :: sm31y, em31y, sm32y, em32y, sm33y, em33y
25 ! this argument is a bitmask. First bit is time level 1, second is time level 2, and so on.
26 ! e.g. to set both 1st and second time level, use 3
27 ! to set only 1st use 1
28 ! to set only 2st use 2
29 INTEGER , INTENT(IN) :: tl_in
31 ! true if the allocation is for an intermediate domain (for nesting); only certain fields allocated
32 ! false otherwise (all allocated, modulo tl above)
33 LOGICAL , INTENT(IN) :: inter_domain_in
36 INTEGER idum1, idum2, spec_bdy_width
37 INTEGER num_bytes_allocated
38 REAL initial_data_value
39 CHARACTER (LEN=256) message
45 !declare ierr variable for error checking ALLOCATE calls
50 CALL nl_get_sr_x( id , sr_x )
51 CALL nl_get_sr_x( id , sr_y )
54 inter_domain = inter_domain_in
56 #if ( RWORDSIZE == 8 )
57 initial_data_value = 0.
59 CALL get_initial_data_value ( initial_data_value )
62 #ifdef NO_INITIAL_DATA_VALUE
65 setinitval = setinitval_in
68 CALL nl_get_spec_bdy_width( 1, spec_bdy_width )
70 CALL set_scalar_indices_from_config( id , idum1 , idum2 )
72 num_bytes_allocated = 0
75 IF ( grid%id .EQ. 1 ) CALL wrf_message ( &
76 'DYNAMICS OPTION: Eulerian Mass Coordinate ')
79 IF ( grid%id .EQ. 1 ) &
80 CALL wrf_message ( 'DYNAMICS OPTION: nmm dyncore' )
82 #if (COAMPS_CORE == 1)
83 IF ( grid%id .EQ. 1 ) &
84 CALL wrf_message ( 'DYNAMICS OPTION: coamps dyncore' )
87 # include <allocs.inc>
90 'alloc_space_field: domain ',id,', ',num_bytes_allocated,' bytes allocated'
91 CALL wrf_debug( 1, message )
93 END SUBROUTINE alloc_space_field_core
94 END MODULE module_alloc_space