include file: allocs.inc 1,1554 !STARTOFREGISTRYGENERATEDINCLUDE 'inc/allocs.inc' ! ! WARNING This file is generated automatically by use_registry ! using the data base in the file named Registry. ! Do not edit. Your changes to this file will be lost. ! IF(in_use_for_config(id,'lu_index'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lu_index(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lu_index(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lu_index=initial_data_value ELSE ALLOCATE(grid%lu_index(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lu_index(1,1). ') endif ENDIF IF(in_use_for_config(id,'lu_mask').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lu_mask(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lu_mask(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lu_mask=initial_data_value ELSE ALLOCATE(grid%lu_mask(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lu_mask(1,1). ') endif ENDIF IF(in_use_for_config(id,'znu').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE ALLOCATE(grid%znu(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%znu(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%znu=initial_data_value ELSE ALLOCATE(grid%znu(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%znu(1). ') endif ENDIF IF(in_use_for_config(id,'znw').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE ALLOCATE(grid%znw(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%znw(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%znw=initial_data_value ELSE ALLOCATE(grid%znw(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%znw(1). ') endif ENDIF IF(in_use_for_config(id,'zs').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%zs(1:model_config_rec%num_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%zs(1:model_config_rec%num_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%zs=initial_data_value ELSE ALLOCATE(grid%zs(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%zs(1). ') endif ENDIF IF(in_use_for_config(id,'dzs').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%dzs(1:model_config_rec%num_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dzs(1:model_config_rec%num_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dzs=initial_data_value ELSE ALLOCATE(grid%dzs(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dzs(1). ') endif ENDIF IF(in_use_for_config(id,'u_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%u_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_gc=initial_data_value ELSE ALLOCATE(grid%u_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_gc(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'v_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%v_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_gc=initial_data_value ELSE ALLOCATE(grid%v_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_gc(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'t_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%t_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_gc=initial_data_value ELSE ALLOCATE(grid%t_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_gc(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rh_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rh_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rh_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rh_gc=initial_data_value ELSE ALLOCATE(grid%rh_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rh_gc(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ght_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ght_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ght_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ght_gc=initial_data_value ELSE ALLOCATE(grid%ght_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ght_gc(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'p_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%p_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%p_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p_gc=initial_data_value ELSE ALLOCATE(grid%p_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%p_gc(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'xlat_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xlat_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlat_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xlat_gc=initial_data_value ELSE ALLOCATE(grid%xlat_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlat_gc(1,1). ') endif ENDIF IF(in_use_for_config(id,'xlong_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xlong_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlong_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xlong_gc=initial_data_value ELSE ALLOCATE(grid%xlong_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlong_gc(1,1). ') endif ENDIF IF(in_use_for_config(id,'ht_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ht_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_gc=initial_data_value ELSE ALLOCATE(grid%ht_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_gc(1,1). ') endif ENDIF IF(in_use_for_config(id,'tsk_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tsk_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tsk_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsk_gc=initial_data_value ELSE ALLOCATE(grid%tsk_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tsk_gc(1,1). ') endif ENDIF IF(in_use_for_config(id,'tavgsfc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tavgsfc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tavgsfc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tavgsfc=initial_data_value ELSE ALLOCATE(grid%tavgsfc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tavgsfc(1,1). ') endif ENDIF IF(in_use_for_config(id,'tmn_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tmn_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tmn_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tmn_gc=initial_data_value ELSE ALLOCATE(grid%tmn_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tmn_gc(1,1). ') endif ENDIF IF(in_use_for_config(id,'pslv_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%pslv_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pslv_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pslv_gc=initial_data_value ELSE ALLOCATE(grid%pslv_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pslv_gc(1,1). ') endif ENDIF IF(in_use_for_config(id,'greenfrac').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((12)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%greenfrac(sm31:em31,1:12,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%greenfrac(sm31:em31,1:12,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%greenfrac=initial_data_value ELSE ALLOCATE(grid%greenfrac(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%greenfrac(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'albedo12m').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((12)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%albedo12m(sm31:em31,1:12,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%albedo12m(sm31:em31,1:12,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%albedo12m=initial_data_value ELSE ALLOCATE(grid%albedo12m(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%albedo12m(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'pd_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%pd_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pd_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pd_gc=initial_data_value ELSE ALLOCATE(grid%pd_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pd_gc(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'psfc_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%psfc_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%psfc_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%psfc_gc=initial_data_value ELSE ALLOCATE(grid%psfc_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%psfc_gc(1,1). ') endif ENDIF IF(in_use_for_config(id,'intq_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%intq_gc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%intq_gc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%intq_gc=initial_data_value ELSE ALLOCATE(grid%intq_gc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%intq_gc(1,1). ') endif ENDIF IF(in_use_for_config(id,'pdhs').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%pdhs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pdhs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pdhs=initial_data_value ELSE ALLOCATE(grid%pdhs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pdhs(1,1). ') endif ENDIF IF(in_use_for_config(id,'qv_gc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%qv_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qv_gc(sm31:em31,1:model_config_rec%num_metgrid_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_gc=initial_data_value ELSE ALLOCATE(grid%qv_gc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qv_gc(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'u_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%u_1(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_1(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_1=initial_data_value ELSE ALLOCATE(grid%u_1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_1(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'u_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%u_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_2=initial_data_value ELSE ALLOCATE(grid%u_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_2(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%u_bxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_bxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%u_bxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_bxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%u_bys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_bys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%u_bye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_bye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_bye=initial_data_value ELSE ALLOCATE(grid%u_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_bxs(1,1,1). ') endif ALLOCATE(grid%u_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_bxe(1,1,1). ') endif ALLOCATE(grid%u_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_bys(1,1,1). ') endif ALLOCATE(grid%u_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_bye(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%u_btxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_btxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%u_btxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_btxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%u_btys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_btys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%u_btye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_btye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_btye=initial_data_value ELSE ALLOCATE(grid%u_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_btxs(1,1,1). ') endif ALLOCATE(grid%u_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_btxe(1,1,1). ') endif ALLOCATE(grid%u_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_btys(1,1,1). ') endif ALLOCATE(grid%u_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_btye(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ru').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ru(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ru(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ru=initial_data_value ELSE ALLOCATE(grid%ru(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ru(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ru_m').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ru_m(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ru_m(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ru_m=initial_data_value ELSE ALLOCATE(grid%ru_m(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ru_m(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ru_tend').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ru_tend(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ru_tend(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ru_tend=initial_data_value ELSE ALLOCATE(grid%ru_tend(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ru_tend(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'u_save').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%u_save(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_save(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_save=initial_data_value ELSE ALLOCATE(grid%u_save(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_save(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'z_force').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%z_force(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%z_force(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z_force=initial_data_value ELSE ALLOCATE(grid%z_force(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%z_force(1). ') endif ENDIF IF(in_use_for_config(id,'u_g').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%u_g(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_g(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_g=initial_data_value ELSE ALLOCATE(grid%u_g(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_g(1). ') endif ENDIF IF(in_use_for_config(id,'u_g_tend').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%u_g_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_g_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_g_tend=initial_data_value ELSE ALLOCATE(grid%u_g_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_g_tend(1). ') endif ENDIF IF(in_use_for_config(id,'v_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%v_1(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_1(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_1=initial_data_value ELSE ALLOCATE(grid%v_1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_1(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'v_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%v_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_2=initial_data_value ELSE ALLOCATE(grid%v_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_2(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%v_bxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_bxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%v_bxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_bxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%v_bys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_bys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%v_bye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_bye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_bye=initial_data_value ELSE ALLOCATE(grid%v_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_bxs(1,1,1). ') endif ALLOCATE(grid%v_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_bxe(1,1,1). ') endif ALLOCATE(grid%v_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_bys(1,1,1). ') endif ALLOCATE(grid%v_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_bye(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%v_btxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_btxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%v_btxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_btxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%v_btys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_btys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%v_btye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_btye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_btye=initial_data_value ELSE ALLOCATE(grid%v_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_btxs(1,1,1). ') endif ALLOCATE(grid%v_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_btxe(1,1,1). ') endif ALLOCATE(grid%v_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_btys(1,1,1). ') endif ALLOCATE(grid%v_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_btye(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rv').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rv(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rv(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rv=initial_data_value ELSE ALLOCATE(grid%rv(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rv(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rv_m').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rv_m(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rv_m(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rv_m=initial_data_value ELSE ALLOCATE(grid%rv_m(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rv_m(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rv_tend').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rv_tend(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rv_tend(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rv_tend=initial_data_value ELSE ALLOCATE(grid%rv_tend(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rv_tend(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'v_save').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%v_save(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_save(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_save=initial_data_value ELSE ALLOCATE(grid%v_save(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_save(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'v_g').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%v_g(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_g(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_g=initial_data_value ELSE ALLOCATE(grid%v_g(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_g(1). ') endif ENDIF IF(in_use_for_config(id,'v_g_tend').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%v_g_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_g_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_g_tend=initial_data_value ELSE ALLOCATE(grid%v_g_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_g_tend(1). ') endif ENDIF IF(in_use_for_config(id,'w_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%w_1(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_1(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_1=initial_data_value ELSE ALLOCATE(grid%w_1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_1(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'w_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%w_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_2=initial_data_value ELSE ALLOCATE(grid%w_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_2(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%w_bxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_bxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%w_bxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_bxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%w_bys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_bys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%w_bye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_bye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_bye=initial_data_value ELSE ALLOCATE(grid%w_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_bxs(1,1,1). ') endif ALLOCATE(grid%w_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_bxe(1,1,1). ') endif ALLOCATE(grid%w_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_bys(1,1,1). ') endif ALLOCATE(grid%w_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_bye(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%w_btxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_btxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%w_btxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_btxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%w_btys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_btys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%w_btye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_btye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_btye=initial_data_value ELSE ALLOCATE(grid%w_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_btxs(1,1,1). ') endif ALLOCATE(grid%w_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_btxe(1,1,1). ') endif ALLOCATE(grid%w_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_btys(1,1,1). ') endif ALLOCATE(grid%w_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_btye(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ww').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ww(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ww(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ww=initial_data_value ELSE ALLOCATE(grid%ww(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ww(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rw').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rw(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rw(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rw=initial_data_value ELSE ALLOCATE(grid%rw(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rw(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ww_m').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ww_m(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ww_m(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ww_m=initial_data_value ELSE ALLOCATE(grid%ww_m(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ww_m(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'w_subs').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%w_subs(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_subs(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_subs=initial_data_value ELSE ALLOCATE(grid%w_subs(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_subs(1). ') endif ENDIF IF(in_use_for_config(id,'w_subs_tend').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%w_subs_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_subs_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_subs_tend=initial_data_value ELSE ALLOCATE(grid%w_subs_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_subs_tend(1). ') endif ENDIF IF(in_use_for_config(id,'ph_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ph_1(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_1(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_1=initial_data_value ELSE ALLOCATE(grid%ph_1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_1(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ph_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ph_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_2=initial_data_value ELSE ALLOCATE(grid%ph_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_2(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ph_bxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_bxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ph_bxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_bxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ph_bys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_bys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ph_bye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_bye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_bye=initial_data_value ELSE ALLOCATE(grid%ph_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_bxs(1,1,1). ') endif ALLOCATE(grid%ph_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_bxe(1,1,1). ') endif ALLOCATE(grid%ph_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_bys(1,1,1). ') endif ALLOCATE(grid%ph_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_bye(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ph_btxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_btxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ph_btxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_btxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ph_btys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_btys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ph_btye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_btye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_btye=initial_data_value ELSE ALLOCATE(grid%ph_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_btxs(1,1,1). ') endif ALLOCATE(grid%ph_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_btxe(1,1,1). ') endif ALLOCATE(grid%ph_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_btys(1,1,1). ') endif ALLOCATE(grid%ph_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_btye(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'phb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%phb(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%phb(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%phb=initial_data_value ELSE ALLOCATE(grid%phb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%phb(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'phb_fine').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%phb_fine(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%phb_fine(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%phb_fine=initial_data_value ELSE ALLOCATE(grid%phb_fine(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%phb_fine(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ph0').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ph0(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph0(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph0=initial_data_value ELSE ALLOCATE(grid%ph0(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph0(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'php').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%php(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%php(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%php=initial_data_value ELSE ALLOCATE(grid%php(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%php(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'t_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%t_1(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_1(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_1=initial_data_value ELSE ALLOCATE(grid%t_1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_1(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'t_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%t_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_2=initial_data_value ELSE ALLOCATE(grid%t_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_2(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%t_bxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_bxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%t_bxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_bxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%t_bys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_bys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%t_bye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_bye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_bye=initial_data_value ELSE ALLOCATE(grid%t_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_bxs(1,1,1). ') endif ALLOCATE(grid%t_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_bxe(1,1,1). ') endif ALLOCATE(grid%t_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_bys(1,1,1). ') endif ALLOCATE(grid%t_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_bye(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%t_btxs(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_btxs(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%t_btxe(sm33:em33,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_btxe(sm33:em33,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%t_btys(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_btys(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%t_btye(sm31:em31,sm32:em32,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_btye(sm31:em31,sm32:em32,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_btye=initial_data_value ELSE ALLOCATE(grid%t_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_btxs(1,1,1). ') endif ALLOCATE(grid%t_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_btxe(1,1,1). ') endif ALLOCATE(grid%t_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_btys(1,1,1). ') endif ALLOCATE(grid%t_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_btye(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'t_init').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%t_init(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_init(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_init=initial_data_value ELSE ALLOCATE(grid%t_init(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_init(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'tp_1').AND.(.NOT.inter_domain).AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tp_1(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tp_1(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tp_1=initial_data_value ELSE ALLOCATE(grid%tp_1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tp_1(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'tp_2').AND.(.NOT.inter_domain).AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tp_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tp_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tp_2=initial_data_value ELSE ALLOCATE(grid%tp_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tp_2(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'t_save'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%t_save(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_save(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_save=initial_data_value ELSE ALLOCATE(grid%t_save(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_save(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'th_upstream_x').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%th_upstream_x(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th_upstream_x(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th_upstream_x=initial_data_value ELSE ALLOCATE(grid%th_upstream_x(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th_upstream_x(1). ') endif ENDIF IF(in_use_for_config(id,'th_upstream_x_tend').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%th_upstream_x_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th_upstream_x_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th_upstream_x_tend=initial_data_value ELSE ALLOCATE(grid%th_upstream_x_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th_upstream_x_tend(1). ') endif ENDIF IF(in_use_for_config(id,'th_upstream_y').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%th_upstream_y(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th_upstream_y(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th_upstream_y=initial_data_value ELSE ALLOCATE(grid%th_upstream_y(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th_upstream_y(1). ') endif ENDIF IF(in_use_for_config(id,'th_upstream_y_tend').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%th_upstream_y_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th_upstream_y_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th_upstream_y_tend=initial_data_value ELSE ALLOCATE(grid%th_upstream_y_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th_upstream_y_tend(1). ') endif ENDIF IF(in_use_for_config(id,'qv_upstream_x').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%qv_upstream_x(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qv_upstream_x(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_upstream_x=initial_data_value ELSE ALLOCATE(grid%qv_upstream_x(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qv_upstream_x(1). ') endif ENDIF IF(in_use_for_config(id,'qv_upstream_x_tend').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%qv_upstream_x_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qv_upstream_x_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_upstream_x_tend=initial_data_value ELSE ALLOCATE(grid%qv_upstream_x_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qv_upstream_x_tend(1). ') endif ENDIF IF(in_use_for_config(id,'qv_upstream_y').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%qv_upstream_y(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qv_upstream_y(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_upstream_y=initial_data_value ELSE ALLOCATE(grid%qv_upstream_y(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qv_upstream_y(1). ') endif ENDIF IF(in_use_for_config(id,'qv_upstream_y_tend').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%qv_upstream_y_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qv_upstream_y_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_upstream_y_tend=initial_data_value ELSE ALLOCATE(grid%qv_upstream_y_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qv_upstream_y_tend(1). ') endif ENDIF IF(in_use_for_config(id,'u_upstream_x').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%u_upstream_x(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_upstream_x(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_upstream_x=initial_data_value ELSE ALLOCATE(grid%u_upstream_x(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_upstream_x(1). ') endif ENDIF IF(in_use_for_config(id,'u_upstream_x_tend').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%u_upstream_x_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_upstream_x_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_upstream_x_tend=initial_data_value ELSE ALLOCATE(grid%u_upstream_x_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_upstream_x_tend(1). ') endif ENDIF IF(in_use_for_config(id,'u_upstream_y').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%u_upstream_y(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_upstream_y(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_upstream_y=initial_data_value ELSE ALLOCATE(grid%u_upstream_y(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_upstream_y(1). ') endif ENDIF IF(in_use_for_config(id,'u_upstream_y_tend').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%u_upstream_y_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_upstream_y_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_upstream_y_tend=initial_data_value ELSE ALLOCATE(grid%u_upstream_y_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_upstream_y_tend(1). ') endif ENDIF IF(in_use_for_config(id,'v_upstream_x').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%v_upstream_x(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_upstream_x(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_upstream_x=initial_data_value ELSE ALLOCATE(grid%v_upstream_x(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_upstream_x(1). ') endif ENDIF IF(in_use_for_config(id,'v_upstream_x_tend').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%v_upstream_x_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_upstream_x_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_upstream_x_tend=initial_data_value ELSE ALLOCATE(grid%v_upstream_x_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_upstream_x_tend(1). ') endif ENDIF IF(in_use_for_config(id,'v_upstream_y').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%v_upstream_y(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_upstream_y(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_upstream_y=initial_data_value ELSE ALLOCATE(grid%v_upstream_y(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_upstream_y(1). ') endif ENDIF IF(in_use_for_config(id,'v_upstream_y_tend').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%v_upstream_y_tend(1:model_config_rec%num_force_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_upstream_y_tend(1:model_config_rec%num_force_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_upstream_y_tend=initial_data_value ELSE ALLOCATE(grid%v_upstream_y_tend(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_upstream_y_tend(1). ') endif ENDIF IF(in_use_for_config(id,'mu_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%mu_1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_1=initial_data_value ELSE ALLOCATE(grid%mu_1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_1(1,1). ') endif ENDIF IF(in_use_for_config(id,'mu_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%mu_2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_2=initial_data_value ELSE ALLOCATE(grid%mu_2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_2(1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%mu_bxs(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_bxs(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%mu_bxe(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_bxe(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%mu_bys(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_bys(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%mu_bye(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_bye(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_bye=initial_data_value ELSE ALLOCATE(grid%mu_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_bxs(1,1,1). ') endif ALLOCATE(grid%mu_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_bxe(1,1,1). ') endif ALLOCATE(grid%mu_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_bys(1,1,1). ') endif ALLOCATE(grid%mu_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_bye(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%mu_btxs(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_btxs(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%mu_btxe(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_btxe(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%mu_btys(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_btys(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%mu_btye(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_btye(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_btye=initial_data_value ELSE ALLOCATE(grid%mu_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_btxs(1,1,1). ') endif ALLOCATE(grid%mu_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_btxe(1,1,1). ') endif ALLOCATE(grid%mu_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_btys(1,1,1). ') endif ALLOCATE(grid%mu_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_btye(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'mub'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%mub(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mub(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mub=initial_data_value ELSE ALLOCATE(grid%mub(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mub(1,1). ') endif ENDIF IF(in_use_for_config(id,'mub_fine').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%mub_fine(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mub_fine(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mub_fine=initial_data_value ELSE ALLOCATE(grid%mub_fine(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mub_fine(1,1). ') endif ENDIF IF(in_use_for_config(id,'mub_save').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%mub_save(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mub_save(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mub_save=initial_data_value ELSE ALLOCATE(grid%mub_save(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mub_save(1,1). ') endif ENDIF IF(in_use_for_config(id,'mu0').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%mu0(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu0(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu0=initial_data_value ELSE ALLOCATE(grid%mu0(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu0(1,1). ') endif ENDIF IF(in_use_for_config(id,'mudf').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%mudf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mudf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mudf=initial_data_value ELSE ALLOCATE(grid%mudf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mudf(1,1). ') endif ENDIF IF(in_use_for_config(id,'muu'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%muu(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%muu(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%muu=initial_data_value ELSE ALLOCATE(grid%muu(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%muu(1,1). ') endif ENDIF IF(in_use_for_config(id,'muv'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%muv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%muv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%muv=initial_data_value ELSE ALLOCATE(grid%muv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%muv(1,1). ') endif ENDIF IF(in_use_for_config(id,'mut'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%mut(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mut(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mut=initial_data_value ELSE ALLOCATE(grid%mut(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mut(1,1). ') endif ENDIF IF(in_use_for_config(id,'muts'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%muts(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%muts(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%muts=initial_data_value ELSE ALLOCATE(grid%muts(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%muts(1,1). ') endif ENDIF IF(in_use_for_config(id,'nest_pos'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%nest_pos(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%nest_pos(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%nest_pos=initial_data_value ELSE ALLOCATE(grid%nest_pos(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%nest_pos(1,1). ') endif ENDIF IF(in_use_for_config(id,'nest_mask'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%nest_mask(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%nest_mask(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%nest_mask=initial_data_value ELSE ALLOCATE(grid%nest_mask(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%nest_mask(1,1). ') endif ENDIF IF(in_use_for_config(id,'ht_coarse').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ht_coarse(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_coarse(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_coarse=initial_data_value ELSE ALLOCATE(grid%ht_coarse(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_coarse(1,1). ') endif ENDIF IF(in_use_for_config(id,'tke_1').AND.(.NOT.inter_domain).AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tke_1(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tke_1(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tke_1=initial_data_value ELSE ALLOCATE(grid%tke_1(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tke_1(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'tke_2').AND.(.NOT.inter_domain).AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tke_2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tke_2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tke_2=initial_data_value ELSE ALLOCATE(grid%tke_2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tke_2(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'p').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%p(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%p(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%p=initial_data_value ELSE ALLOCATE(grid%p(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%p(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'al').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%al(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%al(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%al=initial_data_value ELSE ALLOCATE(grid%al(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%al(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'alt').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%alt(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%alt(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%alt=initial_data_value ELSE ALLOCATE(grid%alt(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%alt(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'alb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%alb(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%alb(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%alb=initial_data_value ELSE ALLOCATE(grid%alb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%alb(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'zx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%zx(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%zx(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%zx=initial_data_value ELSE ALLOCATE(grid%zx(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%zx(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'zy').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%zy(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%zy(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%zy=initial_data_value ELSE ALLOCATE(grid%zy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%zy(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rdz').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rdz(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rdz(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rdz=initial_data_value ELSE ALLOCATE(grid%rdz(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rdz(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rdzw').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rdzw(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rdzw(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rdzw=initial_data_value ELSE ALLOCATE(grid%rdzw(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rdzw(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'pb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%pb(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pb(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pb=initial_data_value ELSE ALLOCATE(grid%pb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pb(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'sr').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sr=initial_data_value ELSE ALLOCATE(grid%sr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sr(1,1). ') endif ENDIF IF(in_use_for_config(id,'potevp').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%potevp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%potevp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%potevp=initial_data_value ELSE ALLOCATE(grid%potevp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%potevp(1,1). ') endif ENDIF IF(in_use_for_config(id,'snopcx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%snopcx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snopcx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snopcx=initial_data_value ELSE ALLOCATE(grid%snopcx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snopcx(1,1). ') endif ENDIF IF(in_use_for_config(id,'soiltb').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soiltb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soiltb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soiltb=initial_data_value ELSE ALLOCATE(grid%soiltb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soiltb(1,1). ') endif ENDIF IF(in_use_for_config(id,'fnm').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE ALLOCATE(grid%fnm(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fnm(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fnm=initial_data_value ELSE ALLOCATE(grid%fnm(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fnm(1). ') endif ENDIF IF(in_use_for_config(id,'fnp').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE ALLOCATE(grid%fnp(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fnp(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fnp=initial_data_value ELSE ALLOCATE(grid%fnp(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fnp(1). ') endif ENDIF IF(in_use_for_config(id,'rdnw').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE ALLOCATE(grid%rdnw(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rdnw(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rdnw=initial_data_value ELSE ALLOCATE(grid%rdnw(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rdnw(1). ') endif ENDIF IF(in_use_for_config(id,'rdn').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE ALLOCATE(grid%rdn(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rdn(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rdn=initial_data_value ELSE ALLOCATE(grid%rdn(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rdn(1). ') endif ENDIF IF(in_use_for_config(id,'dnw').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE ALLOCATE(grid%dnw(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dnw(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dnw=initial_data_value ELSE ALLOCATE(grid%dnw(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dnw(1). ') endif ENDIF IF(in_use_for_config(id,'dn').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE ALLOCATE(grid%dn(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dn(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dn=initial_data_value ELSE ALLOCATE(grid%dn(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dn(1). ') endif ENDIF IF(in_use_for_config(id,'t_base').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE ALLOCATE(grid%t_base(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_base(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_base=initial_data_value ELSE ALLOCATE(grid%t_base(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_base(1). ') endif ENDIF IF(in_use_for_config(id,'z').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%z(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%z(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z=initial_data_value ELSE ALLOCATE(grid%z(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%z(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'z_at_w').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%z_at_w(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%z_at_w(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z_at_w=initial_data_value ELSE ALLOCATE(grid%z_at_w(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%z_at_w(1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%cfn=initial_data_value IF ( setinitval .EQ. 3 ) grid%cfn1=initial_data_value IF ( setinitval .EQ. 3 ) grid%step_number=0 IF(in_use_for_config(id,'q2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%q2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%q2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2=initial_data_value ELSE ALLOCATE(grid%q2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%q2(1,1). ') endif ENDIF IF(in_use_for_config(id,'t2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%t2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2=initial_data_value ELSE ALLOCATE(grid%t2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t2(1,1). ') endif ENDIF IF(in_use_for_config(id,'th2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%th2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th2=initial_data_value ELSE ALLOCATE(grid%th2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th2(1,1). ') endif ENDIF IF(in_use_for_config(id,'psfc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%psfc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%psfc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%psfc=initial_data_value ELSE ALLOCATE(grid%psfc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%psfc(1,1). ') endif ENDIF IF(in_use_for_config(id,'u10'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%u10(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u10(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u10=initial_data_value ELSE ALLOCATE(grid%u10(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u10(1,1). ') endif ENDIF IF(in_use_for_config(id,'v10'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%v10(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v10(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v10=initial_data_value ELSE ALLOCATE(grid%v10(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v10(1,1). ') endif ENDIF IF(in_use_for_config(id,'uratx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%uratx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%uratx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%uratx=initial_data_value ELSE ALLOCATE(grid%uratx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%uratx(1,1). ') endif ENDIF IF(in_use_for_config(id,'vratx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%vratx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vratx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vratx=initial_data_value ELSE ALLOCATE(grid%vratx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vratx(1,1). ') endif ENDIF IF(in_use_for_config(id,'tratx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tratx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tratx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tratx=initial_data_value ELSE ALLOCATE(grid%tratx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tratx(1,1). ') endif ENDIF IF(in_use_for_config(id,'obs_savwt').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%nobs_err_flds)-(1)+1))*(((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%obs_savwt(1:model_config_rec%nobs_err_flds,sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%obs_savwt(1:model_config_rec%nobs_err_flds,sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%obs_savwt=initial_data_value ELSE ALLOCATE(grid%obs_savwt(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%obs_savwt(1,1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%rdx=initial_data_value IF ( setinitval .EQ. 3 ) grid%rdy=initial_data_value IF ( setinitval .EQ. 3 ) grid%dts=initial_data_value IF ( setinitval .EQ. 3 ) grid%dtseps=initial_data_value IF ( setinitval .EQ. 3 ) grid%resm=initial_data_value IF ( setinitval .EQ. 3 ) grid%zetatop=initial_data_value IF ( setinitval .EQ. 3 ) grid%cf1=initial_data_value IF ( setinitval .EQ. 3 ) grid%cf2=initial_data_value IF ( setinitval .EQ. 3 ) grid%cf3=initial_data_value IF ( setinitval .EQ. 3 ) grid%number_at_same_level=0 IF ( setinitval .EQ. 3 ) grid%itimestep=0 IF ( setinitval .EQ. 3 ) grid%xtime=initial_data_value IF ( setinitval .EQ. 3 ) grid%julian=initial_data_value IF ( setinitval .EQ. 3 ) grid%lbc_fid=0 IF ( setinitval .EQ. 3 ) grid%tiled=.FALSE. IF ( setinitval .EQ. 3 ) grid%patched=.FALSE. IF ( setinitval .EQ. 3 ) grid%press_adj=.FALSE. IF(in_use_for_config(id,'imask_nostag').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%imask_nostag(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%imask_nostag(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%imask_nostag=0 ELSE ALLOCATE(grid%imask_nostag(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%imask_nostag(1,1). ') endif ENDIF IF(in_use_for_config(id,'imask_xstag').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%imask_xstag(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%imask_xstag(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%imask_xstag=0 ELSE ALLOCATE(grid%imask_xstag(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%imask_xstag(1,1). ') endif ENDIF IF(in_use_for_config(id,'imask_ystag').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%imask_ystag(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%imask_ystag(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%imask_ystag=0 ELSE ALLOCATE(grid%imask_ystag(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%imask_ystag(1,1). ') endif ENDIF IF(in_use_for_config(id,'imask_xystag').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%imask_xystag(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%imask_xystag(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%imask_xystag=0 ELSE ALLOCATE(grid%imask_xystag(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%imask_xystag(1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%xi=initial_data_value IF ( setinitval .EQ. 3 ) grid%xj=initial_data_value IF ( setinitval .EQ. 3 ) grid%vc_i=initial_data_value IF ( setinitval .EQ. 3 ) grid%vc_j=initial_data_value IF(in_use_for_config(id,'moist'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_moist)) * RWORDSIZE ALLOCATE(grid%moist(sm31:em31,sm32:em32,sm33:em33,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist(sm31:em31,sm32:em32,sm33:em33,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist=initial_data_value ELSE ALLOCATE(grid%moist(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist(1,1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE ALLOCATE(grid%moist_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE ALLOCATE(grid%moist_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE ALLOCATE(grid%moist_bys(sm31:em31,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_bys(sm31:em31,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE ALLOCATE(grid%moist_bye(sm31:em31,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_bye(sm31:em31,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_bye=initial_data_value ELSE ALLOCATE(grid%moist_bxs(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_bxs(1,1,1,num_moist). ') endif ALLOCATE(grid%moist_bxe(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_bxe(1,1,1,num_moist). ') endif ALLOCATE(grid%moist_bys(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_bys(1,1,1,num_moist). ') endif ALLOCATE(grid%moist_bye(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_bye(1,1,1,num_moist). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE ALLOCATE(grid%moist_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE ALLOCATE(grid%moist_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE ALLOCATE(grid%moist_btys(sm31:em31,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_btys(sm31:em31,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE ALLOCATE(grid%moist_btye(sm31:em31,sm32:em32,spec_bdy_width,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_btye(sm31:em31,sm32:em32,spec_bdy_width,num_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%moist_btye=initial_data_value ELSE ALLOCATE(grid%moist_btxs(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_btxs(1,1,1,num_moist). ') endif ALLOCATE(grid%moist_btxe(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_btxe(1,1,1,num_moist). ') endif ALLOCATE(grid%moist_btys(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_btys(1,1,1,num_moist). ') endif ALLOCATE(grid%moist_btye(1,1,1,num_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%moist_btye(1,1,1,num_moist). ') endif ENDIF IF(in_use_for_config(id,'dfi_moist'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_dfi_moist)) * RWORDSIZE ALLOCATE(grid%dfi_moist(sm31:em31,sm32:em32,sm33:em33,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist(sm31:em31,sm32:em32,sm33:em33,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist=initial_data_value ELSE ALLOCATE(grid%dfi_moist(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist(1,1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE ALLOCATE(grid%dfi_moist_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE ALLOCATE(grid%dfi_moist_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE ALLOCATE(grid%dfi_moist_bys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE ALLOCATE(grid%dfi_moist_bye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_bye=initial_data_value ELSE ALLOCATE(grid%dfi_moist_bxs(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bxs(1,1,1,num_dfi_moist). ') endif ALLOCATE(grid%dfi_moist_bxe(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bxe(1,1,1,num_dfi_moist). ') endif ALLOCATE(grid%dfi_moist_bys(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bys(1,1,1,num_dfi_moist). ') endif ALLOCATE(grid%dfi_moist_bye(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_bye(1,1,1,num_dfi_moist). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE ALLOCATE(grid%dfi_moist_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE ALLOCATE(grid%dfi_moist_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE ALLOCATE(grid%dfi_moist_btys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE ALLOCATE(grid%dfi_moist_btye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_moist). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_moist_btye=initial_data_value ELSE ALLOCATE(grid%dfi_moist_btxs(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btxs(1,1,1,num_dfi_moist). ') endif ALLOCATE(grid%dfi_moist_btxe(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btxe(1,1,1,num_dfi_moist). ') endif ALLOCATE(grid%dfi_moist_btys(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btys(1,1,1,num_dfi_moist). ') endif ALLOCATE(grid%dfi_moist_btye(1,1,1,num_dfi_moist),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_moist_btye(1,1,1,num_dfi_moist). ') endif ENDIF IF(in_use_for_config(id,'chem'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_chem)) * RWORDSIZE ALLOCATE(grid%chem(sm31:em31,sm32:em32,sm33:em33,num_chem),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%chem(sm31:em31,sm32:em32,sm33:em33,num_chem). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%chem=initial_data_value ELSE ALLOCATE(grid%chem(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%chem(1,1,1,1). ') endif ENDIF IF(in_use_for_config(id,'scalar'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_scalar)) * RWORDSIZE ALLOCATE(grid%scalar(sm31:em31,sm32:em32,sm33:em33,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar(sm31:em31,sm32:em32,sm33:em33,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar=initial_data_value ELSE ALLOCATE(grid%scalar(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar(1,1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE ALLOCATE(grid%scalar_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE ALLOCATE(grid%scalar_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE ALLOCATE(grid%scalar_bys(sm31:em31,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_bys(sm31:em31,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE ALLOCATE(grid%scalar_bye(sm31:em31,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_bye(sm31:em31,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_bye=initial_data_value ELSE ALLOCATE(grid%scalar_bxs(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_bxs(1,1,1,num_scalar). ') endif ALLOCATE(grid%scalar_bxe(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_bxe(1,1,1,num_scalar). ') endif ALLOCATE(grid%scalar_bys(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_bys(1,1,1,num_scalar). ') endif ALLOCATE(grid%scalar_bye(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_bye(1,1,1,num_scalar). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE ALLOCATE(grid%scalar_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE ALLOCATE(grid%scalar_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE ALLOCATE(grid%scalar_btys(sm31:em31,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_btys(sm31:em31,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE ALLOCATE(grid%scalar_btye(sm31:em31,sm32:em32,spec_bdy_width,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_btye(sm31:em31,sm32:em32,spec_bdy_width,num_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%scalar_btye=initial_data_value ELSE ALLOCATE(grid%scalar_btxs(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_btxs(1,1,1,num_scalar). ') endif ALLOCATE(grid%scalar_btxe(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_btxe(1,1,1,num_scalar). ') endif ALLOCATE(grid%scalar_btys(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_btys(1,1,1,num_scalar). ') endif ALLOCATE(grid%scalar_btye(1,1,1,num_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%scalar_btye(1,1,1,num_scalar). ') endif ENDIF IF(in_use_for_config(id,'dfi_scalar'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_dfi_scalar)) * RWORDSIZE ALLOCATE(grid%dfi_scalar(sm31:em31,sm32:em32,sm33:em33,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar(sm31:em31,sm32:em32,sm33:em33,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar=initial_data_value ELSE ALLOCATE(grid%dfi_scalar(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar(1,1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE ALLOCATE(grid%dfi_scalar_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE ALLOCATE(grid%dfi_scalar_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE ALLOCATE(grid%dfi_scalar_bys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE ALLOCATE(grid%dfi_scalar_bye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_bye=initial_data_value ELSE ALLOCATE(grid%dfi_scalar_bxs(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bxs(1,1,1,num_dfi_scalar). ') endif ALLOCATE(grid%dfi_scalar_bxe(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bxe(1,1,1,num_dfi_scalar). ') endif ALLOCATE(grid%dfi_scalar_bys(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bys(1,1,1,num_dfi_scalar). ') endif ALLOCATE(grid%dfi_scalar_bye(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_bye(1,1,1,num_dfi_scalar). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE ALLOCATE(grid%dfi_scalar_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btxs(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE ALLOCATE(grid%dfi_scalar_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btxe(sm33:em33,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE ALLOCATE(grid%dfi_scalar_btys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btys(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE ALLOCATE(grid%dfi_scalar_btye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btye(sm31:em31,sm32:em32,spec_bdy_width,num_dfi_scalar). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_scalar_btye=initial_data_value ELSE ALLOCATE(grid%dfi_scalar_btxs(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btxs(1,1,1,num_dfi_scalar). ') endif ALLOCATE(grid%dfi_scalar_btxe(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btxe(1,1,1,num_dfi_scalar). ') endif ALLOCATE(grid%dfi_scalar_btys(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btys(1,1,1,num_dfi_scalar). ') endif ALLOCATE(grid%dfi_scalar_btye(1,1,1,num_dfi_scalar),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_scalar_btye(1,1,1,num_dfi_scalar). ') endif ENDIF IF(in_use_for_config(id,'fcx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%spec_bdy_width)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fcx(1:model_config_rec%spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fcx(1:model_config_rec%spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fcx=initial_data_value ELSE ALLOCATE(grid%fcx(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fcx(1). ') endif ENDIF IF(in_use_for_config(id,'gcx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%spec_bdy_width)-(1)+1))) * RWORDSIZE ALLOCATE(grid%gcx(1:model_config_rec%spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%gcx(1:model_config_rec%spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gcx=initial_data_value ELSE ALLOCATE(grid%gcx(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%gcx(1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%dtbc=initial_data_value IF(in_use_for_config(id,'soil_layers').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soil_layers(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soil_layers(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soil_layers=initial_data_value ELSE ALLOCATE(grid%soil_layers(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soil_layers(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'soil_levels').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soil_levels(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soil_levels(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soil_levels=initial_data_value ELSE ALLOCATE(grid%soil_levels(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soil_levels(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'st').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%st(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st=initial_data_value ELSE ALLOCATE(grid%st(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'sm').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sm(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm=initial_data_value ELSE ALLOCATE(grid%sm(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'sw').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sw(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sw(sm31:em31,1:model_config_rec%num_metgrid_soil_levels,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sw=initial_data_value ELSE ALLOCATE(grid%sw(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sw(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'sm000007').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sm000007(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm000007(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm000007=initial_data_value ELSE ALLOCATE(grid%sm000007(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm000007(1,1). ') endif ENDIF IF(in_use_for_config(id,'sm007028').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sm007028(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm007028(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm007028=initial_data_value ELSE ALLOCATE(grid%sm007028(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm007028(1,1). ') endif ENDIF IF(in_use_for_config(id,'sm028100').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sm028100(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm028100(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm028100=initial_data_value ELSE ALLOCATE(grid%sm028100(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm028100(1,1). ') endif ENDIF IF(in_use_for_config(id,'sm100255').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sm100255(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm100255(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm100255=initial_data_value ELSE ALLOCATE(grid%sm100255(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm100255(1,1). ') endif ENDIF IF(in_use_for_config(id,'st000007').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%st000007(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st000007(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st000007=initial_data_value ELSE ALLOCATE(grid%st000007(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st000007(1,1). ') endif ENDIF IF(in_use_for_config(id,'st007028').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%st007028(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st007028(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st007028=initial_data_value ELSE ALLOCATE(grid%st007028(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st007028(1,1). ') endif ENDIF IF(in_use_for_config(id,'st028100').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%st028100(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st028100(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st028100=initial_data_value ELSE ALLOCATE(grid%st028100(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st028100(1,1). ') endif ENDIF IF(in_use_for_config(id,'st100255').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%st100255(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st100255(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st100255=initial_data_value ELSE ALLOCATE(grid%st100255(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st100255(1,1). ') endif ENDIF IF(in_use_for_config(id,'sm000010').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sm000010(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm000010(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm000010=initial_data_value ELSE ALLOCATE(grid%sm000010(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm000010(1,1). ') endif ENDIF IF(in_use_for_config(id,'sm010040').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sm010040(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm010040(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm010040=initial_data_value ELSE ALLOCATE(grid%sm010040(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm010040(1,1). ') endif ENDIF IF(in_use_for_config(id,'sm040100').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sm040100(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm040100(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm040100=initial_data_value ELSE ALLOCATE(grid%sm040100(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm040100(1,1). ') endif ENDIF IF(in_use_for_config(id,'sm100200').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sm100200(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm100200(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm100200=initial_data_value ELSE ALLOCATE(grid%sm100200(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm100200(1,1). ') endif ENDIF IF(in_use_for_config(id,'sm010200').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sm010200(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm010200(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sm010200=initial_data_value ELSE ALLOCATE(grid%sm010200(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sm010200(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilm000').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilm000(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilm000(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilm000=initial_data_value ELSE ALLOCATE(grid%soilm000(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilm000(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilm005').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilm005(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilm005(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilm005=initial_data_value ELSE ALLOCATE(grid%soilm005(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilm005(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilm020').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilm020(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilm020(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilm020=initial_data_value ELSE ALLOCATE(grid%soilm020(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilm020(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilm040').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilm040(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilm040(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilm040=initial_data_value ELSE ALLOCATE(grid%soilm040(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilm040(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilm160').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilm160(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilm160(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilm160=initial_data_value ELSE ALLOCATE(grid%soilm160(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilm160(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilm300').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilm300(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilm300(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilm300=initial_data_value ELSE ALLOCATE(grid%soilm300(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilm300(1,1). ') endif ENDIF IF(in_use_for_config(id,'sw000010').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sw000010(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sw000010(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sw000010=initial_data_value ELSE ALLOCATE(grid%sw000010(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sw000010(1,1). ') endif ENDIF IF(in_use_for_config(id,'sw010040').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sw010040(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sw010040(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sw010040=initial_data_value ELSE ALLOCATE(grid%sw010040(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sw010040(1,1). ') endif ENDIF IF(in_use_for_config(id,'sw040100').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sw040100(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sw040100(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sw040100=initial_data_value ELSE ALLOCATE(grid%sw040100(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sw040100(1,1). ') endif ENDIF IF(in_use_for_config(id,'sw100200').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sw100200(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sw100200(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sw100200=initial_data_value ELSE ALLOCATE(grid%sw100200(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sw100200(1,1). ') endif ENDIF IF(in_use_for_config(id,'sw010200').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sw010200(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sw010200(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sw010200=initial_data_value ELSE ALLOCATE(grid%sw010200(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sw010200(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilw000').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilw000(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilw000(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilw000=initial_data_value ELSE ALLOCATE(grid%soilw000(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilw000(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilw005').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilw005(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilw005(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilw005=initial_data_value ELSE ALLOCATE(grid%soilw005(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilw005(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilw020').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilw020(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilw020(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilw020=initial_data_value ELSE ALLOCATE(grid%soilw020(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilw020(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilw040').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilw040(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilw040(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilw040=initial_data_value ELSE ALLOCATE(grid%soilw040(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilw040(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilw160').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilw160(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilw160(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilw160=initial_data_value ELSE ALLOCATE(grid%soilw160(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilw160(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilw300').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilw300(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilw300(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilw300=initial_data_value ELSE ALLOCATE(grid%soilw300(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilw300(1,1). ') endif ENDIF IF(in_use_for_config(id,'st000010').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%st000010(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st000010(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st000010=initial_data_value ELSE ALLOCATE(grid%st000010(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st000010(1,1). ') endif ENDIF IF(in_use_for_config(id,'st010040').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%st010040(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st010040(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st010040=initial_data_value ELSE ALLOCATE(grid%st010040(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st010040(1,1). ') endif ENDIF IF(in_use_for_config(id,'st040100').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%st040100(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st040100(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st040100=initial_data_value ELSE ALLOCATE(grid%st040100(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st040100(1,1). ') endif ENDIF IF(in_use_for_config(id,'st100200').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%st100200(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st100200(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st100200=initial_data_value ELSE ALLOCATE(grid%st100200(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st100200(1,1). ') endif ENDIF IF(in_use_for_config(id,'st010200').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%st010200(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st010200(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%st010200=initial_data_value ELSE ALLOCATE(grid%st010200(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%st010200(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilt000').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilt000(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt000(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt000=initial_data_value ELSE ALLOCATE(grid%soilt000(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt000(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilt005').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilt005(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt005(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt005=initial_data_value ELSE ALLOCATE(grid%soilt005(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt005(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilt020').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilt020(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt020(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt020=initial_data_value ELSE ALLOCATE(grid%soilt020(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt020(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilt040').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilt040(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt040(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt040=initial_data_value ELSE ALLOCATE(grid%soilt040(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt040(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilt160').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilt160(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt160(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt160=initial_data_value ELSE ALLOCATE(grid%soilt160(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt160(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilt300').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilt300(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt300(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt300=initial_data_value ELSE ALLOCATE(grid%soilt300(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt300(1,1). ') endif ENDIF IF(in_use_for_config(id,'landmask'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%landmask(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%landmask(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%landmask=initial_data_value ELSE ALLOCATE(grid%landmask(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%landmask(1,1). ') endif ENDIF IF(in_use_for_config(id,'topostdv').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%topostdv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%topostdv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%topostdv=initial_data_value ELSE ALLOCATE(grid%topostdv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%topostdv(1,1). ') endif ENDIF IF(in_use_for_config(id,'toposlpx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%toposlpx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%toposlpx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%toposlpx=initial_data_value ELSE ALLOCATE(grid%toposlpx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%toposlpx(1,1). ') endif ENDIF IF(in_use_for_config(id,'toposlpy').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%toposlpy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%toposlpy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%toposlpy=initial_data_value ELSE ALLOCATE(grid%toposlpy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%toposlpy(1,1). ') endif ENDIF IF(in_use_for_config(id,'shdmax'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%shdmax(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%shdmax(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%shdmax=initial_data_value ELSE ALLOCATE(grid%shdmax(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%shdmax(1,1). ') endif ENDIF IF(in_use_for_config(id,'shdmin'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%shdmin(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%shdmin(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%shdmin=initial_data_value ELSE ALLOCATE(grid%shdmin(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%shdmin(1,1). ') endif ENDIF IF(in_use_for_config(id,'snoalb').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%snoalb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snoalb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snoalb=initial_data_value ELSE ALLOCATE(grid%snoalb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snoalb(1,1). ') endif ENDIF IF(in_use_for_config(id,'slopecat').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%slopecat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%slopecat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%slopecat=initial_data_value ELSE ALLOCATE(grid%slopecat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%slopecat(1,1). ') endif ENDIF IF(in_use_for_config(id,'toposoil').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%toposoil(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%toposoil(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%toposoil=initial_data_value ELSE ALLOCATE(grid%toposoil(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%toposoil(1,1). ') endif ENDIF IF(in_use_for_config(id,'landusef').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_land_cat)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%landusef(sm31:em31,1:model_config_rec%num_land_cat,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%landusef(sm31:em31,1:model_config_rec%num_land_cat,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%landusef=initial_data_value ELSE ALLOCATE(grid%landusef(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%landusef(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'soilctop').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_cat)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilctop(sm31:em31,1:model_config_rec%num_soil_cat,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilctop(sm31:em31,1:model_config_rec%num_soil_cat,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilctop=initial_data_value ELSE ALLOCATE(grid%soilctop(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilctop(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'soilcbot').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_cat)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilcbot(sm31:em31,1:model_config_rec%num_soil_cat,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilcbot(sm31:em31,1:model_config_rec%num_soil_cat,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilcbot=initial_data_value ELSE ALLOCATE(grid%soilcbot(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilcbot(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'soilcat').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilcat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilcat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilcat=initial_data_value ELSE ALLOCATE(grid%soilcat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilcat(1,1). ') endif ENDIF IF(in_use_for_config(id,'vegcat').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%vegcat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vegcat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vegcat=initial_data_value ELSE ALLOCATE(grid%vegcat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vegcat(1,1). ') endif ENDIF IF(in_use_for_config(id,'tslb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tslb(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tslb(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tslb=initial_data_value ELSE ALLOCATE(grid%tslb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tslb(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_hour').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_hour(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_hour(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_hour=initial_data_value ELSE ALLOCATE(grid%ts_hour(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_hour(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_u').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_u(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_u(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_u=initial_data_value ELSE ALLOCATE(grid%ts_u(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_u(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_v').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_v(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_v(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_v=initial_data_value ELSE ALLOCATE(grid%ts_v(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_v(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_q').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_q(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_q(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_q=initial_data_value ELSE ALLOCATE(grid%ts_q(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_q(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_t').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_t(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_t(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_t=initial_data_value ELSE ALLOCATE(grid%ts_t(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_t(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_psfc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_psfc(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_psfc(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_psfc=initial_data_value ELSE ALLOCATE(grid%ts_psfc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_psfc(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_glw').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_glw(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_glw(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_glw=initial_data_value ELSE ALLOCATE(grid%ts_glw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_glw(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_gsw').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_gsw(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_gsw(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_gsw=initial_data_value ELSE ALLOCATE(grid%ts_gsw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_gsw(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_hfx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_hfx(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_hfx(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_hfx=initial_data_value ELSE ALLOCATE(grid%ts_hfx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_hfx(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_lh').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_lh(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_lh(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_lh=initial_data_value ELSE ALLOCATE(grid%ts_lh(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_lh(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_tsk').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_tsk(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_tsk(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_tsk=initial_data_value ELSE ALLOCATE(grid%ts_tsk(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_tsk(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_tslb').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_tslb(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_tslb(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_tslb=initial_data_value ELSE ALLOCATE(grid%ts_tslb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_tslb(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_clw').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_clw(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_clw(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_clw=initial_data_value ELSE ALLOCATE(grid%ts_clw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_clw(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_rainc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_rainc(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_rainc(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_rainc=initial_data_value ELSE ALLOCATE(grid%ts_rainc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_rainc(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_rainnc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%ts_rainnc(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_rainnc(1:model_config_rec%ts_buf_size,1:model_config_rec%max_ts_locs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_rainnc=initial_data_value ELSE ALLOCATE(grid%ts_rainnc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_rainnc(1,1). ') endif ENDIF IF(in_use_for_config(id,'dzr').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%dzr(1:model_config_rec%num_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dzr(1:model_config_rec%num_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dzr=initial_data_value ELSE ALLOCATE(grid%dzr(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dzr(1). ') endif ENDIF IF(in_use_for_config(id,'dzb').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%dzb(1:model_config_rec%num_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dzb(1:model_config_rec%num_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dzb=initial_data_value ELSE ALLOCATE(grid%dzb(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dzb(1). ') endif ENDIF IF(in_use_for_config(id,'dzg').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * RWORDSIZE ALLOCATE(grid%dzg(1:model_config_rec%num_soil_layers),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dzg(1:model_config_rec%num_soil_layers). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dzg=initial_data_value ELSE ALLOCATE(grid%dzg(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dzg(1). ') endif ENDIF IF(in_use_for_config(id,'smois'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%smois(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%smois(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%smois=initial_data_value ELSE ALLOCATE(grid%smois(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%smois(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'sh2o'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sh2o(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sh2o(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sh2o=initial_data_value ELSE ALLOCATE(grid%sh2o(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sh2o(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'xice'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xice(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xice(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xice=initial_data_value ELSE ALLOCATE(grid%xice(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xice(1,1). ') endif ENDIF IF(in_use_for_config(id,'xicem'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xicem(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xicem(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xicem=initial_data_value ELSE ALLOCATE(grid%xicem(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xicem(1,1). ') endif ENDIF IF(in_use_for_config(id,'smstav'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%smstav(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%smstav(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%smstav=initial_data_value ELSE ALLOCATE(grid%smstav(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%smstav(1,1). ') endif ENDIF IF(in_use_for_config(id,'smstot').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%smstot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%smstot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%smstot=initial_data_value ELSE ALLOCATE(grid%smstot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%smstot(1,1). ') endif ENDIF IF(in_use_for_config(id,'sfcrunoff'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sfcrunoff(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfcrunoff(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfcrunoff=initial_data_value ELSE ALLOCATE(grid%sfcrunoff(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfcrunoff(1,1). ') endif ENDIF IF(in_use_for_config(id,'udrunoff'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%udrunoff(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%udrunoff(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%udrunoff=initial_data_value ELSE ALLOCATE(grid%udrunoff(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%udrunoff(1,1). ') endif ENDIF IF(in_use_for_config(id,'ivgtyp'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%ivgtyp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ivgtyp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ivgtyp=0 ELSE ALLOCATE(grid%ivgtyp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ivgtyp(1,1). ') endif ENDIF IF(in_use_for_config(id,'isltyp'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%isltyp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%isltyp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%isltyp=0 ELSE ALLOCATE(grid%isltyp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%isltyp(1,1). ') endif ENDIF IF(in_use_for_config(id,'vegfra'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%vegfra(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vegfra(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vegfra=initial_data_value ELSE ALLOCATE(grid%vegfra(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vegfra(1,1). ') endif ENDIF IF(in_use_for_config(id,'sfcevp').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sfcevp(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfcevp(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfcevp=initial_data_value ELSE ALLOCATE(grid%sfcevp(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfcevp(1,1). ') endif ENDIF IF(in_use_for_config(id,'grdflx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%grdflx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%grdflx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%grdflx=initial_data_value ELSE ALLOCATE(grid%grdflx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%grdflx(1,1). ') endif ENDIF IF(in_use_for_config(id,'acgrdflx'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%acgrdflx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acgrdflx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acgrdflx=initial_data_value ELSE ALLOCATE(grid%acgrdflx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acgrdflx(1,1). ') endif ENDIF IF(in_use_for_config(id,'sfcexc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sfcexc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfcexc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfcexc=initial_data_value ELSE ALLOCATE(grid%sfcexc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfcexc(1,1). ') endif ENDIF IF(in_use_for_config(id,'acsnow'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%acsnow(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acsnow(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acsnow=initial_data_value ELSE ALLOCATE(grid%acsnow(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acsnow(1,1). ') endif ENDIF IF(in_use_for_config(id,'acsnom'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%acsnom(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acsnom(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acsnom=initial_data_value ELSE ALLOCATE(grid%acsnom(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acsnom(1,1). ') endif ENDIF IF(in_use_for_config(id,'snow'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%snow(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snow(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snow=initial_data_value ELSE ALLOCATE(grid%snow(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snow(1,1). ') endif ENDIF IF(in_use_for_config(id,'snowh'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%snowh(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snowh(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowh=initial_data_value ELSE ALLOCATE(grid%snowh(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snowh(1,1). ') endif ENDIF IF(in_use_for_config(id,'rhosn'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rhosn(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rhosn(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rhosn=initial_data_value ELSE ALLOCATE(grid%rhosn(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rhosn(1,1). ') endif ENDIF IF(in_use_for_config(id,'canwat'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%canwat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%canwat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%canwat=initial_data_value ELSE ALLOCATE(grid%canwat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%canwat(1,1). ') endif ENDIF IF(in_use_for_config(id,'sst'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sst(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sst(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sst=initial_data_value ELSE ALLOCATE(grid%sst(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sst(1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%ifndsnowh=0 IF ( setinitval .EQ. 3 ) grid%ifndsoilw=0 IF(in_use_for_config(id,'sstsk'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sstsk(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sstsk(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sstsk=initial_data_value ELSE ALLOCATE(grid%sstsk(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sstsk(1,1). ') endif ENDIF IF(in_use_for_config(id,'dtw').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dtw(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dtw(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dtw=initial_data_value ELSE ALLOCATE(grid%dtw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dtw(1,1). ') endif ENDIF IF(in_use_for_config(id,'hcoeff').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%dfi_time_dim)-(1)+1))) * RWORDSIZE ALLOCATE(grid%hcoeff(1:model_config_rec%dfi_time_dim),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%hcoeff(1:model_config_rec%dfi_time_dim). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hcoeff=initial_data_value ELSE ALLOCATE(grid%hcoeff(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%hcoeff(1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%hcoeff_tot=initial_data_value IF(in_use_for_config(id,'dfi_p').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_p(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_p(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_p=initial_data_value ELSE ALLOCATE(grid%dfi_p(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_p(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_al').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_al(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_al(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_al=initial_data_value ELSE ALLOCATE(grid%dfi_al(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_al(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_mu').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_mu(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_mu(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_mu=initial_data_value ELSE ALLOCATE(grid%dfi_mu(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_mu(1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_phb').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_phb(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_phb(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_phb=initial_data_value ELSE ALLOCATE(grid%dfi_phb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_phb(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_ph0').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_ph0(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_ph0(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_ph0=initial_data_value ELSE ALLOCATE(grid%dfi_ph0(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_ph0(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_php').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_php(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_php(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_php=initial_data_value ELSE ALLOCATE(grid%dfi_php(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_php(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_u').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_u(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_u(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_u=initial_data_value ELSE ALLOCATE(grid%dfi_u(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_u(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_v').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_v(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_v(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_v=initial_data_value ELSE ALLOCATE(grid%dfi_v(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_v(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_w').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_w(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_w(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_w=initial_data_value ELSE ALLOCATE(grid%dfi_w(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_w(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_ww').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_ww(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_ww(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_ww=initial_data_value ELSE ALLOCATE(grid%dfi_ww(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_ww(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_t').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_t(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_t(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_t=initial_data_value ELSE ALLOCATE(grid%dfi_t(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_t(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_ph').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_ph(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_ph(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_ph=initial_data_value ELSE ALLOCATE(grid%dfi_ph(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_ph(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_pb').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_pb(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_pb(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_pb=initial_data_value ELSE ALLOCATE(grid%dfi_pb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_pb(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_alt').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_alt(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_alt(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_alt=initial_data_value ELSE ALLOCATE(grid%dfi_alt(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_alt(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_tke').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_tke(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_tke(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_tke=initial_data_value ELSE ALLOCATE(grid%dfi_tke(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_tke(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_tslb').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_tslb(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_tslb(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_tslb=initial_data_value ELSE ALLOCATE(grid%dfi_tslb(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_tslb(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_smois').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_smois(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_smois(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_smois=initial_data_value ELSE ALLOCATE(grid%dfi_smois(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_smois(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_snow').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_snow(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_snow(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_snow=initial_data_value ELSE ALLOCATE(grid%dfi_snow(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_snow(1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_snowh').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_snowh(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_snowh(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_snowh=initial_data_value ELSE ALLOCATE(grid%dfi_snowh(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_snowh(1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_canwat').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_canwat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_canwat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_canwat=initial_data_value ELSE ALLOCATE(grid%dfi_canwat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_canwat(1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_smfr3d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_smfr3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_smfr3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_smfr3d=initial_data_value ELSE ALLOCATE(grid%dfi_smfr3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_smfr3d(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_keepfr3dflag').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_keepfr3dflag(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_keepfr3dflag(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_keepfr3dflag=initial_data_value ELSE ALLOCATE(grid%dfi_keepfr3dflag(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_keepfr3dflag(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'tr_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tr_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tr_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tr_urb2d=initial_data_value ELSE ALLOCATE(grid%tr_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tr_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'tb_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tb_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tb_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tb_urb2d=initial_data_value ELSE ALLOCATE(grid%tb_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tb_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'tg_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tg_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tg_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tg_urb2d=initial_data_value ELSE ALLOCATE(grid%tg_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tg_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'tc_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tc_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tc_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tc_urb2d=initial_data_value ELSE ALLOCATE(grid%tc_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tc_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'qc_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%qc_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qc_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qc_urb2d=initial_data_value ELSE ALLOCATE(grid%qc_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qc_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'uc_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%uc_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%uc_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%uc_urb2d=initial_data_value ELSE ALLOCATE(grid%uc_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%uc_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'xxxr_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xxxr_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xxxr_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xxxr_urb2d=initial_data_value ELSE ALLOCATE(grid%xxxr_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xxxr_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'xxxb_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xxxb_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xxxb_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xxxb_urb2d=initial_data_value ELSE ALLOCATE(grid%xxxb_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xxxb_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'xxxg_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xxxg_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xxxg_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xxxg_urb2d=initial_data_value ELSE ALLOCATE(grid%xxxg_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xxxg_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'xxxc_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xxxc_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xxxc_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xxxc_urb2d=initial_data_value ELSE ALLOCATE(grid%xxxc_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xxxc_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'trl_urb3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%trl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%trl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%trl_urb3d=initial_data_value ELSE ALLOCATE(grid%trl_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%trl_urb3d(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'tbl_urb3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tbl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tbl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tbl_urb3d=initial_data_value ELSE ALLOCATE(grid%tbl_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tbl_urb3d(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'tgl_urb3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tgl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tgl_urb3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tgl_urb3d=initial_data_value ELSE ALLOCATE(grid%tgl_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tgl_urb3d(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'sh_urb2d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sh_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sh_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sh_urb2d=initial_data_value ELSE ALLOCATE(grid%sh_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sh_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'lh_urb2d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lh_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lh_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lh_urb2d=initial_data_value ELSE ALLOCATE(grid%lh_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lh_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'g_urb2d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%g_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%g_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%g_urb2d=initial_data_value ELSE ALLOCATE(grid%g_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%g_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'rn_urb2d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rn_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rn_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rn_urb2d=initial_data_value ELSE ALLOCATE(grid%rn_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rn_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'ts_urb2d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ts_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ts_urb2d=initial_data_value ELSE ALLOCATE(grid%ts_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ts_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'frc_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%frc_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%frc_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%frc_urb2d=initial_data_value ELSE ALLOCATE(grid%frc_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%frc_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'utype_urb2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%utype_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%utype_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%utype_urb2d=0 ELSE ALLOCATE(grid%utype_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%utype_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'trb_urb4d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%trb_urb4d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%trb_urb4d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%trb_urb4d=initial_data_value ELSE ALLOCATE(grid%trb_urb4d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%trb_urb4d(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'tw1_urb4d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tw1_urb4d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tw1_urb4d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tw1_urb4d=initial_data_value ELSE ALLOCATE(grid%tw1_urb4d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tw1_urb4d(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'tw2_urb4d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tw2_urb4d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tw2_urb4d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tw2_urb4d=initial_data_value ELSE ALLOCATE(grid%tw2_urb4d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tw2_urb4d(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'tgb_urb4d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tgb_urb4d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tgb_urb4d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tgb_urb4d=initial_data_value ELSE ALLOCATE(grid%tgb_urb4d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tgb_urb4d(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'sfw1_urb3d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sfw1_urb3d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfw1_urb3d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfw1_urb3d=initial_data_value ELSE ALLOCATE(grid%sfw1_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfw1_urb3d(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'sfw2_urb3d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sfw2_urb3d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfw2_urb3d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfw2_urb3d=initial_data_value ELSE ALLOCATE(grid%sfw2_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfw2_urb3d(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'sfr_urb3d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sfr_urb3d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfr_urb3d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfr_urb3d=initial_data_value ELSE ALLOCATE(grid%sfr_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfr_urb3d(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'sfg_urb3d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sfg_urb3d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfg_urb3d(sm31:em31,1:model_config_rec%num_urban_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sfg_urb3d=initial_data_value ELSE ALLOCATE(grid%sfg_urb3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sfg_urb3d(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'cosz_urb2d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cosz_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cosz_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cosz_urb2d=initial_data_value ELSE ALLOCATE(grid%cosz_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cosz_urb2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'omg_urb2d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%omg_urb2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%omg_urb2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%omg_urb2d=initial_data_value ELSE ALLOCATE(grid%omg_urb2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%omg_urb2d(1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%declin_urb=initial_data_value IF(in_use_for_config(id,'smfr3d').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%smfr3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%smfr3d(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%smfr3d=initial_data_value ELSE ALLOCATE(grid%smfr3d(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%smfr3d(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'keepfr3dflag').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%keepfr3dflag(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%keepfr3dflag(sm31:em31,1:model_config_rec%num_soil_layers,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%keepfr3dflag=initial_data_value ELSE ALLOCATE(grid%keepfr3dflag(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%keepfr3dflag(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ra').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ra(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ra(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ra=initial_data_value ELSE ALLOCATE(grid%ra(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ra(1,1). ') endif ENDIF IF(in_use_for_config(id,'rs').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rs=initial_data_value ELSE ALLOCATE(grid%rs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rs(1,1). ') endif ENDIF IF(in_use_for_config(id,'lai').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lai(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lai(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lai=initial_data_value ELSE ALLOCATE(grid%lai(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lai(1,1). ') endif ENDIF IF(in_use_for_config(id,'vegf_px').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%vegf_px(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vegf_px(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vegf_px=initial_data_value ELSE ALLOCATE(grid%vegf_px(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vegf_px(1,1). ') endif ENDIF IF(in_use_for_config(id,'t2obs').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%t2obs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t2obs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2obs=initial_data_value ELSE ALLOCATE(grid%t2obs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t2obs(1,1). ') endif ENDIF IF(in_use_for_config(id,'q2obs').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%q2obs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%q2obs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2obs=initial_data_value ELSE ALLOCATE(grid%q2obs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%q2obs(1,1). ') endif ENDIF IF(in_use_for_config(id,'tke_myj').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tke_myj(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tke_myj(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tke_myj=initial_data_value ELSE ALLOCATE(grid%tke_myj(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tke_myj(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'el_myj').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%el_myj(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%el_myj(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%el_myj=initial_data_value ELSE ALLOCATE(grid%el_myj(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%el_myj(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'exch_h').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%exch_h(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%exch_h(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%exch_h=initial_data_value ELSE ALLOCATE(grid%exch_h(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%exch_h(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'exch_m').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%exch_m(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%exch_m(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%exch_m=initial_data_value ELSE ALLOCATE(grid%exch_m(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%exch_m(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ct').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ct(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ct(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ct=initial_data_value ELSE ALLOCATE(grid%ct(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ct(1,1). ') endif ENDIF IF(in_use_for_config(id,'thz0').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%thz0(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%thz0(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%thz0=initial_data_value ELSE ALLOCATE(grid%thz0(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%thz0(1,1). ') endif ENDIF IF(in_use_for_config(id,'z0').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%z0(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%z0(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z0=initial_data_value ELSE ALLOCATE(grid%z0(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%z0(1,1). ') endif ENDIF IF(in_use_for_config(id,'qz0').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%qz0(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qz0(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qz0=initial_data_value ELSE ALLOCATE(grid%qz0(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qz0(1,1). ') endif ENDIF IF(in_use_for_config(id,'uz0').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%uz0(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%uz0(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%uz0=initial_data_value ELSE ALLOCATE(grid%uz0(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%uz0(1,1). ') endif ENDIF IF(in_use_for_config(id,'vz0').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%vz0(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vz0(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vz0=initial_data_value ELSE ALLOCATE(grid%vz0(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vz0(1,1). ') endif ENDIF IF(in_use_for_config(id,'qsfc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%qsfc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qsfc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qsfc=initial_data_value ELSE ALLOCATE(grid%qsfc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qsfc(1,1). ') endif ENDIF IF(in_use_for_config(id,'akhs').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%akhs(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%akhs(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%akhs=initial_data_value ELSE ALLOCATE(grid%akhs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%akhs(1,1). ') endif ENDIF IF(in_use_for_config(id,'akms').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%akms(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%akms(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%akms=initial_data_value ELSE ALLOCATE(grid%akms(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%akms(1,1). ') endif ENDIF IF(in_use_for_config(id,'kpbl').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%kpbl(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%kpbl(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%kpbl=0 ELSE ALLOCATE(grid%kpbl(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%kpbl(1,1). ') endif ENDIF IF(in_use_for_config(id,'tshltr').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tshltr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tshltr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tshltr=initial_data_value ELSE ALLOCATE(grid%tshltr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tshltr(1,1). ') endif ENDIF IF(in_use_for_config(id,'qshltr').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%qshltr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qshltr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qshltr=initial_data_value ELSE ALLOCATE(grid%qshltr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qshltr(1,1). ') endif ENDIF IF(in_use_for_config(id,'pshltr').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%pshltr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pshltr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pshltr=initial_data_value ELSE ALLOCATE(grid%pshltr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pshltr(1,1). ') endif ENDIF IF(in_use_for_config(id,'th10').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%th10(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th10(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th10=initial_data_value ELSE ALLOCATE(grid%th10(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th10(1,1). ') endif ENDIF IF(in_use_for_config(id,'q10').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%q10(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%q10(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q10=initial_data_value ELSE ALLOCATE(grid%q10(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%q10(1,1). ') endif ENDIF IF(in_use_for_config(id,'qke').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%qke(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qke(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qke=initial_data_value ELSE ALLOCATE(grid%qke(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qke(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'tsq').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tsq(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tsq(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsq=initial_data_value ELSE ALLOCATE(grid%tsq(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tsq(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'qsq').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%qsq(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qsq(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qsq=initial_data_value ELSE ALLOCATE(grid%qsq(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qsq(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'cov').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cov(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cov(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cov=initial_data_value ELSE ALLOCATE(grid%cov(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cov(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ch').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ch(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ch(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ch=initial_data_value ELSE ALLOCATE(grid%ch(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ch(1,1). ') endif ENDIF IF(in_use_for_config(id,'dusfcg').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dusfcg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dusfcg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dusfcg=initial_data_value ELSE ALLOCATE(grid%dusfcg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dusfcg(1,1). ') endif ENDIF IF(in_use_for_config(id,'dvsfcg').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dvsfcg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dvsfcg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dvsfcg=initial_data_value ELSE ALLOCATE(grid%dvsfcg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dvsfcg(1,1). ') endif ENDIF IF(in_use_for_config(id,'var2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%var2d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%var2d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%var2d=initial_data_value ELSE ALLOCATE(grid%var2d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%var2d(1,1). ') endif ENDIF IF(in_use_for_config(id,'oc12d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%oc12d(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%oc12d(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%oc12d=initial_data_value ELSE ALLOCATE(grid%oc12d(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%oc12d(1,1). ') endif ENDIF IF(in_use_for_config(id,'oa1'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%oa1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%oa1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%oa1=initial_data_value ELSE ALLOCATE(grid%oa1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%oa1(1,1). ') endif ENDIF IF(in_use_for_config(id,'oa2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%oa2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%oa2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%oa2=initial_data_value ELSE ALLOCATE(grid%oa2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%oa2(1,1). ') endif ENDIF IF(in_use_for_config(id,'oa3'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%oa3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%oa3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%oa3=initial_data_value ELSE ALLOCATE(grid%oa3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%oa3(1,1). ') endif ENDIF IF(in_use_for_config(id,'oa4'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%oa4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%oa4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%oa4=initial_data_value ELSE ALLOCATE(grid%oa4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%oa4(1,1). ') endif ENDIF IF(in_use_for_config(id,'ol1'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ol1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ol1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ol1=initial_data_value ELSE ALLOCATE(grid%ol1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ol1(1,1). ') endif ENDIF IF(in_use_for_config(id,'ol2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ol2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ol2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ol2=initial_data_value ELSE ALLOCATE(grid%ol2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ol2(1,1). ') endif ENDIF IF(in_use_for_config(id,'ol3'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ol3(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ol3(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ol3=initial_data_value ELSE ALLOCATE(grid%ol3(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ol3(1,1). ') endif ENDIF IF(in_use_for_config(id,'ol4'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ol4(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ol4(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ol4=initial_data_value ELSE ALLOCATE(grid%ol4(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ol4(1,1). ') endif ENDIF IF(in_use_for_config(id,'a_u_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%a_u_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%a_u_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%a_u_bep=initial_data_value ELSE ALLOCATE(grid%a_u_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%a_u_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'a_v_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%a_v_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%a_v_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%a_v_bep=initial_data_value ELSE ALLOCATE(grid%a_v_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%a_v_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'a_t_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%a_t_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%a_t_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%a_t_bep=initial_data_value ELSE ALLOCATE(grid%a_t_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%a_t_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'a_q_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%a_q_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%a_q_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%a_q_bep=initial_data_value ELSE ALLOCATE(grid%a_q_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%a_q_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'a_e_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%a_e_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%a_e_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%a_e_bep=initial_data_value ELSE ALLOCATE(grid%a_e_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%a_e_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'b_u_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%b_u_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%b_u_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%b_u_bep=initial_data_value ELSE ALLOCATE(grid%b_u_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%b_u_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'b_v_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%b_v_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%b_v_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%b_v_bep=initial_data_value ELSE ALLOCATE(grid%b_v_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%b_v_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'b_t_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%b_t_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%b_t_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%b_t_bep=initial_data_value ELSE ALLOCATE(grid%b_t_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%b_t_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'b_q_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%b_q_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%b_q_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%b_q_bep=initial_data_value ELSE ALLOCATE(grid%b_q_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%b_q_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'b_e_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%b_e_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%b_e_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%b_e_bep=initial_data_value ELSE ALLOCATE(grid%b_e_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%b_e_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dlg_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dlg_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dlg_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dlg_bep=initial_data_value ELSE ALLOCATE(grid%dlg_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dlg_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dl_u_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dl_u_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dl_u_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dl_u_bep=initial_data_value ELSE ALLOCATE(grid%dl_u_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dl_u_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'sf_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sf_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sf_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sf_bep=initial_data_value ELSE ALLOCATE(grid%sf_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sf_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'vl_bep').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%vl_bep(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vl_bep(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vl_bep=initial_data_value ELSE ALLOCATE(grid%vl_bep(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vl_bep(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'tke_pbl').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tke_pbl(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tke_pbl(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tke_pbl=initial_data_value ELSE ALLOCATE(grid%tke_pbl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tke_pbl(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'el_pbl').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%el_pbl(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%el_pbl(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%el_pbl=initial_data_value ELSE ALLOCATE(grid%el_pbl(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%el_pbl(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'wu_tur').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%wu_tur(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%wu_tur(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wu_tur=initial_data_value ELSE ALLOCATE(grid%wu_tur(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%wu_tur(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'wv_tur').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%wv_tur(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%wv_tur(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wv_tur=initial_data_value ELSE ALLOCATE(grid%wv_tur(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%wv_tur(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'wt_tur').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%wt_tur(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%wt_tur(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wt_tur=initial_data_value ELSE ALLOCATE(grid%wt_tur(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%wt_tur(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'wq_tur').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%wq_tur(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%wq_tur(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%wq_tur=initial_data_value ELSE ALLOCATE(grid%wq_tur(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%wq_tur(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'htop').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%htop(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%htop(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%htop=initial_data_value ELSE ALLOCATE(grid%htop(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%htop(1,1). ') endif ENDIF IF(in_use_for_config(id,'hbot').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%hbot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%hbot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hbot=initial_data_value ELSE ALLOCATE(grid%hbot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%hbot(1,1). ') endif ENDIF IF(in_use_for_config(id,'htopr').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%htopr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%htopr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%htopr=initial_data_value ELSE ALLOCATE(grid%htopr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%htopr(1,1). ') endif ENDIF IF(in_use_for_config(id,'hbotr').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%hbotr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%hbotr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hbotr=initial_data_value ELSE ALLOCATE(grid%hbotr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%hbotr(1,1). ') endif ENDIF IF(in_use_for_config(id,'cutop').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cutop(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cutop(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cutop=initial_data_value ELSE ALLOCATE(grid%cutop(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cutop(1,1). ') endif ENDIF IF(in_use_for_config(id,'cubot').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cubot(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cubot(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cubot=initial_data_value ELSE ALLOCATE(grid%cubot(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cubot(1,1). ') endif ENDIF IF(in_use_for_config(id,'cuppt').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cuppt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cuppt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cuppt=initial_data_value ELSE ALLOCATE(grid%cuppt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cuppt(1,1). ') endif ENDIF IF(in_use_for_config(id,'rswtoa').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rswtoa(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rswtoa(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rswtoa=initial_data_value ELSE ALLOCATE(grid%rswtoa(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rswtoa(1,1). ') endif ENDIF IF(in_use_for_config(id,'rlwtoa').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rlwtoa(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rlwtoa(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rlwtoa=initial_data_value ELSE ALLOCATE(grid%rlwtoa(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rlwtoa(1,1). ') endif ENDIF IF(in_use_for_config(id,'czmean').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%czmean(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%czmean(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%czmean=initial_data_value ELSE ALLOCATE(grid%czmean(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%czmean(1,1). ') endif ENDIF IF(in_use_for_config(id,'cfracl').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cfracl(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cfracl(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cfracl=initial_data_value ELSE ALLOCATE(grid%cfracl(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cfracl(1,1). ') endif ENDIF IF(in_use_for_config(id,'cfracm').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cfracm(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cfracm(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cfracm=initial_data_value ELSE ALLOCATE(grid%cfracm(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cfracm(1,1). ') endif ENDIF IF(in_use_for_config(id,'cfrach').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cfrach(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cfrach(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cfrach=initial_data_value ELSE ALLOCATE(grid%cfrach(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cfrach(1,1). ') endif ENDIF IF(in_use_for_config(id,'acfrst').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%acfrst(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acfrst(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acfrst=initial_data_value ELSE ALLOCATE(grid%acfrst(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acfrst(1,1). ') endif ENDIF IF(in_use_for_config(id,'ncfrst').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%ncfrst(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ncfrst(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ncfrst=0 ELSE ALLOCATE(grid%ncfrst(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ncfrst(1,1). ') endif ENDIF IF(in_use_for_config(id,'acfrcv').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%acfrcv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acfrcv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acfrcv=initial_data_value ELSE ALLOCATE(grid%acfrcv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acfrcv(1,1). ') endif ENDIF IF(in_use_for_config(id,'ncfrcv').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%ncfrcv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ncfrcv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ncfrcv=0 ELSE ALLOCATE(grid%ncfrcv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ncfrcv(1,1). ') endif ENDIF IF(in_use_for_config(id,'ozmixm'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%levsiz)-(1)+1))*(((em33)-(sm33)+1)*num_ozmixm)) * RWORDSIZE ALLOCATE(grid%ozmixm(sm31:em31,1:model_config_rec%levsiz,sm33:em33,num_ozmixm),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ozmixm(sm31:em31,1:model_config_rec%levsiz,sm33:em33,num_ozmixm). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ozmixm=initial_data_value ELSE ALLOCATE(grid%ozmixm(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ozmixm(1,1,1,1). ') endif ENDIF IF(in_use_for_config(id,'pin').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%levsiz)-(1)+1))) * RWORDSIZE ALLOCATE(grid%pin(1:model_config_rec%levsiz),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pin(1:model_config_rec%levsiz). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pin=initial_data_value ELSE ALLOCATE(grid%pin(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pin(1). ') endif ENDIF IF(in_use_for_config(id,'m_ps_1').AND.(.NOT.inter_domain).AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%m_ps_1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%m_ps_1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%m_ps_1=initial_data_value ELSE ALLOCATE(grid%m_ps_1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%m_ps_1(1,1). ') endif ENDIF IF(in_use_for_config(id,'m_ps_2').AND.(.NOT.inter_domain).AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%m_ps_2(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%m_ps_2(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%m_ps_2=initial_data_value ELSE ALLOCATE(grid%m_ps_2(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%m_ps_2(1,1). ') endif ENDIF IF(in_use_for_config(id,'aerosolc_1').AND.(IAND(1,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%paerlev)-(1)+1))*(((em33)-(sm33)+1)*num_aerosolc)) * RWORDSIZE ALLOCATE(grid%aerosolc_1(sm31:em31,1:model_config_rec%paerlev,sm33:em33,num_aerosolc),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aerosolc_1(sm31:em31,1:model_config_rec%paerlev,sm33:em33,num_aerosolc). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aerosolc_1=initial_data_value ELSE ALLOCATE(grid%aerosolc_1(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aerosolc_1(1,1,1,1). ') endif ENDIF IF(in_use_for_config(id,'aerosolc_2').AND.(IAND(2,tl).NE.0))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%paerlev)-(1)+1))*(((em33)-(sm33)+1)*num_aerosolc)) * RWORDSIZE ALLOCATE(grid%aerosolc_2(sm31:em31,1:model_config_rec%paerlev,sm33:em33,num_aerosolc),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aerosolc_2(sm31:em31,1:model_config_rec%paerlev,sm33:em33,num_aerosolc). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aerosolc_2=initial_data_value ELSE ALLOCATE(grid%aerosolc_2(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aerosolc_2(1,1,1,1). ') endif ENDIF IF(in_use_for_config(id,'m_hybi').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%paerlev)-(1)+1))) * RWORDSIZE ALLOCATE(grid%m_hybi(1:model_config_rec%paerlev),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%m_hybi(1:model_config_rec%paerlev). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%m_hybi=initial_data_value ELSE ALLOCATE(grid%m_hybi(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%m_hybi(1). ') endif ENDIF IF(in_use_for_config(id,'f_ice_phy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%f_ice_phy(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%f_ice_phy(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%f_ice_phy=initial_data_value ELSE ALLOCATE(grid%f_ice_phy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%f_ice_phy(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'f_rain_phy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%f_rain_phy(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%f_rain_phy(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%f_rain_phy=initial_data_value ELSE ALLOCATE(grid%f_rain_phy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%f_rain_phy(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'f_rimef_phy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%f_rimef_phy(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%f_rimef_phy(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%f_rimef_phy=initial_data_value ELSE ALLOCATE(grid%f_rimef_phy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%f_rimef_phy(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'qndropsource').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%qndropsource(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qndropsource(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qndropsource=initial_data_value ELSE ALLOCATE(grid%qndropsource(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qndropsource(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'h_diabatic'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%h_diabatic(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%h_diabatic(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h_diabatic=initial_data_value ELSE ALLOCATE(grid%h_diabatic(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%h_diabatic(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'msft'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%msft(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msft(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msft=initial_data_value ELSE ALLOCATE(grid%msft(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msft(1,1). ') endif ENDIF IF(in_use_for_config(id,'msfu'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%msfu(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfu(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfu=initial_data_value ELSE ALLOCATE(grid%msfu(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfu(1,1). ') endif ENDIF IF(in_use_for_config(id,'msfv'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%msfv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfv=initial_data_value ELSE ALLOCATE(grid%msfv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfv(1,1). ') endif ENDIF IF(in_use_for_config(id,'msftx'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%msftx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msftx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msftx=initial_data_value ELSE ALLOCATE(grid%msftx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msftx(1,1). ') endif ENDIF IF(in_use_for_config(id,'msfty'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%msfty(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfty(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfty=initial_data_value ELSE ALLOCATE(grid%msfty(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfty(1,1). ') endif ENDIF IF(in_use_for_config(id,'msfux'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%msfux(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfux(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfux=initial_data_value ELSE ALLOCATE(grid%msfux(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfux(1,1). ') endif ENDIF IF(in_use_for_config(id,'msfuy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%msfuy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfuy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfuy=initial_data_value ELSE ALLOCATE(grid%msfuy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfuy(1,1). ') endif ENDIF IF(in_use_for_config(id,'msfvx'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%msfvx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfvx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfvx=initial_data_value ELSE ALLOCATE(grid%msfvx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfvx(1,1). ') endif ENDIF IF(in_use_for_config(id,'msfvx_inv'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%msfvx_inv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfvx_inv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfvx_inv=initial_data_value ELSE ALLOCATE(grid%msfvx_inv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfvx_inv(1,1). ') endif ENDIF IF(in_use_for_config(id,'msfvy'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%msfvy(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfvy(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%msfvy=initial_data_value ELSE ALLOCATE(grid%msfvy(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%msfvy(1,1). ') endif ENDIF IF(in_use_for_config(id,'f'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%f(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%f(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%f=initial_data_value ELSE ALLOCATE(grid%f(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%f(1,1). ') endif ENDIF IF(in_use_for_config(id,'e'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%e(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%e(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%e=initial_data_value ELSE ALLOCATE(grid%e(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%e(1,1). ') endif ENDIF IF(in_use_for_config(id,'sina'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sina(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sina(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sina=initial_data_value ELSE ALLOCATE(grid%sina(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sina(1,1). ') endif ENDIF IF(in_use_for_config(id,'cosa'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cosa(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cosa(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cosa=initial_data_value ELSE ALLOCATE(grid%cosa(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cosa(1,1). ') endif ENDIF IF(in_use_for_config(id,'ht'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ht(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht=initial_data_value ELSE ALLOCATE(grid%ht(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht(1,1). ') endif ENDIF IF(in_use_for_config(id,'ht_fine').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ht_fine(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_fine(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_fine=initial_data_value ELSE ALLOCATE(grid%ht_fine(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_fine(1,1). ') endif ENDIF IF(in_use_for_config(id,'ht_int').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ht_int(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_int(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_int=initial_data_value ELSE ALLOCATE(grid%ht_int(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_int(1,1). ') endif ENDIF IF(in_use_for_config(id,'ht_input').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ht_input(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_input(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_input=initial_data_value ELSE ALLOCATE(grid%ht_input(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_input(1,1). ') endif ENDIF IF(in_use_for_config(id,'ht_shad'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ht_shad(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad=initial_data_value ELSE ALLOCATE(grid%ht_shad(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad(1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ht_shad_bxs(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_bxs(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_bxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ht_shad_bxe(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_bxe(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_bxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ht_shad_bys(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_bys(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_bys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ht_shad_bye(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_bye(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_bye=initial_data_value ELSE ALLOCATE(grid%ht_shad_bxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_bxs(1,1,1). ') endif ALLOCATE(grid%ht_shad_bxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_bxe(1,1,1). ') endif ALLOCATE(grid%ht_shad_bys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_bys(1,1,1). ') endif ALLOCATE(grid%ht_shad_bye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_bye(1,1,1). ') endif ENDIF IF(.TRUE..AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ht_shad_btxs(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_btxs(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_btxs=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ht_shad_btxe(sm33:em33,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_btxe(sm33:em33,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_btxe=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ht_shad_btys(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_btys(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_btys=initial_data_value num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE ALLOCATE(grid%ht_shad_btye(sm31:em31,1,spec_bdy_width),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_btye(sm31:em31,1,spec_bdy_width). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_shad_btye=initial_data_value ELSE ALLOCATE(grid%ht_shad_btxs(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_btxs(1,1,1). ') endif ALLOCATE(grid%ht_shad_btxe(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_btxe(1,1,1). ') endif ALLOCATE(grid%ht_shad_btys(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_btys(1,1,1). ') endif ALLOCATE(grid%ht_shad_btye(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_shad_btye(1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%min_ptchsz=0 IF(in_use_for_config(id,'tsk'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tsk(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tsk(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsk=initial_data_value ELSE ALLOCATE(grid%tsk(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tsk(1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_tsk').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_tsk(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_tsk(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_tsk=initial_data_value ELSE ALLOCATE(grid%dfi_tsk(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_tsk(1,1). ') endif ENDIF IF(in_use_for_config(id,'tsk_save').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tsk_save(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tsk_save(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsk_save=initial_data_value ELSE ALLOCATE(grid%tsk_save(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tsk_save(1,1). ') endif ENDIF IF(in_use_for_config(id,'u_base').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE ALLOCATE(grid%u_base(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_base(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_base=initial_data_value ELSE ALLOCATE(grid%u_base(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_base(1). ') endif ENDIF IF(in_use_for_config(id,'v_base').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE ALLOCATE(grid%v_base(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_base(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_base=initial_data_value ELSE ALLOCATE(grid%v_base(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_base(1). ') endif ENDIF IF(in_use_for_config(id,'qv_base').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE ALLOCATE(grid%qv_base(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qv_base(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qv_base=initial_data_value ELSE ALLOCATE(grid%qv_base(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qv_base(1). ') endif ENDIF IF(in_use_for_config(id,'z_base').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE ALLOCATE(grid%z_base(sm32:em32),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%z_base(sm32:em32). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%z_base=initial_data_value ELSE ALLOCATE(grid%z_base(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%z_base(1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%u_frame=initial_data_value IF ( setinitval .EQ. 3 ) grid%v_frame=initial_data_value IF ( setinitval .EQ. 3 ) grid%p_top=initial_data_value IF ( setinitval .EQ. 3 ) grid%t00=initial_data_value IF ( setinitval .EQ. 3 ) grid%p00=initial_data_value IF ( setinitval .EQ. 3 ) grid%tlp=initial_data_value IF ( setinitval .EQ. 3 ) grid%tiso=initial_data_value IF ( setinitval .EQ. 3 ) grid%max_msftx=initial_data_value IF ( setinitval .EQ. 3 ) grid%max_msfty=initial_data_value IF(in_use_for_config(id,'rthcuten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rthcuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthcuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthcuten=initial_data_value ELSE ALLOCATE(grid%rthcuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthcuten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rqvcuten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rqvcuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqvcuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqvcuten=initial_data_value ELSE ALLOCATE(grid%rqvcuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqvcuten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rqrcuten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rqrcuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqrcuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqrcuten=initial_data_value ELSE ALLOCATE(grid%rqrcuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqrcuten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rqccuten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rqccuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqccuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqccuten=initial_data_value ELSE ALLOCATE(grid%rqccuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqccuten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rqscuten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rqscuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqscuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqscuten=initial_data_value ELSE ALLOCATE(grid%rqscuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqscuten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rqicuten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rqicuten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqicuten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqicuten=initial_data_value ELSE ALLOCATE(grid%rqicuten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqicuten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'w0avg').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%w0avg(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w0avg(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w0avg=initial_data_value ELSE ALLOCATE(grid%w0avg(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w0avg(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rainc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rainc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rainc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainc=initial_data_value ELSE ALLOCATE(grid%rainc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rainc(1,1). ') endif ENDIF IF(in_use_for_config(id,'rainnc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rainnc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rainnc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainnc=initial_data_value ELSE ALLOCATE(grid%rainnc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rainnc(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_rainc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_rainc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_rainc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_rainc=0 ELSE ALLOCATE(grid%i_rainc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_rainc(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_rainnc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_rainnc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_rainnc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_rainnc=0 ELSE ALLOCATE(grid%i_rainnc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_rainnc(1,1). ') endif ENDIF IF(in_use_for_config(id,'pratec').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%pratec(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pratec(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pratec=initial_data_value ELSE ALLOCATE(grid%pratec(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pratec(1,1). ') endif ENDIF IF(in_use_for_config(id,'raincv').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%raincv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%raincv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%raincv=initial_data_value ELSE ALLOCATE(grid%raincv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%raincv(1,1). ') endif ENDIF IF(in_use_for_config(id,'rainncv').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rainncv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rainncv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainncv=initial_data_value ELSE ALLOCATE(grid%rainncv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rainncv(1,1). ') endif ENDIF IF(in_use_for_config(id,'rainbl').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rainbl(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rainbl(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rainbl=initial_data_value ELSE ALLOCATE(grid%rainbl(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rainbl(1,1). ') endif ENDIF IF(in_use_for_config(id,'snownc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%snownc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snownc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snownc=initial_data_value ELSE ALLOCATE(grid%snownc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snownc(1,1). ') endif ENDIF IF(in_use_for_config(id,'graupelnc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%graupelnc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%graupelnc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%graupelnc=initial_data_value ELSE ALLOCATE(grid%graupelnc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%graupelnc(1,1). ') endif ENDIF IF(in_use_for_config(id,'snowncv').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%snowncv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snowncv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowncv=initial_data_value ELSE ALLOCATE(grid%snowncv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snowncv(1,1). ') endif ENDIF IF(in_use_for_config(id,'graupelncv').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%graupelncv(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%graupelncv(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%graupelncv=initial_data_value ELSE ALLOCATE(grid%graupelncv(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%graupelncv(1,1). ') endif ENDIF IF(in_use_for_config(id,'nca').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%nca(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%nca(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%nca=initial_data_value ELSE ALLOCATE(grid%nca(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%nca(1,1). ') endif ENDIF IF(in_use_for_config(id,'lowlyr').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%lowlyr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lowlyr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lowlyr=0 ELSE ALLOCATE(grid%lowlyr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lowlyr(1,1). ') endif ENDIF IF(in_use_for_config(id,'mass_flux').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%mass_flux(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mass_flux(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mass_flux=initial_data_value ELSE ALLOCATE(grid%mass_flux(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mass_flux(1,1). ') endif ENDIF IF(in_use_for_config(id,'apr_gr').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%apr_gr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_gr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_gr=initial_data_value ELSE ALLOCATE(grid%apr_gr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_gr(1,1). ') endif ENDIF IF(in_use_for_config(id,'apr_w').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%apr_w(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_w(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_w=initial_data_value ELSE ALLOCATE(grid%apr_w(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_w(1,1). ') endif ENDIF IF(in_use_for_config(id,'apr_mc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%apr_mc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_mc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_mc=initial_data_value ELSE ALLOCATE(grid%apr_mc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_mc(1,1). ') endif ENDIF IF(in_use_for_config(id,'apr_st').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%apr_st(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_st(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_st=initial_data_value ELSE ALLOCATE(grid%apr_st(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_st(1,1). ') endif ENDIF IF(in_use_for_config(id,'apr_as').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%apr_as(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_as(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_as=initial_data_value ELSE ALLOCATE(grid%apr_as(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_as(1,1). ') endif ENDIF IF(in_use_for_config(id,'apr_capma').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%apr_capma(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_capma(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_capma=initial_data_value ELSE ALLOCATE(grid%apr_capma(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_capma(1,1). ') endif ENDIF IF(in_use_for_config(id,'apr_capme').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%apr_capme(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_capme(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_capme=initial_data_value ELSE ALLOCATE(grid%apr_capme(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_capme(1,1). ') endif ENDIF IF(in_use_for_config(id,'apr_capmi').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%apr_capmi(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_capmi(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%apr_capmi=initial_data_value ELSE ALLOCATE(grid%apr_capmi(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%apr_capmi(1,1). ') endif ENDIF IF(in_use_for_config(id,'edt_out').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%edt_out(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%edt_out(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%edt_out=initial_data_value ELSE ALLOCATE(grid%edt_out(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%edt_out(1,1). ') endif ENDIF IF(in_use_for_config(id,'xf_ens').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))*(((model_config_rec%ensdim)-(1)+1))) * RWORDSIZE ALLOCATE(grid%xf_ens(sm31:em31,sm33:em33,1:model_config_rec%ensdim),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xf_ens(sm31:em31,sm33:em33,1:model_config_rec%ensdim). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xf_ens=initial_data_value ELSE ALLOCATE(grid%xf_ens(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xf_ens(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'pr_ens').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))*(((model_config_rec%ensdim)-(1)+1))) * RWORDSIZE ALLOCATE(grid%pr_ens(sm31:em31,sm33:em33,1:model_config_rec%ensdim),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pr_ens(sm31:em31,sm33:em33,1:model_config_rec%ensdim). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pr_ens=initial_data_value ELSE ALLOCATE(grid%pr_ens(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pr_ens(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'cugd_tten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cugd_tten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cugd_tten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cugd_tten=initial_data_value ELSE ALLOCATE(grid%cugd_tten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cugd_tten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'cugd_qvten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cugd_qvten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cugd_qvten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cugd_qvten=initial_data_value ELSE ALLOCATE(grid%cugd_qvten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cugd_qvten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'cugd_ttens').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cugd_ttens(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cugd_ttens(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cugd_ttens=initial_data_value ELSE ALLOCATE(grid%cugd_ttens(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cugd_ttens(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'cugd_qvtens').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cugd_qvtens(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cugd_qvtens(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cugd_qvtens=initial_data_value ELSE ALLOCATE(grid%cugd_qvtens(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cugd_qvtens(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'cugd_qcten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cugd_qcten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cugd_qcten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cugd_qcten=initial_data_value ELSE ALLOCATE(grid%cugd_qcten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cugd_qcten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rthften').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rthften(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthften(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthften=initial_data_value ELSE ALLOCATE(grid%rthften(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthften(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rqvften').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rqvften(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqvften(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqvften=initial_data_value ELSE ALLOCATE(grid%rqvften(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqvften(1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%stepcu=0 IF(in_use_for_config(id,'rthraten'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rthraten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthraten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthraten=initial_data_value ELSE ALLOCATE(grid%rthraten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthraten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rthratenlw').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rthratenlw(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthratenlw(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthratenlw=initial_data_value ELSE ALLOCATE(grid%rthratenlw(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthratenlw(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rthratensw').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rthratensw(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthratensw(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthratensw=initial_data_value ELSE ALLOCATE(grid%rthratensw(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthratensw(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'cldfra').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cldfra(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cldfra(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldfra=initial_data_value ELSE ALLOCATE(grid%cldfra(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cldfra(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'swdown'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%swdown(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swdown(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdown=initial_data_value ELSE ALLOCATE(grid%swdown(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swdown(1,1). ') endif ENDIF IF(in_use_for_config(id,'swdownc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%swdownc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swdownc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdownc=initial_data_value ELSE ALLOCATE(grid%swdownc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swdownc(1,1). ') endif ENDIF IF(in_use_for_config(id,'gsw'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%gsw(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%gsw(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%gsw=initial_data_value ELSE ALLOCATE(grid%gsw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%gsw(1,1). ') endif ENDIF IF(in_use_for_config(id,'glw'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%glw(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%glw(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%glw=initial_data_value ELSE ALLOCATE(grid%glw(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%glw(1,1). ') endif ENDIF IF(in_use_for_config(id,'acswupt'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%acswupt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswupt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acswupt=initial_data_value ELSE ALLOCATE(grid%acswupt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswupt(1,1). ') endif ENDIF IF(in_use_for_config(id,'acswuptc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%acswuptc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswuptc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acswuptc=initial_data_value ELSE ALLOCATE(grid%acswuptc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswuptc(1,1). ') endif ENDIF IF(in_use_for_config(id,'acswdnt'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%acswdnt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswdnt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acswdnt=initial_data_value ELSE ALLOCATE(grid%acswdnt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswdnt(1,1). ') endif ENDIF IF(in_use_for_config(id,'acswdntc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%acswdntc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswdntc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acswdntc=initial_data_value ELSE ALLOCATE(grid%acswdntc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswdntc(1,1). ') endif ENDIF IF(in_use_for_config(id,'acswupb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%acswupb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswupb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acswupb=initial_data_value ELSE ALLOCATE(grid%acswupb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswupb(1,1). ') endif ENDIF IF(in_use_for_config(id,'acswupbc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%acswupbc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswupbc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acswupbc=initial_data_value ELSE ALLOCATE(grid%acswupbc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswupbc(1,1). ') endif ENDIF IF(in_use_for_config(id,'acswdnb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%acswdnb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswdnb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acswdnb=initial_data_value ELSE ALLOCATE(grid%acswdnb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswdnb(1,1). ') endif ENDIF IF(in_use_for_config(id,'acswdnbc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%acswdnbc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswdnbc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%acswdnbc=initial_data_value ELSE ALLOCATE(grid%acswdnbc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%acswdnbc(1,1). ') endif ENDIF IF(in_use_for_config(id,'aclwupt'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%aclwupt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwupt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aclwupt=initial_data_value ELSE ALLOCATE(grid%aclwupt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwupt(1,1). ') endif ENDIF IF(in_use_for_config(id,'aclwuptc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%aclwuptc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwuptc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aclwuptc=initial_data_value ELSE ALLOCATE(grid%aclwuptc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwuptc(1,1). ') endif ENDIF IF(in_use_for_config(id,'aclwdnt'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%aclwdnt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwdnt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aclwdnt=initial_data_value ELSE ALLOCATE(grid%aclwdnt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwdnt(1,1). ') endif ENDIF IF(in_use_for_config(id,'aclwdntc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%aclwdntc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwdntc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aclwdntc=initial_data_value ELSE ALLOCATE(grid%aclwdntc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwdntc(1,1). ') endif ENDIF IF(in_use_for_config(id,'aclwupb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%aclwupb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwupb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aclwupb=initial_data_value ELSE ALLOCATE(grid%aclwupb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwupb(1,1). ') endif ENDIF IF(in_use_for_config(id,'aclwupbc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%aclwupbc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwupbc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aclwupbc=initial_data_value ELSE ALLOCATE(grid%aclwupbc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwupbc(1,1). ') endif ENDIF IF(in_use_for_config(id,'aclwdnb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%aclwdnb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwdnb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aclwdnb=initial_data_value ELSE ALLOCATE(grid%aclwdnb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwdnb(1,1). ') endif ENDIF IF(in_use_for_config(id,'aclwdnbc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%aclwdnbc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwdnbc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aclwdnbc=initial_data_value ELSE ALLOCATE(grid%aclwdnbc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclwdnbc(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_acswupt'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_acswupt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswupt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_acswupt=0 ELSE ALLOCATE(grid%i_acswupt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswupt(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_acswuptc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_acswuptc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswuptc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_acswuptc=0 ELSE ALLOCATE(grid%i_acswuptc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswuptc(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_acswdnt'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_acswdnt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswdnt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_acswdnt=0 ELSE ALLOCATE(grid%i_acswdnt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswdnt(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_acswdntc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_acswdntc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswdntc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_acswdntc=0 ELSE ALLOCATE(grid%i_acswdntc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswdntc(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_acswupb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_acswupb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswupb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_acswupb=0 ELSE ALLOCATE(grid%i_acswupb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswupb(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_acswupbc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_acswupbc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswupbc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_acswupbc=0 ELSE ALLOCATE(grid%i_acswupbc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswupbc(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_acswdnb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_acswdnb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswdnb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_acswdnb=0 ELSE ALLOCATE(grid%i_acswdnb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswdnb(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_acswdnbc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_acswdnbc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswdnbc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_acswdnbc=0 ELSE ALLOCATE(grid%i_acswdnbc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_acswdnbc(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_aclwupt'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_aclwupt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwupt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_aclwupt=0 ELSE ALLOCATE(grid%i_aclwupt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwupt(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_aclwuptc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_aclwuptc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwuptc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_aclwuptc=0 ELSE ALLOCATE(grid%i_aclwuptc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwuptc(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_aclwdnt'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_aclwdnt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwdnt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_aclwdnt=0 ELSE ALLOCATE(grid%i_aclwdnt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwdnt(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_aclwdntc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_aclwdntc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwdntc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_aclwdntc=0 ELSE ALLOCATE(grid%i_aclwdntc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwdntc(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_aclwupb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_aclwupb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwupb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_aclwupb=0 ELSE ALLOCATE(grid%i_aclwupb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwupb(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_aclwupbc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_aclwupbc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwupbc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_aclwupbc=0 ELSE ALLOCATE(grid%i_aclwupbc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwupbc(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_aclwdnb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_aclwdnb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwdnb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_aclwdnb=0 ELSE ALLOCATE(grid%i_aclwdnb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwdnb(1,1). ') endif ENDIF IF(in_use_for_config(id,'i_aclwdnbc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE ALLOCATE(grid%i_aclwdnbc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwdnbc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%i_aclwdnbc=0 ELSE ALLOCATE(grid%i_aclwdnbc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%i_aclwdnbc(1,1). ') endif ENDIF IF(in_use_for_config(id,'swupt'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%swupt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swupt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swupt=initial_data_value ELSE ALLOCATE(grid%swupt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swupt(1,1). ') endif ENDIF IF(in_use_for_config(id,'swuptc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%swuptc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swuptc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swuptc=initial_data_value ELSE ALLOCATE(grid%swuptc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swuptc(1,1). ') endif ENDIF IF(in_use_for_config(id,'swdnt'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%swdnt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swdnt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdnt=initial_data_value ELSE ALLOCATE(grid%swdnt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swdnt(1,1). ') endif ENDIF IF(in_use_for_config(id,'swdntc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%swdntc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swdntc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdntc=initial_data_value ELSE ALLOCATE(grid%swdntc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swdntc(1,1). ') endif ENDIF IF(in_use_for_config(id,'swupb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%swupb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swupb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swupb=initial_data_value ELSE ALLOCATE(grid%swupb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swupb(1,1). ') endif ENDIF IF(in_use_for_config(id,'swupbc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%swupbc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swupbc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swupbc=initial_data_value ELSE ALLOCATE(grid%swupbc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swupbc(1,1). ') endif ENDIF IF(in_use_for_config(id,'swdnb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%swdnb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swdnb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdnb=initial_data_value ELSE ALLOCATE(grid%swdnb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swdnb(1,1). ') endif ENDIF IF(in_use_for_config(id,'swdnbc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%swdnbc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swdnbc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swdnbc=initial_data_value ELSE ALLOCATE(grid%swdnbc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swdnbc(1,1). ') endif ENDIF IF(in_use_for_config(id,'lwupt'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lwupt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwupt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwupt=initial_data_value ELSE ALLOCATE(grid%lwupt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwupt(1,1). ') endif ENDIF IF(in_use_for_config(id,'lwuptc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lwuptc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwuptc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwuptc=initial_data_value ELSE ALLOCATE(grid%lwuptc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwuptc(1,1). ') endif ENDIF IF(in_use_for_config(id,'lwdnt'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lwdnt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwdnt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwdnt=initial_data_value ELSE ALLOCATE(grid%lwdnt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwdnt(1,1). ') endif ENDIF IF(in_use_for_config(id,'lwdntc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lwdntc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwdntc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwdntc=initial_data_value ELSE ALLOCATE(grid%lwdntc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwdntc(1,1). ') endif ENDIF IF(in_use_for_config(id,'lwupb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lwupb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwupb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwupb=initial_data_value ELSE ALLOCATE(grid%lwupb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwupb(1,1). ') endif ENDIF IF(in_use_for_config(id,'lwupbc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lwupbc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwupbc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwupbc=initial_data_value ELSE ALLOCATE(grid%lwupbc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwupbc(1,1). ') endif ENDIF IF(in_use_for_config(id,'lwdnb'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lwdnb(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwdnb(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwdnb=initial_data_value ELSE ALLOCATE(grid%lwdnb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwdnb(1,1). ') endif ENDIF IF(in_use_for_config(id,'lwdnbc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lwdnbc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwdnbc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwdnbc=initial_data_value ELSE ALLOCATE(grid%lwdnbc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwdnbc(1,1). ') endif ENDIF IF(in_use_for_config(id,'swcf').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%swcf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swcf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%swcf=initial_data_value ELSE ALLOCATE(grid%swcf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%swcf(1,1). ') endif ENDIF IF(in_use_for_config(id,'lwcf').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lwcf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwcf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lwcf=initial_data_value ELSE ALLOCATE(grid%lwcf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lwcf(1,1). ') endif ENDIF IF(in_use_for_config(id,'olr').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%olr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%olr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%olr=initial_data_value ELSE ALLOCATE(grid%olr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%olr(1,1). ') endif ENDIF IF(in_use_for_config(id,'xlat'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xlat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xlat=initial_data_value ELSE ALLOCATE(grid%xlat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlat(1,1). ') endif ENDIF IF(in_use_for_config(id,'xlong'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xlong(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlong(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xlong=initial_data_value ELSE ALLOCATE(grid%xlong(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlong(1,1). ') endif ENDIF IF(in_use_for_config(id,'xlat_u'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xlat_u(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlat_u(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xlat_u=initial_data_value ELSE ALLOCATE(grid%xlat_u(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlat_u(1,1). ') endif ENDIF IF(in_use_for_config(id,'xlong_u'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xlong_u(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlong_u(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xlong_u=initial_data_value ELSE ALLOCATE(grid%xlong_u(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlong_u(1,1). ') endif ENDIF IF(in_use_for_config(id,'xlat_v'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xlat_v(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlat_v(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xlat_v=initial_data_value ELSE ALLOCATE(grid%xlat_v(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlat_v(1,1). ') endif ENDIF IF(in_use_for_config(id,'xlong_v'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xlong_v(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlong_v(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xlong_v=initial_data_value ELSE ALLOCATE(grid%xlong_v(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xlong_v(1,1). ') endif ENDIF IF(in_use_for_config(id,'albedo').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%albedo(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%albedo(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%albedo=initial_data_value ELSE ALLOCATE(grid%albedo(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%albedo(1,1). ') endif ENDIF IF(in_use_for_config(id,'clat'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%clat(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%clat(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%clat=initial_data_value ELSE ALLOCATE(grid%clat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%clat(1,1). ') endif ENDIF IF(in_use_for_config(id,'clong'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%clong(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%clong(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%clong=initial_data_value ELSE ALLOCATE(grid%clong(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%clong(1,1). ') endif ENDIF IF(in_use_for_config(id,'albbck').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%albbck(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%albbck(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%albbck=initial_data_value ELSE ALLOCATE(grid%albbck(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%albbck(1,1). ') endif ENDIF IF(in_use_for_config(id,'embck').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%embck(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%embck(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%embck=initial_data_value ELSE ALLOCATE(grid%embck(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%embck(1,1). ') endif ENDIF IF(in_use_for_config(id,'emiss').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%emiss(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%emiss(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%emiss=initial_data_value ELSE ALLOCATE(grid%emiss(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%emiss(1,1). ') endif ENDIF IF(in_use_for_config(id,'snotime').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%snotime(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snotime(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snotime=initial_data_value ELSE ALLOCATE(grid%snotime(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snotime(1,1). ') endif ENDIF IF(in_use_for_config(id,'noahres').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%noahres(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%noahres(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%noahres=initial_data_value ELSE ALLOCATE(grid%noahres(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%noahres(1,1). ') endif ENDIF IF(in_use_for_config(id,'cldefi').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cldefi(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cldefi(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cldefi=initial_data_value ELSE ALLOCATE(grid%cldefi(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cldefi(1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%stepra=0 IF(in_use_for_config(id,'rublten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rublten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rublten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rublten=initial_data_value ELSE ALLOCATE(grid%rublten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rublten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rvblten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rvblten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rvblten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rvblten=initial_data_value ELSE ALLOCATE(grid%rvblten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rvblten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rthblten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rthblten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthblten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthblten=initial_data_value ELSE ALLOCATE(grid%rthblten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthblten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rqvblten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rqvblten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqvblten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqvblten=initial_data_value ELSE ALLOCATE(grid%rqvblten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqvblten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rqcblten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rqcblten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqcblten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqcblten=initial_data_value ELSE ALLOCATE(grid%rqcblten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqcblten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rqiblten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rqiblten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqiblten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqiblten=initial_data_value ELSE ALLOCATE(grid%rqiblten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqiblten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'mp_restart_state').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((7501)-(1)+1))) * RWORDSIZE ALLOCATE(grid%mp_restart_state(1:7501),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mp_restart_state(1:7501). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mp_restart_state=initial_data_value ELSE ALLOCATE(grid%mp_restart_state(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mp_restart_state(1). ') endif ENDIF IF(in_use_for_config(id,'tbpvs_state').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((7501)-(1)+1))) * RWORDSIZE ALLOCATE(grid%tbpvs_state(1:7501),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tbpvs_state(1:7501). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tbpvs_state=initial_data_value ELSE ALLOCATE(grid%tbpvs_state(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tbpvs_state(1). ') endif ENDIF IF(in_use_for_config(id,'tbpvs0_state').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((7501)-(1)+1))) * RWORDSIZE ALLOCATE(grid%tbpvs0_state(1:7501),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tbpvs0_state(1:7501). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tbpvs0_state=initial_data_value ELSE ALLOCATE(grid%tbpvs0_state(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tbpvs0_state(1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%landuse_isice=0 IF ( setinitval .EQ. 3 ) grid%landuse_lucats=0 IF ( setinitval .EQ. 3 ) grid%landuse_luseas=0 IF ( setinitval .EQ. 3 ) grid%landuse_isn=0 IF(in_use_for_config(id,'lu_state').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((7501)-(1)+1))) * RWORDSIZE ALLOCATE(grid%lu_state(1:7501),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lu_state(1:7501). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lu_state=initial_data_value ELSE ALLOCATE(grid%lu_state(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lu_state(1). ') endif ENDIF IF(in_use_for_config(id,'tmn'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tmn(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tmn(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tmn=initial_data_value ELSE ALLOCATE(grid%tmn(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tmn(1,1). ') endif ENDIF IF(in_use_for_config(id,'tyr'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tyr(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tyr(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tyr=initial_data_value ELSE ALLOCATE(grid%tyr(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tyr(1,1). ') endif ENDIF IF(in_use_for_config(id,'tyra'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tyra(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tyra(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tyra=initial_data_value ELSE ALLOCATE(grid%tyra(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tyra(1,1). ') endif ENDIF IF(in_use_for_config(id,'tdly'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tdly(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tdly(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tdly=initial_data_value ELSE ALLOCATE(grid%tdly(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tdly(1,1). ') endif ENDIF IF(in_use_for_config(id,'tlag'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%lagday)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tlag(sm31:em31,1:model_config_rec%lagday,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tlag(sm31:em31,1:model_config_rec%lagday,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tlag=initial_data_value ELSE ALLOCATE(grid%tlag(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tlag(1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%nyear=0 IF ( setinitval .EQ. 3 ) grid%nday=0 IF(in_use_for_config(id,'xland'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xland(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xland(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xland=initial_data_value ELSE ALLOCATE(grid%xland(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xland(1,1). ') endif ENDIF IF(in_use_for_config(id,'znt').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%znt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%znt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%znt=initial_data_value ELSE ALLOCATE(grid%znt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%znt(1,1). ') endif ENDIF IF(in_use_for_config(id,'ck').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ck(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ck(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ck=initial_data_value ELSE ALLOCATE(grid%ck(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ck(1,1). ') endif ENDIF IF(in_use_for_config(id,'cka').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cka(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cka(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cka=initial_data_value ELSE ALLOCATE(grid%cka(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cka(1,1). ') endif ENDIF IF(in_use_for_config(id,'cd').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cd(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cd(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cd=initial_data_value ELSE ALLOCATE(grid%cd(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cd(1,1). ') endif ENDIF IF(in_use_for_config(id,'cda').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%cda(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cda(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%cda=initial_data_value ELSE ALLOCATE(grid%cda(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%cda(1,1). ') endif ENDIF IF(in_use_for_config(id,'ust').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ust(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ust(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ust=initial_data_value ELSE ALLOCATE(grid%ust(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ust(1,1). ') endif ENDIF IF(in_use_for_config(id,'ustm').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ustm(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ustm(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ustm=initial_data_value ELSE ALLOCATE(grid%ustm(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ustm(1,1). ') endif ENDIF IF(in_use_for_config(id,'rmol').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rmol(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rmol(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rmol=initial_data_value ELSE ALLOCATE(grid%rmol(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rmol(1,1). ') endif ENDIF IF(in_use_for_config(id,'mol').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%mol(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mol(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mol=initial_data_value ELSE ALLOCATE(grid%mol(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mol(1,1). ') endif ENDIF IF(in_use_for_config(id,'pblh').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%pblh(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pblh(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pblh=initial_data_value ELSE ALLOCATE(grid%pblh(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pblh(1,1). ') endif ENDIF IF(in_use_for_config(id,'capg').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%capg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%capg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%capg=initial_data_value ELSE ALLOCATE(grid%capg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%capg(1,1). ') endif ENDIF IF(in_use_for_config(id,'thc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%thc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%thc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%thc=initial_data_value ELSE ALLOCATE(grid%thc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%thc(1,1). ') endif ENDIF IF(in_use_for_config(id,'hfx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%hfx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%hfx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hfx=initial_data_value ELSE ALLOCATE(grid%hfx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%hfx(1,1). ') endif ENDIF IF(in_use_for_config(id,'qfx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%qfx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qfx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qfx=initial_data_value ELSE ALLOCATE(grid%qfx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qfx(1,1). ') endif ENDIF IF(in_use_for_config(id,'lh').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%lh(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lh(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lh=initial_data_value ELSE ALLOCATE(grid%lh(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lh(1,1). ') endif ENDIF IF(in_use_for_config(id,'achfx'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%achfx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%achfx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%achfx=initial_data_value ELSE ALLOCATE(grid%achfx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%achfx(1,1). ') endif ENDIF IF(in_use_for_config(id,'aclhf'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%aclhf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclhf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%aclhf=initial_data_value ELSE ALLOCATE(grid%aclhf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%aclhf(1,1). ') endif ENDIF IF(in_use_for_config(id,'flhc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%flhc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%flhc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%flhc=initial_data_value ELSE ALLOCATE(grid%flhc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%flhc(1,1). ') endif ENDIF IF(in_use_for_config(id,'flqc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%flqc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%flqc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%flqc=initial_data_value ELSE ALLOCATE(grid%flqc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%flqc(1,1). ') endif ENDIF IF(in_use_for_config(id,'qsg').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%qsg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qsg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qsg=initial_data_value ELSE ALLOCATE(grid%qsg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qsg(1,1). ') endif ENDIF IF(in_use_for_config(id,'qvg').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%qvg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qvg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qvg=initial_data_value ELSE ALLOCATE(grid%qvg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qvg(1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_qvg').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_qvg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_qvg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_qvg=initial_data_value ELSE ALLOCATE(grid%dfi_qvg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_qvg(1,1). ') endif ENDIF IF(in_use_for_config(id,'qcg').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%qcg(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qcg(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%qcg=initial_data_value ELSE ALLOCATE(grid%qcg(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%qcg(1,1). ') endif ENDIF IF(in_use_for_config(id,'soilt1').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%soilt1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%soilt1=initial_data_value ELSE ALLOCATE(grid%soilt1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%soilt1(1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_soilt1').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_soilt1(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_soilt1(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_soilt1=initial_data_value ELSE ALLOCATE(grid%dfi_soilt1(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_soilt1(1,1). ') endif ENDIF IF(in_use_for_config(id,'tsnav').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tsnav(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tsnav(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tsnav=initial_data_value ELSE ALLOCATE(grid%tsnav(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tsnav(1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_tsnav').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_tsnav(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_tsnav(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_tsnav=initial_data_value ELSE ALLOCATE(grid%dfi_tsnav(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_tsnav(1,1). ') endif ENDIF IF(in_use_for_config(id,'regime').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%regime(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%regime(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%regime=initial_data_value ELSE ALLOCATE(grid%regime(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%regime(1,1). ') endif ENDIF IF(in_use_for_config(id,'snowc'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%snowc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snowc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%snowc=initial_data_value ELSE ALLOCATE(grid%snowc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%snowc(1,1). ') endif ENDIF IF(in_use_for_config(id,'dfi_snowc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dfi_snowc(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_snowc(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dfi_snowc=initial_data_value ELSE ALLOCATE(grid%dfi_snowc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dfi_snowc(1,1). ') endif ENDIF IF(in_use_for_config(id,'mavail').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%mavail(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mavail(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mavail=initial_data_value ELSE ALLOCATE(grid%mavail(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mavail(1,1). ') endif ENDIF IF(in_use_for_config(id,'tkesfcf').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tkesfcf(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tkesfcf(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tkesfcf=initial_data_value ELSE ALLOCATE(grid%tkesfcf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tkesfcf(1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%stepbl=0 IF(in_use_for_config(id,'taucldi').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%taucldi(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%taucldi(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%taucldi=initial_data_value ELSE ALLOCATE(grid%taucldi(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%taucldi(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'taucldc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%taucldc(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%taucldc(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%taucldc=initial_data_value ELSE ALLOCATE(grid%taucldc(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%taucldc(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'defor11').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%defor11(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%defor11(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%defor11=initial_data_value ELSE ALLOCATE(grid%defor11(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%defor11(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'defor22').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%defor22(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%defor22(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%defor22=initial_data_value ELSE ALLOCATE(grid%defor22(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%defor22(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'defor12').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%defor12(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%defor12(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%defor12=initial_data_value ELSE ALLOCATE(grid%defor12(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%defor12(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'defor33').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%defor33(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%defor33(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%defor33=initial_data_value ELSE ALLOCATE(grid%defor33(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%defor33(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'defor13').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%defor13(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%defor13(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%defor13=initial_data_value ELSE ALLOCATE(grid%defor13(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%defor13(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'defor23').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%defor23(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%defor23(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%defor23=initial_data_value ELSE ALLOCATE(grid%defor23(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%defor23(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'xkmv').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xkmv(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xkmv(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xkmv=initial_data_value ELSE ALLOCATE(grid%xkmv(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xkmv(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'xkmh').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xkmh(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xkmh(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xkmh=initial_data_value ELSE ALLOCATE(grid%xkmh(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xkmh(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'xkhv').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xkhv(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xkhv(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xkhv=initial_data_value ELSE ALLOCATE(grid%xkhv(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xkhv(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'xkhh').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%xkhh(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xkhh(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%xkhh=initial_data_value ELSE ALLOCATE(grid%xkhh(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%xkhh(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'div').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%div(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%div(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%div=initial_data_value ELSE ALLOCATE(grid%div(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%div(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'bn2').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%bn2(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%bn2(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bn2=initial_data_value ELSE ALLOCATE(grid%bn2(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%bn2(1,1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%warm_rain=.FALSE. IF ( setinitval .EQ. 3 ) grid%adv_moist_cond=.FALSE. IF ( setinitval .EQ. 3 ) grid%save_topo_from_real=0 IF ( setinitval .EQ. 3 ) grid%stepfg=0 IF(in_use_for_config(id,'rundgdten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rundgdten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rundgdten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rundgdten=initial_data_value ELSE ALLOCATE(grid%rundgdten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rundgdten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rvndgdten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rvndgdten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rvndgdten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rvndgdten=initial_data_value ELSE ALLOCATE(grid%rvndgdten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rvndgdten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rthndgdten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rthndgdten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthndgdten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthndgdten=initial_data_value ELSE ALLOCATE(grid%rthndgdten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthndgdten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rphndgdten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rphndgdten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rphndgdten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rphndgdten=initial_data_value ELSE ALLOCATE(grid%rphndgdten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rphndgdten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rqvndgdten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rqvndgdten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqvndgdten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqvndgdten=initial_data_value ELSE ALLOCATE(grid%rqvndgdten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqvndgdten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rmundgdten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rmundgdten(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rmundgdten(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rmundgdten=initial_data_value ELSE ALLOCATE(grid%rmundgdten(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rmundgdten(1,1). ') endif ENDIF IF(in_use_for_config(id,'fdda3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1)*num_fdda3d)) * RWORDSIZE ALLOCATE(grid%fdda3d(sm31:em31,sm32:em32,sm33:em33,num_fdda3d),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdda3d(sm31:em31,sm32:em32,sm33:em33,num_fdda3d). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdda3d=initial_data_value ELSE ALLOCATE(grid%fdda3d(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdda3d(1,1,1,1). ') endif ENDIF IF(in_use_for_config(id,'fdda2d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((1)-(1)+1))*(((em33)-(sm33)+1)*num_fdda2d)) * RWORDSIZE ALLOCATE(grid%fdda2d(sm31:em31,1:1,sm33:em33,num_fdda2d),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdda2d(sm31:em31,1:1,sm33:em33,num_fdda2d). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdda2d=initial_data_value ELSE ALLOCATE(grid%fdda2d(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdda2d(1,1,1,1). ') endif ENDIF IF(in_use_for_config(id,'u10_ndg_old').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%u10_ndg_old(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u10_ndg_old(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u10_ndg_old=initial_data_value ELSE ALLOCATE(grid%u10_ndg_old(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u10_ndg_old(1,1). ') endif ENDIF IF(in_use_for_config(id,'u10_ndg_new').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%u10_ndg_new(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u10_ndg_new(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u10_ndg_new=initial_data_value ELSE ALLOCATE(grid%u10_ndg_new(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u10_ndg_new(1,1). ') endif ENDIF IF(in_use_for_config(id,'v10_ndg_old').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%v10_ndg_old(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v10_ndg_old(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v10_ndg_old=initial_data_value ELSE ALLOCATE(grid%v10_ndg_old(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v10_ndg_old(1,1). ') endif ENDIF IF(in_use_for_config(id,'v10_ndg_new').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%v10_ndg_new(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v10_ndg_new(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v10_ndg_new=initial_data_value ELSE ALLOCATE(grid%v10_ndg_new(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v10_ndg_new(1,1). ') endif ENDIF IF(in_use_for_config(id,'t2_ndg_old').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%t2_ndg_old(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t2_ndg_old(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2_ndg_old=initial_data_value ELSE ALLOCATE(grid%t2_ndg_old(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t2_ndg_old(1,1). ') endif ENDIF IF(in_use_for_config(id,'t2_ndg_new').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%t2_ndg_new(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t2_ndg_new(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t2_ndg_new=initial_data_value ELSE ALLOCATE(grid%t2_ndg_new(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t2_ndg_new(1,1). ') endif ENDIF IF(in_use_for_config(id,'th2_ndg_old').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%th2_ndg_old(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th2_ndg_old(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th2_ndg_old=initial_data_value ELSE ALLOCATE(grid%th2_ndg_old(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th2_ndg_old(1,1). ') endif ENDIF IF(in_use_for_config(id,'th2_ndg_new').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%th2_ndg_new(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th2_ndg_new(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%th2_ndg_new=initial_data_value ELSE ALLOCATE(grid%th2_ndg_new(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%th2_ndg_new(1,1). ') endif ENDIF IF(in_use_for_config(id,'q2_ndg_old').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%q2_ndg_old(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%q2_ndg_old(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2_ndg_old=initial_data_value ELSE ALLOCATE(grid%q2_ndg_old(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%q2_ndg_old(1,1). ') endif ENDIF IF(in_use_for_config(id,'q2_ndg_new').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%q2_ndg_new(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%q2_ndg_new(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%q2_ndg_new=initial_data_value ELSE ALLOCATE(grid%q2_ndg_new(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%q2_ndg_new(1,1). ') endif ENDIF IF(in_use_for_config(id,'rh_ndg_old').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rh_ndg_old(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rh_ndg_old(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rh_ndg_old=initial_data_value ELSE ALLOCATE(grid%rh_ndg_old(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rh_ndg_old(1,1). ') endif ENDIF IF(in_use_for_config(id,'rh_ndg_new').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rh_ndg_new(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rh_ndg_new(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rh_ndg_new=initial_data_value ELSE ALLOCATE(grid%rh_ndg_new(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rh_ndg_new(1,1). ') endif ENDIF IF(in_use_for_config(id,'psl_ndg_old').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%psl_ndg_old(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%psl_ndg_old(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%psl_ndg_old=initial_data_value ELSE ALLOCATE(grid%psl_ndg_old(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%psl_ndg_old(1,1). ') endif ENDIF IF(in_use_for_config(id,'psl_ndg_new').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%psl_ndg_new(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%psl_ndg_new(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%psl_ndg_new=initial_data_value ELSE ALLOCATE(grid%psl_ndg_new(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%psl_ndg_new(1,1). ') endif ENDIF IF(in_use_for_config(id,'ps_ndg_old').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ps_ndg_old(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ps_ndg_old(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ps_ndg_old=initial_data_value ELSE ALLOCATE(grid%ps_ndg_old(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ps_ndg_old(1,1). ') endif ENDIF IF(in_use_for_config(id,'ps_ndg_new').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%ps_ndg_new(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ps_ndg_new(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ps_ndg_new=initial_data_value ELSE ALLOCATE(grid%ps_ndg_new(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ps_ndg_new(1,1). ') endif ENDIF IF(in_use_for_config(id,'tob_ndg_old').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tob_ndg_old(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tob_ndg_old(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tob_ndg_old=initial_data_value ELSE ALLOCATE(grid%tob_ndg_old(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tob_ndg_old(1,1). ') endif ENDIF IF(in_use_for_config(id,'odis_ndg_old').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%odis_ndg_old(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%odis_ndg_old(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%odis_ndg_old=initial_data_value ELSE ALLOCATE(grid%odis_ndg_old(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%odis_ndg_old(1,1). ') endif ENDIF IF(in_use_for_config(id,'tob_ndg_new').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tob_ndg_new(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tob_ndg_new(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tob_ndg_new=initial_data_value ELSE ALLOCATE(grid%tob_ndg_new(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tob_ndg_new(1,1). ') endif ENDIF IF(in_use_for_config(id,'odis_ndg_new').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%odis_ndg_new(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%odis_ndg_new(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%odis_ndg_new=initial_data_value ELSE ALLOCATE(grid%odis_ndg_new(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%odis_ndg_new(1,1). ') endif ENDIF IF(in_use_for_config(id,'sn_ndg_new').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sn_ndg_new(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sn_ndg_new(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sn_ndg_new=initial_data_value ELSE ALLOCATE(grid%sn_ndg_new(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sn_ndg_new(1,1). ') endif ENDIF IF(in_use_for_config(id,'sn_ndg_old').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%sn_ndg_old(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sn_ndg_old(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%sn_ndg_old=initial_data_value ELSE ALLOCATE(grid%sn_ndg_old(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%sn_ndg_old(1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%moved=.FALSE. IF(in_use_for_config(id,'abstot').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((model_config_rec%cam_abs_dim2)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%abstot(sm31:em31,sm32:em32,1:model_config_rec%cam_abs_dim2,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%abstot(sm31:em31,sm32:em32,1:model_config_rec%cam_abs_dim2,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%abstot=initial_data_value ELSE ALLOCATE(grid%abstot(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%abstot(1,1,1,1). ') endif ENDIF IF(in_use_for_config(id,'absnxt').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((model_config_rec%cam_abs_dim1)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%absnxt(sm31:em31,sm32:em32,1:model_config_rec%cam_abs_dim1,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%absnxt(sm31:em31,sm32:em32,1:model_config_rec%cam_abs_dim1,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%absnxt=initial_data_value ELSE ALLOCATE(grid%absnxt(1,1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%absnxt(1,1,1,1). ') endif ENDIF IF(in_use_for_config(id,'emstot').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%emstot(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%emstot(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%emstot=initial_data_value ELSE ALLOCATE(grid%emstot(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%emstot(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dpsdt').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dpsdt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dpsdt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dpsdt=initial_data_value ELSE ALLOCATE(grid%dpsdt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dpsdt(1,1). ') endif ENDIF IF(in_use_for_config(id,'dmudt').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dmudt(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dmudt(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dmudt=initial_data_value ELSE ALLOCATE(grid%dmudt(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dmudt(1,1). ') endif ENDIF IF(in_use_for_config(id,'pk1m').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%pk1m(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pk1m(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%pk1m=initial_data_value ELSE ALLOCATE(grid%pk1m(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%pk1m(1,1). ') endif ENDIF IF(in_use_for_config(id,'mu_2m').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%mu_2m(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_2m(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mu_2m=initial_data_value ELSE ALLOCATE(grid%mu_2m(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mu_2m(1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%max_cfl=initial_data_value IF(in_use_for_config(id,'tml'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%tml(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tml(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tml=initial_data_value ELSE ALLOCATE(grid%tml(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tml(1,1). ') endif ENDIF IF(in_use_for_config(id,'t0ml'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%t0ml(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t0ml(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t0ml=initial_data_value ELSE ALLOCATE(grid%t0ml(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t0ml(1,1). ') endif ENDIF IF(in_use_for_config(id,'hml'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%hml(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%hml(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hml=initial_data_value ELSE ALLOCATE(grid%hml(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%hml(1,1). ') endif ENDIF IF(in_use_for_config(id,'h0ml'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%h0ml(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%h0ml(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%h0ml=initial_data_value ELSE ALLOCATE(grid%h0ml(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%h0ml(1,1). ') endif ENDIF IF(in_use_for_config(id,'huml'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%huml(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%huml(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%huml=initial_data_value ELSE ALLOCATE(grid%huml(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%huml(1,1). ') endif ENDIF IF(in_use_for_config(id,'hvml'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%hvml(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%hvml(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%hvml=initial_data_value ELSE ALLOCATE(grid%hvml(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%hvml(1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%run_days=0 IF ( setinitval .EQ. 3 ) grid%run_hours=0 IF ( setinitval .EQ. 3 ) grid%run_minutes=0 IF ( setinitval .EQ. 3 ) grid%run_seconds=0 IF ( setinitval .EQ. 3 ) grid%start_year=0 IF ( setinitval .EQ. 3 ) grid%start_month=0 IF ( setinitval .EQ. 3 ) grid%start_day=0 IF ( setinitval .EQ. 3 ) grid%start_hour=0 IF ( setinitval .EQ. 3 ) grid%start_minute=0 IF ( setinitval .EQ. 3 ) grid%start_second=0 IF ( setinitval .EQ. 3 ) grid%end_year=0 IF ( setinitval .EQ. 3 ) grid%end_month=0 IF ( setinitval .EQ. 3 ) grid%end_day=0 IF ( setinitval .EQ. 3 ) grid%end_hour=0 IF ( setinitval .EQ. 3 ) grid%end_minute=0 IF ( setinitval .EQ. 3 ) grid%end_second=0 IF ( setinitval .EQ. 3 ) grid%interval_seconds=0 IF ( setinitval .EQ. 3 ) grid%input_from_file=.FALSE. IF ( setinitval .EQ. 3 ) grid%fine_input_stream=0 IF ( setinitval .EQ. 3 ) grid%input_from_hires=.FALSE. IF ( setinitval .EQ. 3 ) grid%all_ic_times=.FALSE. IF ( setinitval .EQ. 3 ) grid%oid=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_oid=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_oid=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_oid=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_oid=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_oid=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_oid=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_oid=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_oid=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_oid=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_oid=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_oid=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_oid=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_oid=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_oid=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_oid=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_oid=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_oid=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_oid=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_oid=0 IF ( setinitval .EQ. 3 ) grid%auxinput9_oid=0 IF ( setinitval .EQ. 3 ) grid%auxinput10_oid=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_oid=0 IF ( setinitval .EQ. 3 ) grid%history_interval=0 IF ( setinitval .EQ. 3 ) grid%frames_per_outfile=0 IF ( setinitval .EQ. 3 ) grid%frames_per_auxhist1=0 IF ( setinitval .EQ. 3 ) grid%frames_per_auxhist2=0 IF ( setinitval .EQ. 3 ) grid%frames_per_auxhist3=0 IF ( setinitval .EQ. 3 ) grid%frames_per_auxhist4=0 IF ( setinitval .EQ. 3 ) grid%frames_per_auxhist5=0 IF ( setinitval .EQ. 3 ) grid%frames_per_auxhist6=0 IF ( setinitval .EQ. 3 ) grid%frames_per_auxhist7=0 IF ( setinitval .EQ. 3 ) grid%frames_per_auxhist8=0 IF ( setinitval .EQ. 3 ) grid%frames_per_auxhist9=0 IF ( setinitval .EQ. 3 ) grid%frames_per_auxhist10=0 IF ( setinitval .EQ. 3 ) grid%frames_per_auxhist11=0 IF ( setinitval .EQ. 3 ) grid%restart=.FALSE. IF ( setinitval .EQ. 3 ) grid%restart_interval=0 IF ( setinitval .EQ. 3 ) grid%io_form_input=0 IF ( setinitval .EQ. 3 ) grid%io_form_history=0 IF ( setinitval .EQ. 3 ) grid%io_form_restart=0 IF ( setinitval .EQ. 3 ) grid%io_form_boundary=0 IF ( setinitval .EQ. 3 ) grid%debug_level=0 IF ( setinitval .EQ. 3 ) grid%self_test_domain=.FALSE. IF ( setinitval .EQ. 3 ) grid%history_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%history_interval_d=0 IF ( setinitval .EQ. 3 ) grid%history_interval_h=0 IF ( setinitval .EQ. 3 ) grid%history_interval_m=0 IF ( setinitval .EQ. 3 ) grid%history_interval_s=0 IF ( setinitval .EQ. 3 ) grid%inputout_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%inputout_interval_d=0 IF ( setinitval .EQ. 3 ) grid%inputout_interval_h=0 IF ( setinitval .EQ. 3 ) grid%inputout_interval_m=0 IF ( setinitval .EQ. 3 ) grid%inputout_interval_s=0 IF ( setinitval .EQ. 3 ) grid%inputout_interval=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_interval=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_interval=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_interval=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_interval=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_interval=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_interval=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_interval=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_interval=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_interval=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_interval=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_interval=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_interval=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_interval=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_interval=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_interval=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_interval=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_interval=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_interval=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_interval=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_interval_d=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_interval_h=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_interval_m=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_interval_s=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_interval=0 IF ( setinitval .EQ. 3 ) grid%gfdda_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%gfdda_interval_d=0 IF ( setinitval .EQ. 3 ) grid%gfdda_interval_h=0 IF ( setinitval .EQ. 3 ) grid%gfdda_interval_m=0 IF ( setinitval .EQ. 3 ) grid%gfdda_interval_s=0 IF ( setinitval .EQ. 3 ) grid%gfdda_interval=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_interval_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_interval_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_interval_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_interval_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_interval=0 IF ( setinitval .EQ. 3 ) grid%restart_interval_mo=0 IF ( setinitval .EQ. 3 ) grid%restart_interval_d=0 IF ( setinitval .EQ. 3 ) grid%restart_interval_h=0 IF ( setinitval .EQ. 3 ) grid%restart_interval_m=0 IF ( setinitval .EQ. 3 ) grid%restart_interval_s=0 IF ( setinitval .EQ. 3 ) grid%history_begin_y=0 IF ( setinitval .EQ. 3 ) grid%history_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%history_begin_d=0 IF ( setinitval .EQ. 3 ) grid%history_begin_h=0 IF ( setinitval .EQ. 3 ) grid%history_begin_m=0 IF ( setinitval .EQ. 3 ) grid%history_begin_s=0 IF ( setinitval .EQ. 3 ) grid%inputout_begin_y=0 IF ( setinitval .EQ. 3 ) grid%inputout_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%inputout_begin_d=0 IF ( setinitval .EQ. 3 ) grid%inputout_begin_h=0 IF ( setinitval .EQ. 3 ) grid%inputout_begin_m=0 IF ( setinitval .EQ. 3 ) grid%inputout_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_begin_s=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_begin_y=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_begin_d=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_begin_h=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_begin_m=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_begin_s=0 IF ( setinitval .EQ. 3 ) grid%gfdda_begin_y=0 IF ( setinitval .EQ. 3 ) grid%gfdda_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%gfdda_begin_d=0 IF ( setinitval .EQ. 3 ) grid%gfdda_begin_h=0 IF ( setinitval .EQ. 3 ) grid%gfdda_begin_m=0 IF ( setinitval .EQ. 3 ) grid%gfdda_begin_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_begin_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_begin_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_begin_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_begin_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_begin_s=0 IF ( setinitval .EQ. 3 ) grid%restart_begin_y=0 IF ( setinitval .EQ. 3 ) grid%restart_begin_mo=0 IF ( setinitval .EQ. 3 ) grid%restart_begin_d=0 IF ( setinitval .EQ. 3 ) grid%restart_begin_h=0 IF ( setinitval .EQ. 3 ) grid%restart_begin_m=0 IF ( setinitval .EQ. 3 ) grid%restart_begin_s=0 IF ( setinitval .EQ. 3 ) grid%history_end_y=0 IF ( setinitval .EQ. 3 ) grid%history_end_mo=0 IF ( setinitval .EQ. 3 ) grid%history_end_d=0 IF ( setinitval .EQ. 3 ) grid%history_end_h=0 IF ( setinitval .EQ. 3 ) grid%history_end_m=0 IF ( setinitval .EQ. 3 ) grid%history_end_s=0 IF ( setinitval .EQ. 3 ) grid%inputout_end_y=0 IF ( setinitval .EQ. 3 ) grid%inputout_end_mo=0 IF ( setinitval .EQ. 3 ) grid%inputout_end_d=0 IF ( setinitval .EQ. 3 ) grid%inputout_end_h=0 IF ( setinitval .EQ. 3 ) grid%inputout_end_m=0 IF ( setinitval .EQ. 3 ) grid%inputout_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist1_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist2_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist3_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist4_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist5_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist6_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist7_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist8_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist9_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist10_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxhist11_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput1_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput2_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput3_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput4_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput5_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput6_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput7_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput8_end_s=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_end_y=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_end_mo=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_end_d=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_end_h=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_end_m=0 IF ( setinitval .EQ. 3 ) grid%sgfdda_end_s=0 IF ( setinitval .EQ. 3 ) grid%gfdda_end_y=0 IF ( setinitval .EQ. 3 ) grid%gfdda_end_mo=0 IF ( setinitval .EQ. 3 ) grid%gfdda_end_d=0 IF ( setinitval .EQ. 3 ) grid%gfdda_end_h=0 IF ( setinitval .EQ. 3 ) grid%gfdda_end_m=0 IF ( setinitval .EQ. 3 ) grid%gfdda_end_s=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_end_y=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_end_mo=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_end_d=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_end_h=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_end_m=0 IF ( setinitval .EQ. 3 ) grid%auxinput11_end_s=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxinput1=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxinput2=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxinput3=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxinput4=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxinput5=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxinput6=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxinput7=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxinput8=0 IF ( setinitval .EQ. 3 ) grid%io_form_sgfdda=0 IF ( setinitval .EQ. 3 ) grid%io_form_gfdda=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxinput11=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxhist1=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxhist2=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxhist3=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxhist4=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxhist5=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxhist6=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxhist7=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxhist8=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxhist9=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxhist10=0 IF ( setinitval .EQ. 3 ) grid%io_form_auxhist11=0 IF ( setinitval .EQ. 3 ) grid%simulation_start_year=0 IF ( setinitval .EQ. 3 ) grid%simulation_start_month=0 IF ( setinitval .EQ. 3 ) grid%simulation_start_day=0 IF ( setinitval .EQ. 3 ) grid%simulation_start_hour=0 IF ( setinitval .EQ. 3 ) grid%simulation_start_minute=0 IF ( setinitval .EQ. 3 ) grid%simulation_start_second=0 IF ( setinitval .EQ. 3 ) grid%reset_simulation_start=.FALSE. IF ( setinitval .EQ. 3 ) grid%sr_x=0 IF ( setinitval .EQ. 3 ) grid%sr_y=0 IF ( setinitval .EQ. 3 ) grid%julyr=0 IF ( setinitval .EQ. 3 ) grid%julday=0 IF ( setinitval .EQ. 3 ) grid%gmt=initial_data_value IF ( setinitval .EQ. 3 ) grid%write_input=.FALSE. IF ( setinitval .EQ. 3 ) grid%write_restart_at_0h=.FALSE. IF ( setinitval .EQ. 3 ) grid%adjust_output_times=.FALSE. IF ( setinitval .EQ. 3 ) grid%adjust_input_times=.FALSE. IF ( setinitval .EQ. 3 ) grid%diag_print=0 IF ( setinitval .EQ. 3 ) grid%nocolons=.FALSE. IF ( setinitval .EQ. 3 ) grid%cycling=.FALSE. IF ( setinitval .EQ. 3 ) grid%dfi_opt=0 IF ( setinitval .EQ. 3 ) grid%dfi_nfilter=0 IF ( setinitval .EQ. 3 ) grid%dfi_write_filtered_input=.FALSE. IF ( setinitval .EQ. 3 ) grid%dfi_write_dfi_history=.FALSE. IF ( setinitval .EQ. 3 ) grid%dfi_cutoff_seconds=0 IF ( setinitval .EQ. 3 ) grid%dfi_time_dim=0 IF ( setinitval .EQ. 3 ) grid%dfi_fwdstop_year=0 IF ( setinitval .EQ. 3 ) grid%dfi_fwdstop_month=0 IF ( setinitval .EQ. 3 ) grid%dfi_fwdstop_day=0 IF ( setinitval .EQ. 3 ) grid%dfi_fwdstop_hour=0 IF ( setinitval .EQ. 3 ) grid%dfi_fwdstop_minute=0 IF ( setinitval .EQ. 3 ) grid%dfi_fwdstop_second=0 IF ( setinitval .EQ. 3 ) grid%dfi_bckstop_year=0 IF ( setinitval .EQ. 3 ) grid%dfi_bckstop_month=0 IF ( setinitval .EQ. 3 ) grid%dfi_bckstop_day=0 IF ( setinitval .EQ. 3 ) grid%dfi_bckstop_hour=0 IF ( setinitval .EQ. 3 ) grid%dfi_bckstop_minute=0 IF ( setinitval .EQ. 3 ) grid%dfi_bckstop_second=0 IF ( setinitval .EQ. 3 ) grid%time_step=0 IF ( setinitval .EQ. 3 ) grid%time_step_fract_num=0 IF ( setinitval .EQ. 3 ) grid%time_step_fract_den=0 IF ( setinitval .EQ. 3 ) grid%min_time_step=0 IF ( setinitval .EQ. 3 ) grid%max_time_step=0 IF ( setinitval .EQ. 3 ) grid%target_cfl=initial_data_value IF ( setinitval .EQ. 3 ) grid%max_step_increase_pct=0 IF ( setinitval .EQ. 3 ) grid%starting_time_step=0 IF ( setinitval .EQ. 3 ) grid%step_to_output_time=.FALSE. IF ( setinitval .EQ. 3 ) grid%use_adaptive_time_step=.FALSE. IF ( setinitval .EQ. 3 ) grid%max_dom=0 IF ( setinitval .EQ. 3 ) grid%s_we=0 IF ( setinitval .EQ. 3 ) grid%e_we=0 IF ( setinitval .EQ. 3 ) grid%s_sn=0 IF ( setinitval .EQ. 3 ) grid%e_sn=0 IF ( setinitval .EQ. 3 ) grid%s_vert=0 IF ( setinitval .EQ. 3 ) grid%e_vert=0 IF ( setinitval .EQ. 3 ) grid%num_metgrid_levels=0 IF ( setinitval .EQ. 3 ) grid%num_metgrid_soil_levels=0 IF ( setinitval .EQ. 3 ) grid%p_top_requested=initial_data_value IF ( setinitval .EQ. 3 ) grid%interp_type=0 IF ( setinitval .EQ. 3 ) grid%extrap_type=0 IF ( setinitval .EQ. 3 ) grid%t_extrap_type=0 IF ( setinitval .EQ. 3 ) grid%lowest_lev_from_sfc=.FALSE. IF ( setinitval .EQ. 3 ) grid%use_levels_below_ground=.FALSE. IF ( setinitval .EQ. 3 ) grid%use_tavg_for_tsk=.FALSE. IF ( setinitval .EQ. 3 ) grid%use_surface=.FALSE. IF ( setinitval .EQ. 3 ) grid%lagrange_order=0 IF ( setinitval .EQ. 3 ) grid%force_sfc_in_vinterp=0 IF ( setinitval .EQ. 3 ) grid%zap_close_levels=initial_data_value IF ( setinitval .EQ. 3 ) grid%sfcp_to_sfcp=.FALSE. IF ( setinitval .EQ. 3 ) grid%adjust_heights=.FALSE. IF ( setinitval .EQ. 3 ) grid%smooth_cg_topo=.FALSE. IF ( setinitval .EQ. 3 ) grid%rh2qv_wrt_liquid=.FALSE. IF ( setinitval .EQ. 3 ) grid%dx=initial_data_value IF ( setinitval .EQ. 3 ) grid%dy=initial_data_value IF ( setinitval .EQ. 3 ) grid%grid_id=0 IF ( setinitval .EQ. 3 ) grid%grid_allowed=.FALSE. IF ( setinitval .EQ. 3 ) grid%parent_id=0 IF ( setinitval .EQ. 3 ) grid%i_parent_start=0 IF ( setinitval .EQ. 3 ) grid%j_parent_start=0 IF ( setinitval .EQ. 3 ) grid%parent_grid_ratio=0 IF ( setinitval .EQ. 3 ) grid%parent_time_step_ratio=0 IF ( setinitval .EQ. 3 ) grid%feedback=0 IF ( setinitval .EQ. 3 ) grid%smooth_option=0 IF ( setinitval .EQ. 3 ) grid%blend_width=0 IF ( setinitval .EQ. 3 ) grid%ztop=initial_data_value IF ( setinitval .EQ. 3 ) grid%moad_grid_ratio=0 IF ( setinitval .EQ. 3 ) grid%moad_time_step_ratio=0 IF ( setinitval .EQ. 3 ) grid%shw=0 IF ( setinitval .EQ. 3 ) grid%tile_sz_x=0 IF ( setinitval .EQ. 3 ) grid%tile_sz_y=0 IF ( setinitval .EQ. 3 ) grid%numtiles=0 IF ( setinitval .EQ. 3 ) grid%nproc_x=0 IF ( setinitval .EQ. 3 ) grid%nproc_y=0 IF ( setinitval .EQ. 3 ) grid%irand=0 IF ( setinitval .EQ. 3 ) grid%dt=initial_data_value IF ( setinitval .EQ. 3 ) grid%num_moves=0 IF ( setinitval .EQ. 3 ) grid%ts_buf_size=0 IF ( setinitval .EQ. 3 ) grid%max_ts_locs=0 IF ( setinitval .EQ. 3 ) grid%vortex_interval=0 IF ( setinitval .EQ. 3 ) grid%max_vortex_speed=0 IF ( setinitval .EQ. 3 ) grid%corral_dist=0 IF ( setinitval .EQ. 3 ) grid%track_level=0 IF ( setinitval .EQ. 3 ) grid%time_to_move=initial_data_value IF ( setinitval .EQ. 3 ) grid%move_id=0 IF ( setinitval .EQ. 3 ) grid%move_interval=0 IF ( setinitval .EQ. 3 ) grid%move_cd_x=0 IF ( setinitval .EQ. 3 ) grid%move_cd_y=0 IF ( setinitval .EQ. 3 ) grid%swap_x=.FALSE. IF ( setinitval .EQ. 3 ) grid%swap_y=.FALSE. IF ( setinitval .EQ. 3 ) grid%cycle_x=.FALSE. IF ( setinitval .EQ. 3 ) grid%cycle_y=.FALSE. IF ( setinitval .EQ. 3 ) grid%reorder_mesh=.FALSE. IF ( setinitval .EQ. 3 ) grid%perturb_input=.FALSE. IF ( setinitval .EQ. 3 ) grid%eta_levels=initial_data_value IF ( setinitval .EQ. 3 ) grid%max_dz=initial_data_value IF ( setinitval .EQ. 3 ) grid%insert_bogus_storm=.FALSE. IF ( setinitval .EQ. 3 ) grid%remove_storm=.FALSE. IF ( setinitval .EQ. 3 ) grid%num_storm=0 IF ( setinitval .EQ. 3 ) grid%latc_loc=initial_data_value IF ( setinitval .EQ. 3 ) grid%lonc_loc=initial_data_value IF ( setinitval .EQ. 3 ) grid%vmax_meters_per_second=initial_data_value IF ( setinitval .EQ. 3 ) grid%rmax=initial_data_value IF ( setinitval .EQ. 3 ) grid%vmax_ratio=initial_data_value IF ( setinitval .EQ. 3 ) grid%mp_physics=0 IF ( setinitval .EQ. 3 ) grid%gsfcgce_hail=0 IF ( setinitval .EQ. 3 ) grid%gsfcgce_2ice=0 IF ( setinitval .EQ. 3 ) grid%progn=0 IF ( setinitval .EQ. 3 ) grid%ra_lw_physics=0 IF ( setinitval .EQ. 3 ) grid%ra_sw_physics=0 IF ( setinitval .EQ. 3 ) grid%radt=initial_data_value IF ( setinitval .EQ. 3 ) grid%naer=initial_data_value IF ( setinitval .EQ. 3 ) grid%sf_sfclay_physics=0 IF ( setinitval .EQ. 3 ) grid%sf_surface_physics=0 IF ( setinitval .EQ. 3 ) grid%bl_pbl_physics=0 IF ( setinitval .EQ. 3 ) grid%sf_urban_physics=0 IF ( setinitval .EQ. 3 ) grid%bldt=initial_data_value IF ( setinitval .EQ. 3 ) grid%cu_physics=0 IF ( setinitval .EQ. 3 ) grid%cudt=initial_data_value IF ( setinitval .EQ. 3 ) grid%gsmdt=initial_data_value IF ( setinitval .EQ. 3 ) grid%isfflx=0 IF ( setinitval .EQ. 3 ) grid%ifsnow=0 IF ( setinitval .EQ. 3 ) grid%icloud=0 IF ( setinitval .EQ. 3 ) grid%swrad_scat=initial_data_value IF ( setinitval .EQ. 3 ) grid%surface_input_source=0 IF ( setinitval .EQ. 3 ) grid%num_soil_layers=0 IF ( setinitval .EQ. 3 ) grid%num_urban_layers=0 IF ( setinitval .EQ. 3 ) grid%num_months=0 IF ( setinitval .EQ. 3 ) grid%maxiens=0 IF ( setinitval .EQ. 3 ) grid%maxens=0 IF ( setinitval .EQ. 3 ) grid%maxens2=0 IF ( setinitval .EQ. 3 ) grid%maxens3=0 IF ( setinitval .EQ. 3 ) grid%ensdim=0 IF ( setinitval .EQ. 3 ) grid%cugd_avedx=0 IF ( setinitval .EQ. 3 ) grid%clos_choice=0 IF ( setinitval .EQ. 3 ) grid%imomentum=0 IF ( setinitval .EQ. 3 ) grid%chem_opt=0 IF ( setinitval .EQ. 3 ) grid%num_land_cat=0 IF ( setinitval .EQ. 3 ) grid%num_soil_cat=0 IF ( setinitval .EQ. 3 ) grid%mp_zero_out=0 IF ( setinitval .EQ. 3 ) grid%mp_zero_out_thresh=initial_data_value IF ( setinitval .EQ. 3 ) grid%seaice_threshold=initial_data_value IF ( setinitval .EQ. 3 ) grid%sst_update=0 IF ( setinitval .EQ. 3 ) grid%sst_skin=0 IF ( setinitval .EQ. 3 ) grid%tmn_update=0 IF ( setinitval .EQ. 3 ) grid%usemonalb=.FALSE. IF ( setinitval .EQ. 3 ) grid%rdmaxalb=.FALSE. IF ( setinitval .EQ. 3 ) grid%rdlai2d=.FALSE. IF ( setinitval .EQ. 3 ) grid%co2tf=0 IF ( setinitval .EQ. 3 ) grid%ra_call_offset=0 IF ( setinitval .EQ. 3 ) grid%cam_abs_freq_s=initial_data_value IF ( setinitval .EQ. 3 ) grid%levsiz=0 IF ( setinitval .EQ. 3 ) grid%paerlev=0 IF ( setinitval .EQ. 3 ) grid%cam_abs_dim1=0 IF ( setinitval .EQ. 3 ) grid%cam_abs_dim2=0 IF ( setinitval .EQ. 3 ) grid%lagday=0 IF ( setinitval .EQ. 3 ) grid%cu_rad_feedback=.FALSE. IF ( setinitval .EQ. 3 ) grid%pxlsm_smois_init=0 IF ( setinitval .EQ. 3 ) grid%omlcall=0 IF ( setinitval .EQ. 3 ) grid%oml_hml0=initial_data_value IF ( setinitval .EQ. 3 ) grid%oml_gamma=initial_data_value IF ( setinitval .EQ. 3 ) grid%isftcflx=0 IF ( setinitval .EQ. 3 ) grid%shadlen=initial_data_value IF ( setinitval .EQ. 3 ) grid%slope_rad=0 IF ( setinitval .EQ. 3 ) grid%topo_shading=0 IF ( setinitval .EQ. 3 ) grid%no_mp_heating=0 IF ( setinitval .EQ. 3 ) grid%fractional_seaice=0 IF ( setinitval .EQ. 3 ) grid%bucket_mm=initial_data_value IF ( setinitval .EQ. 3 ) grid%bucket_j=initial_data_value IF ( setinitval .EQ. 3 ) grid%grav_settling=0 IF ( setinitval .EQ. 3 ) grid%fgdt=initial_data_value IF ( setinitval .EQ. 3 ) grid%fgdtzero=0 IF ( setinitval .EQ. 3 ) grid%grid_fdda=0 IF ( setinitval .EQ. 3 ) grid%grid_sfdda=0 IF ( setinitval .EQ. 3 ) grid%if_no_pbl_nudging_uv=0 IF ( setinitval .EQ. 3 ) grid%if_no_pbl_nudging_t=0 IF ( setinitval .EQ. 3 ) grid%if_no_pbl_nudging_ph=0 IF ( setinitval .EQ. 3 ) grid%if_no_pbl_nudging_q=0 IF ( setinitval .EQ. 3 ) grid%if_zfac_uv=0 IF ( setinitval .EQ. 3 ) grid%k_zfac_uv=0 IF ( setinitval .EQ. 3 ) grid%if_zfac_t=0 IF ( setinitval .EQ. 3 ) grid%k_zfac_t=0 IF ( setinitval .EQ. 3 ) grid%if_zfac_ph=0 IF ( setinitval .EQ. 3 ) grid%k_zfac_ph=0 IF ( setinitval .EQ. 3 ) grid%if_zfac_q=0 IF ( setinitval .EQ. 3 ) grid%k_zfac_q=0 IF ( setinitval .EQ. 3 ) grid%dk_zfac_uv=0 IF ( setinitval .EQ. 3 ) grid%dk_zfac_t=0 IF ( setinitval .EQ. 3 ) grid%dk_zfac_ph=0 IF ( setinitval .EQ. 3 ) grid%guv=initial_data_value IF ( setinitval .EQ. 3 ) grid%guv_sfc=initial_data_value IF ( setinitval .EQ. 3 ) grid%gt=initial_data_value IF ( setinitval .EQ. 3 ) grid%gt_sfc=initial_data_value IF ( setinitval .EQ. 3 ) grid%gq=initial_data_value IF ( setinitval .EQ. 3 ) grid%gq_sfc=initial_data_value IF ( setinitval .EQ. 3 ) grid%gph=initial_data_value IF ( setinitval .EQ. 3 ) grid%dtramp_min=initial_data_value IF ( setinitval .EQ. 3 ) grid%if_ramping=0 IF ( setinitval .EQ. 3 ) grid%rinblw=initial_data_value IF ( setinitval .EQ. 3 ) grid%xwavenum=0 IF ( setinitval .EQ. 3 ) grid%ywavenum=0 IF ( setinitval .EQ. 3 ) grid%obs_nudge_opt=0 IF ( setinitval .EQ. 3 ) grid%max_obs=0 IF ( setinitval .EQ. 3 ) grid%fdda_start=initial_data_value IF ( setinitval .EQ. 3 ) grid%fdda_end=initial_data_value IF ( setinitval .EQ. 3 ) grid%obs_nudge_wind=0 IF ( setinitval .EQ. 3 ) grid%obs_coef_wind=initial_data_value IF ( setinitval .EQ. 3 ) grid%obs_nudge_temp=0 IF ( setinitval .EQ. 3 ) grid%obs_coef_temp=initial_data_value IF ( setinitval .EQ. 3 ) grid%obs_nudge_mois=0 IF ( setinitval .EQ. 3 ) grid%obs_coef_mois=initial_data_value IF ( setinitval .EQ. 3 ) grid%obs_nudge_pstr=0 IF ( setinitval .EQ. 3 ) grid%obs_coef_pstr=initial_data_value IF ( setinitval .EQ. 3 ) grid%obs_rinxy=initial_data_value IF ( setinitval .EQ. 3 ) grid%obs_rinsig=initial_data_value IF ( setinitval .EQ. 3 ) grid%obs_twindo=initial_data_value IF ( setinitval .EQ. 3 ) grid%obs_npfi=0 IF ( setinitval .EQ. 3 ) grid%obs_ionf=0 IF ( setinitval .EQ. 3 ) grid%obs_idynin=0 IF ( setinitval .EQ. 3 ) grid%obs_dtramp=initial_data_value IF ( setinitval .EQ. 3 ) grid%obs_prt_max=0 IF ( setinitval .EQ. 3 ) grid%obs_prt_freq=0 IF ( setinitval .EQ. 3 ) grid%obs_ipf_in4dob=.FALSE. IF ( setinitval .EQ. 3 ) grid%obs_ipf_errob=.FALSE. IF ( setinitval .EQ. 3 ) grid%obs_ipf_nudob=.FALSE. IF ( setinitval .EQ. 3 ) grid%obs_ipf_init=.FALSE. IF ( setinitval .EQ. 3 ) grid%scm_force=0 IF ( setinitval .EQ. 3 ) grid%scm_force_dx=initial_data_value IF ( setinitval .EQ. 3 ) grid%num_force_layers=0 IF ( setinitval .EQ. 3 ) grid%scm_lu_index=0 IF ( setinitval .EQ. 3 ) grid%scm_isltyp=0 IF ( setinitval .EQ. 3 ) grid%scm_vegfra=initial_data_value IF ( setinitval .EQ. 3 ) grid%scm_canwat=0 IF ( setinitval .EQ. 3 ) grid%scm_lat=initial_data_value IF ( setinitval .EQ. 3 ) grid%scm_lon=initial_data_value IF ( setinitval .EQ. 3 ) grid%scm_th_adv=.FALSE. IF ( setinitval .EQ. 3 ) grid%scm_wind_adv=.FALSE. IF ( setinitval .EQ. 3 ) grid%scm_qv_adv=.FALSE. IF ( setinitval .EQ. 3 ) grid%scm_vert_adv=.FALSE. IF ( setinitval .EQ. 3 ) grid%dyn_opt=0 IF ( setinitval .EQ. 3 ) grid%rk_ord=0 IF ( setinitval .EQ. 3 ) grid%w_damping=0 IF ( setinitval .EQ. 3 ) grid%diff_opt=0 IF ( setinitval .EQ. 3 ) grid%km_opt=0 IF ( setinitval .EQ. 3 ) grid%km_opt_dfi=0 IF ( setinitval .EQ. 3 ) grid%damp_opt=0 IF ( setinitval .EQ. 3 ) grid%gwd_opt=0 IF ( setinitval .EQ. 3 ) grid%zdamp=initial_data_value IF ( setinitval .EQ. 3 ) grid%dampcoef=initial_data_value IF ( setinitval .EQ. 3 ) grid%khdif=initial_data_value IF ( setinitval .EQ. 3 ) grid%kvdif=initial_data_value IF ( setinitval .EQ. 3 ) grid%diff_6th_factor=initial_data_value IF ( setinitval .EQ. 3 ) grid%diff_6th_opt=0 IF ( setinitval .EQ. 3 ) grid%c_s=initial_data_value IF ( setinitval .EQ. 3 ) grid%c_k=initial_data_value IF ( setinitval .EQ. 3 ) grid%smdiv=initial_data_value IF ( setinitval .EQ. 3 ) grid%emdiv=initial_data_value IF ( setinitval .EQ. 3 ) grid%epssm=initial_data_value IF ( setinitval .EQ. 3 ) grid%non_hydrostatic=.FALSE. IF ( setinitval .EQ. 3 ) grid%time_step_sound=0 IF ( setinitval .EQ. 3 ) grid%h_mom_adv_order=0 IF ( setinitval .EQ. 3 ) grid%v_mom_adv_order=0 IF ( setinitval .EQ. 3 ) grid%h_sca_adv_order=0 IF ( setinitval .EQ. 3 ) grid%v_sca_adv_order=0 IF ( setinitval .EQ. 3 ) grid%moist_adv_opt=0 IF ( setinitval .EQ. 3 ) grid%moist_adv_dfi_opt=0 IF ( setinitval .EQ. 3 ) grid%chem_adv_opt=0 IF ( setinitval .EQ. 3 ) grid%scalar_adv_opt=0 IF ( setinitval .EQ. 3 ) grid%tke_adv_opt=0 IF ( setinitval .EQ. 3 ) grid%top_radiation=.FALSE. IF ( setinitval .EQ. 3 ) grid%mix_isotropic=0 IF ( setinitval .EQ. 3 ) grid%mix_upper_bound=initial_data_value IF ( setinitval .EQ. 3 ) grid%top_lid=.FALSE. IF ( setinitval .EQ. 3 ) grid%tke_upper_bound=initial_data_value IF ( setinitval .EQ. 3 ) grid%tke_drag_coefficient=initial_data_value IF ( setinitval .EQ. 3 ) grid%tke_heat_flux=initial_data_value IF ( setinitval .EQ. 3 ) grid%pert_coriolis=.FALSE. IF ( setinitval .EQ. 3 ) grid%coriolis2d=.FALSE. IF ( setinitval .EQ. 3 ) grid%mix_full_fields=.FALSE. IF ( setinitval .EQ. 3 ) grid%base_pres=initial_data_value IF ( setinitval .EQ. 3 ) grid%base_temp=initial_data_value IF ( setinitval .EQ. 3 ) grid%base_lapse=initial_data_value IF ( setinitval .EQ. 3 ) grid%iso_temp=initial_data_value IF ( setinitval .EQ. 3 ) grid%use_baseparam_fr_nml=.FALSE. IF ( setinitval .EQ. 3 ) grid%fft_filter_lat=initial_data_value IF ( setinitval .EQ. 3 ) grid%rotated_pole=.FALSE. IF ( setinitval .EQ. 3 ) grid%do_coriolis=.FALSE. IF ( setinitval .EQ. 3 ) grid%do_curvature=.FALSE. IF ( setinitval .EQ. 3 ) grid%do_gradp=.FALSE. IF ( setinitval .EQ. 3 ) grid%spec_bdy_width=0 IF ( setinitval .EQ. 3 ) grid%spec_zone=0 IF ( setinitval .EQ. 3 ) grid%relax_zone=0 IF ( setinitval .EQ. 3 ) grid%specified=.FALSE. IF ( setinitval .EQ. 3 ) grid%periodic_x=.FALSE. IF ( setinitval .EQ. 3 ) grid%symmetric_xs=.FALSE. IF ( setinitval .EQ. 3 ) grid%symmetric_xe=.FALSE. IF ( setinitval .EQ. 3 ) grid%open_xs=.FALSE. IF ( setinitval .EQ. 3 ) grid%open_xe=.FALSE. IF ( setinitval .EQ. 3 ) grid%periodic_y=.FALSE. IF ( setinitval .EQ. 3 ) grid%symmetric_ys=.FALSE. IF ( setinitval .EQ. 3 ) grid%symmetric_ye=.FALSE. IF ( setinitval .EQ. 3 ) grid%open_ys=.FALSE. IF ( setinitval .EQ. 3 ) grid%open_ye=.FALSE. IF ( setinitval .EQ. 3 ) grid%polar=.FALSE. IF ( setinitval .EQ. 3 ) grid%nested=.FALSE. IF ( setinitval .EQ. 3 ) grid%spec_exp=initial_data_value IF ( setinitval .EQ. 3 ) grid%real_data_init_type=0 IF ( setinitval .EQ. 3 ) grid%background_proc_id=0 IF ( setinitval .EQ. 3 ) grid%forecast_proc_id=0 IF ( setinitval .EQ. 3 ) grid%production_status=0 IF ( setinitval .EQ. 3 ) grid%compression=0 IF ( setinitval .EQ. 3 ) grid%nobs_ndg_vars=0 IF ( setinitval .EQ. 3 ) grid%nobs_err_flds=0 IF ( setinitval .EQ. 3 ) grid%cen_lat=initial_data_value IF ( setinitval .EQ. 3 ) grid%cen_lon=initial_data_value IF ( setinitval .EQ. 3 ) grid%truelat1=initial_data_value IF ( setinitval .EQ. 3 ) grid%truelat2=initial_data_value IF ( setinitval .EQ. 3 ) grid%moad_cen_lat=initial_data_value IF ( setinitval .EQ. 3 ) grid%stand_lon=initial_data_value IF ( setinitval .EQ. 3 ) grid%flag_metgrid=0 IF ( setinitval .EQ. 3 ) grid%flag_snow=0 IF ( setinitval .EQ. 3 ) grid%flag_psfc=0 IF ( setinitval .EQ. 3 ) grid%flag_sm000010=0 IF ( setinitval .EQ. 3 ) grid%flag_sm010040=0 IF ( setinitval .EQ. 3 ) grid%flag_sm040100=0 IF ( setinitval .EQ. 3 ) grid%flag_sm100200=0 IF ( setinitval .EQ. 3 ) grid%flag_st000010=0 IF ( setinitval .EQ. 3 ) grid%flag_st010040=0 IF ( setinitval .EQ. 3 ) grid%flag_st040100=0 IF ( setinitval .EQ. 3 ) grid%flag_st100200=0 IF ( setinitval .EQ. 3 ) grid%flag_slp=0 IF ( setinitval .EQ. 3 ) grid%flag_soilhgt=0 IF ( setinitval .EQ. 3 ) grid%flag_mf_xy=0 IF ( setinitval .EQ. 3 ) grid%bdyfrq=initial_data_value IF ( setinitval .EQ. 3 ) grid%iswater=0 IF ( setinitval .EQ. 3 ) grid%islake=0 IF ( setinitval .EQ. 3 ) grid%isice=0 IF ( setinitval .EQ. 3 ) grid%isurban=0 IF ( setinitval .EQ. 3 ) grid%isoilwater=0 IF ( setinitval .EQ. 3 ) grid%map_proj=0 IF ( setinitval .EQ. 3 ) grid%use_wps_input=0 IF ( setinitval .EQ. 3 ) grid%dfi_stage=0 IF ( setinitval .EQ. 3 ) grid%mp_physics_dfi=0 IF ( setinitval .EQ. 3 ) grid%nodyn_dummy=0 IF ( setinitval .EQ. 3 ) grid%fdob%domain_tot=0 IF ( setinitval .EQ. 3 ) grid%fdob%ieodi=0 IF ( setinitval .EQ. 3 ) grid%fdob%iwtsig=0 IF ( setinitval .EQ. 3 ) grid%fdob%nstat=0 IF ( setinitval .EQ. 3 ) grid%fdob%nstaw=0 IF ( setinitval .EQ. 3 ) grid%fdob%ktaur=0 IF ( setinitval .EQ. 3 ) grid%fdob%levidn(max_domains)=0 IF ( setinitval .EQ. 3 ) grid%fdob%refprt(max_domains)=0 IF ( setinitval .EQ. 3 ) grid%fdob%window=initial_data_value IF ( setinitval .EQ. 3 ) grid%fdob%rtlast=initial_data_value IF ( setinitval .EQ. 3 ) grid%fdob%datend=initial_data_value IF ( setinitval .EQ. 3 ) grid%fdob%rinfmn=initial_data_value IF ( setinitval .EQ. 3 ) grid%fdob%rinfmx=initial_data_value IF ( setinitval .EQ. 3 ) grid%fdob%pfree=initial_data_value IF ( setinitval .EQ. 3 ) grid%fdob%dcon=initial_data_value IF ( setinitval .EQ. 3 ) grid%fdob%dpsmx=initial_data_value IF ( setinitval .EQ. 3 ) grid%fdob%tfaci=initial_data_value IF ( setinitval .EQ. 3 ) grid%fdob%known_lat=initial_data_value IF ( setinitval .EQ. 3 ) grid%fdob%known_lon=initial_data_value IF(in_use_for_config(id,'varobs').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%nobs_ndg_vars)-(1)+1))*(((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%varobs(1:model_config_rec%nobs_ndg_vars,1:model_config_rec%max_obs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%varobs(1:model_config_rec%nobs_ndg_vars,1:model_config_rec%max_obs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%varobs=initial_data_value ELSE ALLOCATE(grid%fdob%varobs(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%varobs(1,1). ') endif ENDIF IF(in_use_for_config(id,'errf').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%nobs_err_flds)-(1)+1))*(((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%errf(1:model_config_rec%nobs_err_flds,1:model_config_rec%max_obs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%errf(1:model_config_rec%nobs_err_flds,1:model_config_rec%max_obs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%errf=initial_data_value ELSE ALLOCATE(grid%fdob%errf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%errf(1,1). ') endif ENDIF IF(in_use_for_config(id,'timeob').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%timeob(1:model_config_rec%max_obs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%timeob(1:model_config_rec%max_obs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%timeob=initial_data_value ELSE ALLOCATE(grid%fdob%timeob(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%timeob(1). ') endif ENDIF IF(in_use_for_config(id,'nlevs_ob').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%nlevs_ob(1:model_config_rec%max_obs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%nlevs_ob(1:model_config_rec%max_obs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%nlevs_ob=initial_data_value ELSE ALLOCATE(grid%fdob%nlevs_ob(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%nlevs_ob(1). ') endif ENDIF IF(in_use_for_config(id,'lev_in_ob').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%lev_in_ob(1:model_config_rec%max_obs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%lev_in_ob(1:model_config_rec%max_obs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%lev_in_ob=initial_data_value ELSE ALLOCATE(grid%fdob%lev_in_ob(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%lev_in_ob(1). ') endif ENDIF IF(in_use_for_config(id,'plfo').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%plfo(1:model_config_rec%max_obs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%plfo(1:model_config_rec%max_obs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%plfo=initial_data_value ELSE ALLOCATE(grid%fdob%plfo(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%plfo(1). ') endif ENDIF IF(in_use_for_config(id,'elevob').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%elevob(1:model_config_rec%max_obs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%elevob(1:model_config_rec%max_obs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%elevob=initial_data_value ELSE ALLOCATE(grid%fdob%elevob(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%elevob(1). ') endif ENDIF IF(in_use_for_config(id,'rio').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%rio(1:model_config_rec%max_obs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%rio(1:model_config_rec%max_obs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%rio=initial_data_value ELSE ALLOCATE(grid%fdob%rio(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%rio(1). ') endif ENDIF IF(in_use_for_config(id,'rjo').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%rjo(1:model_config_rec%max_obs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%rjo(1:model_config_rec%max_obs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%rjo=initial_data_value ELSE ALLOCATE(grid%fdob%rjo(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%rjo(1). ') endif ENDIF IF(in_use_for_config(id,'rko').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%rko(1:model_config_rec%max_obs),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%rko(1:model_config_rec%max_obs). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%rko=initial_data_value ELSE ALLOCATE(grid%fdob%rko(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%rko(1). ') endif ENDIF IF(in_use_for_config(id,'obsprt').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%obs_prt_max)-(1)+1))) * IWORDSIZE ALLOCATE(grid%fdob%obsprt(1:model_config_rec%obs_prt_max),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%obsprt(1:model_config_rec%obs_prt_max). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%obsprt=0 ELSE ALLOCATE(grid%fdob%obsprt(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%obsprt(1). ') endif ENDIF IF(in_use_for_config(id,'latprt').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%obs_prt_max)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%latprt(1:model_config_rec%obs_prt_max),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%latprt(1:model_config_rec%obs_prt_max). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%latprt=initial_data_value ELSE ALLOCATE(grid%fdob%latprt(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%latprt(1). ') endif ENDIF IF(in_use_for_config(id,'lonprt').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%obs_prt_max)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%lonprt(1:model_config_rec%obs_prt_max),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%lonprt(1:model_config_rec%obs_prt_max). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%lonprt=initial_data_value ELSE ALLOCATE(grid%fdob%lonprt(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%lonprt(1). ') endif ENDIF IF(in_use_for_config(id,'mlatprt').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%obs_prt_max)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%mlatprt(1:model_config_rec%obs_prt_max),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%mlatprt(1:model_config_rec%obs_prt_max). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%mlatprt=initial_data_value ELSE ALLOCATE(grid%fdob%mlatprt(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%mlatprt(1). ') endif ENDIF IF(in_use_for_config(id,'mlonprt').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%obs_prt_max)-(1)+1))) * RWORDSIZE ALLOCATE(grid%fdob%mlonprt(1:model_config_rec%obs_prt_max),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%mlonprt(1:model_config_rec%obs_prt_max). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fdob%mlonprt=initial_data_value ELSE ALLOCATE(grid%fdob%mlonprt(1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fdob%mlonprt(1). ') endif ENDIF IF(in_use_for_config(id,'t_xxx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE ALLOCATE(grid%t_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%t_xxx=initial_data_value ELSE ALLOCATE(grid%t_xxx(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%t_xxx(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'u_xxx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE ALLOCATE(grid%u_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%u_xxx=initial_data_value ELSE ALLOCATE(grid%u_xxx(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%u_xxx(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ru_xxx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE ALLOCATE(grid%ru_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ru_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ru_xxx=initial_data_value ELSE ALLOCATE(grid%ru_xxx(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ru_xxx(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'v_xxx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE ALLOCATE(grid%v_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%v_xxx=initial_data_value ELSE ALLOCATE(grid%v_xxx(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%v_xxx(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rv_xxx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE ALLOCATE(grid%rv_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rv_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rv_xxx=initial_data_value ELSE ALLOCATE(grid%rv_xxx(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rv_xxx(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'w_xxx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE ALLOCATE(grid%w_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%w_xxx=initial_data_value ELSE ALLOCATE(grid%w_xxx(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%w_xxx(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ww_xxx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE ALLOCATE(grid%ww_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ww_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ww_xxx=initial_data_value ELSE ALLOCATE(grid%ww_xxx(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ww_xxx(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'ph_xxx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE ALLOCATE(grid%ph_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ph_xxx=initial_data_value ELSE ALLOCATE(grid%ph_xxx(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ph_xxx(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dum_yyy').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31y)-(sm31y)+1))*(((em32y)-(sm32y)+1))*(((em33y)-(sm33y)+1))) * RWORDSIZE ALLOCATE(grid%dum_yyy(sm31y:em31y,sm32y:em32y,sm33y:em33y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dum_yyy(sm31y:em31y,sm32y:em32y,sm33y:em33y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dum_yyy=initial_data_value ELSE ALLOCATE(grid%dum_yyy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dum_yyy(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'fourd_xxx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE ALLOCATE(grid%fourd_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fourd_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fourd_xxx=initial_data_value ELSE ALLOCATE(grid%fourd_xxx(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fourd_xxx(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'clat_xxx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE ALLOCATE(grid%clat_xxx(sm31x:em31x,sm33x:em33x),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%clat_xxx(sm31x:em31x,sm33x:em33x). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%clat_xxx=initial_data_value ELSE ALLOCATE(grid%clat_xxx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%clat_xxx(1,1). ') endif ENDIF IF(in_use_for_config(id,'ht_xxx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE ALLOCATE(grid%ht_xxx(sm31x:em31x,sm33x:em33x),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_xxx(sm31x:em31x,sm33x:em33x). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ht_xxx=initial_data_value ELSE ALLOCATE(grid%ht_xxx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ht_xxx(1,1). ') endif ENDIF IF(in_use_for_config(id,'mf_xxx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE ALLOCATE(grid%mf_xxx(sm31x:em31x,sm33x:em33x),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mf_xxx(sm31x:em31x,sm33x:em33x). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%mf_xxx=initial_data_value ELSE ALLOCATE(grid%mf_xxx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%mf_xxx(1,1). ') endif ENDIF IF(in_use_for_config(id,'dif_analysis').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%dif_analysis(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dif_analysis(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dif_analysis=initial_data_value ELSE ALLOCATE(grid%dif_analysis(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dif_analysis(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dif_xxx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE ALLOCATE(grid%dif_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dif_xxx(sm31x:em31x,sm32x:em32x,sm33x:em33x). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dif_xxx=initial_data_value ELSE ALLOCATE(grid%dif_xxx(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dif_xxx(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'dif_yyy').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31y)-(sm31y)+1))*(((em32y)-(sm32y)+1))*(((em33y)-(sm33y)+1))) * RWORDSIZE ALLOCATE(grid%dif_yyy(sm31y:em31y,sm32y:em32y,sm33y:em33y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dif_yyy(sm31y:em31y,sm32y:em32y,sm33y:em33y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%dif_yyy=initial_data_value ELSE ALLOCATE(grid%dif_yyy(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%dif_yyy(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'nfuel_cat').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%nfuel_cat((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%nfuel_cat((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%nfuel_cat=initial_data_value ELSE ALLOCATE(grid%nfuel_cat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%nfuel_cat(1,1). ') endif ENDIF IF(in_use_for_config(id,'zsf').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%zsf((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%zsf((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%zsf=initial_data_value ELSE ALLOCATE(grid%zsf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%zsf(1,1). ') endif ENDIF IF(in_use_for_config(id,'tign_g').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%tign_g((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tign_g((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%tign_g=initial_data_value ELSE ALLOCATE(grid%tign_g(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%tign_g(1,1). ') endif ENDIF IF(in_use_for_config(id,'rthfrten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rthfrten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthfrten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rthfrten=initial_data_value ELSE ALLOCATE(grid%rthfrten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rthfrten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'rqvfrten').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%rqvfrten(sm31:em31,sm32:em32,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqvfrten(sm31:em31,sm32:em32,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%rqvfrten=initial_data_value ELSE ALLOCATE(grid%rqvfrten(1,1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%rqvfrten(1,1,1). ') endif ENDIF IF(in_use_for_config(id,'grnhfx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%grnhfx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%grnhfx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%grnhfx=initial_data_value ELSE ALLOCATE(grid%grnhfx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%grnhfx(1,1). ') endif ENDIF IF(in_use_for_config(id,'grnqfx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%grnqfx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%grnqfx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%grnqfx=initial_data_value ELSE ALLOCATE(grid%grnqfx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%grnqfx(1,1). ') endif ENDIF IF(in_use_for_config(id,'canhfx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%canhfx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%canhfx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%canhfx=initial_data_value ELSE ALLOCATE(grid%canhfx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%canhfx(1,1). ') endif ENDIF IF(in_use_for_config(id,'canqfx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE ALLOCATE(grid%canqfx(sm31:em31,sm33:em33),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%canqfx(sm31:em31,sm33:em33). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%canqfx=initial_data_value ELSE ALLOCATE(grid%canqfx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%canqfx(1,1). ') endif ENDIF IF(in_use_for_config(id,'lfn').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%lfn((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lfn((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%lfn=initial_data_value ELSE ALLOCATE(grid%lfn(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%lfn(1,1). ') endif ENDIF IF(in_use_for_config(id,'fuel_frac').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%fuel_frac((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fuel_frac((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fuel_frac=initial_data_value ELSE ALLOCATE(grid%fuel_frac(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fuel_frac(1,1). ') endif ENDIF IF(in_use_for_config(id,'fire_area').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%fire_area((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fire_area((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fire_area=initial_data_value ELSE ALLOCATE(grid%fire_area(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fire_area(1,1). ') endif ENDIF IF(in_use_for_config(id,'uf').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%uf((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%uf((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%uf=initial_data_value ELSE ALLOCATE(grid%uf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%uf(1,1). ') endif ENDIF IF(in_use_for_config(id,'vf').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%vf((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vf((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%vf=initial_data_value ELSE ALLOCATE(grid%vf(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%vf(1,1). ') endif ENDIF IF(in_use_for_config(id,'fgrnhfx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%fgrnhfx((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fgrnhfx((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fgrnhfx=initial_data_value ELSE ALLOCATE(grid%fgrnhfx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fgrnhfx(1,1). ') endif ENDIF IF(in_use_for_config(id,'fgrnqfx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%fgrnqfx((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fgrnqfx((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fgrnqfx=initial_data_value ELSE ALLOCATE(grid%fgrnqfx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fgrnqfx(1,1). ') endif ENDIF IF(in_use_for_config(id,'fcanhfx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%fcanhfx((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fcanhfx((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fcanhfx=initial_data_value ELSE ALLOCATE(grid%fcanhfx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fcanhfx(1,1). ') endif ENDIF IF(in_use_for_config(id,'fcanqfx').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%fcanqfx((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fcanqfx((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fcanqfx=initial_data_value ELSE ALLOCATE(grid%fcanqfx(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fcanqfx(1,1). ') endif ENDIF IF(in_use_for_config(id,'fxlong').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%fxlong((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fxlong((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fxlong=initial_data_value ELSE ALLOCATE(grid%fxlong(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fxlong(1,1). ') endif ENDIF IF(in_use_for_config(id,'fxlat').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%fxlat((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fxlat((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fxlat=initial_data_value ELSE ALLOCATE(grid%fxlat(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fxlat(1,1). ') endif ENDIF IF(in_use_for_config(id,'fuel_time').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%fuel_time((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fuel_time((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fuel_time=initial_data_value ELSE ALLOCATE(grid%fuel_time(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fuel_time(1,1). ') endif ENDIF IF(in_use_for_config(id,'bbb').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%bbb((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%bbb((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%bbb=initial_data_value ELSE ALLOCATE(grid%bbb(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%bbb(1,1). ') endif ENDIF IF(in_use_for_config(id,'betafl').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%betafl((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%betafl((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%betafl=initial_data_value ELSE ALLOCATE(grid%betafl(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%betafl(1,1). ') endif ENDIF IF(in_use_for_config(id,'phiwc').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%phiwc((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%phiwc((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%phiwc=initial_data_value ELSE ALLOCATE(grid%phiwc(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%phiwc(1,1). ') endif ENDIF IF(in_use_for_config(id,'r_0').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%r_0((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%r_0((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%r_0=initial_data_value ELSE ALLOCATE(grid%r_0(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%r_0(1,1). ') endif ENDIF IF(in_use_for_config(id,'fgip').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * RWORDSIZE ALLOCATE(grid%fgip((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fgip((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%fgip=initial_data_value ELSE ALLOCATE(grid%fgip(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%fgip(1,1). ') endif ENDIF IF(in_use_for_config(id,'ischap').AND.(.NOT.inter_domain))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31*sr_x)-((sm31-1)*sr_x+1)+1))*(((em33*sr_y)-((sm33-1)*sr_y+1)+1))) * IWORDSIZE ALLOCATE(grid%ischap((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ischap((sm31-1)*sr_x+1:em31*sr_x,(sm33-1)*sr_y+1:em33*sr_y). ') endif IF ( setinitval .EQ. 1 .OR. setinitval .EQ. 3 ) grid%ischap=0 ELSE ALLOCATE(grid%ischap(1,1),STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal
( & 'frame/module_domain.f: Failed to allocate grid%ischap(1,1). ') endif ENDIF IF ( setinitval .EQ. 3 ) grid%ifire=0 IF ( setinitval .EQ. 3 ) grid%fire_boundary_guard=0 IF ( setinitval .EQ. 3 ) grid%fire_num_ignitions=0 IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_long1=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_lat1=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_long1=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_lat1=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_radius1=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_time1=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_long2=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_lat2=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_long2=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_lat2=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_radius2=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_time2=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_long3=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_lat3=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_long3=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_lat3=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_radius3=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_time3=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_long4=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_lat4=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_long4=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_lat4=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_radius4=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_time4=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_long5=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_lat5=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_long5=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_lat5=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_radius5=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_time5=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_x1=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_y1=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_x1=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_y1=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_x2=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_y2=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_x2=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_y2=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_x3=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_y3=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_x3=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_y3=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_x4=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_y4=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_x4=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_y4=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_x5=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_start_y5=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_x5=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ignition_end_y5=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_lat_init=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_lon_init=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ign_time=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_shape=0 IF ( setinitval .EQ. 3 ) grid%fire_sprd_mdl=0 IF ( setinitval .EQ. 3 ) grid%fire_crwn_hgt=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ext_grnd=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_ext_crwn=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_fuel_read=0 IF ( setinitval .EQ. 3 ) grid%fire_fuel_cat=0 IF ( setinitval .EQ. 3 ) grid%fire_print_msg=0 IF ( setinitval .EQ. 3 ) grid%fire_print_file=0 IF ( setinitval .EQ. 3 ) grid%fire_fuel_left_method=0 IF ( setinitval .EQ. 3 ) grid%fire_fuel_left_irl=0 IF ( setinitval .EQ. 3 ) grid%fire_fuel_left_jrl=0 IF ( setinitval .EQ. 3 ) grid%fire_atm_feedback=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_back_weight=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_grows_only=0 IF ( setinitval .EQ. 3 ) grid%fire_upwinding=0 IF ( setinitval .EQ. 3 ) grid%fire_upwind_split=0 IF ( setinitval .EQ. 3 ) grid%fire_viscosity=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_lfn_ext_up=initial_data_value IF ( setinitval .EQ. 3 ) grid%fire_test_steps=0 IF ( setinitval .EQ. 3 ) grid%fire_topo_from_atm=0 !ENDOFREGISTRYGENERATEDINCLUDE