include file: alloc_count.inc,777 !STARTOFREGISTRYGENERATEDINCLUDE 'inc/alloc_count.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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((12)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((12)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_force_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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 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 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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(in_use_for_config(id,'q2'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))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 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(in_use_for_config(id,'imask_nostag'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE 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(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 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_moist)) * RWORDSIZE 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 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_moist)) * RWORDSIZE 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 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 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_scalar)) * RWORDSIZE 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 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(em32-sm32+1)*(spec_bdy_width)*num_dfi_scalar)) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%spec_bdy_width)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%spec_bdy_width)-(1)+1))) * RWORDSIZE 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(in_use_for_config(id,'soil_layers'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_metgrid_soil_levels)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_land_cat)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_cat)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_cat)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%ts_buf_size)-(1)+1))*(((model_config_rec%max_ts_locs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%num_soil_layers)-(1)+1))) * RWORDSIZE 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 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 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 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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 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 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 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 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 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(in_use_for_config(id,'sstsk'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%dfi_time_dim)-(1)+1))) * RWORDSIZE 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(in_use_for_config(id,'dfi_p'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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 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 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 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 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 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 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 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 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 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_urban_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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(in_use_for_config(id,'smfr3d'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%num_soil_layers)-(1)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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 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 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 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 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 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 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%levsiz)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%paerlev)-(1)+1))*(((em33)-(sm33)+1)*num_aerosolc)) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((model_config_rec%paerlev)-(1)+1))*(((em33)-(sm33)+1)*num_aerosolc)) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%paerlev)-(1)+1))) * RWORDSIZE 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 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE 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.)THEN num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em33-sm33+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE num_bytes_allocated = num_bytes_allocated + & (((em31-sm31+1)*(spec_bdy_width))) * RWORDSIZE 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(in_use_for_config(id,'tsk'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em32)-(sm32)+1))) * RWORDSIZE 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(in_use_for_config(id,'rthcuten'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * IWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))*(((model_config_rec%ensdim)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))*(((model_config_rec%ensdim)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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(in_use_for_config(id,'rthraten'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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 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 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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(in_use_for_config(id,'rublten'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((7501)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((7501)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((7501)-(1)+1))) * RWORDSIZE 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(in_use_for_config(id,'lu_state'))THEN num_bytes_allocated = num_bytes_allocated + & ((((7501)-(1)+1))) * RWORDSIZE 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 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 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 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 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 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(in_use_for_config(id,'xland'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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(in_use_for_config(id,'taucldi'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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(in_use_for_config(id,'rundgdten'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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(in_use_for_config(id,'abstot'))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 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'))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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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(in_use_for_config(id,'tml'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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 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 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 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 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 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(in_use_for_config(id,'varobs'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%nobs_ndg_vars)-(1)+1))*(((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%nobs_err_flds)-(1)+1))*(((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%max_obs)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%obs_prt_max)-(1)+1))) * IWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%obs_prt_max)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%obs_prt_max)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%obs_prt_max)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((model_config_rec%obs_prt_max)-(1)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31y)-(sm31y)+1))*(((em32y)-(sm32y)+1))*(((em33y)-(sm33y)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31x)-(sm31x)+1))*(((em32x)-(sm32x)+1))*(((em33x)-(sm33x)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31y)-(sm31y)+1))*(((em32y)-(sm32y)+1))*(((em33y)-(sm33y)+1))) * RWORDSIZE 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'))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 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'))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 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'))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 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em32)-(sm32)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))THEN num_bytes_allocated = num_bytes_allocated + & ((((em31)-(sm31)+1))*(((em33)-(sm33)+1))) * RWORDSIZE 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'))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 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'))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 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'))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 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'))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 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'))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 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'))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 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'))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 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'))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 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'))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 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'))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 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'))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 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'))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 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'))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 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'))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 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'))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 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'))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 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'))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 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'))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 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 !ENDOFREGISTRYGENERATEDINCLUDE