Merge branch 'master' into jm2/perimeter
[wrffire.git] / wrfv2_fire / chem / module_input_gocart_dms.F
blob30b3d9eb7c5318e2c23d058ee2b18a931a094281
1 !dis
2 !dis    Open Source License/Disclaimer, Forecast Systems Laboratory
3 !dis    NOAA/OAR/FSL, 325 Broadway Boulder, CO 80305
4 !dis
5 !dis    This software is distributed under the Open Source Definition,
6 !dis    which may be found at http://www.opensource.org/osd.html.
7 !dis
8 !dis    In particular, redistribution and use in source and binary forms,
9 !dis    with or without modification, are permitted provided that the
10 !dis    following conditions are met:
11 !dis
12 !dis    - Redistributions of source code must retain this notice, this
13 !dis    list of conditions and the following disclaimer.
14 !dis
15 !dis    - Redistributions in binary form must provide access to this
16 !dis    notice, this list of conditions and the following disclaimer, and
17 !dis    the underlying source code.
18 !dis
19 !dis    - All modifications to this software must be clearly documented,
20 !dis    and are solely the responsibility of the agent making the
21 !dis    modifications.
22 !dis
23 !dis    - If significant modifications or enhancements are made to this
24 !dis    software, the FSL Software Policy Manager
25 !dis    (softwaremgr@fsl.noaa.gov) should be notified.
26 !dis
27 !dis    THIS SOFTWARE AND ITS DOCUMENTATION ARE IN THE PUBLIC DOMAIN
28 !dis    AND ARE FURNISHED "AS IS."  THE AUTHORS, THE UNITED STATES
29 !dis    GOVERNMENT, ITS INSTRUMENTALITIES, OFFICERS, EMPLOYEES, AND
30 !dis    AGENTS MAKE NO WARRANTY, EXPRESS OR IMPLIED, AS TO THE USEFULNESS
31 !dis    OF THE SOFTWARE AND DOCUMENTATION FOR ANY PURPOSE.  THEY ASSUME
32 !dis    NO RESPONSIBILITY (1) FOR THE USE OF THE SOFTWARE AND
33 !dis    DOCUMENTATION; OR (2) TO PROVIDE TECHNICAL SUPPORT TO USERS.
34 !dis
35 !dis
37 !WRF:PACKAGE:IO
39 MODULE module_input_gocart_dms
41     USE module_io_domain
42     USE module_domain
43     USE module_driver_constants
44     USE module_state_description
45     USE module_configure
46     USE module_date_time
47     USE module_wrf_error
48     USE module_timing
49     USE module_data_radm2
50     USE module_aerosols_sorgam
51     USE module_get_file_names
54 CONTAINS
55 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
57 SUBROUTINE input_ext_chem_gocart_dms (grid)
58 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
60    IMPLICIT NONE
62    TYPE(domain)           ::  grid
64    INTEGER ::  i,j,n,numfil,status,system
66    INTEGER :: ids, ide, jds, jde, kds, kde,    &
67               ims, ime, jms, jme, kms, kme,    &
68               ips, ipe, jps, jpe, kps, kpe
70    REAL, ALLOCATABLE, DIMENSION(:,:) :: tmp
71 !  REAL, ALLOCATABLE, DIMENSION(:,:) :: dms_0
73 ! Number of reference emission and LAI files to open
74       PARAMETER(numfil=19)
76    CHARACTER (LEN=80) :: message
78    TYPE (grid_config_rec_type)              :: config_flags
80 ! Filenames of reference emissions and LAI
81       CHARACTER*100 onefil
83 !!!!!-------------------------------------------------------------------
85        ! Get grid dimensions
86        CALL get_ijk_from_grid (  grid ,                        &
87                                  ids, ide, jds, jde, kds, kde,    &
88                                  ims, ime, jms, jme, kms, kme,    &
89                                  ips, ipe, jps, jpe, kps, kpe    )
91      WRITE( message , FMT='(A,4I5)' ) ' DIMS: ',ids,ide-1,jds,jde-1
92      CALL  wrf_message ( message )
94      ALLOCATE(   tmp(ids:ide-1,jds:jde-1) )
95 !    ALLOCATE( dms_0(ids:ide-1,jds:jde-1) )
98      OPEN(19,FILE='wrf_gocart_dms.txt',FORM='FORMATTED')
99      READ(19,'(12E15.5)') tmp
100      grid%dms_0(ids:ide-1,jds:jde-1) = tmp
101      CLOSE(19)
103 ! End of loop over file names
105       DEALLOCATE( tmp )
106 !     DEALLOCATE( dms_0 )
108 END SUBROUTINE input_ext_chem_gocart_dms 
109 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
111 END MODULE module_input_gocart_dms