[Dart-dev] DART/branches Revision: 11171
dart at ucar.edu
dart at ucar.edu
Tue Feb 28 14:41:48 MST 2017
thoar at ucar.edu
2017-02-28 14:41:48 -0700 (Tue, 28 Feb 2017)
125
Better error messages indicating which file is throwing the error.
Removed 'public' designation from some private routines.
Modified: DART/branches/mizzi/models/wrf_chem/model_mod.f90
===================================================================
--- DART/branches/mizzi/models/wrf_chem/model_mod.f90 2017-02-28 21:17:40 UTC (rev 11170)
+++ DART/branches/mizzi/models/wrf_chem/model_mod.f90 2017-02-28 21:41:48 UTC (rev 11171)
@@ -145,7 +145,6 @@
get_domain_info, &
get_wrf_state_variables, &
fill_default_state_table, &
- read_wrf_dimensions, &
get_number_of_wrf_variables, &
get_variable_bounds, &
set_variable_bound_defaults, &
@@ -154,12 +153,8 @@
trans_2Dto1D, trans_1Dto2D, &
get_wrf_date, set_wrf_date, &
height_diff_check
-!
-! LXL/APM +++
-public :: read_emiss_dimensions, &
- get_emiss_variable_size_from_file
-! LXL/APM ---
-!
+
+
! public parameters
public :: max_state_variables, &
num_state_table_columns, &
@@ -404,8 +399,9 @@
! LXL/APM +++
logical :: add_emiss = .true.
! LXL/APM ---
-!
+character(len=256) :: wrf_filename, chem_filename, fire_filename
+
!----------------------------------------------------------------------
! Register the module
@@ -500,23 +496,26 @@
write( idom , '(I1)') id
+ write( wrf_filename,'(''wrfinput_d'',i2.2)')id
+ write(chem_filename,'(''wrfchemi_d'',i2.2)')id
+ write(fire_filename,'(''wrffirechemi_d'',i2.2)')id
+
! only print this once, no matter how many parallel tasks are running
if (do_output()) then
write(*,*) '******************'
write(*,*) '** DOMAIN # ',idom,' **'
write(*,*) '******************'
+ call error_handler(E_MSG,'static_init_model','wrf input file is "'//trim(wrf_filename)//'"')
+ call error_handler(E_MSG,'static_init_model','wrfchemi input file is "'//trim(chem_filename)//'"')
+ call error_handler(E_MSG,'static_init_model','wrffirechemi input file is "'//trim(fire_filename)//'"')
endif
- if(file_exist('wrfinput_d0'//idom)) then
-
- call nc_check( nf90_open('wrfinput_d0'//idom, NF90_NOWRITE, ncid), &
- 'static_init_model','open wrfinput_d0'//idom )
-
+ if(file_exist(wrf_filename)) then
+ call nc_check( nf90_open(wrf_filename, NF90_NOWRITE, ncid), &
+ 'static_init_model','open "'//trim(wrf_filename)//'"' )
else
-
call error_handler(E_ERR,'static_init_model', &
- 'Please put wrfinput_d0'//idom//' in the work directory.', source, revision,revdate)
-
+ 'Please put "'//trim(wrf_filename)//'" in the work directory.', source, revision,revdate)
endif
if(debug) write(*,*) ' ncid is ',ncid
@@ -525,22 +524,23 @@
! if ( add_emiss ) then
!
! WRFCHEMI emissions
- if(file_exist('wrfchemi_d0'//idom)) then
- call nc_check( nf90_open('wrfchemi_d0'//idom, NF90_NOWRITE, ncid_emiss_chemi), &
- 'static_init_model','open wrfchemi_d0'//idom )
+
+ if(file_exist(chem_filename)) then
+ call nc_check(nf90_open(chem_filename, NF90_NOWRITE, ncid_emiss_chemi), &
+ 'static_init_model','open "'//trim(chem_filename)//'"' )
else
call error_handler(E_ERR,'static_init_model', &
- 'Please put wrfchemi_d0'//idom//' in the work directory.', source, revision,revdate)
+ 'Please put "'//trim(chem_filename)//'" in the work directory.', source, revision,revdate)
endif
if(debug) write(*,*) ' ncid_emiss_chemi is ',ncid_emiss_chemi
!
! WRFFIRECHEMI emissions
- if(file_exist('wrffirechemi_d0'//idom)) then
- call nc_check( nf90_open('wrffirechemi_d0'//idom, NF90_NOWRITE, ncid_emiss_firechemi), &
- 'static_init_model','open wrffirechemi_d0'//idom )
+ if(file_exist(fire_filename)) then
+ call nc_check( nf90_open(fire_filename, NF90_NOWRITE, ncid_emiss_firechemi), &
+ 'static_init_model','open "'//trim(fire_filename)//'"')
else
call error_handler(E_ERR,'static_init_model', &
- 'Please put wrffirechemi_d0'//idom//' in the work directory.', source, revision,revdate)
More information about the Dart-dev
mailing list