!STARTOFREGISTRYGENERATEDINCLUDE 'inc/deallocs.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 ( ASSOCIATED( grid%xlat ) ) THEN DEALLOCATE(grid%xlat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xlat. ') endif ENDIF IF ( ASSOCIATED( grid%xlong ) ) THEN DEALLOCATE(grid%xlong,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xlong. ') endif ENDIF IF ( ASSOCIATED( grid%lu_index ) ) THEN DEALLOCATE(grid%lu_index,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lu_index. ') endif ENDIF IF ( ASSOCIATED( grid%lu_mask ) ) THEN DEALLOCATE(grid%lu_mask,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lu_mask. ') endif ENDIF IF ( ASSOCIATED( grid%znu ) ) THEN DEALLOCATE(grid%znu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%znu. ') endif ENDIF IF ( ASSOCIATED( grid%znw ) ) THEN DEALLOCATE(grid%znw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%znw. ') endif ENDIF IF ( ASSOCIATED( grid%zs ) ) THEN DEALLOCATE(grid%zs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zs. ') endif ENDIF IF ( ASSOCIATED( grid%dzs ) ) THEN DEALLOCATE(grid%dzs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzs. ') endif ENDIF IF ( ASSOCIATED( grid%traj_i ) ) THEN DEALLOCATE(grid%traj_i,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%traj_i. ') endif ENDIF IF ( ASSOCIATED( grid%traj_j ) ) THEN DEALLOCATE(grid%traj_j,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%traj_j. ') endif ENDIF IF ( ASSOCIATED( grid%traj_k ) ) THEN DEALLOCATE(grid%traj_k,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%traj_k. ') endif ENDIF IF ( ASSOCIATED( grid%traj_long ) ) THEN DEALLOCATE(grid%traj_long,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%traj_long. ') endif ENDIF IF ( ASSOCIATED( grid%traj_lat ) ) THEN DEALLOCATE(grid%traj_lat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%traj_lat. ') endif ENDIF IF ( ASSOCIATED( grid%u_gc ) ) THEN DEALLOCATE(grid%u_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_gc. ') endif ENDIF IF ( ASSOCIATED( grid%v_gc ) ) THEN DEALLOCATE(grid%v_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_gc. ') endif ENDIF IF ( ASSOCIATED( grid%t_gc ) ) THEN DEALLOCATE(grid%t_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_gc. ') endif ENDIF IF ( ASSOCIATED( grid%rh_gc ) ) THEN DEALLOCATE(grid%rh_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rh_gc. ') endif ENDIF IF ( ASSOCIATED( grid%ght_gc ) ) THEN DEALLOCATE(grid%ght_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ght_gc. ') endif ENDIF IF ( ASSOCIATED( grid%p_gc ) ) THEN DEALLOCATE(grid%p_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p_gc. ') endif ENDIF IF ( ASSOCIATED( grid%prho_gc ) ) THEN DEALLOCATE(grid%prho_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%prho_gc. ') endif ENDIF IF ( ASSOCIATED( grid%xlat_gc ) ) THEN DEALLOCATE(grid%xlat_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xlat_gc. ') endif ENDIF IF ( ASSOCIATED( grid%xlong_gc ) ) THEN DEALLOCATE(grid%xlong_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xlong_gc. ') endif ENDIF IF ( ASSOCIATED( grid%ht_gc ) ) THEN DEALLOCATE(grid%ht_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_gc. ') endif ENDIF IF ( ASSOCIATED( grid%var_sso ) ) THEN DEALLOCATE(grid%var_sso,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%var_sso. ') endif ENDIF IF ( ASSOCIATED( grid%lap_hgt ) ) THEN DEALLOCATE(grid%lap_hgt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lap_hgt. ') endif ENDIF IF ( ASSOCIATED( grid%tsk_gc ) ) THEN DEALLOCATE(grid%tsk_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tsk_gc. ') endif ENDIF IF ( ASSOCIATED( grid%tavgsfc ) ) THEN DEALLOCATE(grid%tavgsfc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tavgsfc. ') endif ENDIF IF ( ASSOCIATED( grid%tmn_gc ) ) THEN DEALLOCATE(grid%tmn_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tmn_gc. ') endif ENDIF IF ( ASSOCIATED( grid%pslv_gc ) ) THEN DEALLOCATE(grid%pslv_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pslv_gc. ') endif ENDIF IF ( ASSOCIATED( grid%sct_dom_gc ) ) THEN DEALLOCATE(grid%sct_dom_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sct_dom_gc. ') endif ENDIF IF ( ASSOCIATED( grid%scb_dom_gc ) ) THEN DEALLOCATE(grid%scb_dom_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scb_dom_gc. ') endif ENDIF IF ( ASSOCIATED( grid%greenfrac ) ) THEN DEALLOCATE(grid%greenfrac,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%greenfrac. ') endif ENDIF IF ( ASSOCIATED( grid%albedo12m ) ) THEN DEALLOCATE(grid%albedo12m,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%albedo12m. ') endif ENDIF IF ( ASSOCIATED( grid%pd_gc ) ) THEN DEALLOCATE(grid%pd_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pd_gc. ') endif ENDIF IF ( ASSOCIATED( grid%pdrho_gc ) ) THEN DEALLOCATE(grid%pdrho_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pdrho_gc. ') endif ENDIF IF ( ASSOCIATED( grid%psfc_gc ) ) THEN DEALLOCATE(grid%psfc_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%psfc_gc. ') endif ENDIF IF ( ASSOCIATED( grid%intq_gc ) ) THEN DEALLOCATE(grid%intq_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%intq_gc. ') endif ENDIF IF ( ASSOCIATED( grid%pdhs ) ) THEN DEALLOCATE(grid%pdhs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pdhs. ') endif ENDIF IF ( ASSOCIATED( grid%qv_gc ) ) THEN DEALLOCATE(grid%qv_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qv_gc. ') endif ENDIF IF ( ASSOCIATED( grid%sh_gc ) ) THEN DEALLOCATE(grid%sh_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sh_gc. ') endif ENDIF IF ( ASSOCIATED( grid%icefrac_gc ) ) THEN DEALLOCATE(grid%icefrac_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%icefrac_gc. ') endif ENDIF IF ( ASSOCIATED( grid%qr_gc ) ) THEN DEALLOCATE(grid%qr_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qr_gc. ') endif ENDIF IF ( ASSOCIATED( grid%qc_gc ) ) THEN DEALLOCATE(grid%qc_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qc_gc. ') endif ENDIF IF ( ASSOCIATED( grid%qs_gc ) ) THEN DEALLOCATE(grid%qs_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qs_gc. ') endif ENDIF IF ( ASSOCIATED( grid%qi_gc ) ) THEN DEALLOCATE(grid%qi_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qi_gc. ') endif ENDIF IF ( ASSOCIATED( grid%qg_gc ) ) THEN DEALLOCATE(grid%qg_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qg_gc. ') endif ENDIF IF ( ASSOCIATED( grid%qh_gc ) ) THEN DEALLOCATE(grid%qh_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qh_gc. ') endif ENDIF IF ( ASSOCIATED( grid%qni_gc ) ) THEN DEALLOCATE(grid%qni_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qni_gc. ') endif ENDIF IF ( ASSOCIATED( grid%qnr_gc ) ) THEN DEALLOCATE(grid%qnr_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qnr_gc. ') endif ENDIF IF ( ASSOCIATED( grid%t_max_p ) ) THEN DEALLOCATE(grid%t_max_p,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_max_p. ') endif ENDIF IF ( ASSOCIATED( grid%ght_max_p ) ) THEN DEALLOCATE(grid%ght_max_p,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ght_max_p. ') endif ENDIF IF ( ASSOCIATED( grid%max_p ) ) THEN DEALLOCATE(grid%max_p,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%max_p. ') endif ENDIF IF ( ASSOCIATED( grid%t_min_p ) ) THEN DEALLOCATE(grid%t_min_p,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_min_p. ') endif ENDIF IF ( ASSOCIATED( grid%ght_min_p ) ) THEN DEALLOCATE(grid%ght_min_p,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ght_min_p. ') endif ENDIF IF ( ASSOCIATED( grid%min_p ) ) THEN DEALLOCATE(grid%min_p,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%min_p. ') endif ENDIF IF ( ASSOCIATED( grid%u_1 ) ) THEN DEALLOCATE(grid%u_1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_1. ') endif ENDIF IF ( ASSOCIATED( grid%u_2 ) ) THEN DEALLOCATE(grid%u_2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_2. ') endif ENDIF IF ( ASSOCIATED( grid%u_bxs ) ) THEN DEALLOCATE(grid%u_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_bxs. ') endif NULLIFY(grid%u_bxs) ENDIF IF ( ASSOCIATED( grid%u_bxe ) ) THEN DEALLOCATE(grid%u_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_bxe. ') endif NULLIFY(grid%u_bxe) ENDIF IF ( ASSOCIATED( grid%u_bys ) ) THEN DEALLOCATE(grid%u_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_bys. ') endif NULLIFY(grid%u_bys) ENDIF IF ( ASSOCIATED( grid%u_bye ) ) THEN DEALLOCATE(grid%u_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_bye. ') endif NULLIFY(grid%u_bye) ENDIF IF ( ASSOCIATED( grid%u_btxs ) ) THEN DEALLOCATE(grid%u_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_btxs. ') endif NULLIFY(grid%u_btxs) ENDIF IF ( ASSOCIATED( grid%u_btxe ) ) THEN DEALLOCATE(grid%u_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_btxe. ') endif NULLIFY(grid%u_btxe) ENDIF IF ( ASSOCIATED( grid%u_btys ) ) THEN DEALLOCATE(grid%u_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_btys. ') endif NULLIFY(grid%u_btys) ENDIF IF ( ASSOCIATED( grid%u_btye ) ) THEN DEALLOCATE(grid%u_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_btye. ') endif NULLIFY(grid%u_btye) ENDIF IF ( ASSOCIATED( grid%ru ) ) THEN DEALLOCATE(grid%ru,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ru. ') endif ENDIF IF ( ASSOCIATED( grid%ru_m ) ) THEN DEALLOCATE(grid%ru_m,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ru_m. ') endif ENDIF IF ( ASSOCIATED( grid%ru_tend ) ) THEN DEALLOCATE(grid%ru_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ru_tend. ') endif ENDIF IF ( ASSOCIATED( grid%u_save ) ) THEN DEALLOCATE(grid%u_save,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_save. ') endif ENDIF IF ( ASSOCIATED( grid%z_force ) ) THEN DEALLOCATE(grid%z_force,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%z_force. ') endif ENDIF IF ( ASSOCIATED( grid%z_force_tend ) ) THEN DEALLOCATE(grid%z_force_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%z_force_tend. ') endif ENDIF IF ( ASSOCIATED( grid%u_g ) ) THEN DEALLOCATE(grid%u_g,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_g. ') endif ENDIF IF ( ASSOCIATED( grid%u_g_tend ) ) THEN DEALLOCATE(grid%u_g_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_g_tend. ') endif ENDIF IF ( ASSOCIATED( grid%v_1 ) ) THEN DEALLOCATE(grid%v_1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_1. ') endif ENDIF IF ( ASSOCIATED( grid%v_2 ) ) THEN DEALLOCATE(grid%v_2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_2. ') endif ENDIF IF ( ASSOCIATED( grid%v_bxs ) ) THEN DEALLOCATE(grid%v_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_bxs. ') endif NULLIFY(grid%v_bxs) ENDIF IF ( ASSOCIATED( grid%v_bxe ) ) THEN DEALLOCATE(grid%v_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_bxe. ') endif NULLIFY(grid%v_bxe) ENDIF IF ( ASSOCIATED( grid%v_bys ) ) THEN DEALLOCATE(grid%v_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_bys. ') endif NULLIFY(grid%v_bys) ENDIF IF ( ASSOCIATED( grid%v_bye ) ) THEN DEALLOCATE(grid%v_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_bye. ') endif NULLIFY(grid%v_bye) ENDIF IF ( ASSOCIATED( grid%v_btxs ) ) THEN DEALLOCATE(grid%v_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_btxs. ') endif NULLIFY(grid%v_btxs) ENDIF IF ( ASSOCIATED( grid%v_btxe ) ) THEN DEALLOCATE(grid%v_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_btxe. ') endif NULLIFY(grid%v_btxe) ENDIF IF ( ASSOCIATED( grid%v_btys ) ) THEN DEALLOCATE(grid%v_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_btys. ') endif NULLIFY(grid%v_btys) ENDIF IF ( ASSOCIATED( grid%v_btye ) ) THEN DEALLOCATE(grid%v_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_btye. ') endif NULLIFY(grid%v_btye) ENDIF IF ( ASSOCIATED( grid%rv ) ) THEN DEALLOCATE(grid%rv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rv. ') endif ENDIF IF ( ASSOCIATED( grid%rv_m ) ) THEN DEALLOCATE(grid%rv_m,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rv_m. ') endif ENDIF IF ( ASSOCIATED( grid%rv_tend ) ) THEN DEALLOCATE(grid%rv_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rv_tend. ') endif ENDIF IF ( ASSOCIATED( grid%v_save ) ) THEN DEALLOCATE(grid%v_save,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_save. ') endif ENDIF IF ( ASSOCIATED( grid%v_g ) ) THEN DEALLOCATE(grid%v_g,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_g. ') endif ENDIF IF ( ASSOCIATED( grid%v_g_tend ) ) THEN DEALLOCATE(grid%v_g_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_g_tend. ') endif ENDIF IF ( ASSOCIATED( grid%w_1 ) ) THEN DEALLOCATE(grid%w_1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_1. ') endif ENDIF IF ( ASSOCIATED( grid%w_2 ) ) THEN DEALLOCATE(grid%w_2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_2. ') endif ENDIF IF ( ASSOCIATED( grid%w_bxs ) ) THEN DEALLOCATE(grid%w_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_bxs. ') endif NULLIFY(grid%w_bxs) ENDIF IF ( ASSOCIATED( grid%w_bxe ) ) THEN DEALLOCATE(grid%w_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_bxe. ') endif NULLIFY(grid%w_bxe) ENDIF IF ( ASSOCIATED( grid%w_bys ) ) THEN DEALLOCATE(grid%w_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_bys. ') endif NULLIFY(grid%w_bys) ENDIF IF ( ASSOCIATED( grid%w_bye ) ) THEN DEALLOCATE(grid%w_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_bye. ') endif NULLIFY(grid%w_bye) ENDIF IF ( ASSOCIATED( grid%w_btxs ) ) THEN DEALLOCATE(grid%w_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_btxs. ') endif NULLIFY(grid%w_btxs) ENDIF IF ( ASSOCIATED( grid%w_btxe ) ) THEN DEALLOCATE(grid%w_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_btxe. ') endif NULLIFY(grid%w_btxe) ENDIF IF ( ASSOCIATED( grid%w_btys ) ) THEN DEALLOCATE(grid%w_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_btys. ') endif NULLIFY(grid%w_btys) ENDIF IF ( ASSOCIATED( grid%w_btye ) ) THEN DEALLOCATE(grid%w_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_btye. ') endif NULLIFY(grid%w_btye) ENDIF IF ( ASSOCIATED( grid%ww ) ) THEN DEALLOCATE(grid%ww,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ww. ') endif ENDIF IF ( ASSOCIATED( grid%rw ) ) THEN DEALLOCATE(grid%rw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rw. ') endif ENDIF IF ( ASSOCIATED( grid%ww_m ) ) THEN DEALLOCATE(grid%ww_m,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ww_m. ') endif ENDIF IF ( ASSOCIATED( grid%w_subs ) ) THEN DEALLOCATE(grid%w_subs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_subs. ') endif ENDIF IF ( ASSOCIATED( grid%w_subs_tend ) ) THEN DEALLOCATE(grid%w_subs_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_subs_tend. ') endif ENDIF IF ( ASSOCIATED( grid%ph_1 ) ) THEN DEALLOCATE(grid%ph_1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ph_1. ') endif ENDIF IF ( ASSOCIATED( grid%ph_2 ) ) THEN DEALLOCATE(grid%ph_2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ph_2. ') endif ENDIF IF ( ASSOCIATED( grid%ph_bxs ) ) THEN DEALLOCATE(grid%ph_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ph_bxs. ') endif NULLIFY(grid%ph_bxs) ENDIF IF ( ASSOCIATED( grid%ph_bxe ) ) THEN DEALLOCATE(grid%ph_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ph_bxe. ') endif NULLIFY(grid%ph_bxe) ENDIF IF ( ASSOCIATED( grid%ph_bys ) ) THEN DEALLOCATE(grid%ph_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ph_bys. ') endif NULLIFY(grid%ph_bys) ENDIF IF ( ASSOCIATED( grid%ph_bye ) ) THEN DEALLOCATE(grid%ph_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ph_bye. ') endif NULLIFY(grid%ph_bye) ENDIF IF ( ASSOCIATED( grid%ph_btxs ) ) THEN DEALLOCATE(grid%ph_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ph_btxs. ') endif NULLIFY(grid%ph_btxs) ENDIF IF ( ASSOCIATED( grid%ph_btxe ) ) THEN DEALLOCATE(grid%ph_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ph_btxe. ') endif NULLIFY(grid%ph_btxe) ENDIF IF ( ASSOCIATED( grid%ph_btys ) ) THEN DEALLOCATE(grid%ph_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ph_btys. ') endif NULLIFY(grid%ph_btys) ENDIF IF ( ASSOCIATED( grid%ph_btye ) ) THEN DEALLOCATE(grid%ph_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ph_btye. ') endif NULLIFY(grid%ph_btye) ENDIF IF ( ASSOCIATED( grid%phb ) ) THEN DEALLOCATE(grid%phb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%phb. ') endif ENDIF IF ( ASSOCIATED( grid%phb_fine ) ) THEN DEALLOCATE(grid%phb_fine,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%phb_fine. ') endif ENDIF IF ( ASSOCIATED( grid%ph0 ) ) THEN DEALLOCATE(grid%ph0,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ph0. ') endif ENDIF IF ( ASSOCIATED( grid%php ) ) THEN DEALLOCATE(grid%php,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%php. ') endif ENDIF IF ( ASSOCIATED( grid%t_1 ) ) THEN DEALLOCATE(grid%t_1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_1. ') endif ENDIF IF ( ASSOCIATED( grid%t_2 ) ) THEN DEALLOCATE(grid%t_2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_2. ') endif ENDIF IF ( ASSOCIATED( grid%t_bxs ) ) THEN DEALLOCATE(grid%t_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_bxs. ') endif NULLIFY(grid%t_bxs) ENDIF IF ( ASSOCIATED( grid%t_bxe ) ) THEN DEALLOCATE(grid%t_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_bxe. ') endif NULLIFY(grid%t_bxe) ENDIF IF ( ASSOCIATED( grid%t_bys ) ) THEN DEALLOCATE(grid%t_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_bys. ') endif NULLIFY(grid%t_bys) ENDIF IF ( ASSOCIATED( grid%t_bye ) ) THEN DEALLOCATE(grid%t_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_bye. ') endif NULLIFY(grid%t_bye) ENDIF IF ( ASSOCIATED( grid%t_btxs ) ) THEN DEALLOCATE(grid%t_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_btxs. ') endif NULLIFY(grid%t_btxs) ENDIF IF ( ASSOCIATED( grid%t_btxe ) ) THEN DEALLOCATE(grid%t_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_btxe. ') endif NULLIFY(grid%t_btxe) ENDIF IF ( ASSOCIATED( grid%t_btys ) ) THEN DEALLOCATE(grid%t_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_btys. ') endif NULLIFY(grid%t_btys) ENDIF IF ( ASSOCIATED( grid%t_btye ) ) THEN DEALLOCATE(grid%t_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_btye. ') endif NULLIFY(grid%t_btye) ENDIF IF ( ASSOCIATED( grid%t_init ) ) THEN DEALLOCATE(grid%t_init,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_init. ') endif ENDIF IF ( ASSOCIATED( grid%t_save ) ) THEN DEALLOCATE(grid%t_save,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_save. ') endif ENDIF IF ( ASSOCIATED( grid%th_upstream_x ) ) THEN DEALLOCATE(grid%th_upstream_x,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%th_upstream_x. ') endif ENDIF IF ( ASSOCIATED( grid%th_upstream_x_tend ) ) THEN DEALLOCATE(grid%th_upstream_x_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%th_upstream_x_tend. ') endif ENDIF IF ( ASSOCIATED( grid%th_upstream_y ) ) THEN DEALLOCATE(grid%th_upstream_y,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%th_upstream_y. ') endif ENDIF IF ( ASSOCIATED( grid%th_upstream_y_tend ) ) THEN DEALLOCATE(grid%th_upstream_y_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%th_upstream_y_tend. ') endif ENDIF IF ( ASSOCIATED( grid%qv_upstream_x ) ) THEN DEALLOCATE(grid%qv_upstream_x,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qv_upstream_x. ') endif ENDIF IF ( ASSOCIATED( grid%qv_upstream_x_tend ) ) THEN DEALLOCATE(grid%qv_upstream_x_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qv_upstream_x_tend. ') endif ENDIF IF ( ASSOCIATED( grid%qv_upstream_y ) ) THEN DEALLOCATE(grid%qv_upstream_y,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qv_upstream_y. ') endif ENDIF IF ( ASSOCIATED( grid%qv_upstream_y_tend ) ) THEN DEALLOCATE(grid%qv_upstream_y_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qv_upstream_y_tend. ') endif ENDIF IF ( ASSOCIATED( grid%ql_upstream_x ) ) THEN DEALLOCATE(grid%ql_upstream_x,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ql_upstream_x. ') endif ENDIF IF ( ASSOCIATED( grid%ql_upstream_x_tend ) ) THEN DEALLOCATE(grid%ql_upstream_x_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ql_upstream_x_tend. ') endif ENDIF IF ( ASSOCIATED( grid%ql_upstream_y ) ) THEN DEALLOCATE(grid%ql_upstream_y,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ql_upstream_y. ') endif ENDIF IF ( ASSOCIATED( grid%ql_upstream_y_tend ) ) THEN DEALLOCATE(grid%ql_upstream_y_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ql_upstream_y_tend. ') endif ENDIF IF ( ASSOCIATED( grid%u_upstream_x ) ) THEN DEALLOCATE(grid%u_upstream_x,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_upstream_x. ') endif ENDIF IF ( ASSOCIATED( grid%u_upstream_x_tend ) ) THEN DEALLOCATE(grid%u_upstream_x_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_upstream_x_tend. ') endif ENDIF IF ( ASSOCIATED( grid%u_upstream_y ) ) THEN DEALLOCATE(grid%u_upstream_y,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_upstream_y. ') endif ENDIF IF ( ASSOCIATED( grid%u_upstream_y_tend ) ) THEN DEALLOCATE(grid%u_upstream_y_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_upstream_y_tend. ') endif ENDIF IF ( ASSOCIATED( grid%v_upstream_x ) ) THEN DEALLOCATE(grid%v_upstream_x,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_upstream_x. ') endif ENDIF IF ( ASSOCIATED( grid%v_upstream_x_tend ) ) THEN DEALLOCATE(grid%v_upstream_x_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_upstream_x_tend. ') endif ENDIF IF ( ASSOCIATED( grid%v_upstream_y ) ) THEN DEALLOCATE(grid%v_upstream_y,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_upstream_y. ') endif ENDIF IF ( ASSOCIATED( grid%v_upstream_y_tend ) ) THEN DEALLOCATE(grid%v_upstream_y_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_upstream_y_tend. ') endif ENDIF IF ( ASSOCIATED( grid%th_t_tend ) ) THEN DEALLOCATE(grid%th_t_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%th_t_tend. ') endif ENDIF IF ( ASSOCIATED( grid%qv_t_tend ) ) THEN DEALLOCATE(grid%qv_t_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qv_t_tend. ') endif ENDIF IF ( ASSOCIATED( grid%th_largescale ) ) THEN DEALLOCATE(grid%th_largescale,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%th_largescale. ') endif ENDIF IF ( ASSOCIATED( grid%th_largescale_tend ) ) THEN DEALLOCATE(grid%th_largescale_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%th_largescale_tend. ') endif ENDIF IF ( ASSOCIATED( grid%qv_largescale ) ) THEN DEALLOCATE(grid%qv_largescale,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qv_largescale. ') endif ENDIF IF ( ASSOCIATED( grid%qv_largescale_tend ) ) THEN DEALLOCATE(grid%qv_largescale_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qv_largescale_tend. ') endif ENDIF IF ( ASSOCIATED( grid%ql_largescale ) ) THEN DEALLOCATE(grid%ql_largescale,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ql_largescale. ') endif ENDIF IF ( ASSOCIATED( grid%ql_largescale_tend ) ) THEN DEALLOCATE(grid%ql_largescale_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ql_largescale_tend. ') endif ENDIF IF ( ASSOCIATED( grid%u_largescale ) ) THEN DEALLOCATE(grid%u_largescale,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_largescale. ') endif ENDIF IF ( ASSOCIATED( grid%u_largescale_tend ) ) THEN DEALLOCATE(grid%u_largescale_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_largescale_tend. ') endif ENDIF IF ( ASSOCIATED( grid%v_largescale ) ) THEN DEALLOCATE(grid%v_largescale,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_largescale. ') endif ENDIF IF ( ASSOCIATED( grid%v_largescale_tend ) ) THEN DEALLOCATE(grid%v_largescale_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_largescale_tend. ') endif ENDIF IF ( ASSOCIATED( grid%tau_largescale ) ) THEN DEALLOCATE(grid%tau_largescale,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tau_largescale. ') endif ENDIF IF ( ASSOCIATED( grid%tau_largescale_tend ) ) THEN DEALLOCATE(grid%tau_largescale_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tau_largescale_tend. ') endif ENDIF IF ( ASSOCIATED( grid%tau_x ) ) THEN DEALLOCATE(grid%tau_x,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tau_x. ') endif ENDIF IF ( ASSOCIATED( grid%tau_x_tend ) ) THEN DEALLOCATE(grid%tau_x_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tau_x_tend. ') endif ENDIF IF ( ASSOCIATED( grid%tau_y ) ) THEN DEALLOCATE(grid%tau_y,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tau_y. ') endif ENDIF IF ( ASSOCIATED( grid%tau_y_tend ) ) THEN DEALLOCATE(grid%tau_y_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tau_y_tend. ') endif ENDIF IF ( ASSOCIATED( grid%t_soil_forcing_val ) ) THEN DEALLOCATE(grid%t_soil_forcing_val,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soil_forcing_val. ') endif ENDIF IF ( ASSOCIATED( grid%t_soil_forcing_tend ) ) THEN DEALLOCATE(grid%t_soil_forcing_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soil_forcing_tend. ') endif ENDIF IF ( ASSOCIATED( grid%q_soil_forcing_val ) ) THEN DEALLOCATE(grid%q_soil_forcing_val,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q_soil_forcing_val. ') endif ENDIF IF ( ASSOCIATED( grid%q_soil_forcing_tend ) ) THEN DEALLOCATE(grid%q_soil_forcing_tend,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q_soil_forcing_tend. ') endif ENDIF IF ( ASSOCIATED( grid%tau_soil ) ) THEN DEALLOCATE(grid%tau_soil,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tau_soil. ') endif ENDIF IF ( ASSOCIATED( grid%soil_depth_force ) ) THEN DEALLOCATE(grid%soil_depth_force,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soil_depth_force. ') endif ENDIF IF ( ASSOCIATED( grid%mu_1 ) ) THEN DEALLOCATE(grid%mu_1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mu_1. ') endif ENDIF IF ( ASSOCIATED( grid%mu_2 ) ) THEN DEALLOCATE(grid%mu_2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mu_2. ') endif ENDIF IF ( ASSOCIATED( grid%mu_bxs ) ) THEN DEALLOCATE(grid%mu_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mu_bxs. ') endif NULLIFY(grid%mu_bxs) ENDIF IF ( ASSOCIATED( grid%mu_bxe ) ) THEN DEALLOCATE(grid%mu_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mu_bxe. ') endif NULLIFY(grid%mu_bxe) ENDIF IF ( ASSOCIATED( grid%mu_bys ) ) THEN DEALLOCATE(grid%mu_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mu_bys. ') endif NULLIFY(grid%mu_bys) ENDIF IF ( ASSOCIATED( grid%mu_bye ) ) THEN DEALLOCATE(grid%mu_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mu_bye. ') endif NULLIFY(grid%mu_bye) ENDIF IF ( ASSOCIATED( grid%mu_btxs ) ) THEN DEALLOCATE(grid%mu_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mu_btxs. ') endif NULLIFY(grid%mu_btxs) ENDIF IF ( ASSOCIATED( grid%mu_btxe ) ) THEN DEALLOCATE(grid%mu_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mu_btxe. ') endif NULLIFY(grid%mu_btxe) ENDIF IF ( ASSOCIATED( grid%mu_btys ) ) THEN DEALLOCATE(grid%mu_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mu_btys. ') endif NULLIFY(grid%mu_btys) ENDIF IF ( ASSOCIATED( grid%mu_btye ) ) THEN DEALLOCATE(grid%mu_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mu_btye. ') endif NULLIFY(grid%mu_btye) ENDIF IF ( ASSOCIATED( grid%mub ) ) THEN DEALLOCATE(grid%mub,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mub. ') endif ENDIF IF ( ASSOCIATED( grid%mub_fine ) ) THEN DEALLOCATE(grid%mub_fine,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mub_fine. ') endif ENDIF IF ( ASSOCIATED( grid%mub_save ) ) THEN DEALLOCATE(grid%mub_save,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mub_save. ') endif ENDIF IF ( ASSOCIATED( grid%mu0 ) ) THEN DEALLOCATE(grid%mu0,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mu0. ') endif ENDIF IF ( ASSOCIATED( grid%mudf ) ) THEN DEALLOCATE(grid%mudf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mudf. ') endif ENDIF IF ( ASSOCIATED( grid%muu ) ) THEN DEALLOCATE(grid%muu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%muu. ') endif ENDIF IF ( ASSOCIATED( grid%muv ) ) THEN DEALLOCATE(grid%muv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%muv. ') endif ENDIF IF ( ASSOCIATED( grid%mut ) ) THEN DEALLOCATE(grid%mut,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mut. ') endif ENDIF IF ( ASSOCIATED( grid%muts ) ) THEN DEALLOCATE(grid%muts,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%muts. ') endif ENDIF IF ( ASSOCIATED( grid%nest_pos ) ) THEN DEALLOCATE(grid%nest_pos,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%nest_pos. ') endif ENDIF IF ( ASSOCIATED( grid%nest_mask ) ) THEN DEALLOCATE(grid%nest_mask,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%nest_mask. ') endif ENDIF IF ( ASSOCIATED( grid%ht_coarse ) ) THEN DEALLOCATE(grid%ht_coarse,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_coarse. ') endif ENDIF IF ( ASSOCIATED( grid%tke_1 ) ) THEN DEALLOCATE(grid%tke_1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tke_1. ') endif ENDIF IF ( ASSOCIATED( grid%tke_2 ) ) THEN DEALLOCATE(grid%tke_2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tke_2. ') endif ENDIF IF ( ASSOCIATED( grid%p ) ) THEN DEALLOCATE(grid%p,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p. ') endif ENDIF IF ( ASSOCIATED( grid%al ) ) THEN DEALLOCATE(grid%al,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%al. ') endif ENDIF IF ( ASSOCIATED( grid%alt ) ) THEN DEALLOCATE(grid%alt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%alt. ') endif ENDIF IF ( ASSOCIATED( grid%alb ) ) THEN DEALLOCATE(grid%alb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%alb. ') endif ENDIF IF ( ASSOCIATED( grid%zx ) ) THEN DEALLOCATE(grid%zx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zx. ') endif ENDIF IF ( ASSOCIATED( grid%zy ) ) THEN DEALLOCATE(grid%zy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zy. ') endif ENDIF IF ( ASSOCIATED( grid%rdz ) ) THEN DEALLOCATE(grid%rdz,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rdz. ') endif ENDIF IF ( ASSOCIATED( grid%rdzw ) ) THEN DEALLOCATE(grid%rdzw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rdzw. ') endif ENDIF IF ( ASSOCIATED( grid%pb ) ) THEN DEALLOCATE(grid%pb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pb. ') endif ENDIF IF ( ASSOCIATED( grid%fnm ) ) THEN DEALLOCATE(grid%fnm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fnm. ') endif ENDIF IF ( ASSOCIATED( grid%fnp ) ) THEN DEALLOCATE(grid%fnp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fnp. ') endif ENDIF IF ( ASSOCIATED( grid%rdnw ) ) THEN DEALLOCATE(grid%rdnw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rdnw. ') endif ENDIF IF ( ASSOCIATED( grid%rdn ) ) THEN DEALLOCATE(grid%rdn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rdn. ') endif ENDIF IF ( ASSOCIATED( grid%dnw ) ) THEN DEALLOCATE(grid%dnw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dnw. ') endif ENDIF IF ( ASSOCIATED( grid%dn ) ) THEN DEALLOCATE(grid%dn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dn. ') endif ENDIF IF ( ASSOCIATED( grid%t_base ) ) THEN DEALLOCATE(grid%t_base,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_base. ') endif ENDIF IF ( ASSOCIATED( grid%z ) ) THEN DEALLOCATE(grid%z,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%z. ') endif ENDIF IF ( ASSOCIATED( grid%z_at_w ) ) THEN DEALLOCATE(grid%z_at_w,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%z_at_w. ') endif ENDIF IF ( ASSOCIATED( grid%p_hyd ) ) THEN DEALLOCATE(grid%p_hyd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p_hyd. ') endif ENDIF IF ( ASSOCIATED( grid%p_hyd_w ) ) THEN DEALLOCATE(grid%p_hyd_w,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p_hyd_w. ') endif ENDIF IF ( ASSOCIATED( grid%q2 ) ) THEN DEALLOCATE(grid%q2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2. ') endif ENDIF IF ( ASSOCIATED( grid%t2 ) ) THEN DEALLOCATE(grid%t2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t2. ') endif ENDIF IF ( ASSOCIATED( grid%th2 ) ) THEN DEALLOCATE(grid%th2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%th2. ') endif ENDIF IF ( ASSOCIATED( grid%psfc ) ) THEN DEALLOCATE(grid%psfc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%psfc. ') endif ENDIF IF ( ASSOCIATED( grid%u10 ) ) THEN DEALLOCATE(grid%u10,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u10. ') endif ENDIF IF ( ASSOCIATED( grid%v10 ) ) THEN DEALLOCATE(grid%v10,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v10. ') endif ENDIF IF ( ASSOCIATED( grid%uratx ) ) THEN DEALLOCATE(grid%uratx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uratx. ') endif ENDIF IF ( ASSOCIATED( grid%vratx ) ) THEN DEALLOCATE(grid%vratx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vratx. ') endif ENDIF IF ( ASSOCIATED( grid%tratx ) ) THEN DEALLOCATE(grid%tratx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tratx. ') endif ENDIF IF ( ASSOCIATED( grid%obs_savwt ) ) THEN DEALLOCATE(grid%obs_savwt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%obs_savwt. ') endif ENDIF IF ( ASSOCIATED( grid%imask_nostag ) ) THEN DEALLOCATE(grid%imask_nostag,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%imask_nostag. ') endif ENDIF IF ( ASSOCIATED( grid%imask_xstag ) ) THEN DEALLOCATE(grid%imask_xstag,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%imask_xstag. ') endif ENDIF IF ( ASSOCIATED( grid%imask_ystag ) ) THEN DEALLOCATE(grid%imask_ystag,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%imask_ystag. ') endif ENDIF IF ( ASSOCIATED( grid%imask_xystag ) ) THEN DEALLOCATE(grid%imask_xystag,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%imask_xystag. ') endif ENDIF IF ( ASSOCIATED( grid%moist ) ) THEN DEALLOCATE(grid%moist,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%moist. ') endif ENDIF IF ( ASSOCIATED( grid%moist_bxs ) ) THEN DEALLOCATE(grid%moist_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%moist_bxs. ') endif NULLIFY(grid%moist_bxs) ENDIF IF ( ASSOCIATED( grid%moist_bxe ) ) THEN DEALLOCATE(grid%moist_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%moist_bxe. ') endif NULLIFY(grid%moist_bxe) ENDIF IF ( ASSOCIATED( grid%moist_bys ) ) THEN DEALLOCATE(grid%moist_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%moist_bys. ') endif NULLIFY(grid%moist_bys) ENDIF IF ( ASSOCIATED( grid%moist_bye ) ) THEN DEALLOCATE(grid%moist_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%moist_bye. ') endif NULLIFY(grid%moist_bye) ENDIF IF ( ASSOCIATED( grid%moist_btxs ) ) THEN DEALLOCATE(grid%moist_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%moist_btxs. ') endif NULLIFY(grid%moist_btxs) ENDIF IF ( ASSOCIATED( grid%moist_btxe ) ) THEN DEALLOCATE(grid%moist_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%moist_btxe. ') endif NULLIFY(grid%moist_btxe) ENDIF IF ( ASSOCIATED( grid%moist_btys ) ) THEN DEALLOCATE(grid%moist_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%moist_btys. ') endif NULLIFY(grid%moist_btys) ENDIF IF ( ASSOCIATED( grid%moist_btye ) ) THEN DEALLOCATE(grid%moist_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%moist_btye. ') endif NULLIFY(grid%moist_btye) ENDIF IF ( ASSOCIATED( grid%dfi_moist ) ) THEN DEALLOCATE(grid%dfi_moist,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_moist. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_moist_bxs ) ) THEN DEALLOCATE(grid%dfi_moist_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_moist_bxs. ') endif NULLIFY(grid%dfi_moist_bxs) ENDIF IF ( ASSOCIATED( grid%dfi_moist_bxe ) ) THEN DEALLOCATE(grid%dfi_moist_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_moist_bxe. ') endif NULLIFY(grid%dfi_moist_bxe) ENDIF IF ( ASSOCIATED( grid%dfi_moist_bys ) ) THEN DEALLOCATE(grid%dfi_moist_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_moist_bys. ') endif NULLIFY(grid%dfi_moist_bys) ENDIF IF ( ASSOCIATED( grid%dfi_moist_bye ) ) THEN DEALLOCATE(grid%dfi_moist_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_moist_bye. ') endif NULLIFY(grid%dfi_moist_bye) ENDIF IF ( ASSOCIATED( grid%dfi_moist_btxs ) ) THEN DEALLOCATE(grid%dfi_moist_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_moist_btxs. ') endif NULLIFY(grid%dfi_moist_btxs) ENDIF IF ( ASSOCIATED( grid%dfi_moist_btxe ) ) THEN DEALLOCATE(grid%dfi_moist_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_moist_btxe. ') endif NULLIFY(grid%dfi_moist_btxe) ENDIF IF ( ASSOCIATED( grid%dfi_moist_btys ) ) THEN DEALLOCATE(grid%dfi_moist_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_moist_btys. ') endif NULLIFY(grid%dfi_moist_btys) ENDIF IF ( ASSOCIATED( grid%dfi_moist_btye ) ) THEN DEALLOCATE(grid%dfi_moist_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_moist_btye. ') endif NULLIFY(grid%dfi_moist_btye) ENDIF IF ( ASSOCIATED( grid%rimi ) ) THEN DEALLOCATE(grid%rimi,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rimi. ') endif ENDIF IF ( ASSOCIATED( grid%re_cloud ) ) THEN DEALLOCATE(grid%re_cloud,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%re_cloud. ') endif ENDIF IF ( ASSOCIATED( grid%re_ice ) ) THEN DEALLOCATE(grid%re_ice,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%re_ice. ') endif ENDIF IF ( ASSOCIATED( grid%re_snow ) ) THEN DEALLOCATE(grid%re_snow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%re_snow. ') endif ENDIF IF ( ASSOCIATED( grid%scalar ) ) THEN DEALLOCATE(grid%scalar,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scalar. ') endif ENDIF IF ( ASSOCIATED( grid%scalar_bxs ) ) THEN DEALLOCATE(grid%scalar_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scalar_bxs. ') endif NULLIFY(grid%scalar_bxs) ENDIF IF ( ASSOCIATED( grid%scalar_bxe ) ) THEN DEALLOCATE(grid%scalar_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scalar_bxe. ') endif NULLIFY(grid%scalar_bxe) ENDIF IF ( ASSOCIATED( grid%scalar_bys ) ) THEN DEALLOCATE(grid%scalar_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scalar_bys. ') endif NULLIFY(grid%scalar_bys) ENDIF IF ( ASSOCIATED( grid%scalar_bye ) ) THEN DEALLOCATE(grid%scalar_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scalar_bye. ') endif NULLIFY(grid%scalar_bye) ENDIF IF ( ASSOCIATED( grid%scalar_btxs ) ) THEN DEALLOCATE(grid%scalar_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scalar_btxs. ') endif NULLIFY(grid%scalar_btxs) ENDIF IF ( ASSOCIATED( grid%scalar_btxe ) ) THEN DEALLOCATE(grid%scalar_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scalar_btxe. ') endif NULLIFY(grid%scalar_btxe) ENDIF IF ( ASSOCIATED( grid%scalar_btys ) ) THEN DEALLOCATE(grid%scalar_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scalar_btys. ') endif NULLIFY(grid%scalar_btys) ENDIF IF ( ASSOCIATED( grid%scalar_btye ) ) THEN DEALLOCATE(grid%scalar_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scalar_btye. ') endif NULLIFY(grid%scalar_btye) ENDIF IF ( ASSOCIATED( grid%dfi_scalar ) ) THEN DEALLOCATE(grid%dfi_scalar,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_scalar. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_scalar_bxs ) ) THEN DEALLOCATE(grid%dfi_scalar_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_scalar_bxs. ') endif NULLIFY(grid%dfi_scalar_bxs) ENDIF IF ( ASSOCIATED( grid%dfi_scalar_bxe ) ) THEN DEALLOCATE(grid%dfi_scalar_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_scalar_bxe. ') endif NULLIFY(grid%dfi_scalar_bxe) ENDIF IF ( ASSOCIATED( grid%dfi_scalar_bys ) ) THEN DEALLOCATE(grid%dfi_scalar_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_scalar_bys. ') endif NULLIFY(grid%dfi_scalar_bys) ENDIF IF ( ASSOCIATED( grid%dfi_scalar_bye ) ) THEN DEALLOCATE(grid%dfi_scalar_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_scalar_bye. ') endif NULLIFY(grid%dfi_scalar_bye) ENDIF IF ( ASSOCIATED( grid%dfi_scalar_btxs ) ) THEN DEALLOCATE(grid%dfi_scalar_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_scalar_btxs. ') endif NULLIFY(grid%dfi_scalar_btxs) ENDIF IF ( ASSOCIATED( grid%dfi_scalar_btxe ) ) THEN DEALLOCATE(grid%dfi_scalar_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_scalar_btxe. ') endif NULLIFY(grid%dfi_scalar_btxe) ENDIF IF ( ASSOCIATED( grid%dfi_scalar_btys ) ) THEN DEALLOCATE(grid%dfi_scalar_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_scalar_btys. ') endif NULLIFY(grid%dfi_scalar_btys) ENDIF IF ( ASSOCIATED( grid%dfi_scalar_btye ) ) THEN DEALLOCATE(grid%dfi_scalar_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_scalar_btye. ') endif NULLIFY(grid%dfi_scalar_btye) ENDIF IF ( ASSOCIATED( grid%fcx ) ) THEN DEALLOCATE(grid%fcx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fcx. ') endif ENDIF IF ( ASSOCIATED( grid%gcx ) ) THEN DEALLOCATE(grid%gcx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gcx. ') endif ENDIF IF ( ASSOCIATED( grid%soil_layers ) ) THEN DEALLOCATE(grid%soil_layers,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soil_layers. ') endif ENDIF IF ( ASSOCIATED( grid%soil_levels ) ) THEN DEALLOCATE(grid%soil_levels,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soil_levels. ') endif ENDIF IF ( ASSOCIATED( grid%st ) ) THEN DEALLOCATE(grid%st,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%st. ') endif ENDIF IF ( ASSOCIATED( grid%sm ) ) THEN DEALLOCATE(grid%sm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm. ') endif ENDIF IF ( ASSOCIATED( grid%sw ) ) THEN DEALLOCATE(grid%sw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sw. ') endif ENDIF IF ( ASSOCIATED( grid%soilt ) ) THEN DEALLOCATE(grid%soilt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilt. ') endif ENDIF IF ( ASSOCIATED( grid%soilm ) ) THEN DEALLOCATE(grid%soilm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilm. ') endif ENDIF IF ( ASSOCIATED( grid%sm000007 ) ) THEN DEALLOCATE(grid%sm000007,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm000007. ') endif ENDIF IF ( ASSOCIATED( grid%sm007028 ) ) THEN DEALLOCATE(grid%sm007028,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm007028. ') endif ENDIF IF ( ASSOCIATED( grid%sm028100 ) ) THEN DEALLOCATE(grid%sm028100,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm028100. ') endif ENDIF IF ( ASSOCIATED( grid%sm100255 ) ) THEN DEALLOCATE(grid%sm100255,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm100255. ') endif ENDIF IF ( ASSOCIATED( grid%st000007 ) ) THEN DEALLOCATE(grid%st000007,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%st000007. ') endif ENDIF IF ( ASSOCIATED( grid%st007028 ) ) THEN DEALLOCATE(grid%st007028,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%st007028. ') endif ENDIF IF ( ASSOCIATED( grid%st028100 ) ) THEN DEALLOCATE(grid%st028100,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%st028100. ') endif ENDIF IF ( ASSOCIATED( grid%st100255 ) ) THEN DEALLOCATE(grid%st100255,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%st100255. ') endif ENDIF IF ( ASSOCIATED( grid%sm000010 ) ) THEN DEALLOCATE(grid%sm000010,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm000010. ') endif ENDIF IF ( ASSOCIATED( grid%sm010040 ) ) THEN DEALLOCATE(grid%sm010040,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm010040. ') endif ENDIF IF ( ASSOCIATED( grid%sm040100 ) ) THEN DEALLOCATE(grid%sm040100,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm040100. ') endif ENDIF IF ( ASSOCIATED( grid%sm100200 ) ) THEN DEALLOCATE(grid%sm100200,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm100200. ') endif ENDIF IF ( ASSOCIATED( grid%sm010200 ) ) THEN DEALLOCATE(grid%sm010200,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm010200. ') endif ENDIF IF ( ASSOCIATED( grid%soilm000 ) ) THEN DEALLOCATE(grid%soilm000,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilm000. ') endif ENDIF IF ( ASSOCIATED( grid%soilm005 ) ) THEN DEALLOCATE(grid%soilm005,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilm005. ') endif ENDIF IF ( ASSOCIATED( grid%soilm020 ) ) THEN DEALLOCATE(grid%soilm020,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilm020. ') endif ENDIF IF ( ASSOCIATED( grid%soilm040 ) ) THEN DEALLOCATE(grid%soilm040,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilm040. ') endif ENDIF IF ( ASSOCIATED( grid%soilm160 ) ) THEN DEALLOCATE(grid%soilm160,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilm160. ') endif ENDIF IF ( ASSOCIATED( grid%soilm300 ) ) THEN DEALLOCATE(grid%soilm300,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilm300. ') endif ENDIF IF ( ASSOCIATED( grid%sw000010 ) ) THEN DEALLOCATE(grid%sw000010,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sw000010. ') endif ENDIF IF ( ASSOCIATED( grid%sw010040 ) ) THEN DEALLOCATE(grid%sw010040,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sw010040. ') endif ENDIF IF ( ASSOCIATED( grid%sw040100 ) ) THEN DEALLOCATE(grid%sw040100,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sw040100. ') endif ENDIF IF ( ASSOCIATED( grid%sw100200 ) ) THEN DEALLOCATE(grid%sw100200,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sw100200. ') endif ENDIF IF ( ASSOCIATED( grid%sw010200 ) ) THEN DEALLOCATE(grid%sw010200,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sw010200. ') endif ENDIF IF ( ASSOCIATED( grid%soilw000 ) ) THEN DEALLOCATE(grid%soilw000,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilw000. ') endif ENDIF IF ( ASSOCIATED( grid%soilw005 ) ) THEN DEALLOCATE(grid%soilw005,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilw005. ') endif ENDIF IF ( ASSOCIATED( grid%soilw020 ) ) THEN DEALLOCATE(grid%soilw020,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilw020. ') endif ENDIF IF ( ASSOCIATED( grid%soilw040 ) ) THEN DEALLOCATE(grid%soilw040,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilw040. ') endif ENDIF IF ( ASSOCIATED( grid%soilw160 ) ) THEN DEALLOCATE(grid%soilw160,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilw160. ') endif ENDIF IF ( ASSOCIATED( grid%soilw300 ) ) THEN DEALLOCATE(grid%soilw300,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilw300. ') endif ENDIF IF ( ASSOCIATED( grid%st000010 ) ) THEN DEALLOCATE(grid%st000010,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%st000010. ') endif ENDIF IF ( ASSOCIATED( grid%st010040 ) ) THEN DEALLOCATE(grid%st010040,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%st010040. ') endif ENDIF IF ( ASSOCIATED( grid%st040100 ) ) THEN DEALLOCATE(grid%st040100,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%st040100. ') endif ENDIF IF ( ASSOCIATED( grid%st100200 ) ) THEN DEALLOCATE(grid%st100200,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%st100200. ') endif ENDIF IF ( ASSOCIATED( grid%st010200 ) ) THEN DEALLOCATE(grid%st010200,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%st010200. ') endif ENDIF IF ( ASSOCIATED( grid%soilt000 ) ) THEN DEALLOCATE(grid%soilt000,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilt000. ') endif ENDIF IF ( ASSOCIATED( grid%soilt005 ) ) THEN DEALLOCATE(grid%soilt005,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilt005. ') endif ENDIF IF ( ASSOCIATED( grid%soilt020 ) ) THEN DEALLOCATE(grid%soilt020,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilt020. ') endif ENDIF IF ( ASSOCIATED( grid%soilt040 ) ) THEN DEALLOCATE(grid%soilt040,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilt040. ') endif ENDIF IF ( ASSOCIATED( grid%soilt160 ) ) THEN DEALLOCATE(grid%soilt160,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilt160. ') endif ENDIF IF ( ASSOCIATED( grid%soilt300 ) ) THEN DEALLOCATE(grid%soilt300,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilt300. ') endif ENDIF IF ( ASSOCIATED( grid%topostdv ) ) THEN DEALLOCATE(grid%topostdv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%topostdv. ') endif ENDIF IF ( ASSOCIATED( grid%toposlpx ) ) THEN DEALLOCATE(grid%toposlpx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%toposlpx. ') endif ENDIF IF ( ASSOCIATED( grid%toposlpy ) ) THEN DEALLOCATE(grid%toposlpy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%toposlpy. ') endif ENDIF IF ( ASSOCIATED( grid%slope ) ) THEN DEALLOCATE(grid%slope,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%slope. ') endif ENDIF IF ( ASSOCIATED( grid%slp_azi ) ) THEN DEALLOCATE(grid%slp_azi,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%slp_azi. ') endif ENDIF IF ( ASSOCIATED( grid%shdmax ) ) THEN DEALLOCATE(grid%shdmax,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%shdmax. ') endif ENDIF IF ( ASSOCIATED( grid%shdmin ) ) THEN DEALLOCATE(grid%shdmin,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%shdmin. ') endif ENDIF IF ( ASSOCIATED( grid%snoalb ) ) THEN DEALLOCATE(grid%snoalb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snoalb. ') endif ENDIF IF ( ASSOCIATED( grid%slopecat ) ) THEN DEALLOCATE(grid%slopecat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%slopecat. ') endif ENDIF IF ( ASSOCIATED( grid%toposoil ) ) THEN DEALLOCATE(grid%toposoil,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%toposoil. ') endif ENDIF IF ( ASSOCIATED( grid%landusef ) ) THEN DEALLOCATE(grid%landusef,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%landusef. ') endif ENDIF IF ( ASSOCIATED( grid%soilctop ) ) THEN DEALLOCATE(grid%soilctop,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilctop. ') endif ENDIF IF ( ASSOCIATED( grid%soilcbot ) ) THEN DEALLOCATE(grid%soilcbot,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilcbot. ') endif ENDIF IF ( ASSOCIATED( grid%soilcat ) ) THEN DEALLOCATE(grid%soilcat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilcat. ') endif ENDIF IF ( ASSOCIATED( grid%vegcat ) ) THEN DEALLOCATE(grid%vegcat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vegcat. ') endif ENDIF IF ( ASSOCIATED( grid%tslb ) ) THEN DEALLOCATE(grid%tslb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tslb. ') endif ENDIF IF ( ASSOCIATED( grid%ts_hour ) ) THEN DEALLOCATE(grid%ts_hour,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_hour. ') endif ENDIF IF ( ASSOCIATED( grid%ts_u ) ) THEN DEALLOCATE(grid%ts_u,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_u. ') endif ENDIF IF ( ASSOCIATED( grid%ts_v ) ) THEN DEALLOCATE(grid%ts_v,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_v. ') endif ENDIF IF ( ASSOCIATED( grid%ts_q ) ) THEN DEALLOCATE(grid%ts_q,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_q. ') endif ENDIF IF ( ASSOCIATED( grid%ts_t ) ) THEN DEALLOCATE(grid%ts_t,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_t. ') endif ENDIF IF ( ASSOCIATED( grid%ts_psfc ) ) THEN DEALLOCATE(grid%ts_psfc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_psfc. ') endif ENDIF IF ( ASSOCIATED( grid%ts_glw ) ) THEN DEALLOCATE(grid%ts_glw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_glw. ') endif ENDIF IF ( ASSOCIATED( grid%ts_gsw ) ) THEN DEALLOCATE(grid%ts_gsw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_gsw. ') endif ENDIF IF ( ASSOCIATED( grid%ts_hfx ) ) THEN DEALLOCATE(grid%ts_hfx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_hfx. ') endif ENDIF IF ( ASSOCIATED( grid%ts_lh ) ) THEN DEALLOCATE(grid%ts_lh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_lh. ') endif ENDIF IF ( ASSOCIATED( grid%ts_tsk ) ) THEN DEALLOCATE(grid%ts_tsk,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_tsk. ') endif ENDIF IF ( ASSOCIATED( grid%ts_tslb ) ) THEN DEALLOCATE(grid%ts_tslb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_tslb. ') endif ENDIF IF ( ASSOCIATED( grid%ts_clw ) ) THEN DEALLOCATE(grid%ts_clw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_clw. ') endif ENDIF IF ( ASSOCIATED( grid%ts_rainc ) ) THEN DEALLOCATE(grid%ts_rainc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_rainc. ') endif ENDIF IF ( ASSOCIATED( grid%ts_rainnc ) ) THEN DEALLOCATE(grid%ts_rainnc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_rainnc. ') endif ENDIF IF ( ASSOCIATED( grid%ts_u_profile ) ) THEN DEALLOCATE(grid%ts_u_profile,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_u_profile. ') endif ENDIF IF ( ASSOCIATED( grid%ts_v_profile ) ) THEN DEALLOCATE(grid%ts_v_profile,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_v_profile. ') endif ENDIF IF ( ASSOCIATED( grid%ts_gph_profile ) ) THEN DEALLOCATE(grid%ts_gph_profile,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_gph_profile. ') endif ENDIF IF ( ASSOCIATED( grid%ts_th_profile ) ) THEN DEALLOCATE(grid%ts_th_profile,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_th_profile. ') endif ENDIF IF ( ASSOCIATED( grid%ts_qv_profile ) ) THEN DEALLOCATE(grid%ts_qv_profile,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_qv_profile. ') endif ENDIF IF ( ASSOCIATED( grid%dzr ) ) THEN DEALLOCATE(grid%dzr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzr. ') endif ENDIF IF ( ASSOCIATED( grid%dzb ) ) THEN DEALLOCATE(grid%dzb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzb. ') endif ENDIF IF ( ASSOCIATED( grid%dzg ) ) THEN DEALLOCATE(grid%dzg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzg. ') endif ENDIF IF ( ASSOCIATED( grid%urb_param ) ) THEN DEALLOCATE(grid%urb_param,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%urb_param. ') endif ENDIF IF ( ASSOCIATED( grid%lp_urb2d ) ) THEN DEALLOCATE(grid%lp_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lp_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%hi_urb2d ) ) THEN DEALLOCATE(grid%hi_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hi_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%lb_urb2d ) ) THEN DEALLOCATE(grid%lb_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lb_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%hgt_urb2d ) ) THEN DEALLOCATE(grid%hgt_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hgt_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%fad0_urb2d ) ) THEN DEALLOCATE(grid%fad0_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fad0_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%fad135_urb2d ) ) THEN DEALLOCATE(grid%fad135_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fad135_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%fad45_urb2d ) ) THEN DEALLOCATE(grid%fad45_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fad45_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%pad_urb2d ) ) THEN DEALLOCATE(grid%pad_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pad_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%fad90_urb2d ) ) THEN DEALLOCATE(grid%fad90_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fad90_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%rad_urb2d ) ) THEN DEALLOCATE(grid%rad_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rad_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%mh_urb2d ) ) THEN DEALLOCATE(grid%mh_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mh_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%stdh_urb2d ) ) THEN DEALLOCATE(grid%stdh_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%stdh_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%lf_urb2d ) ) THEN DEALLOCATE(grid%lf_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lf_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%car_urb2d ) ) THEN DEALLOCATE(grid%car_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%car_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%h2w_urb2d ) ) THEN DEALLOCATE(grid%h2w_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2w_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%svf_urb2d ) ) THEN DEALLOCATE(grid%svf_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%svf_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%z0s_urb2d ) ) THEN DEALLOCATE(grid%z0s_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%z0s_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%z0r_urb2d ) ) THEN DEALLOCATE(grid%z0r_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%z0r_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%z0m_urb2d ) ) THEN DEALLOCATE(grid%z0m_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%z0m_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%zds_urb2d ) ) THEN DEALLOCATE(grid%zds_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zds_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%zdm_urb2d ) ) THEN DEALLOCATE(grid%zdm_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zdm_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%zdr_urb2d ) ) THEN DEALLOCATE(grid%zdr_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zdr_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%smois ) ) THEN DEALLOCATE(grid%smois,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%smois. ') endif ENDIF IF ( ASSOCIATED( grid%sh2o ) ) THEN DEALLOCATE(grid%sh2o,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sh2o. ') endif ENDIF IF ( ASSOCIATED( grid%smcrel ) ) THEN DEALLOCATE(grid%smcrel,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%smcrel. ') endif ENDIF IF ( ASSOCIATED( grid%xice ) ) THEN DEALLOCATE(grid%xice,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xice. ') endif ENDIF IF ( ASSOCIATED( grid%icedepth ) ) THEN DEALLOCATE(grid%icedepth,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%icedepth. ') endif ENDIF IF ( ASSOCIATED( grid%xicem ) ) THEN DEALLOCATE(grid%xicem,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xicem. ') endif ENDIF IF ( ASSOCIATED( grid%albsi ) ) THEN DEALLOCATE(grid%albsi,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%albsi. ') endif ENDIF IF ( ASSOCIATED( grid%snowsi ) ) THEN DEALLOCATE(grid%snowsi,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowsi. ') endif ENDIF IF ( ASSOCIATED( grid%smstav ) ) THEN DEALLOCATE(grid%smstav,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%smstav. ') endif ENDIF IF ( ASSOCIATED( grid%smstot ) ) THEN DEALLOCATE(grid%smstot,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%smstot. ') endif ENDIF IF ( ASSOCIATED( grid%soldrain ) ) THEN DEALLOCATE(grid%soldrain,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soldrain. ') endif ENDIF IF ( ASSOCIATED( grid%sfcheadrt ) ) THEN DEALLOCATE(grid%sfcheadrt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfcheadrt. ') endif ENDIF IF ( ASSOCIATED( grid%infxsrt ) ) THEN DEALLOCATE(grid%infxsrt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%infxsrt. ') endif ENDIF IF ( ASSOCIATED( grid%sfcrunoff ) ) THEN DEALLOCATE(grid%sfcrunoff,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfcrunoff. ') endif ENDIF IF ( ASSOCIATED( grid%udrunoff ) ) THEN DEALLOCATE(grid%udrunoff,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%udrunoff. ') endif ENDIF IF ( ASSOCIATED( grid%ivgtyp ) ) THEN DEALLOCATE(grid%ivgtyp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ivgtyp. ') endif ENDIF IF ( ASSOCIATED( grid%isltyp ) ) THEN DEALLOCATE(grid%isltyp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%isltyp. ') endif ENDIF IF ( ASSOCIATED( grid%vegfra ) ) THEN DEALLOCATE(grid%vegfra,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vegfra. ') endif ENDIF IF ( ASSOCIATED( grid%sfcevp ) ) THEN DEALLOCATE(grid%sfcevp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfcevp. ') endif ENDIF IF ( ASSOCIATED( grid%grdflx ) ) THEN DEALLOCATE(grid%grdflx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%grdflx. ') endif ENDIF IF ( ASSOCIATED( grid%acgrdflx ) ) THEN DEALLOCATE(grid%acgrdflx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acgrdflx. ') endif ENDIF IF ( ASSOCIATED( grid%sfcexc ) ) THEN DEALLOCATE(grid%sfcexc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfcexc. ') endif ENDIF IF ( ASSOCIATED( grid%acsnow ) ) THEN DEALLOCATE(grid%acsnow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acsnow. ') endif ENDIF IF ( ASSOCIATED( grid%acsnom ) ) THEN DEALLOCATE(grid%acsnom,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acsnom. ') endif ENDIF IF ( ASSOCIATED( grid%snow ) ) THEN DEALLOCATE(grid%snow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snow. ') endif ENDIF IF ( ASSOCIATED( grid%snowh ) ) THEN DEALLOCATE(grid%snowh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowh. ') endif ENDIF IF ( ASSOCIATED( grid%canwat ) ) THEN DEALLOCATE(grid%canwat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%canwat. ') endif ENDIF IF ( ASSOCIATED( grid%sstsk ) ) THEN DEALLOCATE(grid%sstsk,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sstsk. ') endif ENDIF IF ( ASSOCIATED( grid%dtw ) ) THEN DEALLOCATE(grid%dtw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dtw. ') endif ENDIF IF ( ASSOCIATED( grid%hcoeff ) ) THEN DEALLOCATE(grid%hcoeff,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hcoeff. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_p ) ) THEN DEALLOCATE(grid%dfi_p,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_p. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_al ) ) THEN DEALLOCATE(grid%dfi_al,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_al. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_mu ) ) THEN DEALLOCATE(grid%dfi_mu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_mu. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_phb ) ) THEN DEALLOCATE(grid%dfi_phb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_phb. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_ph0 ) ) THEN DEALLOCATE(grid%dfi_ph0,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_ph0. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_php ) ) THEN DEALLOCATE(grid%dfi_php,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_php. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_u ) ) THEN DEALLOCATE(grid%dfi_u,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_u. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_v ) ) THEN DEALLOCATE(grid%dfi_v,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_v. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_w ) ) THEN DEALLOCATE(grid%dfi_w,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_w. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_ww ) ) THEN DEALLOCATE(grid%dfi_ww,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_ww. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_t ) ) THEN DEALLOCATE(grid%dfi_t,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_t. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_rh ) ) THEN DEALLOCATE(grid%dfi_rh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_rh. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_ph ) ) THEN DEALLOCATE(grid%dfi_ph,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_ph. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_pb ) ) THEN DEALLOCATE(grid%dfi_pb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_pb. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_alt ) ) THEN DEALLOCATE(grid%dfi_alt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_alt. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_tke ) ) THEN DEALLOCATE(grid%dfi_tke,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_tke. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_tten_rad ) ) THEN DEALLOCATE(grid%dfi_tten_rad,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_tten_rad. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_tslb ) ) THEN DEALLOCATE(grid%dfi_tslb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_tslb. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_smois ) ) THEN DEALLOCATE(grid%dfi_smois,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_smois. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_snow ) ) THEN DEALLOCATE(grid%dfi_snow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_snow. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_snowh ) ) THEN DEALLOCATE(grid%dfi_snowh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_snowh. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_canwat ) ) THEN DEALLOCATE(grid%dfi_canwat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_canwat. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_smfr3d ) ) THEN DEALLOCATE(grid%dfi_smfr3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_smfr3d. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_keepfr3dflag ) ) THEN DEALLOCATE(grid%dfi_keepfr3dflag,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_keepfr3dflag. ') endif ENDIF IF ( ASSOCIATED( grid%tr_urb2d ) ) THEN DEALLOCATE(grid%tr_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tr_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%tb_urb2d ) ) THEN DEALLOCATE(grid%tb_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tb_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%tg_urb2d ) ) THEN DEALLOCATE(grid%tg_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%tc_urb2d ) ) THEN DEALLOCATE(grid%tc_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tc_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%qc_urb2d ) ) THEN DEALLOCATE(grid%qc_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qc_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%uc_urb2d ) ) THEN DEALLOCATE(grid%uc_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uc_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%xxxr_urb2d ) ) THEN DEALLOCATE(grid%xxxr_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xxxr_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%xxxb_urb2d ) ) THEN DEALLOCATE(grid%xxxb_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xxxb_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%xxxg_urb2d ) ) THEN DEALLOCATE(grid%xxxg_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xxxg_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%xxxc_urb2d ) ) THEN DEALLOCATE(grid%xxxc_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xxxc_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%trl_urb3d ) ) THEN DEALLOCATE(grid%trl_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%trl_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%tbl_urb3d ) ) THEN DEALLOCATE(grid%tbl_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tbl_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%tgl_urb3d ) ) THEN DEALLOCATE(grid%tgl_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tgl_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%sh_urb2d ) ) THEN DEALLOCATE(grid%sh_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sh_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%lh_urb2d ) ) THEN DEALLOCATE(grid%lh_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lh_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%g_urb2d ) ) THEN DEALLOCATE(grid%g_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%g_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%rn_urb2d ) ) THEN DEALLOCATE(grid%rn_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rn_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%ts_urb2d ) ) THEN DEALLOCATE(grid%ts_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ts_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%frc_urb2d ) ) THEN DEALLOCATE(grid%frc_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%frc_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%utype_urb2d ) ) THEN DEALLOCATE(grid%utype_urb2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%utype_urb2d. ') endif ENDIF IF ( ASSOCIATED( grid%trb_urb4d ) ) THEN DEALLOCATE(grid%trb_urb4d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%trb_urb4d. ') endif ENDIF IF ( ASSOCIATED( grid%tw1_urb4d ) ) THEN DEALLOCATE(grid%tw1_urb4d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tw1_urb4d. ') endif ENDIF IF ( ASSOCIATED( grid%tw2_urb4d ) ) THEN DEALLOCATE(grid%tw2_urb4d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tw2_urb4d. ') endif ENDIF IF ( ASSOCIATED( grid%tgb_urb4d ) ) THEN DEALLOCATE(grid%tgb_urb4d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tgb_urb4d. ') endif ENDIF IF ( ASSOCIATED( grid%tlev_urb3d ) ) THEN DEALLOCATE(grid%tlev_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tlev_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%qlev_urb3d ) ) THEN DEALLOCATE(grid%qlev_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qlev_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%tw1lev_urb3d ) ) THEN DEALLOCATE(grid%tw1lev_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tw1lev_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%tw2lev_urb3d ) ) THEN DEALLOCATE(grid%tw2lev_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tw2lev_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%tglev_urb3d ) ) THEN DEALLOCATE(grid%tglev_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tglev_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%tflev_urb3d ) ) THEN DEALLOCATE(grid%tflev_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tflev_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%sf_ac_urb3d ) ) THEN DEALLOCATE(grid%sf_ac_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sf_ac_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%lf_ac_urb3d ) ) THEN DEALLOCATE(grid%lf_ac_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lf_ac_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%cm_ac_urb3d ) ) THEN DEALLOCATE(grid%cm_ac_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cm_ac_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%sfvent_urb3d ) ) THEN DEALLOCATE(grid%sfvent_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfvent_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%lfvent_urb3d ) ) THEN DEALLOCATE(grid%lfvent_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lfvent_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%sfwin1_urb3d ) ) THEN DEALLOCATE(grid%sfwin1_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfwin1_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%sfwin2_urb3d ) ) THEN DEALLOCATE(grid%sfwin2_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfwin2_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%sfw1_urb3d ) ) THEN DEALLOCATE(grid%sfw1_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfw1_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%sfw2_urb3d ) ) THEN DEALLOCATE(grid%sfw2_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfw2_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%sfr_urb3d ) ) THEN DEALLOCATE(grid%sfr_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfr_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%sfg_urb3d ) ) THEN DEALLOCATE(grid%sfg_urb3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfg_urb3d. ') endif ENDIF IF ( ASSOCIATED( grid%cmr_sfcdif ) ) THEN DEALLOCATE(grid%cmr_sfcdif,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cmr_sfcdif. ') endif ENDIF IF ( ASSOCIATED( grid%chr_sfcdif ) ) THEN DEALLOCATE(grid%chr_sfcdif,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%chr_sfcdif. ') endif ENDIF IF ( ASSOCIATED( grid%cmc_sfcdif ) ) THEN DEALLOCATE(grid%cmc_sfcdif,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cmc_sfcdif. ') endif ENDIF IF ( ASSOCIATED( grid%chc_sfcdif ) ) THEN DEALLOCATE(grid%chc_sfcdif,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%chc_sfcdif. ') endif ENDIF IF ( ASSOCIATED( grid%coszen ) ) THEN DEALLOCATE(grid%coszen,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%coszen. ') endif ENDIF IF ( ASSOCIATED( grid%hrang ) ) THEN DEALLOCATE(grid%hrang,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hrang. ') endif ENDIF IF ( ASSOCIATED( grid%smfr3d ) ) THEN DEALLOCATE(grid%smfr3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%smfr3d. ') endif ENDIF IF ( ASSOCIATED( grid%keepfr3dflag ) ) THEN DEALLOCATE(grid%keepfr3dflag,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%keepfr3dflag. ') endif ENDIF IF ( ASSOCIATED( grid%swvisdir ) ) THEN DEALLOCATE(grid%swvisdir,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swvisdir. ') endif ENDIF IF ( ASSOCIATED( grid%swvisdif ) ) THEN DEALLOCATE(grid%swvisdif,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swvisdif. ') endif ENDIF IF ( ASSOCIATED( grid%swnirdir ) ) THEN DEALLOCATE(grid%swnirdir,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swnirdir. ') endif ENDIF IF ( ASSOCIATED( grid%swnirdif ) ) THEN DEALLOCATE(grid%swnirdif,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swnirdif. ') endif ENDIF IF ( ASSOCIATED( grid%alswvisdir ) ) THEN DEALLOCATE(grid%alswvisdir,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%alswvisdir. ') endif ENDIF IF ( ASSOCIATED( grid%alswvisdif ) ) THEN DEALLOCATE(grid%alswvisdif,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%alswvisdif. ') endif ENDIF IF ( ASSOCIATED( grid%alswnirdir ) ) THEN DEALLOCATE(grid%alswnirdir,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%alswnirdir. ') endif ENDIF IF ( ASSOCIATED( grid%alswnirdif ) ) THEN DEALLOCATE(grid%alswnirdif,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%alswnirdif. ') endif ENDIF IF ( ASSOCIATED( grid%ra ) ) THEN DEALLOCATE(grid%ra,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ra. ') endif ENDIF IF ( ASSOCIATED( grid%rs ) ) THEN DEALLOCATE(grid%rs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rs. ') endif ENDIF IF ( ASSOCIATED( grid%lai ) ) THEN DEALLOCATE(grid%lai,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lai. ') endif ENDIF IF ( ASSOCIATED( grid%vegf_px ) ) THEN DEALLOCATE(grid%vegf_px,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vegf_px. ') endif ENDIF IF ( ASSOCIATED( grid%t2obs ) ) THEN DEALLOCATE(grid%t2obs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t2obs. ') endif ENDIF IF ( ASSOCIATED( grid%q2obs ) ) THEN DEALLOCATE(grid%q2obs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2obs. ') endif ENDIF IF ( ASSOCIATED( grid%fm ) ) THEN DEALLOCATE(grid%fm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fm. ') endif ENDIF IF ( ASSOCIATED( grid%fh ) ) THEN DEALLOCATE(grid%fh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fh. ') endif ENDIF IF ( ASSOCIATED( grid%wstar_ysu ) ) THEN DEALLOCATE(grid%wstar_ysu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wstar_ysu. ') endif ENDIF IF ( ASSOCIATED( grid%delta_ysu ) ) THEN DEALLOCATE(grid%delta_ysu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%delta_ysu. ') endif ENDIF IF ( ASSOCIATED( grid%exch_h ) ) THEN DEALLOCATE(grid%exch_h,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exch_h. ') endif ENDIF IF ( ASSOCIATED( grid%exch_m ) ) THEN DEALLOCATE(grid%exch_m,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exch_m. ') endif ENDIF IF ( ASSOCIATED( grid%ct ) ) THEN DEALLOCATE(grid%ct,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ct. ') endif ENDIF IF ( ASSOCIATED( grid%thz0 ) ) THEN DEALLOCATE(grid%thz0,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%thz0. ') endif ENDIF IF ( ASSOCIATED( grid%z0 ) ) THEN DEALLOCATE(grid%z0,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%z0. ') endif ENDIF IF ( ASSOCIATED( grid%qz0 ) ) THEN DEALLOCATE(grid%qz0,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qz0. ') endif ENDIF IF ( ASSOCIATED( grid%uz0 ) ) THEN DEALLOCATE(grid%uz0,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uz0. ') endif ENDIF IF ( ASSOCIATED( grid%vz0 ) ) THEN DEALLOCATE(grid%vz0,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vz0. ') endif ENDIF IF ( ASSOCIATED( grid%qsfc ) ) THEN DEALLOCATE(grid%qsfc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qsfc. ') endif ENDIF IF ( ASSOCIATED( grid%akhs ) ) THEN DEALLOCATE(grid%akhs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%akhs. ') endif ENDIF IF ( ASSOCIATED( grid%akms ) ) THEN DEALLOCATE(grid%akms,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%akms. ') endif ENDIF IF ( ASSOCIATED( grid%kpbl ) ) THEN DEALLOCATE(grid%kpbl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%kpbl. ') endif ENDIF IF ( ASSOCIATED( grid%tshltr ) ) THEN DEALLOCATE(grid%tshltr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tshltr. ') endif ENDIF IF ( ASSOCIATED( grid%qshltr ) ) THEN DEALLOCATE(grid%qshltr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qshltr. ') endif ENDIF IF ( ASSOCIATED( grid%pshltr ) ) THEN DEALLOCATE(grid%pshltr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pshltr. ') endif ENDIF IF ( ASSOCIATED( grid%th10 ) ) THEN DEALLOCATE(grid%th10,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%th10. ') endif ENDIF IF ( ASSOCIATED( grid%q10 ) ) THEN DEALLOCATE(grid%q10,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q10. ') endif ENDIF IF ( ASSOCIATED( grid%massflux_edkf ) ) THEN DEALLOCATE(grid%massflux_edkf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%massflux_edkf. ') endif ENDIF IF ( ASSOCIATED( grid%entr_edkf ) ) THEN DEALLOCATE(grid%entr_edkf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%entr_edkf. ') endif ENDIF IF ( ASSOCIATED( grid%detr_edkf ) ) THEN DEALLOCATE(grid%detr_edkf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%detr_edkf. ') endif ENDIF IF ( ASSOCIATED( grid%thl_up ) ) THEN DEALLOCATE(grid%thl_up,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%thl_up. ') endif ENDIF IF ( ASSOCIATED( grid%thv_up ) ) THEN DEALLOCATE(grid%thv_up,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%thv_up. ') endif ENDIF IF ( ASSOCIATED( grid%rv_up ) ) THEN DEALLOCATE(grid%rv_up,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rv_up. ') endif ENDIF IF ( ASSOCIATED( grid%rt_up ) ) THEN DEALLOCATE(grid%rt_up,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rt_up. ') endif ENDIF IF ( ASSOCIATED( grid%rc_up ) ) THEN DEALLOCATE(grid%rc_up,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rc_up. ') endif ENDIF IF ( ASSOCIATED( grid%u_up ) ) THEN DEALLOCATE(grid%u_up,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_up. ') endif ENDIF IF ( ASSOCIATED( grid%v_up ) ) THEN DEALLOCATE(grid%v_up,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_up. ') endif ENDIF IF ( ASSOCIATED( grid%frac_up ) ) THEN DEALLOCATE(grid%frac_up,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%frac_up. ') endif ENDIF IF ( ASSOCIATED( grid%rc_mf ) ) THEN DEALLOCATE(grid%rc_mf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rc_mf. ') endif ENDIF IF ( ASSOCIATED( grid%te_temf ) ) THEN DEALLOCATE(grid%te_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%te_temf. ') endif ENDIF IF ( ASSOCIATED( grid%kh_temf ) ) THEN DEALLOCATE(grid%kh_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%kh_temf. ') endif ENDIF IF ( ASSOCIATED( grid%km_temf ) ) THEN DEALLOCATE(grid%km_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%km_temf. ') endif ENDIF IF ( ASSOCIATED( grid%shf_temf ) ) THEN DEALLOCATE(grid%shf_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%shf_temf. ') endif ENDIF IF ( ASSOCIATED( grid%qf_temf ) ) THEN DEALLOCATE(grid%qf_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qf_temf. ') endif ENDIF IF ( ASSOCIATED( grid%uw_temf ) ) THEN DEALLOCATE(grid%uw_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uw_temf. ') endif ENDIF IF ( ASSOCIATED( grid%vw_temf ) ) THEN DEALLOCATE(grid%vw_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vw_temf. ') endif ENDIF IF ( ASSOCIATED( grid%wupd_temf ) ) THEN DEALLOCATE(grid%wupd_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wupd_temf. ') endif ENDIF IF ( ASSOCIATED( grid%mf_temf ) ) THEN DEALLOCATE(grid%mf_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mf_temf. ') endif ENDIF IF ( ASSOCIATED( grid%thup_temf ) ) THEN DEALLOCATE(grid%thup_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%thup_temf. ') endif ENDIF IF ( ASSOCIATED( grid%qtup_temf ) ) THEN DEALLOCATE(grid%qtup_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qtup_temf. ') endif ENDIF IF ( ASSOCIATED( grid%qlup_temf ) ) THEN DEALLOCATE(grid%qlup_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qlup_temf. ') endif ENDIF IF ( ASSOCIATED( grid%cf3d_temf ) ) THEN DEALLOCATE(grid%cf3d_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cf3d_temf. ') endif ENDIF IF ( ASSOCIATED( grid%hd_temf ) ) THEN DEALLOCATE(grid%hd_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hd_temf. ') endif ENDIF IF ( ASSOCIATED( grid%lcl_temf ) ) THEN DEALLOCATE(grid%lcl_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lcl_temf. ') endif ENDIF IF ( ASSOCIATED( grid%hct_temf ) ) THEN DEALLOCATE(grid%hct_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hct_temf. ') endif ENDIF IF ( ASSOCIATED( grid%cfm_temf ) ) THEN DEALLOCATE(grid%cfm_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cfm_temf. ') endif ENDIF IF ( ASSOCIATED( grid%wm_temf ) ) THEN DEALLOCATE(grid%wm_temf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wm_temf. ') endif ENDIF IF ( ASSOCIATED( grid%qke ) ) THEN DEALLOCATE(grid%qke,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qke. ') endif ENDIF IF ( ASSOCIATED( grid%qshear ) ) THEN DEALLOCATE(grid%qshear,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qshear. ') endif ENDIF IF ( ASSOCIATED( grid%qbuoy ) ) THEN DEALLOCATE(grid%qbuoy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qbuoy. ') endif ENDIF IF ( ASSOCIATED( grid%qdiss ) ) THEN DEALLOCATE(grid%qdiss,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qdiss. ') endif ENDIF IF ( ASSOCIATED( grid%qwt ) ) THEN DEALLOCATE(grid%qwt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qwt. ') endif ENDIF IF ( ASSOCIATED( grid%dqke ) ) THEN DEALLOCATE(grid%dqke,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dqke. ') endif ENDIF IF ( ASSOCIATED( grid%tsq ) ) THEN DEALLOCATE(grid%tsq,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tsq. ') endif ENDIF IF ( ASSOCIATED( grid%qsq ) ) THEN DEALLOCATE(grid%qsq,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qsq. ') endif ENDIF IF ( ASSOCIATED( grid%cov ) ) THEN DEALLOCATE(grid%cov,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cov. ') endif ENDIF IF ( ASSOCIATED( grid%sh3d ) ) THEN DEALLOCATE(grid%sh3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sh3d. ') endif ENDIF IF ( ASSOCIATED( grid%ch ) ) THEN DEALLOCATE(grid%ch,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ch. ') endif ENDIF IF ( ASSOCIATED( grid%fgdp ) ) THEN DEALLOCATE(grid%fgdp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fgdp. ') endif ENDIF IF ( ASSOCIATED( grid%dfgdp ) ) THEN DEALLOCATE(grid%dfgdp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfgdp. ') endif ENDIF IF ( ASSOCIATED( grid%vdfg ) ) THEN DEALLOCATE(grid%vdfg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vdfg. ') endif ENDIF IF ( ASSOCIATED( grid%exch_tke ) ) THEN DEALLOCATE(grid%exch_tke,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exch_tke. ') endif ENDIF IF ( ASSOCIATED( grid%dtaux3d ) ) THEN DEALLOCATE(grid%dtaux3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dtaux3d. ') endif ENDIF IF ( ASSOCIATED( grid%dtauy3d ) ) THEN DEALLOCATE(grid%dtauy3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dtauy3d. ') endif ENDIF IF ( ASSOCIATED( grid%dusfcg ) ) THEN DEALLOCATE(grid%dusfcg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dusfcg. ') endif ENDIF IF ( ASSOCIATED( grid%dvsfcg ) ) THEN DEALLOCATE(grid%dvsfcg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dvsfcg. ') endif ENDIF IF ( ASSOCIATED( grid%var2d ) ) THEN DEALLOCATE(grid%var2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%var2d. ') endif ENDIF IF ( ASSOCIATED( grid%oc12d ) ) THEN DEALLOCATE(grid%oc12d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%oc12d. ') endif ENDIF IF ( ASSOCIATED( grid%oa1 ) ) THEN DEALLOCATE(grid%oa1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%oa1. ') endif ENDIF IF ( ASSOCIATED( grid%oa2 ) ) THEN DEALLOCATE(grid%oa2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%oa2. ') endif ENDIF IF ( ASSOCIATED( grid%oa3 ) ) THEN DEALLOCATE(grid%oa3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%oa3. ') endif ENDIF IF ( ASSOCIATED( grid%oa4 ) ) THEN DEALLOCATE(grid%oa4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%oa4. ') endif ENDIF IF ( ASSOCIATED( grid%ol1 ) ) THEN DEALLOCATE(grid%ol1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ol1. ') endif ENDIF IF ( ASSOCIATED( grid%ol2 ) ) THEN DEALLOCATE(grid%ol2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ol2. ') endif ENDIF IF ( ASSOCIATED( grid%ol3 ) ) THEN DEALLOCATE(grid%ol3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ol3. ') endif ENDIF IF ( ASSOCIATED( grid%ol4 ) ) THEN DEALLOCATE(grid%ol4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ol4. ') endif ENDIF IF ( ASSOCIATED( grid%ctopo ) ) THEN DEALLOCATE(grid%ctopo,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ctopo. ') endif ENDIF IF ( ASSOCIATED( grid%ctopo2 ) ) THEN DEALLOCATE(grid%ctopo2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ctopo2. ') endif ENDIF IF ( ASSOCIATED( grid%a_u_bep ) ) THEN DEALLOCATE(grid%a_u_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%a_u_bep. ') endif ENDIF IF ( ASSOCIATED( grid%a_v_bep ) ) THEN DEALLOCATE(grid%a_v_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%a_v_bep. ') endif ENDIF IF ( ASSOCIATED( grid%a_t_bep ) ) THEN DEALLOCATE(grid%a_t_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%a_t_bep. ') endif ENDIF IF ( ASSOCIATED( grid%a_q_bep ) ) THEN DEALLOCATE(grid%a_q_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%a_q_bep. ') endif ENDIF IF ( ASSOCIATED( grid%a_e_bep ) ) THEN DEALLOCATE(grid%a_e_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%a_e_bep. ') endif ENDIF IF ( ASSOCIATED( grid%b_u_bep ) ) THEN DEALLOCATE(grid%b_u_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%b_u_bep. ') endif ENDIF IF ( ASSOCIATED( grid%b_v_bep ) ) THEN DEALLOCATE(grid%b_v_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%b_v_bep. ') endif ENDIF IF ( ASSOCIATED( grid%b_t_bep ) ) THEN DEALLOCATE(grid%b_t_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%b_t_bep. ') endif ENDIF IF ( ASSOCIATED( grid%b_q_bep ) ) THEN DEALLOCATE(grid%b_q_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%b_q_bep. ') endif ENDIF IF ( ASSOCIATED( grid%b_e_bep ) ) THEN DEALLOCATE(grid%b_e_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%b_e_bep. ') endif ENDIF IF ( ASSOCIATED( grid%dlg_bep ) ) THEN DEALLOCATE(grid%dlg_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dlg_bep. ') endif ENDIF IF ( ASSOCIATED( grid%dl_u_bep ) ) THEN DEALLOCATE(grid%dl_u_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dl_u_bep. ') endif ENDIF IF ( ASSOCIATED( grid%sf_bep ) ) THEN DEALLOCATE(grid%sf_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sf_bep. ') endif ENDIF IF ( ASSOCIATED( grid%vl_bep ) ) THEN DEALLOCATE(grid%vl_bep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vl_bep. ') endif ENDIF IF ( ASSOCIATED( grid%tke_pbl ) ) THEN DEALLOCATE(grid%tke_pbl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tke_pbl. ') endif ENDIF IF ( ASSOCIATED( grid%el_pbl ) ) THEN DEALLOCATE(grid%el_pbl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%el_pbl. ') endif ENDIF IF ( ASSOCIATED( grid%wu_tur ) ) THEN DEALLOCATE(grid%wu_tur,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wu_tur. ') endif ENDIF IF ( ASSOCIATED( grid%wv_tur ) ) THEN DEALLOCATE(grid%wv_tur,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wv_tur. ') endif ENDIF IF ( ASSOCIATED( grid%wt_tur ) ) THEN DEALLOCATE(grid%wt_tur,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wt_tur. ') endif ENDIF IF ( ASSOCIATED( grid%wq_tur ) ) THEN DEALLOCATE(grid%wq_tur,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wq_tur. ') endif ENDIF IF ( ASSOCIATED( grid%htop ) ) THEN DEALLOCATE(grid%htop,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%htop. ') endif ENDIF IF ( ASSOCIATED( grid%hbot ) ) THEN DEALLOCATE(grid%hbot,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hbot. ') endif ENDIF IF ( ASSOCIATED( grid%htopr ) ) THEN DEALLOCATE(grid%htopr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%htopr. ') endif ENDIF IF ( ASSOCIATED( grid%hbotr ) ) THEN DEALLOCATE(grid%hbotr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hbotr. ') endif ENDIF IF ( ASSOCIATED( grid%cutop ) ) THEN DEALLOCATE(grid%cutop,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cutop. ') endif ENDIF IF ( ASSOCIATED( grid%cubot ) ) THEN DEALLOCATE(grid%cubot,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cubot. ') endif ENDIF IF ( ASSOCIATED( grid%cuppt ) ) THEN DEALLOCATE(grid%cuppt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cuppt. ') endif ENDIF IF ( ASSOCIATED( grid%rswtoa ) ) THEN DEALLOCATE(grid%rswtoa,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rswtoa. ') endif ENDIF IF ( ASSOCIATED( grid%rlwtoa ) ) THEN DEALLOCATE(grid%rlwtoa,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rlwtoa. ') endif ENDIF IF ( ASSOCIATED( grid%czmean ) ) THEN DEALLOCATE(grid%czmean,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%czmean. ') endif ENDIF IF ( ASSOCIATED( grid%cfracl ) ) THEN DEALLOCATE(grid%cfracl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cfracl. ') endif ENDIF IF ( ASSOCIATED( grid%cfracm ) ) THEN DEALLOCATE(grid%cfracm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cfracm. ') endif ENDIF IF ( ASSOCIATED( grid%cfrach ) ) THEN DEALLOCATE(grid%cfrach,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cfrach. ') endif ENDIF IF ( ASSOCIATED( grid%acfrst ) ) THEN DEALLOCATE(grid%acfrst,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acfrst. ') endif ENDIF IF ( ASSOCIATED( grid%ncfrst ) ) THEN DEALLOCATE(grid%ncfrst,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ncfrst. ') endif ENDIF IF ( ASSOCIATED( grid%acfrcv ) ) THEN DEALLOCATE(grid%acfrcv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acfrcv. ') endif ENDIF IF ( ASSOCIATED( grid%ncfrcv ) ) THEN DEALLOCATE(grid%ncfrcv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ncfrcv. ') endif ENDIF IF ( ASSOCIATED( grid%o3rad ) ) THEN DEALLOCATE(grid%o3rad,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%o3rad. ') endif ENDIF IF ( ASSOCIATED( grid%aerodm ) ) THEN DEALLOCATE(grid%aerodm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aerodm. ') endif ENDIF IF ( ASSOCIATED( grid%pina ) ) THEN DEALLOCATE(grid%pina,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pina. ') endif ENDIF IF ( ASSOCIATED( grid%aerod ) ) THEN DEALLOCATE(grid%aerod,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aerod. ') endif ENDIF IF ( ASSOCIATED( grid%aodtot ) ) THEN DEALLOCATE(grid%aodtot,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aodtot. ') endif ENDIF IF ( ASSOCIATED( grid%ozmixm ) ) THEN DEALLOCATE(grid%ozmixm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ozmixm. ') endif ENDIF IF ( ASSOCIATED( grid%pin ) ) THEN DEALLOCATE(grid%pin,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pin. ') endif ENDIF IF ( ASSOCIATED( grid%m_ps_1 ) ) THEN DEALLOCATE(grid%m_ps_1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%m_ps_1. ') endif ENDIF IF ( ASSOCIATED( grid%m_ps_2 ) ) THEN DEALLOCATE(grid%m_ps_2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%m_ps_2. ') endif ENDIF IF ( ASSOCIATED( grid%aerosolc_1 ) ) THEN DEALLOCATE(grid%aerosolc_1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aerosolc_1. ') endif ENDIF IF ( ASSOCIATED( grid%aerosolc_2 ) ) THEN DEALLOCATE(grid%aerosolc_2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aerosolc_2. ') endif ENDIF IF ( ASSOCIATED( grid%m_hybi ) ) THEN DEALLOCATE(grid%m_hybi,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%m_hybi. ') endif ENDIF IF ( ASSOCIATED( grid%f_ice_phy ) ) THEN DEALLOCATE(grid%f_ice_phy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%f_ice_phy. ') endif ENDIF IF ( ASSOCIATED( grid%f_rain_phy ) ) THEN DEALLOCATE(grid%f_rain_phy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%f_rain_phy. ') endif ENDIF IF ( ASSOCIATED( grid%f_rimef_phy ) ) THEN DEALLOCATE(grid%f_rimef_phy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%f_rimef_phy. ') endif ENDIF IF ( ASSOCIATED( grid%qndropsource ) ) THEN DEALLOCATE(grid%qndropsource,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qndropsource. ') endif ENDIF IF ( ASSOCIATED( grid%om_tmp ) ) THEN DEALLOCATE(grid%om_tmp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%om_tmp. ') endif ENDIF IF ( ASSOCIATED( grid%om_s ) ) THEN DEALLOCATE(grid%om_s,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%om_s. ') endif ENDIF IF ( ASSOCIATED( grid%om_depth ) ) THEN DEALLOCATE(grid%om_depth,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%om_depth. ') endif ENDIF IF ( ASSOCIATED( grid%om_u ) ) THEN DEALLOCATE(grid%om_u,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%om_u. ') endif ENDIF IF ( ASSOCIATED( grid%om_v ) ) THEN DEALLOCATE(grid%om_v,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%om_v. ') endif ENDIF IF ( ASSOCIATED( grid%om_lat ) ) THEN DEALLOCATE(grid%om_lat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%om_lat. ') endif ENDIF IF ( ASSOCIATED( grid%om_lon ) ) THEN DEALLOCATE(grid%om_lon,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%om_lon. ') endif ENDIF IF ( ASSOCIATED( grid%om_ml ) ) THEN DEALLOCATE(grid%om_ml,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%om_ml. ') endif ENDIF IF ( ASSOCIATED( grid%om_tini ) ) THEN DEALLOCATE(grid%om_tini,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%om_tini. ') endif ENDIF IF ( ASSOCIATED( grid%om_sini ) ) THEN DEALLOCATE(grid%om_sini,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%om_sini. ') endif ENDIF IF ( ASSOCIATED( grid%h_diabatic ) ) THEN DEALLOCATE(grid%h_diabatic,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h_diabatic. ') endif ENDIF IF ( ASSOCIATED( grid%msft ) ) THEN DEALLOCATE(grid%msft,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%msft. ') endif ENDIF IF ( ASSOCIATED( grid%msfu ) ) THEN DEALLOCATE(grid%msfu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%msfu. ') endif ENDIF IF ( ASSOCIATED( grid%msfv ) ) THEN DEALLOCATE(grid%msfv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%msfv. ') endif ENDIF IF ( ASSOCIATED( grid%msftx ) ) THEN DEALLOCATE(grid%msftx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%msftx. ') endif ENDIF IF ( ASSOCIATED( grid%msfty ) ) THEN DEALLOCATE(grid%msfty,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%msfty. ') endif ENDIF IF ( ASSOCIATED( grid%msfux ) ) THEN DEALLOCATE(grid%msfux,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%msfux. ') endif ENDIF IF ( ASSOCIATED( grid%msfuy ) ) THEN DEALLOCATE(grid%msfuy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%msfuy. ') endif ENDIF IF ( ASSOCIATED( grid%msfvx ) ) THEN DEALLOCATE(grid%msfvx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%msfvx. ') endif ENDIF IF ( ASSOCIATED( grid%msfvx_inv ) ) THEN DEALLOCATE(grid%msfvx_inv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%msfvx_inv. ') endif ENDIF IF ( ASSOCIATED( grid%msfvy ) ) THEN DEALLOCATE(grid%msfvy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%msfvy. ') endif ENDIF IF ( ASSOCIATED( grid%f ) ) THEN DEALLOCATE(grid%f,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%f. ') endif ENDIF IF ( ASSOCIATED( grid%e ) ) THEN DEALLOCATE(grid%e,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%e. ') endif ENDIF IF ( ASSOCIATED( grid%sina ) ) THEN DEALLOCATE(grid%sina,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sina. ') endif ENDIF IF ( ASSOCIATED( grid%cosa ) ) THEN DEALLOCATE(grid%cosa,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cosa. ') endif ENDIF IF ( ASSOCIATED( grid%ht ) ) THEN DEALLOCATE(grid%ht,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht. ') endif ENDIF IF ( ASSOCIATED( grid%ht_fine ) ) THEN DEALLOCATE(grid%ht_fine,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_fine. ') endif ENDIF IF ( ASSOCIATED( grid%ht_int ) ) THEN DEALLOCATE(grid%ht_int,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_int. ') endif ENDIF IF ( ASSOCIATED( grid%ht_input ) ) THEN DEALLOCATE(grid%ht_input,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_input. ') endif ENDIF IF ( ASSOCIATED( grid%ht_smooth ) ) THEN DEALLOCATE(grid%ht_smooth,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_smooth. ') endif ENDIF IF ( ASSOCIATED( grid%ht_shad ) ) THEN DEALLOCATE(grid%ht_shad,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_shad. ') endif ENDIF IF ( ASSOCIATED( grid%ht_shad_bxs ) ) THEN DEALLOCATE(grid%ht_shad_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_shad_bxs. ') endif NULLIFY(grid%ht_shad_bxs) ENDIF IF ( ASSOCIATED( grid%ht_shad_bxe ) ) THEN DEALLOCATE(grid%ht_shad_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_shad_bxe. ') endif NULLIFY(grid%ht_shad_bxe) ENDIF IF ( ASSOCIATED( grid%ht_shad_bys ) ) THEN DEALLOCATE(grid%ht_shad_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_shad_bys. ') endif NULLIFY(grid%ht_shad_bys) ENDIF IF ( ASSOCIATED( grid%ht_shad_bye ) ) THEN DEALLOCATE(grid%ht_shad_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_shad_bye. ') endif NULLIFY(grid%ht_shad_bye) ENDIF IF ( ASSOCIATED( grid%ht_shad_btxs ) ) THEN DEALLOCATE(grid%ht_shad_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_shad_btxs. ') endif NULLIFY(grid%ht_shad_btxs) ENDIF IF ( ASSOCIATED( grid%ht_shad_btxe ) ) THEN DEALLOCATE(grid%ht_shad_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_shad_btxe. ') endif NULLIFY(grid%ht_shad_btxe) ENDIF IF ( ASSOCIATED( grid%ht_shad_btys ) ) THEN DEALLOCATE(grid%ht_shad_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_shad_btys. ') endif NULLIFY(grid%ht_shad_btys) ENDIF IF ( ASSOCIATED( grid%ht_shad_btye ) ) THEN DEALLOCATE(grid%ht_shad_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_shad_btye. ') endif NULLIFY(grid%ht_shad_btye) ENDIF IF ( ASSOCIATED( grid%shadowmask ) ) THEN DEALLOCATE(grid%shadowmask,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%shadowmask. ') endif ENDIF IF ( ASSOCIATED( grid%tsk ) ) THEN DEALLOCATE(grid%tsk,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tsk. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_tsk ) ) THEN DEALLOCATE(grid%dfi_tsk,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_tsk. ') endif ENDIF IF ( ASSOCIATED( grid%tsk_save ) ) THEN DEALLOCATE(grid%tsk_save,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tsk_save. ') endif ENDIF IF ( ASSOCIATED( grid%u_base ) ) THEN DEALLOCATE(grid%u_base,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_base. ') endif ENDIF IF ( ASSOCIATED( grid%v_base ) ) THEN DEALLOCATE(grid%v_base,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_base. ') endif ENDIF IF ( ASSOCIATED( grid%qv_base ) ) THEN DEALLOCATE(grid%qv_base,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qv_base. ') endif ENDIF IF ( ASSOCIATED( grid%z_base ) ) THEN DEALLOCATE(grid%z_base,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%z_base. ') endif ENDIF IF ( ASSOCIATED( grid%tlwdn ) ) THEN DEALLOCATE(grid%tlwdn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tlwdn. ') endif ENDIF IF ( ASSOCIATED( grid%tlwup ) ) THEN DEALLOCATE(grid%tlwup,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tlwup. ') endif ENDIF IF ( ASSOCIATED( grid%slwdn ) ) THEN DEALLOCATE(grid%slwdn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%slwdn. ') endif ENDIF IF ( ASSOCIATED( grid%slwup ) ) THEN DEALLOCATE(grid%slwup,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%slwup. ') endif ENDIF IF ( ASSOCIATED( grid%tswdn ) ) THEN DEALLOCATE(grid%tswdn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tswdn. ') endif ENDIF IF ( ASSOCIATED( grid%tswup ) ) THEN DEALLOCATE(grid%tswup,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tswup. ') endif ENDIF IF ( ASSOCIATED( grid%sswdn ) ) THEN DEALLOCATE(grid%sswdn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sswdn. ') endif ENDIF IF ( ASSOCIATED( grid%sswup ) ) THEN DEALLOCATE(grid%sswup,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sswup. ') endif ENDIF IF ( ASSOCIATED( grid%rushten ) ) THEN DEALLOCATE(grid%rushten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rushten. ') endif ENDIF IF ( ASSOCIATED( grid%rvshten ) ) THEN DEALLOCATE(grid%rvshten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rvshten. ') endif ENDIF IF ( ASSOCIATED( grid%rthshten ) ) THEN DEALLOCATE(grid%rthshten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rthshten. ') endif ENDIF IF ( ASSOCIATED( grid%rqvshten ) ) THEN DEALLOCATE(grid%rqvshten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqvshten. ') endif ENDIF IF ( ASSOCIATED( grid%rqrshten ) ) THEN DEALLOCATE(grid%rqrshten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqrshten. ') endif ENDIF IF ( ASSOCIATED( grid%rqcshten ) ) THEN DEALLOCATE(grid%rqcshten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqcshten. ') endif ENDIF IF ( ASSOCIATED( grid%rqsshten ) ) THEN DEALLOCATE(grid%rqsshten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqsshten. ') endif ENDIF IF ( ASSOCIATED( grid%rqishten ) ) THEN DEALLOCATE(grid%rqishten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqishten. ') endif ENDIF IF ( ASSOCIATED( grid%rqgshten ) ) THEN DEALLOCATE(grid%rqgshten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqgshten. ') endif ENDIF IF ( ASSOCIATED( grid%rqcnshten ) ) THEN DEALLOCATE(grid%rqcnshten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqcnshten. ') endif ENDIF IF ( ASSOCIATED( grid%rqinshten ) ) THEN DEALLOCATE(grid%rqinshten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqinshten. ') endif ENDIF IF ( ASSOCIATED( grid%rucuten ) ) THEN DEALLOCATE(grid%rucuten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rucuten. ') endif ENDIF IF ( ASSOCIATED( grid%rvcuten ) ) THEN DEALLOCATE(grid%rvcuten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rvcuten. ') endif ENDIF IF ( ASSOCIATED( grid%rthcuten ) ) THEN DEALLOCATE(grid%rthcuten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rthcuten. ') endif ENDIF IF ( ASSOCIATED( grid%rqvcuten ) ) THEN DEALLOCATE(grid%rqvcuten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqvcuten. ') endif ENDIF IF ( ASSOCIATED( grid%rqrcuten ) ) THEN DEALLOCATE(grid%rqrcuten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqrcuten. ') endif ENDIF IF ( ASSOCIATED( grid%rqccuten ) ) THEN DEALLOCATE(grid%rqccuten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqccuten. ') endif ENDIF IF ( ASSOCIATED( grid%rqscuten ) ) THEN DEALLOCATE(grid%rqscuten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqscuten. ') endif ENDIF IF ( ASSOCIATED( grid%rqicuten ) ) THEN DEALLOCATE(grid%rqicuten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqicuten. ') endif ENDIF IF ( ASSOCIATED( grid%rqcncuten ) ) THEN DEALLOCATE(grid%rqcncuten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqcncuten. ') endif ENDIF IF ( ASSOCIATED( grid%rqincuten ) ) THEN DEALLOCATE(grid%rqincuten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqincuten. ') endif ENDIF IF ( ASSOCIATED( grid%w0avg ) ) THEN DEALLOCATE(grid%w0avg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w0avg. ') endif ENDIF IF ( ASSOCIATED( grid%rainc ) ) THEN DEALLOCATE(grid%rainc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rainc. ') endif ENDIF IF ( ASSOCIATED( grid%rainsh ) ) THEN DEALLOCATE(grid%rainsh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rainsh. ') endif ENDIF IF ( ASSOCIATED( grid%rainnc ) ) THEN DEALLOCATE(grid%rainnc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rainnc. ') endif ENDIF IF ( ASSOCIATED( grid%i_rainc ) ) THEN DEALLOCATE(grid%i_rainc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_rainc. ') endif ENDIF IF ( ASSOCIATED( grid%i_rainnc ) ) THEN DEALLOCATE(grid%i_rainnc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_rainnc. ') endif ENDIF IF ( ASSOCIATED( grid%pratec ) ) THEN DEALLOCATE(grid%pratec,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pratec. ') endif ENDIF IF ( ASSOCIATED( grid%pratesh ) ) THEN DEALLOCATE(grid%pratesh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pratesh. ') endif ENDIF IF ( ASSOCIATED( grid%raincv ) ) THEN DEALLOCATE(grid%raincv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%raincv. ') endif ENDIF IF ( ASSOCIATED( grid%rainshv ) ) THEN DEALLOCATE(grid%rainshv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rainshv. ') endif ENDIF IF ( ASSOCIATED( grid%rainncv ) ) THEN DEALLOCATE(grid%rainncv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rainncv. ') endif ENDIF IF ( ASSOCIATED( grid%rainbl ) ) THEN DEALLOCATE(grid%rainbl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rainbl. ') endif ENDIF IF ( ASSOCIATED( grid%snownc ) ) THEN DEALLOCATE(grid%snownc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snownc. ') endif ENDIF IF ( ASSOCIATED( grid%graupelnc ) ) THEN DEALLOCATE(grid%graupelnc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%graupelnc. ') endif ENDIF IF ( ASSOCIATED( grid%hailnc ) ) THEN DEALLOCATE(grid%hailnc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hailnc. ') endif ENDIF IF ( ASSOCIATED( grid%snowncv ) ) THEN DEALLOCATE(grid%snowncv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowncv. ') endif ENDIF IF ( ASSOCIATED( grid%graupelncv ) ) THEN DEALLOCATE(grid%graupelncv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%graupelncv. ') endif ENDIF IF ( ASSOCIATED( grid%hailncv ) ) THEN DEALLOCATE(grid%hailncv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hailncv. ') endif ENDIF IF ( ASSOCIATED( grid%refl_10cm ) ) THEN DEALLOCATE(grid%refl_10cm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%refl_10cm. ') endif ENDIF IF ( ASSOCIATED( grid%nca ) ) THEN DEALLOCATE(grid%nca,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%nca. ') endif ENDIF IF ( ASSOCIATED( grid%lowlyr ) ) THEN DEALLOCATE(grid%lowlyr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lowlyr. ') endif ENDIF IF ( ASSOCIATED( grid%mass_flux ) ) THEN DEALLOCATE(grid%mass_flux,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mass_flux. ') endif ENDIF IF ( ASSOCIATED( grid%apr_gr ) ) THEN DEALLOCATE(grid%apr_gr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%apr_gr. ') endif ENDIF IF ( ASSOCIATED( grid%apr_w ) ) THEN DEALLOCATE(grid%apr_w,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%apr_w. ') endif ENDIF IF ( ASSOCIATED( grid%apr_mc ) ) THEN DEALLOCATE(grid%apr_mc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%apr_mc. ') endif ENDIF IF ( ASSOCIATED( grid%apr_st ) ) THEN DEALLOCATE(grid%apr_st,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%apr_st. ') endif ENDIF IF ( ASSOCIATED( grid%apr_as ) ) THEN DEALLOCATE(grid%apr_as,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%apr_as. ') endif ENDIF IF ( ASSOCIATED( grid%apr_capma ) ) THEN DEALLOCATE(grid%apr_capma,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%apr_capma. ') endif ENDIF IF ( ASSOCIATED( grid%apr_capme ) ) THEN DEALLOCATE(grid%apr_capme,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%apr_capme. ') endif ENDIF IF ( ASSOCIATED( grid%apr_capmi ) ) THEN DEALLOCATE(grid%apr_capmi,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%apr_capmi. ') endif ENDIF IF ( ASSOCIATED( grid%edt_out ) ) THEN DEALLOCATE(grid%edt_out,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%edt_out. ') endif ENDIF IF ( ASSOCIATED( grid%xmb_shallow ) ) THEN DEALLOCATE(grid%xmb_shallow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xmb_shallow. ') endif ENDIF IF ( ASSOCIATED( grid%k22_shallow ) ) THEN DEALLOCATE(grid%k22_shallow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%k22_shallow. ') endif ENDIF IF ( ASSOCIATED( grid%kbcon_shallow ) ) THEN DEALLOCATE(grid%kbcon_shallow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%kbcon_shallow. ') endif ENDIF IF ( ASSOCIATED( grid%ktop_shallow ) ) THEN DEALLOCATE(grid%ktop_shallow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ktop_shallow. ') endif ENDIF IF ( ASSOCIATED( grid%k22_deep ) ) THEN DEALLOCATE(grid%k22_deep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%k22_deep. ') endif ENDIF IF ( ASSOCIATED( grid%kbcon_deep ) ) THEN DEALLOCATE(grid%kbcon_deep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%kbcon_deep. ') endif ENDIF IF ( ASSOCIATED( grid%ktop_deep ) ) THEN DEALLOCATE(grid%ktop_deep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ktop_deep. ') endif ENDIF IF ( ASSOCIATED( grid%xf_ens ) ) THEN DEALLOCATE(grid%xf_ens,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xf_ens. ') endif ENDIF IF ( ASSOCIATED( grid%pr_ens ) ) THEN DEALLOCATE(grid%pr_ens,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pr_ens. ') endif ENDIF IF ( ASSOCIATED( grid%cugd_tten ) ) THEN DEALLOCATE(grid%cugd_tten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cugd_tten. ') endif ENDIF IF ( ASSOCIATED( grid%cugd_qvten ) ) THEN DEALLOCATE(grid%cugd_qvten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cugd_qvten. ') endif ENDIF IF ( ASSOCIATED( grid%cugd_ttens ) ) THEN DEALLOCATE(grid%cugd_ttens,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cugd_ttens. ') endif ENDIF IF ( ASSOCIATED( grid%cugd_qvtens ) ) THEN DEALLOCATE(grid%cugd_qvtens,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cugd_qvtens. ') endif ENDIF IF ( ASSOCIATED( grid%cugd_qcten ) ) THEN DEALLOCATE(grid%cugd_qcten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cugd_qcten. ') endif ENDIF IF ( ASSOCIATED( grid%gd_cloud ) ) THEN DEALLOCATE(grid%gd_cloud,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gd_cloud. ') endif ENDIF IF ( ASSOCIATED( grid%gd_cloud2 ) ) THEN DEALLOCATE(grid%gd_cloud2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gd_cloud2. ') endif ENDIF IF ( ASSOCIATED( grid%gd_cldfr ) ) THEN DEALLOCATE(grid%gd_cldfr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gd_cldfr. ') endif ENDIF IF ( ASSOCIATED( grid%raincv_a ) ) THEN DEALLOCATE(grid%raincv_a,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%raincv_a. ') endif ENDIF IF ( ASSOCIATED( grid%raincv_b ) ) THEN DEALLOCATE(grid%raincv_b,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%raincv_b. ') endif ENDIF IF ( ASSOCIATED( grid%gd_cloud_a ) ) THEN DEALLOCATE(grid%gd_cloud_a,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gd_cloud_a. ') endif ENDIF IF ( ASSOCIATED( grid%gd_cloud2_a ) ) THEN DEALLOCATE(grid%gd_cloud2_a,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gd_cloud2_a. ') endif ENDIF IF ( ASSOCIATED( grid%gd_cloud_b ) ) THEN DEALLOCATE(grid%gd_cloud_b,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gd_cloud_b. ') endif ENDIF IF ( ASSOCIATED( grid%gd_cloud2_b ) ) THEN DEALLOCATE(grid%gd_cloud2_b,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gd_cloud2_b. ') endif ENDIF IF ( ASSOCIATED( grid%rthften ) ) THEN DEALLOCATE(grid%rthften,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rthften. ') endif ENDIF IF ( ASSOCIATED( grid%rqvften ) ) THEN DEALLOCATE(grid%rqvften,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqvften. ') endif ENDIF IF ( ASSOCIATED( grid%rthraten ) ) THEN DEALLOCATE(grid%rthraten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rthraten. ') endif ENDIF IF ( ASSOCIATED( grid%rthratenlw ) ) THEN DEALLOCATE(grid%rthratenlw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rthratenlw. ') endif ENDIF IF ( ASSOCIATED( grid%rthratensw ) ) THEN DEALLOCATE(grid%rthratensw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rthratensw. ') endif ENDIF IF ( ASSOCIATED( grid%cldfra ) ) THEN DEALLOCATE(grid%cldfra,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cldfra. ') endif ENDIF IF ( ASSOCIATED( grid%cldfra_old ) ) THEN DEALLOCATE(grid%cldfra_old,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cldfra_old. ') endif ENDIF IF ( ASSOCIATED( grid%swdown ) ) THEN DEALLOCATE(grid%swdown,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swdown. ') endif ENDIF IF ( ASSOCIATED( grid%swdownc ) ) THEN DEALLOCATE(grid%swdownc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swdownc. ') endif ENDIF IF ( ASSOCIATED( grid%gsw ) ) THEN DEALLOCATE(grid%gsw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gsw. ') endif ENDIF IF ( ASSOCIATED( grid%glw ) ) THEN DEALLOCATE(grid%glw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%glw. ') endif ENDIF IF ( ASSOCIATED( grid%swnorm ) ) THEN DEALLOCATE(grid%swnorm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swnorm. ') endif ENDIF IF ( ASSOCIATED( grid%swddir ) ) THEN DEALLOCATE(grid%swddir,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swddir. ') endif ENDIF IF ( ASSOCIATED( grid%swddni ) ) THEN DEALLOCATE(grid%swddni,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swddni. ') endif ENDIF IF ( ASSOCIATED( grid%swddif ) ) THEN DEALLOCATE(grid%swddif,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swddif. ') endif ENDIF IF ( ASSOCIATED( grid%gx ) ) THEN DEALLOCATE(grid%gx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gx. ') endif ENDIF IF ( ASSOCIATED( grid%bx ) ) THEN DEALLOCATE(grid%bx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bx. ') endif ENDIF IF ( ASSOCIATED( grid%gg ) ) THEN DEALLOCATE(grid%gg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gg. ') endif ENDIF IF ( ASSOCIATED( grid%bb ) ) THEN DEALLOCATE(grid%bb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bb. ') endif ENDIF IF ( ASSOCIATED( grid%coszen_ref ) ) THEN DEALLOCATE(grid%coszen_ref,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%coszen_ref. ') endif ENDIF IF ( ASSOCIATED( grid%swdown_ref ) ) THEN DEALLOCATE(grid%swdown_ref,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swdown_ref. ') endif ENDIF IF ( ASSOCIATED( grid%swddir_ref ) ) THEN DEALLOCATE(grid%swddir_ref,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swddir_ref. ') endif ENDIF IF ( ASSOCIATED( grid%t2min ) ) THEN DEALLOCATE(grid%t2min,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t2min. ') endif ENDIF IF ( ASSOCIATED( grid%t2max ) ) THEN DEALLOCATE(grid%t2max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t2max. ') endif ENDIF IF ( ASSOCIATED( grid%tt2min ) ) THEN DEALLOCATE(grid%tt2min,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tt2min. ') endif ENDIF IF ( ASSOCIATED( grid%tt2max ) ) THEN DEALLOCATE(grid%tt2max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tt2max. ') endif ENDIF IF ( ASSOCIATED( grid%t2mean ) ) THEN DEALLOCATE(grid%t2mean,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t2mean. ') endif ENDIF IF ( ASSOCIATED( grid%t2std ) ) THEN DEALLOCATE(grid%t2std,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t2std. ') endif ENDIF IF ( ASSOCIATED( grid%q2min ) ) THEN DEALLOCATE(grid%q2min,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2min. ') endif ENDIF IF ( ASSOCIATED( grid%q2max ) ) THEN DEALLOCATE(grid%q2max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2max. ') endif ENDIF IF ( ASSOCIATED( grid%tq2min ) ) THEN DEALLOCATE(grid%tq2min,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tq2min. ') endif ENDIF IF ( ASSOCIATED( grid%tq2max ) ) THEN DEALLOCATE(grid%tq2max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tq2max. ') endif ENDIF IF ( ASSOCIATED( grid%q2mean ) ) THEN DEALLOCATE(grid%q2mean,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2mean. ') endif ENDIF IF ( ASSOCIATED( grid%q2std ) ) THEN DEALLOCATE(grid%q2std,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2std. ') endif ENDIF IF ( ASSOCIATED( grid%skintempmin ) ) THEN DEALLOCATE(grid%skintempmin,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%skintempmin. ') endif ENDIF IF ( ASSOCIATED( grid%skintempmax ) ) THEN DEALLOCATE(grid%skintempmax,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%skintempmax. ') endif ENDIF IF ( ASSOCIATED( grid%tskintempmin ) ) THEN DEALLOCATE(grid%tskintempmin,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tskintempmin. ') endif ENDIF IF ( ASSOCIATED( grid%tskintempmax ) ) THEN DEALLOCATE(grid%tskintempmax,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tskintempmax. ') endif ENDIF IF ( ASSOCIATED( grid%skintempmean ) ) THEN DEALLOCATE(grid%skintempmean,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%skintempmean. ') endif ENDIF IF ( ASSOCIATED( grid%skintempstd ) ) THEN DEALLOCATE(grid%skintempstd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%skintempstd. ') endif ENDIF IF ( ASSOCIATED( grid%u10max ) ) THEN DEALLOCATE(grid%u10max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u10max. ') endif ENDIF IF ( ASSOCIATED( grid%v10max ) ) THEN DEALLOCATE(grid%v10max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v10max. ') endif ENDIF IF ( ASSOCIATED( grid%spduv10max ) ) THEN DEALLOCATE(grid%spduv10max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%spduv10max. ') endif ENDIF IF ( ASSOCIATED( grid%tspduv10max ) ) THEN DEALLOCATE(grid%tspduv10max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tspduv10max. ') endif ENDIF IF ( ASSOCIATED( grid%u10mean ) ) THEN DEALLOCATE(grid%u10mean,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u10mean. ') endif ENDIF IF ( ASSOCIATED( grid%v10mean ) ) THEN DEALLOCATE(grid%v10mean,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v10mean. ') endif ENDIF IF ( ASSOCIATED( grid%spduv10mean ) ) THEN DEALLOCATE(grid%spduv10mean,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%spduv10mean. ') endif ENDIF IF ( ASSOCIATED( grid%u10std ) ) THEN DEALLOCATE(grid%u10std,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u10std. ') endif ENDIF IF ( ASSOCIATED( grid%v10std ) ) THEN DEALLOCATE(grid%v10std,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v10std. ') endif ENDIF IF ( ASSOCIATED( grid%spduv10std ) ) THEN DEALLOCATE(grid%spduv10std,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%spduv10std. ') endif ENDIF IF ( ASSOCIATED( grid%raincvmax ) ) THEN DEALLOCATE(grid%raincvmax,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%raincvmax. ') endif ENDIF IF ( ASSOCIATED( grid%rainncvmax ) ) THEN DEALLOCATE(grid%rainncvmax,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rainncvmax. ') endif ENDIF IF ( ASSOCIATED( grid%traincvmax ) ) THEN DEALLOCATE(grid%traincvmax,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%traincvmax. ') endif ENDIF IF ( ASSOCIATED( grid%trainncvmax ) ) THEN DEALLOCATE(grid%trainncvmax,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%trainncvmax. ') endif ENDIF IF ( ASSOCIATED( grid%raincvmean ) ) THEN DEALLOCATE(grid%raincvmean,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%raincvmean. ') endif ENDIF IF ( ASSOCIATED( grid%rainncvmean ) ) THEN DEALLOCATE(grid%rainncvmean,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rainncvmean. ') endif ENDIF IF ( ASSOCIATED( grid%raincvstd ) ) THEN DEALLOCATE(grid%raincvstd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%raincvstd. ') endif ENDIF IF ( ASSOCIATED( grid%rainncvstd ) ) THEN DEALLOCATE(grid%rainncvstd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rainncvstd. ') endif ENDIF IF ( ASSOCIATED( grid%acswupt ) ) THEN DEALLOCATE(grid%acswupt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acswupt. ') endif ENDIF IF ( ASSOCIATED( grid%acswuptc ) ) THEN DEALLOCATE(grid%acswuptc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acswuptc. ') endif ENDIF IF ( ASSOCIATED( grid%acswdnt ) ) THEN DEALLOCATE(grid%acswdnt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acswdnt. ') endif ENDIF IF ( ASSOCIATED( grid%acswdntc ) ) THEN DEALLOCATE(grid%acswdntc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acswdntc. ') endif ENDIF IF ( ASSOCIATED( grid%acswupb ) ) THEN DEALLOCATE(grid%acswupb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acswupb. ') endif ENDIF IF ( ASSOCIATED( grid%acswupbc ) ) THEN DEALLOCATE(grid%acswupbc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acswupbc. ') endif ENDIF IF ( ASSOCIATED( grid%acswdnb ) ) THEN DEALLOCATE(grid%acswdnb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acswdnb. ') endif ENDIF IF ( ASSOCIATED( grid%acswdnbc ) ) THEN DEALLOCATE(grid%acswdnbc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acswdnbc. ') endif ENDIF IF ( ASSOCIATED( grid%aclwupt ) ) THEN DEALLOCATE(grid%aclwupt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aclwupt. ') endif ENDIF IF ( ASSOCIATED( grid%aclwuptc ) ) THEN DEALLOCATE(grid%aclwuptc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aclwuptc. ') endif ENDIF IF ( ASSOCIATED( grid%aclwdnt ) ) THEN DEALLOCATE(grid%aclwdnt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aclwdnt. ') endif ENDIF IF ( ASSOCIATED( grid%aclwdntc ) ) THEN DEALLOCATE(grid%aclwdntc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aclwdntc. ') endif ENDIF IF ( ASSOCIATED( grid%aclwupb ) ) THEN DEALLOCATE(grid%aclwupb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aclwupb. ') endif ENDIF IF ( ASSOCIATED( grid%aclwupbc ) ) THEN DEALLOCATE(grid%aclwupbc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aclwupbc. ') endif ENDIF IF ( ASSOCIATED( grid%aclwdnb ) ) THEN DEALLOCATE(grid%aclwdnb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aclwdnb. ') endif ENDIF IF ( ASSOCIATED( grid%aclwdnbc ) ) THEN DEALLOCATE(grid%aclwdnbc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aclwdnbc. ') endif ENDIF IF ( ASSOCIATED( grid%i_acswupt ) ) THEN DEALLOCATE(grid%i_acswupt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_acswupt. ') endif ENDIF IF ( ASSOCIATED( grid%i_acswuptc ) ) THEN DEALLOCATE(grid%i_acswuptc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_acswuptc. ') endif ENDIF IF ( ASSOCIATED( grid%i_acswdnt ) ) THEN DEALLOCATE(grid%i_acswdnt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_acswdnt. ') endif ENDIF IF ( ASSOCIATED( grid%i_acswdntc ) ) THEN DEALLOCATE(grid%i_acswdntc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_acswdntc. ') endif ENDIF IF ( ASSOCIATED( grid%i_acswupb ) ) THEN DEALLOCATE(grid%i_acswupb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_acswupb. ') endif ENDIF IF ( ASSOCIATED( grid%i_acswupbc ) ) THEN DEALLOCATE(grid%i_acswupbc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_acswupbc. ') endif ENDIF IF ( ASSOCIATED( grid%i_acswdnb ) ) THEN DEALLOCATE(grid%i_acswdnb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_acswdnb. ') endif ENDIF IF ( ASSOCIATED( grid%i_acswdnbc ) ) THEN DEALLOCATE(grid%i_acswdnbc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_acswdnbc. ') endif ENDIF IF ( ASSOCIATED( grid%i_aclwupt ) ) THEN DEALLOCATE(grid%i_aclwupt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_aclwupt. ') endif ENDIF IF ( ASSOCIATED( grid%i_aclwuptc ) ) THEN DEALLOCATE(grid%i_aclwuptc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_aclwuptc. ') endif ENDIF IF ( ASSOCIATED( grid%i_aclwdnt ) ) THEN DEALLOCATE(grid%i_aclwdnt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_aclwdnt. ') endif ENDIF IF ( ASSOCIATED( grid%i_aclwdntc ) ) THEN DEALLOCATE(grid%i_aclwdntc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_aclwdntc. ') endif ENDIF IF ( ASSOCIATED( grid%i_aclwupb ) ) THEN DEALLOCATE(grid%i_aclwupb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_aclwupb. ') endif ENDIF IF ( ASSOCIATED( grid%i_aclwupbc ) ) THEN DEALLOCATE(grid%i_aclwupbc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_aclwupbc. ') endif ENDIF IF ( ASSOCIATED( grid%i_aclwdnb ) ) THEN DEALLOCATE(grid%i_aclwdnb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_aclwdnb. ') endif ENDIF IF ( ASSOCIATED( grid%i_aclwdnbc ) ) THEN DEALLOCATE(grid%i_aclwdnbc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%i_aclwdnbc. ') endif ENDIF IF ( ASSOCIATED( grid%swupt ) ) THEN DEALLOCATE(grid%swupt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swupt. ') endif ENDIF IF ( ASSOCIATED( grid%swuptc ) ) THEN DEALLOCATE(grid%swuptc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swuptc. ') endif ENDIF IF ( ASSOCIATED( grid%swdnt ) ) THEN DEALLOCATE(grid%swdnt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swdnt. ') endif ENDIF IF ( ASSOCIATED( grid%swdntc ) ) THEN DEALLOCATE(grid%swdntc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swdntc. ') endif ENDIF IF ( ASSOCIATED( grid%swupb ) ) THEN DEALLOCATE(grid%swupb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swupb. ') endif ENDIF IF ( ASSOCIATED( grid%swupbc ) ) THEN DEALLOCATE(grid%swupbc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swupbc. ') endif ENDIF IF ( ASSOCIATED( grid%swdnb ) ) THEN DEALLOCATE(grid%swdnb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swdnb. ') endif ENDIF IF ( ASSOCIATED( grid%swdnbc ) ) THEN DEALLOCATE(grid%swdnbc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swdnbc. ') endif ENDIF IF ( ASSOCIATED( grid%lwupt ) ) THEN DEALLOCATE(grid%lwupt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lwupt. ') endif ENDIF IF ( ASSOCIATED( grid%lwuptc ) ) THEN DEALLOCATE(grid%lwuptc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lwuptc. ') endif ENDIF IF ( ASSOCIATED( grid%lwdnt ) ) THEN DEALLOCATE(grid%lwdnt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lwdnt. ') endif ENDIF IF ( ASSOCIATED( grid%lwdntc ) ) THEN DEALLOCATE(grid%lwdntc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lwdntc. ') endif ENDIF IF ( ASSOCIATED( grid%lwupb ) ) THEN DEALLOCATE(grid%lwupb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lwupb. ') endif ENDIF IF ( ASSOCIATED( grid%lwupbc ) ) THEN DEALLOCATE(grid%lwupbc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lwupbc. ') endif ENDIF IF ( ASSOCIATED( grid%lwdnb ) ) THEN DEALLOCATE(grid%lwdnb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lwdnb. ') endif ENDIF IF ( ASSOCIATED( grid%lwdnbc ) ) THEN DEALLOCATE(grid%lwdnbc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lwdnbc. ') endif ENDIF IF ( ASSOCIATED( grid%swcf ) ) THEN DEALLOCATE(grid%swcf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swcf. ') endif ENDIF IF ( ASSOCIATED( grid%lwcf ) ) THEN DEALLOCATE(grid%lwcf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lwcf. ') endif ENDIF IF ( ASSOCIATED( grid%olr ) ) THEN DEALLOCATE(grid%olr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%olr. ') endif ENDIF IF ( ASSOCIATED( grid%xlat_u ) ) THEN DEALLOCATE(grid%xlat_u,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xlat_u. ') endif ENDIF IF ( ASSOCIATED( grid%xlong_u ) ) THEN DEALLOCATE(grid%xlong_u,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xlong_u. ') endif ENDIF IF ( ASSOCIATED( grid%xlat_v ) ) THEN DEALLOCATE(grid%xlat_v,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xlat_v. ') endif ENDIF IF ( ASSOCIATED( grid%xlong_v ) ) THEN DEALLOCATE(grid%xlong_v,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xlong_v. ') endif ENDIF IF ( ASSOCIATED( grid%albedo ) ) THEN DEALLOCATE(grid%albedo,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%albedo. ') endif ENDIF IF ( ASSOCIATED( grid%clat ) ) THEN DEALLOCATE(grid%clat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%clat. ') endif ENDIF IF ( ASSOCIATED( grid%albbck ) ) THEN DEALLOCATE(grid%albbck,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%albbck. ') endif ENDIF IF ( ASSOCIATED( grid%embck ) ) THEN DEALLOCATE(grid%embck,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%embck. ') endif ENDIF IF ( ASSOCIATED( grid%emiss ) ) THEN DEALLOCATE(grid%emiss,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%emiss. ') endif ENDIF IF ( ASSOCIATED( grid%snotime ) ) THEN DEALLOCATE(grid%snotime,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snotime. ') endif ENDIF IF ( ASSOCIATED( grid%noahres ) ) THEN DEALLOCATE(grid%noahres,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%noahres. ') endif ENDIF IF ( ASSOCIATED( grid%cldefi ) ) THEN DEALLOCATE(grid%cldefi,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cldefi. ') endif ENDIF IF ( ASSOCIATED( grid%rublten ) ) THEN DEALLOCATE(grid%rublten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rublten. ') endif ENDIF IF ( ASSOCIATED( grid%rvblten ) ) THEN DEALLOCATE(grid%rvblten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rvblten. ') endif ENDIF IF ( ASSOCIATED( grid%rthblten ) ) THEN DEALLOCATE(grid%rthblten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rthblten. ') endif ENDIF IF ( ASSOCIATED( grid%rqvblten ) ) THEN DEALLOCATE(grid%rqvblten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqvblten. ') endif ENDIF IF ( ASSOCIATED( grid%rqcblten ) ) THEN DEALLOCATE(grid%rqcblten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqcblten. ') endif ENDIF IF ( ASSOCIATED( grid%rqiblten ) ) THEN DEALLOCATE(grid%rqiblten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqiblten. ') endif ENDIF IF ( ASSOCIATED( grid%rqniblten ) ) THEN DEALLOCATE(grid%rqniblten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqniblten. ') endif ENDIF IF ( ASSOCIATED( grid%flx4 ) ) THEN DEALLOCATE(grid%flx4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%flx4. ') endif ENDIF IF ( ASSOCIATED( grid%fvb ) ) THEN DEALLOCATE(grid%fvb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fvb. ') endif ENDIF IF ( ASSOCIATED( grid%fbur ) ) THEN DEALLOCATE(grid%fbur,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fbur. ') endif ENDIF IF ( ASSOCIATED( grid%fgsn ) ) THEN DEALLOCATE(grid%fgsn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fgsn. ') endif ENDIF IF ( ASSOCIATED( grid%isnowxy ) ) THEN DEALLOCATE(grid%isnowxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%isnowxy. ') endif ENDIF IF ( ASSOCIATED( grid%tvxy ) ) THEN DEALLOCATE(grid%tvxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tvxy. ') endif ENDIF IF ( ASSOCIATED( grid%tgxy ) ) THEN DEALLOCATE(grid%tgxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tgxy. ') endif ENDIF IF ( ASSOCIATED( grid%canicexy ) ) THEN DEALLOCATE(grid%canicexy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%canicexy. ') endif ENDIF IF ( ASSOCIATED( grid%canliqxy ) ) THEN DEALLOCATE(grid%canliqxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%canliqxy. ') endif ENDIF IF ( ASSOCIATED( grid%eahxy ) ) THEN DEALLOCATE(grid%eahxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%eahxy. ') endif ENDIF IF ( ASSOCIATED( grid%tahxy ) ) THEN DEALLOCATE(grid%tahxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tahxy. ') endif ENDIF IF ( ASSOCIATED( grid%cmxy ) ) THEN DEALLOCATE(grid%cmxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cmxy. ') endif ENDIF IF ( ASSOCIATED( grid%chxy ) ) THEN DEALLOCATE(grid%chxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%chxy. ') endif ENDIF IF ( ASSOCIATED( grid%fwetxy ) ) THEN DEALLOCATE(grid%fwetxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fwetxy. ') endif ENDIF IF ( ASSOCIATED( grid%sneqvoxy ) ) THEN DEALLOCATE(grid%sneqvoxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sneqvoxy. ') endif ENDIF IF ( ASSOCIATED( grid%alboldxy ) ) THEN DEALLOCATE(grid%alboldxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%alboldxy. ') endif ENDIF IF ( ASSOCIATED( grid%qsnowxy ) ) THEN DEALLOCATE(grid%qsnowxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qsnowxy. ') endif ENDIF IF ( ASSOCIATED( grid%wslakexy ) ) THEN DEALLOCATE(grid%wslakexy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wslakexy. ') endif ENDIF IF ( ASSOCIATED( grid%zwtxy ) ) THEN DEALLOCATE(grid%zwtxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zwtxy. ') endif ENDIF IF ( ASSOCIATED( grid%waxy ) ) THEN DEALLOCATE(grid%waxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%waxy. ') endif ENDIF IF ( ASSOCIATED( grid%wtxy ) ) THEN DEALLOCATE(grid%wtxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wtxy. ') endif ENDIF IF ( ASSOCIATED( grid%tsnoxy ) ) THEN DEALLOCATE(grid%tsnoxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tsnoxy. ') endif ENDIF IF ( ASSOCIATED( grid%zsnsoxy ) ) THEN DEALLOCATE(grid%zsnsoxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zsnsoxy. ') endif ENDIF IF ( ASSOCIATED( grid%snicexy ) ) THEN DEALLOCATE(grid%snicexy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snicexy. ') endif ENDIF IF ( ASSOCIATED( grid%snliqxy ) ) THEN DEALLOCATE(grid%snliqxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snliqxy. ') endif ENDIF IF ( ASSOCIATED( grid%lfmassxy ) ) THEN DEALLOCATE(grid%lfmassxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lfmassxy. ') endif ENDIF IF ( ASSOCIATED( grid%rtmassxy ) ) THEN DEALLOCATE(grid%rtmassxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rtmassxy. ') endif ENDIF IF ( ASSOCIATED( grid%stmassxy ) ) THEN DEALLOCATE(grid%stmassxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%stmassxy. ') endif ENDIF IF ( ASSOCIATED( grid%woodxy ) ) THEN DEALLOCATE(grid%woodxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%woodxy. ') endif ENDIF IF ( ASSOCIATED( grid%stblcpxy ) ) THEN DEALLOCATE(grid%stblcpxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%stblcpxy. ') endif ENDIF IF ( ASSOCIATED( grid%fastcpxy ) ) THEN DEALLOCATE(grid%fastcpxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fastcpxy. ') endif ENDIF IF ( ASSOCIATED( grid%xsaixy ) ) THEN DEALLOCATE(grid%xsaixy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xsaixy. ') endif ENDIF IF ( ASSOCIATED( grid%taussxy ) ) THEN DEALLOCATE(grid%taussxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%taussxy. ') endif ENDIF IF ( ASSOCIATED( grid%t2mvxy ) ) THEN DEALLOCATE(grid%t2mvxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t2mvxy. ') endif ENDIF IF ( ASSOCIATED( grid%t2mbxy ) ) THEN DEALLOCATE(grid%t2mbxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t2mbxy. ') endif ENDIF IF ( ASSOCIATED( grid%q2mvxy ) ) THEN DEALLOCATE(grid%q2mvxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2mvxy. ') endif ENDIF IF ( ASSOCIATED( grid%q2mbxy ) ) THEN DEALLOCATE(grid%q2mbxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2mbxy. ') endif ENDIF IF ( ASSOCIATED( grid%tradxy ) ) THEN DEALLOCATE(grid%tradxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tradxy. ') endif ENDIF IF ( ASSOCIATED( grid%neexy ) ) THEN DEALLOCATE(grid%neexy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%neexy. ') endif ENDIF IF ( ASSOCIATED( grid%gppxy ) ) THEN DEALLOCATE(grid%gppxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gppxy. ') endif ENDIF IF ( ASSOCIATED( grid%nppxy ) ) THEN DEALLOCATE(grid%nppxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%nppxy. ') endif ENDIF IF ( ASSOCIATED( grid%fvegxy ) ) THEN DEALLOCATE(grid%fvegxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fvegxy. ') endif ENDIF IF ( ASSOCIATED( grid%qinxy ) ) THEN DEALLOCATE(grid%qinxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qinxy. ') endif ENDIF IF ( ASSOCIATED( grid%runsfxy ) ) THEN DEALLOCATE(grid%runsfxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%runsfxy. ') endif ENDIF IF ( ASSOCIATED( grid%runsbxy ) ) THEN DEALLOCATE(grid%runsbxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%runsbxy. ') endif ENDIF IF ( ASSOCIATED( grid%ecanxy ) ) THEN DEALLOCATE(grid%ecanxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ecanxy. ') endif ENDIF IF ( ASSOCIATED( grid%edirxy ) ) THEN DEALLOCATE(grid%edirxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%edirxy. ') endif ENDIF IF ( ASSOCIATED( grid%etranxy ) ) THEN DEALLOCATE(grid%etranxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%etranxy. ') endif ENDIF IF ( ASSOCIATED( grid%fsaxy ) ) THEN DEALLOCATE(grid%fsaxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fsaxy. ') endif ENDIF IF ( ASSOCIATED( grid%firaxy ) ) THEN DEALLOCATE(grid%firaxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%firaxy. ') endif ENDIF IF ( ASSOCIATED( grid%aparxy ) ) THEN DEALLOCATE(grid%aparxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aparxy. ') endif ENDIF IF ( ASSOCIATED( grid%psnxy ) ) THEN DEALLOCATE(grid%psnxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%psnxy. ') endif ENDIF IF ( ASSOCIATED( grid%savxy ) ) THEN DEALLOCATE(grid%savxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%savxy. ') endif ENDIF IF ( ASSOCIATED( grid%sagxy ) ) THEN DEALLOCATE(grid%sagxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sagxy. ') endif ENDIF IF ( ASSOCIATED( grid%rssunxy ) ) THEN DEALLOCATE(grid%rssunxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rssunxy. ') endif ENDIF IF ( ASSOCIATED( grid%rsshaxy ) ) THEN DEALLOCATE(grid%rsshaxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rsshaxy. ') endif ENDIF IF ( ASSOCIATED( grid%bgapxy ) ) THEN DEALLOCATE(grid%bgapxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bgapxy. ') endif ENDIF IF ( ASSOCIATED( grid%wgapxy ) ) THEN DEALLOCATE(grid%wgapxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wgapxy. ') endif ENDIF IF ( ASSOCIATED( grid%tgvxy ) ) THEN DEALLOCATE(grid%tgvxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tgvxy. ') endif ENDIF IF ( ASSOCIATED( grid%tgbxy ) ) THEN DEALLOCATE(grid%tgbxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tgbxy. ') endif ENDIF IF ( ASSOCIATED( grid%chvxy ) ) THEN DEALLOCATE(grid%chvxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%chvxy. ') endif ENDIF IF ( ASSOCIATED( grid%chbxy ) ) THEN DEALLOCATE(grid%chbxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%chbxy. ') endif ENDIF IF ( ASSOCIATED( grid%shgxy ) ) THEN DEALLOCATE(grid%shgxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%shgxy. ') endif ENDIF IF ( ASSOCIATED( grid%shcxy ) ) THEN DEALLOCATE(grid%shcxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%shcxy. ') endif ENDIF IF ( ASSOCIATED( grid%shbxy ) ) THEN DEALLOCATE(grid%shbxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%shbxy. ') endif ENDIF IF ( ASSOCIATED( grid%evgxy ) ) THEN DEALLOCATE(grid%evgxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%evgxy. ') endif ENDIF IF ( ASSOCIATED( grid%evbxy ) ) THEN DEALLOCATE(grid%evbxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%evbxy. ') endif ENDIF IF ( ASSOCIATED( grid%ghvxy ) ) THEN DEALLOCATE(grid%ghvxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ghvxy. ') endif ENDIF IF ( ASSOCIATED( grid%ghbxy ) ) THEN DEALLOCATE(grid%ghbxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ghbxy. ') endif ENDIF IF ( ASSOCIATED( grid%irgxy ) ) THEN DEALLOCATE(grid%irgxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%irgxy. ') endif ENDIF IF ( ASSOCIATED( grid%ircxy ) ) THEN DEALLOCATE(grid%ircxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ircxy. ') endif ENDIF IF ( ASSOCIATED( grid%irbxy ) ) THEN DEALLOCATE(grid%irbxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%irbxy. ') endif ENDIF IF ( ASSOCIATED( grid%trxy ) ) THEN DEALLOCATE(grid%trxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%trxy. ') endif ENDIF IF ( ASSOCIATED( grid%evcxy ) ) THEN DEALLOCATE(grid%evcxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%evcxy. ') endif ENDIF IF ( ASSOCIATED( grid%chleafxy ) ) THEN DEALLOCATE(grid%chleafxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%chleafxy. ') endif ENDIF IF ( ASSOCIATED( grid%chucxy ) ) THEN DEALLOCATE(grid%chucxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%chucxy. ') endif ENDIF IF ( ASSOCIATED( grid%chv2xy ) ) THEN DEALLOCATE(grid%chv2xy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%chv2xy. ') endif ENDIF IF ( ASSOCIATED( grid%chb2xy ) ) THEN DEALLOCATE(grid%chb2xy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%chb2xy. ') endif ENDIF IF ( ASSOCIATED( grid%chstarxy ) ) THEN DEALLOCATE(grid%chstarxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%chstarxy. ') endif ENDIF IF ( ASSOCIATED( grid%mp_restart_state ) ) THEN DEALLOCATE(grid%mp_restart_state,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mp_restart_state. ') endif ENDIF IF ( ASSOCIATED( grid%tbpvs_state ) ) THEN DEALLOCATE(grid%tbpvs_state,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tbpvs_state. ') endif ENDIF IF ( ASSOCIATED( grid%tbpvs0_state ) ) THEN DEALLOCATE(grid%tbpvs0_state,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tbpvs0_state. ') endif ENDIF IF ( ASSOCIATED( grid%lu_state ) ) THEN DEALLOCATE(grid%lu_state,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lu_state. ') endif ENDIF IF ( ASSOCIATED( grid%t_phy ) ) THEN DEALLOCATE(grid%t_phy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_phy. ') endif ENDIF IF ( ASSOCIATED( grid%tmn ) ) THEN DEALLOCATE(grid%tmn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tmn. ') endif ENDIF IF ( ASSOCIATED( grid%tyr ) ) THEN DEALLOCATE(grid%tyr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tyr. ') endif ENDIF IF ( ASSOCIATED( grid%tyra ) ) THEN DEALLOCATE(grid%tyra,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tyra. ') endif ENDIF IF ( ASSOCIATED( grid%tdly ) ) THEN DEALLOCATE(grid%tdly,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tdly. ') endif ENDIF IF ( ASSOCIATED( grid%tlag ) ) THEN DEALLOCATE(grid%tlag,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tlag. ') endif ENDIF IF ( ASSOCIATED( grid%xland ) ) THEN DEALLOCATE(grid%xland,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xland. ') endif ENDIF IF ( ASSOCIATED( grid%znt ) ) THEN DEALLOCATE(grid%znt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%znt. ') endif ENDIF IF ( ASSOCIATED( grid%ck ) ) THEN DEALLOCATE(grid%ck,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ck. ') endif ENDIF IF ( ASSOCIATED( grid%cka ) ) THEN DEALLOCATE(grid%cka,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cka. ') endif ENDIF IF ( ASSOCIATED( grid%cd ) ) THEN DEALLOCATE(grid%cd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cd. ') endif ENDIF IF ( ASSOCIATED( grid%cda ) ) THEN DEALLOCATE(grid%cda,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cda. ') endif ENDIF IF ( ASSOCIATED( grid%ust ) ) THEN DEALLOCATE(grid%ust,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ust. ') endif ENDIF IF ( ASSOCIATED( grid%ustm ) ) THEN DEALLOCATE(grid%ustm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ustm. ') endif ENDIF IF ( ASSOCIATED( grid%rmol ) ) THEN DEALLOCATE(grid%rmol,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rmol. ') endif ENDIF IF ( ASSOCIATED( grid%mol ) ) THEN DEALLOCATE(grid%mol,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mol. ') endif ENDIF IF ( ASSOCIATED( grid%pblh ) ) THEN DEALLOCATE(grid%pblh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pblh. ') endif ENDIF IF ( ASSOCIATED( grid%capg ) ) THEN DEALLOCATE(grid%capg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%capg. ') endif ENDIF IF ( ASSOCIATED( grid%thc ) ) THEN DEALLOCATE(grid%thc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%thc. ') endif ENDIF IF ( ASSOCIATED( grid%hfx ) ) THEN DEALLOCATE(grid%hfx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hfx. ') endif ENDIF IF ( ASSOCIATED( grid%qfx ) ) THEN DEALLOCATE(grid%qfx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qfx. ') endif ENDIF IF ( ASSOCIATED( grid%lh ) ) THEN DEALLOCATE(grid%lh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lh. ') endif ENDIF IF ( ASSOCIATED( grid%achfx ) ) THEN DEALLOCATE(grid%achfx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%achfx. ') endif ENDIF IF ( ASSOCIATED( grid%aclhf ) ) THEN DEALLOCATE(grid%aclhf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aclhf. ') endif ENDIF IF ( ASSOCIATED( grid%flhc ) ) THEN DEALLOCATE(grid%flhc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%flhc. ') endif ENDIF IF ( ASSOCIATED( grid%flqc ) ) THEN DEALLOCATE(grid%flqc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%flqc. ') endif ENDIF IF ( ASSOCIATED( grid%qsg ) ) THEN DEALLOCATE(grid%qsg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qsg. ') endif ENDIF IF ( ASSOCIATED( grid%qvg ) ) THEN DEALLOCATE(grid%qvg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qvg. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_qvg ) ) THEN DEALLOCATE(grid%dfi_qvg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_qvg. ') endif ENDIF IF ( ASSOCIATED( grid%qcg ) ) THEN DEALLOCATE(grid%qcg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qcg. ') endif ENDIF IF ( ASSOCIATED( grid%dew ) ) THEN DEALLOCATE(grid%dew,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dew. ') endif ENDIF IF ( ASSOCIATED( grid%soilt1 ) ) THEN DEALLOCATE(grid%soilt1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilt1. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_soilt1 ) ) THEN DEALLOCATE(grid%dfi_soilt1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_soilt1. ') endif ENDIF IF ( ASSOCIATED( grid%tsnav ) ) THEN DEALLOCATE(grid%tsnav,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tsnav. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_tsnav ) ) THEN DEALLOCATE(grid%dfi_tsnav,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_tsnav. ') endif ENDIF IF ( ASSOCIATED( grid%regime ) ) THEN DEALLOCATE(grid%regime,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%regime. ') endif ENDIF IF ( ASSOCIATED( grid%snowc ) ) THEN DEALLOCATE(grid%snowc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowc. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_snowc ) ) THEN DEALLOCATE(grid%dfi_snowc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_snowc. ') endif ENDIF IF ( ASSOCIATED( grid%mavail ) ) THEN DEALLOCATE(grid%mavail,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mavail. ') endif ENDIF IF ( ASSOCIATED( grid%tkesfcf ) ) THEN DEALLOCATE(grid%tkesfcf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tkesfcf. ') endif ENDIF IF ( ASSOCIATED( grid%sr ) ) THEN DEALLOCATE(grid%sr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sr. ') endif ENDIF IF ( ASSOCIATED( grid%potevp ) ) THEN DEALLOCATE(grid%potevp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%potevp. ') endif ENDIF IF ( ASSOCIATED( grid%snopcx ) ) THEN DEALLOCATE(grid%snopcx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snopcx. ') endif ENDIF IF ( ASSOCIATED( grid%soiltb ) ) THEN DEALLOCATE(grid%soiltb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soiltb. ') endif ENDIF IF ( ASSOCIATED( grid%taucldi ) ) THEN DEALLOCATE(grid%taucldi,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%taucldi. ') endif ENDIF IF ( ASSOCIATED( grid%taucldc ) ) THEN DEALLOCATE(grid%taucldc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%taucldc. ') endif ENDIF IF ( ASSOCIATED( grid%defor11 ) ) THEN DEALLOCATE(grid%defor11,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%defor11. ') endif ENDIF IF ( ASSOCIATED( grid%defor22 ) ) THEN DEALLOCATE(grid%defor22,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%defor22. ') endif ENDIF IF ( ASSOCIATED( grid%defor12 ) ) THEN DEALLOCATE(grid%defor12,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%defor12. ') endif ENDIF IF ( ASSOCIATED( grid%defor33 ) ) THEN DEALLOCATE(grid%defor33,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%defor33. ') endif ENDIF IF ( ASSOCIATED( grid%defor13 ) ) THEN DEALLOCATE(grid%defor13,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%defor13. ') endif ENDIF IF ( ASSOCIATED( grid%defor23 ) ) THEN DEALLOCATE(grid%defor23,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%defor23. ') endif ENDIF IF ( ASSOCIATED( grid%xkmv ) ) THEN DEALLOCATE(grid%xkmv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xkmv. ') endif ENDIF IF ( ASSOCIATED( grid%xkmh ) ) THEN DEALLOCATE(grid%xkmh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xkmh. ') endif ENDIF IF ( ASSOCIATED( grid%xkhv ) ) THEN DEALLOCATE(grid%xkhv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xkhv. ') endif ENDIF IF ( ASSOCIATED( grid%xkhh ) ) THEN DEALLOCATE(grid%xkhh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xkhh. ') endif ENDIF IF ( ASSOCIATED( grid%div ) ) THEN DEALLOCATE(grid%div,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%div. ') endif ENDIF IF ( ASSOCIATED( grid%bn2 ) ) THEN DEALLOCATE(grid%bn2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bn2. ') endif ENDIF IF ( ASSOCIATED( grid%rundgdten ) ) THEN DEALLOCATE(grid%rundgdten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rundgdten. ') endif ENDIF IF ( ASSOCIATED( grid%rvndgdten ) ) THEN DEALLOCATE(grid%rvndgdten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rvndgdten. ') endif ENDIF IF ( ASSOCIATED( grid%rthndgdten ) ) THEN DEALLOCATE(grid%rthndgdten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rthndgdten. ') endif ENDIF IF ( ASSOCIATED( grid%rphndgdten ) ) THEN DEALLOCATE(grid%rphndgdten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rphndgdten. ') endif ENDIF IF ( ASSOCIATED( grid%rqvndgdten ) ) THEN DEALLOCATE(grid%rqvndgdten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqvndgdten. ') endif ENDIF IF ( ASSOCIATED( grid%rmundgdten ) ) THEN DEALLOCATE(grid%rmundgdten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rmundgdten. ') endif ENDIF IF ( ASSOCIATED( grid%fdda3d ) ) THEN DEALLOCATE(grid%fdda3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdda3d. ') endif ENDIF IF ( ASSOCIATED( grid%fdda2d ) ) THEN DEALLOCATE(grid%fdda2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdda2d. ') endif ENDIF IF ( ASSOCIATED( grid%u10_ndg_old ) ) THEN DEALLOCATE(grid%u10_ndg_old,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u10_ndg_old. ') endif ENDIF IF ( ASSOCIATED( grid%u10_ndg_new ) ) THEN DEALLOCATE(grid%u10_ndg_new,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u10_ndg_new. ') endif ENDIF IF ( ASSOCIATED( grid%v10_ndg_old ) ) THEN DEALLOCATE(grid%v10_ndg_old,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v10_ndg_old. ') endif ENDIF IF ( ASSOCIATED( grid%v10_ndg_new ) ) THEN DEALLOCATE(grid%v10_ndg_new,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v10_ndg_new. ') endif ENDIF IF ( ASSOCIATED( grid%t2_ndg_old ) ) THEN DEALLOCATE(grid%t2_ndg_old,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t2_ndg_old. ') endif ENDIF IF ( ASSOCIATED( grid%t2_ndg_new ) ) THEN DEALLOCATE(grid%t2_ndg_new,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t2_ndg_new. ') endif ENDIF IF ( ASSOCIATED( grid%th2_ndg_old ) ) THEN DEALLOCATE(grid%th2_ndg_old,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%th2_ndg_old. ') endif ENDIF IF ( ASSOCIATED( grid%th2_ndg_new ) ) THEN DEALLOCATE(grid%th2_ndg_new,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%th2_ndg_new. ') endif ENDIF IF ( ASSOCIATED( grid%q2_ndg_old ) ) THEN DEALLOCATE(grid%q2_ndg_old,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2_ndg_old. ') endif ENDIF IF ( ASSOCIATED( grid%q2_ndg_new ) ) THEN DEALLOCATE(grid%q2_ndg_new,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2_ndg_new. ') endif ENDIF IF ( ASSOCIATED( grid%rh_ndg_old ) ) THEN DEALLOCATE(grid%rh_ndg_old,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rh_ndg_old. ') endif ENDIF IF ( ASSOCIATED( grid%rh_ndg_new ) ) THEN DEALLOCATE(grid%rh_ndg_new,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rh_ndg_new. ') endif ENDIF IF ( ASSOCIATED( grid%psl_ndg_old ) ) THEN DEALLOCATE(grid%psl_ndg_old,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%psl_ndg_old. ') endif ENDIF IF ( ASSOCIATED( grid%psl_ndg_new ) ) THEN DEALLOCATE(grid%psl_ndg_new,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%psl_ndg_new. ') endif ENDIF IF ( ASSOCIATED( grid%ps_ndg_old ) ) THEN DEALLOCATE(grid%ps_ndg_old,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ps_ndg_old. ') endif ENDIF IF ( ASSOCIATED( grid%ps_ndg_new ) ) THEN DEALLOCATE(grid%ps_ndg_new,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ps_ndg_new. ') endif ENDIF IF ( ASSOCIATED( grid%tob_ndg_old ) ) THEN DEALLOCATE(grid%tob_ndg_old,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tob_ndg_old. ') endif ENDIF IF ( ASSOCIATED( grid%odis_ndg_old ) ) THEN DEALLOCATE(grid%odis_ndg_old,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%odis_ndg_old. ') endif ENDIF IF ( ASSOCIATED( grid%tob_ndg_new ) ) THEN DEALLOCATE(grid%tob_ndg_new,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tob_ndg_new. ') endif ENDIF IF ( ASSOCIATED( grid%odis_ndg_new ) ) THEN DEALLOCATE(grid%odis_ndg_new,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%odis_ndg_new. ') endif ENDIF IF ( ASSOCIATED( grid%sn_ndg_new ) ) THEN DEALLOCATE(grid%sn_ndg_new,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sn_ndg_new. ') endif ENDIF IF ( ASSOCIATED( grid%sn_ndg_old ) ) THEN DEALLOCATE(grid%sn_ndg_old,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sn_ndg_old. ') endif ENDIF IF ( ASSOCIATED( grid%abstot ) ) THEN DEALLOCATE(grid%abstot,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%abstot. ') endif ENDIF IF ( ASSOCIATED( grid%absnxt ) ) THEN DEALLOCATE(grid%absnxt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%absnxt. ') endif ENDIF IF ( ASSOCIATED( grid%emstot ) ) THEN DEALLOCATE(grid%emstot,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%emstot. ') endif ENDIF IF ( ASSOCIATED( grid%dpsdt ) ) THEN DEALLOCATE(grid%dpsdt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dpsdt. ') endif ENDIF IF ( ASSOCIATED( grid%dmudt ) ) THEN DEALLOCATE(grid%dmudt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dmudt. ') endif ENDIF IF ( ASSOCIATED( grid%pk1m ) ) THEN DEALLOCATE(grid%pk1m,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pk1m. ') endif ENDIF IF ( ASSOCIATED( grid%mu_2m ) ) THEN DEALLOCATE(grid%mu_2m,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mu_2m. ') endif ENDIF IF ( ASSOCIATED( grid%wspd10max ) ) THEN DEALLOCATE(grid%wspd10max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wspd10max. ') endif ENDIF IF ( ASSOCIATED( grid%w_up_max ) ) THEN DEALLOCATE(grid%w_up_max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_up_max. ') endif ENDIF IF ( ASSOCIATED( grid%w_dn_max ) ) THEN DEALLOCATE(grid%w_dn_max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_dn_max. ') endif ENDIF IF ( ASSOCIATED( grid%refd_max ) ) THEN DEALLOCATE(grid%refd_max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%refd_max. ') endif ENDIF IF ( ASSOCIATED( grid%up_heli_max ) ) THEN DEALLOCATE(grid%up_heli_max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%up_heli_max. ') endif ENDIF IF ( ASSOCIATED( grid%w_mean ) ) THEN DEALLOCATE(grid%w_mean,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_mean. ') endif ENDIF IF ( ASSOCIATED( grid%grpl_max ) ) THEN DEALLOCATE(grid%grpl_max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%grpl_max. ') endif ENDIF IF ( ASSOCIATED( grid%uh ) ) THEN DEALLOCATE(grid%uh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uh. ') endif ENDIF IF ( ASSOCIATED( grid%prec_acc_c ) ) THEN DEALLOCATE(grid%prec_acc_c,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%prec_acc_c. ') endif ENDIF IF ( ASSOCIATED( grid%prec_acc_nc ) ) THEN DEALLOCATE(grid%prec_acc_nc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%prec_acc_nc. ') endif ENDIF IF ( ASSOCIATED( grid%snow_acc_nc ) ) THEN DEALLOCATE(grid%snow_acc_nc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snow_acc_nc. ') endif ENDIF IF ( ASSOCIATED( grid%advh_t ) ) THEN DEALLOCATE(grid%advh_t,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%advh_t. ') endif ENDIF IF ( ASSOCIATED( grid%advz_t ) ) THEN DEALLOCATE(grid%advz_t,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%advz_t. ') endif ENDIF IF ( ASSOCIATED( grid%tml ) ) THEN DEALLOCATE(grid%tml,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tml. ') endif ENDIF IF ( ASSOCIATED( grid%t0ml ) ) THEN DEALLOCATE(grid%t0ml,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t0ml. ') endif ENDIF IF ( ASSOCIATED( grid%hml ) ) THEN DEALLOCATE(grid%hml,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hml. ') endif ENDIF IF ( ASSOCIATED( grid%h0ml ) ) THEN DEALLOCATE(grid%h0ml,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h0ml. ') endif ENDIF IF ( ASSOCIATED( grid%huml ) ) THEN DEALLOCATE(grid%huml,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%huml. ') endif ENDIF IF ( ASSOCIATED( grid%hvml ) ) THEN DEALLOCATE(grid%hvml,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hvml. ') endif ENDIF IF ( ASSOCIATED( grid%tmoml ) ) THEN DEALLOCATE(grid%tmoml,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tmoml. ') endif ENDIF IF ( ASSOCIATED( grid%track_z ) ) THEN DEALLOCATE(grid%track_z,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_z. ') endif ENDIF IF ( ASSOCIATED( grid%track_t ) ) THEN DEALLOCATE(grid%track_t,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_t. ') endif ENDIF IF ( ASSOCIATED( grid%track_p ) ) THEN DEALLOCATE(grid%track_p,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_p. ') endif ENDIF IF ( ASSOCIATED( grid%track_u ) ) THEN DEALLOCATE(grid%track_u,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_u. ') endif ENDIF IF ( ASSOCIATED( grid%track_v ) ) THEN DEALLOCATE(grid%track_v,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_v. ') endif ENDIF IF ( ASSOCIATED( grid%track_w ) ) THEN DEALLOCATE(grid%track_w,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_w. ') endif ENDIF IF ( ASSOCIATED( grid%track_rh ) ) THEN DEALLOCATE(grid%track_rh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_rh. ') endif ENDIF IF ( ASSOCIATED( grid%track_alt ) ) THEN DEALLOCATE(grid%track_alt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_alt. ') endif ENDIF IF ( ASSOCIATED( grid%track_ele ) ) THEN DEALLOCATE(grid%track_ele,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_ele. ') endif ENDIF IF ( ASSOCIATED( grid%track_aircraft ) ) THEN DEALLOCATE(grid%track_aircraft,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_aircraft. ') endif ENDIF IF ( ASSOCIATED( grid%track_qcloud ) ) THEN DEALLOCATE(grid%track_qcloud,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_qcloud. ') endif ENDIF IF ( ASSOCIATED( grid%track_qrain ) ) THEN DEALLOCATE(grid%track_qrain,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_qrain. ') endif ENDIF IF ( ASSOCIATED( grid%track_qice ) ) THEN DEALLOCATE(grid%track_qice,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_qice. ') endif ENDIF IF ( ASSOCIATED( grid%track_qsnow ) ) THEN DEALLOCATE(grid%track_qsnow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_qsnow. ') endif ENDIF IF ( ASSOCIATED( grid%track_qgraup ) ) THEN DEALLOCATE(grid%track_qgraup,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_qgraup. ') endif ENDIF IF ( ASSOCIATED( grid%track_qvapor ) ) THEN DEALLOCATE(grid%track_qvapor,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_qvapor. ') endif ENDIF IF ( ASSOCIATED( grid%ic_flashcount ) ) THEN DEALLOCATE(grid%ic_flashcount,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ic_flashcount. ') endif ENDIF IF ( ASSOCIATED( grid%ic_flashrate ) ) THEN DEALLOCATE(grid%ic_flashrate,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ic_flashrate. ') endif ENDIF IF ( ASSOCIATED( grid%cg_flashcount ) ) THEN DEALLOCATE(grid%cg_flashcount,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cg_flashcount. ') endif ENDIF IF ( ASSOCIATED( grid%cg_flashrate ) ) THEN DEALLOCATE(grid%cg_flashrate,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cg_flashrate. ') endif ENDIF IF ( ASSOCIATED( grid%iccg_in_num ) ) THEN DEALLOCATE(grid%iccg_in_num,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iccg_in_num. ') endif ENDIF IF ( ASSOCIATED( grid%iccg_in_den ) ) THEN DEALLOCATE(grid%iccg_in_den,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iccg_in_den. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%varobs ) ) THEN DEALLOCATE(grid%fdob%varobs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%varobs. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%errf ) ) THEN DEALLOCATE(grid%fdob%errf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%errf. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%timeob ) ) THEN DEALLOCATE(grid%fdob%timeob,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%timeob. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%nlevs_ob ) ) THEN DEALLOCATE(grid%fdob%nlevs_ob,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%nlevs_ob. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%lev_in_ob ) ) THEN DEALLOCATE(grid%fdob%lev_in_ob,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%lev_in_ob. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%plfo ) ) THEN DEALLOCATE(grid%fdob%plfo,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%plfo. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%elevob ) ) THEN DEALLOCATE(grid%fdob%elevob,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%elevob. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%rio ) ) THEN DEALLOCATE(grid%fdob%rio,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%rio. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%rjo ) ) THEN DEALLOCATE(grid%fdob%rjo,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%rjo. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%rko ) ) THEN DEALLOCATE(grid%fdob%rko,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%rko. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%obsprt ) ) THEN DEALLOCATE(grid%fdob%obsprt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%obsprt. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%latprt ) ) THEN DEALLOCATE(grid%fdob%latprt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%latprt. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%lonprt ) ) THEN DEALLOCATE(grid%fdob%lonprt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%lonprt. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%mlatprt ) ) THEN DEALLOCATE(grid%fdob%mlatprt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%mlatprt. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%mlonprt ) ) THEN DEALLOCATE(grid%fdob%mlonprt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%mlonprt. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%stnidprt ) ) THEN DEALLOCATE(grid%fdob%stnidprt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%stnidprt. ') endif ENDIF IF ( ASSOCIATED( grid%fdob%base_state ) ) THEN DEALLOCATE(grid%fdob%base_state,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdob%base_state. ') endif ENDIF IF ( ASSOCIATED( grid%t_xxx ) ) THEN DEALLOCATE(grid%t_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%u_xxx ) ) THEN DEALLOCATE(grid%u_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%ru_xxx ) ) THEN DEALLOCATE(grid%ru_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ru_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%v_xxx ) ) THEN DEALLOCATE(grid%v_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%rv_xxx ) ) THEN DEALLOCATE(grid%rv_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rv_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%w_xxx ) ) THEN DEALLOCATE(grid%w_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%ww_xxx ) ) THEN DEALLOCATE(grid%ww_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ww_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%ph_xxx ) ) THEN DEALLOCATE(grid%ph_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ph_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%dum_yyy ) ) THEN DEALLOCATE(grid%dum_yyy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dum_yyy. ') endif ENDIF IF ( ASSOCIATED( grid%fourd_xxx ) ) THEN DEALLOCATE(grid%fourd_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fourd_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%clat_xxx ) ) THEN DEALLOCATE(grid%clat_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%clat_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%ht_xxx ) ) THEN DEALLOCATE(grid%ht_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ht_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%mf_xxx ) ) THEN DEALLOCATE(grid%mf_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mf_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%dif_analysis ) ) THEN DEALLOCATE(grid%dif_analysis,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dif_analysis. ') endif ENDIF IF ( ASSOCIATED( grid%dif_xxx ) ) THEN DEALLOCATE(grid%dif_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dif_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%dif_yyy ) ) THEN DEALLOCATE(grid%dif_yyy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dif_yyy. ') endif ENDIF IF ( ASSOCIATED( grid%lfn_hist ) ) THEN DEALLOCATE(grid%lfn_hist,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lfn_hist. ') endif ENDIF IF ( ASSOCIATED( grid%lfn_time ) ) THEN DEALLOCATE(grid%lfn_time,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lfn_time. ') endif ENDIF IF ( ASSOCIATED( grid%nfuel_cat ) ) THEN DEALLOCATE(grid%nfuel_cat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%nfuel_cat. ') endif ENDIF IF ( ASSOCIATED( grid%zsf ) ) THEN DEALLOCATE(grid%zsf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zsf. ') endif ENDIF IF ( ASSOCIATED( grid%dzdxf ) ) THEN DEALLOCATE(grid%dzdxf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzdxf. ') endif ENDIF IF ( ASSOCIATED( grid%dzdyf ) ) THEN DEALLOCATE(grid%dzdyf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzdyf. ') endif ENDIF IF ( ASSOCIATED( grid%tign_g ) ) THEN DEALLOCATE(grid%tign_g,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tign_g. ') endif ENDIF IF ( ASSOCIATED( grid%rthfrten ) ) THEN DEALLOCATE(grid%rthfrten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rthfrten. ') endif ENDIF IF ( ASSOCIATED( grid%rqvfrten ) ) THEN DEALLOCATE(grid%rqvfrten,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rqvfrten. ') endif ENDIF IF ( ASSOCIATED( grid%avg_fuel_frac ) ) THEN DEALLOCATE(grid%avg_fuel_frac,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%avg_fuel_frac. ') endif ENDIF IF ( ASSOCIATED( grid%grnhfx ) ) THEN DEALLOCATE(grid%grnhfx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%grnhfx. ') endif ENDIF IF ( ASSOCIATED( grid%grnqfx ) ) THEN DEALLOCATE(grid%grnqfx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%grnqfx. ') endif ENDIF IF ( ASSOCIATED( grid%canhfx ) ) THEN DEALLOCATE(grid%canhfx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%canhfx. ') endif ENDIF IF ( ASSOCIATED( grid%canqfx ) ) THEN DEALLOCATE(grid%canqfx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%canqfx. ') endif ENDIF IF ( ASSOCIATED( grid%uah ) ) THEN DEALLOCATE(grid%uah,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uah. ') endif ENDIF IF ( ASSOCIATED( grid%vah ) ) THEN DEALLOCATE(grid%vah,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vah. ') endif ENDIF IF ( ASSOCIATED( grid%lfn ) ) THEN DEALLOCATE(grid%lfn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lfn. ') endif ENDIF IF ( ASSOCIATED( grid%fuel_frac ) ) THEN DEALLOCATE(grid%fuel_frac,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fuel_frac. ') endif ENDIF IF ( ASSOCIATED( grid%fire_area ) ) THEN DEALLOCATE(grid%fire_area,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fire_area. ') endif ENDIF IF ( ASSOCIATED( grid%uf ) ) THEN DEALLOCATE(grid%uf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uf. ') endif ENDIF IF ( ASSOCIATED( grid%vf ) ) THEN DEALLOCATE(grid%vf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vf. ') endif ENDIF IF ( ASSOCIATED( grid%fgrnhfx ) ) THEN DEALLOCATE(grid%fgrnhfx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fgrnhfx. ') endif ENDIF IF ( ASSOCIATED( grid%fgrnqfx ) ) THEN DEALLOCATE(grid%fgrnqfx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fgrnqfx. ') endif ENDIF IF ( ASSOCIATED( grid%fcanhfx ) ) THEN DEALLOCATE(grid%fcanhfx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fcanhfx. ') endif ENDIF IF ( ASSOCIATED( grid%fcanqfx ) ) THEN DEALLOCATE(grid%fcanqfx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fcanqfx. ') endif ENDIF IF ( ASSOCIATED( grid%ros ) ) THEN DEALLOCATE(grid%ros,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ros. ') endif ENDIF IF ( ASSOCIATED( grid%fxlong ) ) THEN DEALLOCATE(grid%fxlong,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fxlong. ') endif ENDIF IF ( ASSOCIATED( grid%fxlat ) ) THEN DEALLOCATE(grid%fxlat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fxlat. ') endif ENDIF IF ( ASSOCIATED( grid%fuel_time ) ) THEN DEALLOCATE(grid%fuel_time,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fuel_time. ') endif ENDIF IF ( ASSOCIATED( grid%bbb ) ) THEN DEALLOCATE(grid%bbb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bbb. ') endif ENDIF IF ( ASSOCIATED( grid%betafl ) ) THEN DEALLOCATE(grid%betafl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%betafl. ') endif ENDIF IF ( ASSOCIATED( grid%phiwc ) ) THEN DEALLOCATE(grid%phiwc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%phiwc. ') endif ENDIF IF ( ASSOCIATED( grid%r_0 ) ) THEN DEALLOCATE(grid%r_0,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%r_0. ') endif ENDIF IF ( ASSOCIATED( grid%fgip ) ) THEN DEALLOCATE(grid%fgip,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fgip. ') endif ENDIF IF ( ASSOCIATED( grid%ischap ) ) THEN DEALLOCATE(grid%ischap,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ischap. ') endif ENDIF IF ( ASSOCIATED( grid%avgflx_rum ) ) THEN DEALLOCATE(grid%avgflx_rum,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%avgflx_rum. ') endif ENDIF IF ( ASSOCIATED( grid%avgflx_rvm ) ) THEN DEALLOCATE(grid%avgflx_rvm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%avgflx_rvm. ') endif ENDIF IF ( ASSOCIATED( grid%avgflx_wwm ) ) THEN DEALLOCATE(grid%avgflx_wwm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%avgflx_wwm. ') endif ENDIF IF ( ASSOCIATED( grid%avgflx_cfu1 ) ) THEN DEALLOCATE(grid%avgflx_cfu1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%avgflx_cfu1. ') endif ENDIF IF ( ASSOCIATED( grid%avgflx_cfd1 ) ) THEN DEALLOCATE(grid%avgflx_cfd1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%avgflx_cfd1. ') endif ENDIF IF ( ASSOCIATED( grid%avgflx_dfu1 ) ) THEN DEALLOCATE(grid%avgflx_dfu1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%avgflx_dfu1. ') endif ENDIF IF ( ASSOCIATED( grid%avgflx_efu1 ) ) THEN DEALLOCATE(grid%avgflx_efu1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%avgflx_efu1. ') endif ENDIF IF ( ASSOCIATED( grid%avgflx_dfd1 ) ) THEN DEALLOCATE(grid%avgflx_dfd1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%avgflx_dfd1. ') endif ENDIF IF ( ASSOCIATED( grid%avgflx_efd1 ) ) THEN DEALLOCATE(grid%avgflx_efd1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%avgflx_efd1. ') endif ENDIF IF ( ASSOCIATED( grid%cfu1 ) ) THEN DEALLOCATE(grid%cfu1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cfu1. ') endif ENDIF IF ( ASSOCIATED( grid%cfd1 ) ) THEN DEALLOCATE(grid%cfd1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cfd1. ') endif ENDIF IF ( ASSOCIATED( grid%dfu1 ) ) THEN DEALLOCATE(grid%dfu1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfu1. ') endif ENDIF IF ( ASSOCIATED( grid%efu1 ) ) THEN DEALLOCATE(grid%efu1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%efu1. ') endif ENDIF IF ( ASSOCIATED( grid%dfd1 ) ) THEN DEALLOCATE(grid%dfd1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfd1. ') endif ENDIF IF ( ASSOCIATED( grid%efd1 ) ) THEN DEALLOCATE(grid%efd1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%efd1. ') endif ENDIF IF ( ASSOCIATED( grid%vertstrucc ) ) THEN DEALLOCATE(grid%vertstrucc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vertstrucc. ') endif ENDIF IF ( ASSOCIATED( grid%vertstrucs ) ) THEN DEALLOCATE(grid%vertstrucs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vertstrucs. ') endif ENDIF IF ( ASSOCIATED( grid%ru_tendf_stoch ) ) THEN DEALLOCATE(grid%ru_tendf_stoch,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ru_tendf_stoch. ') endif ENDIF IF ( ASSOCIATED( grid%rv_tendf_stoch ) ) THEN DEALLOCATE(grid%rv_tendf_stoch,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rv_tendf_stoch. ') endif ENDIF IF ( ASSOCIATED( grid%rt_tendf_stoch ) ) THEN DEALLOCATE(grid%rt_tendf_stoch,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rt_tendf_stoch. ') endif ENDIF IF ( ASSOCIATED( grid%spstreamforcc ) ) THEN DEALLOCATE(grid%spstreamforcc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%spstreamforcc. ') endif ENDIF IF ( ASSOCIATED( grid%spstreamforcs ) ) THEN DEALLOCATE(grid%spstreamforcs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%spstreamforcs. ') endif ENDIF IF ( ASSOCIATED( grid%sptforcc ) ) THEN DEALLOCATE(grid%sptforcc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sptforcc. ') endif ENDIF IF ( ASSOCIATED( grid%sptforcs ) ) THEN DEALLOCATE(grid%sptforcs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sptforcs. ') endif ENDIF IF ( ASSOCIATED( grid%spstream_amp ) ) THEN DEALLOCATE(grid%spstream_amp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%spstream_amp. ') endif ENDIF IF ( ASSOCIATED( grid%spt_amp ) ) THEN DEALLOCATE(grid%spt_amp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%spt_amp. ') endif ENDIF IF ( ASSOCIATED( grid%ru_real ) ) THEN DEALLOCATE(grid%ru_real,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ru_real. ') endif ENDIF IF ( ASSOCIATED( grid%ru_imag ) ) THEN DEALLOCATE(grid%ru_imag,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ru_imag. ') endif ENDIF IF ( ASSOCIATED( grid%ru_real_xxx ) ) THEN DEALLOCATE(grid%ru_real_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ru_real_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%ru_real_yyy ) ) THEN DEALLOCATE(grid%ru_real_yyy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ru_real_yyy. ') endif ENDIF IF ( ASSOCIATED( grid%ru_imag_xxx ) ) THEN DEALLOCATE(grid%ru_imag_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ru_imag_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%ru_imag_yyy ) ) THEN DEALLOCATE(grid%ru_imag_yyy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ru_imag_yyy. ') endif ENDIF IF ( ASSOCIATED( grid%rv_real ) ) THEN DEALLOCATE(grid%rv_real,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rv_real. ') endif ENDIF IF ( ASSOCIATED( grid%rv_imag ) ) THEN DEALLOCATE(grid%rv_imag,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rv_imag. ') endif ENDIF IF ( ASSOCIATED( grid%rv_real_xxx ) ) THEN DEALLOCATE(grid%rv_real_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rv_real_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%rv_real_yyy ) ) THEN DEALLOCATE(grid%rv_real_yyy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rv_real_yyy. ') endif ENDIF IF ( ASSOCIATED( grid%rv_imag_xxx ) ) THEN DEALLOCATE(grid%rv_imag_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rv_imag_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%rv_imag_yyy ) ) THEN DEALLOCATE(grid%rv_imag_yyy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rv_imag_yyy. ') endif ENDIF IF ( ASSOCIATED( grid%rt_real ) ) THEN DEALLOCATE(grid%rt_real,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rt_real. ') endif ENDIF IF ( ASSOCIATED( grid%rt_imag ) ) THEN DEALLOCATE(grid%rt_imag,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rt_imag. ') endif ENDIF IF ( ASSOCIATED( grid%rt_real_xxx ) ) THEN DEALLOCATE(grid%rt_real_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rt_real_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%rt_real_yyy ) ) THEN DEALLOCATE(grid%rt_real_yyy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rt_real_yyy. ') endif ENDIF IF ( ASSOCIATED( grid%rt_imag_xxx ) ) THEN DEALLOCATE(grid%rt_imag_xxx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rt_imag_xxx. ') endif ENDIF IF ( ASSOCIATED( grid%rt_imag_yyy ) ) THEN DEALLOCATE(grid%rt_imag_yyy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rt_imag_yyy. ') endif ENDIF IF ( ASSOCIATED( grid%nba_mij ) ) THEN DEALLOCATE(grid%nba_mij,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%nba_mij. ') endif ENDIF IF ( ASSOCIATED( grid%nba_rij ) ) THEN DEALLOCATE(grid%nba_rij,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%nba_rij. ') endif ENDIF IF ( ASSOCIATED( grid%tauresx2d ) ) THEN DEALLOCATE(grid%tauresx2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tauresx2d. ') endif ENDIF IF ( ASSOCIATED( grid%tauresy2d ) ) THEN DEALLOCATE(grid%tauresy2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tauresy2d. ') endif ENDIF IF ( ASSOCIATED( grid%tpert2d ) ) THEN DEALLOCATE(grid%tpert2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tpert2d. ') endif ENDIF IF ( ASSOCIATED( grid%qpert2d ) ) THEN DEALLOCATE(grid%qpert2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qpert2d. ') endif ENDIF IF ( ASSOCIATED( grid%wpert2d ) ) THEN DEALLOCATE(grid%wpert2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wpert2d. ') endif ENDIF IF ( ASSOCIATED( grid%turbtype3d ) ) THEN DEALLOCATE(grid%turbtype3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%turbtype3d. ') endif ENDIF IF ( ASSOCIATED( grid%smaw3d ) ) THEN DEALLOCATE(grid%smaw3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%smaw3d. ') endif ENDIF IF ( ASSOCIATED( grid%wsedl3d ) ) THEN DEALLOCATE(grid%wsedl3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wsedl3d. ') endif ENDIF IF ( ASSOCIATED( grid%rliq ) ) THEN DEALLOCATE(grid%rliq,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rliq. ') endif ENDIF IF ( ASSOCIATED( grid%dlf ) ) THEN DEALLOCATE(grid%dlf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dlf. ') endif ENDIF IF ( ASSOCIATED( grid%precz ) ) THEN DEALLOCATE(grid%precz,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%precz. ') endif ENDIF IF ( ASSOCIATED( grid%zmdt ) ) THEN DEALLOCATE(grid%zmdt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmdt. ') endif ENDIF IF ( ASSOCIATED( grid%zmdq ) ) THEN DEALLOCATE(grid%zmdq,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmdq. ') endif ENDIF IF ( ASSOCIATED( grid%zmdice ) ) THEN DEALLOCATE(grid%zmdice,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmdice. ') endif ENDIF IF ( ASSOCIATED( grid%zmdliq ) ) THEN DEALLOCATE(grid%zmdliq,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmdliq. ') endif ENDIF IF ( ASSOCIATED( grid%evaptzm ) ) THEN DEALLOCATE(grid%evaptzm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%evaptzm. ') endif ENDIF IF ( ASSOCIATED( grid%fzsntzm ) ) THEN DEALLOCATE(grid%fzsntzm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fzsntzm. ') endif ENDIF IF ( ASSOCIATED( grid%evsntzm ) ) THEN DEALLOCATE(grid%evsntzm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%evsntzm. ') endif ENDIF IF ( ASSOCIATED( grid%evapqzm ) ) THEN DEALLOCATE(grid%evapqzm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%evapqzm. ') endif ENDIF IF ( ASSOCIATED( grid%zmflxprc ) ) THEN DEALLOCATE(grid%zmflxprc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmflxprc. ') endif ENDIF IF ( ASSOCIATED( grid%zmflxsnw ) ) THEN DEALLOCATE(grid%zmflxsnw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmflxsnw. ') endif ENDIF IF ( ASSOCIATED( grid%zmntprpd ) ) THEN DEALLOCATE(grid%zmntprpd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmntprpd. ') endif ENDIF IF ( ASSOCIATED( grid%zmntsnpd ) ) THEN DEALLOCATE(grid%zmntsnpd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmntsnpd. ') endif ENDIF IF ( ASSOCIATED( grid%zmeiheat ) ) THEN DEALLOCATE(grid%zmeiheat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmeiheat. ') endif ENDIF IF ( ASSOCIATED( grid%cmfmcdzm ) ) THEN DEALLOCATE(grid%cmfmcdzm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cmfmcdzm. ') endif ENDIF IF ( ASSOCIATED( grid%preccdzm ) ) THEN DEALLOCATE(grid%preccdzm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%preccdzm. ') endif ENDIF IF ( ASSOCIATED( grid%pconvb ) ) THEN DEALLOCATE(grid%pconvb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pconvb. ') endif ENDIF IF ( ASSOCIATED( grid%pconvt ) ) THEN DEALLOCATE(grid%pconvt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pconvt. ') endif ENDIF IF ( ASSOCIATED( grid%cape ) ) THEN DEALLOCATE(grid%cape,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cape. ') endif ENDIF IF ( ASSOCIATED( grid%zmmtu ) ) THEN DEALLOCATE(grid%zmmtu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmmtu. ') endif ENDIF IF ( ASSOCIATED( grid%zmmtv ) ) THEN DEALLOCATE(grid%zmmtv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmmtv. ') endif ENDIF IF ( ASSOCIATED( grid%zmmu ) ) THEN DEALLOCATE(grid%zmmu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmmu. ') endif ENDIF IF ( ASSOCIATED( grid%zmmd ) ) THEN DEALLOCATE(grid%zmmd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmmd. ') endif ENDIF IF ( ASSOCIATED( grid%zmupgu ) ) THEN DEALLOCATE(grid%zmupgu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmupgu. ') endif ENDIF IF ( ASSOCIATED( grid%zmupgd ) ) THEN DEALLOCATE(grid%zmupgd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmupgd. ') endif ENDIF IF ( ASSOCIATED( grid%zmvpgu ) ) THEN DEALLOCATE(grid%zmvpgu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmvpgu. ') endif ENDIF IF ( ASSOCIATED( grid%zmvpgd ) ) THEN DEALLOCATE(grid%zmvpgd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmvpgd. ') endif ENDIF IF ( ASSOCIATED( grid%zmicuu ) ) THEN DEALLOCATE(grid%zmicuu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmicuu. ') endif ENDIF IF ( ASSOCIATED( grid%zmicud ) ) THEN DEALLOCATE(grid%zmicud,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmicud. ') endif ENDIF IF ( ASSOCIATED( grid%zmicvu ) ) THEN DEALLOCATE(grid%zmicvu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmicvu. ') endif ENDIF IF ( ASSOCIATED( grid%zmicvd ) ) THEN DEALLOCATE(grid%zmicvd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zmicvd. ') endif ENDIF IF ( ASSOCIATED( grid%evapcdp3d ) ) THEN DEALLOCATE(grid%evapcdp3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%evapcdp3d. ') endif ENDIF IF ( ASSOCIATED( grid%icwmrdp3d ) ) THEN DEALLOCATE(grid%icwmrdp3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%icwmrdp3d. ') endif ENDIF IF ( ASSOCIATED( grid%rprddp3d ) ) THEN DEALLOCATE(grid%rprddp3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rprddp3d. ') endif ENDIF IF ( ASSOCIATED( grid%dp3d ) ) THEN DEALLOCATE(grid%dp3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dp3d. ') endif ENDIF IF ( ASSOCIATED( grid%du3d ) ) THEN DEALLOCATE(grid%du3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%du3d. ') endif ENDIF IF ( ASSOCIATED( grid%ed3d ) ) THEN DEALLOCATE(grid%ed3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ed3d. ') endif ENDIF IF ( ASSOCIATED( grid%eu3d ) ) THEN DEALLOCATE(grid%eu3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%eu3d. ') endif ENDIF IF ( ASSOCIATED( grid%md3d ) ) THEN DEALLOCATE(grid%md3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%md3d. ') endif ENDIF IF ( ASSOCIATED( grid%mu3d ) ) THEN DEALLOCATE(grid%mu3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mu3d. ') endif ENDIF IF ( ASSOCIATED( grid%dsubcld2d ) ) THEN DEALLOCATE(grid%dsubcld2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dsubcld2d. ') endif ENDIF IF ( ASSOCIATED( grid%ideep2d ) ) THEN DEALLOCATE(grid%ideep2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ideep2d. ') endif ENDIF IF ( ASSOCIATED( grid%jt2d ) ) THEN DEALLOCATE(grid%jt2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%jt2d. ') endif ENDIF IF ( ASSOCIATED( grid%maxg2d ) ) THEN DEALLOCATE(grid%maxg2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%maxg2d. ') endif ENDIF IF ( ASSOCIATED( grid%lengath2d ) ) THEN DEALLOCATE(grid%lengath2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lengath2d. ') endif ENDIF IF ( ASSOCIATED( grid%cmfsl ) ) THEN DEALLOCATE(grid%cmfsl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cmfsl. ') endif ENDIF IF ( ASSOCIATED( grid%cmflq ) ) THEN DEALLOCATE(grid%cmflq,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cmflq. ') endif ENDIF IF ( ASSOCIATED( grid%cmfmc ) ) THEN DEALLOCATE(grid%cmfmc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cmfmc. ') endif ENDIF IF ( ASSOCIATED( grid%cmfmc2 ) ) THEN DEALLOCATE(grid%cmfmc2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cmfmc2. ') endif ENDIF IF ( ASSOCIATED( grid%cldfrash ) ) THEN DEALLOCATE(grid%cldfrash,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cldfrash. ') endif ENDIF IF ( ASSOCIATED( grid%cush ) ) THEN DEALLOCATE(grid%cush,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cush. ') endif ENDIF IF ( ASSOCIATED( grid%evapcsh ) ) THEN DEALLOCATE(grid%evapcsh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%evapcsh. ') endif ENDIF IF ( ASSOCIATED( grid%icwmrsh ) ) THEN DEALLOCATE(grid%icwmrsh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%icwmrsh. ') endif ENDIF IF ( ASSOCIATED( grid%snowsh ) ) THEN DEALLOCATE(grid%snowsh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowsh. ') endif ENDIF IF ( ASSOCIATED( grid%rprdsh ) ) THEN DEALLOCATE(grid%rprdsh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rprdsh. ') endif ENDIF IF ( ASSOCIATED( grid%rliq2 ) ) THEN DEALLOCATE(grid%rliq2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rliq2. ') endif ENDIF IF ( ASSOCIATED( grid%dlf2 ) ) THEN DEALLOCATE(grid%dlf2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dlf2. ') endif ENDIF IF ( ASSOCIATED( grid%shfrc3d ) ) THEN DEALLOCATE(grid%shfrc3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%shfrc3d. ') endif ENDIF IF ( ASSOCIATED( grid%evapcsh3d ) ) THEN DEALLOCATE(grid%evapcsh3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%evapcsh3d. ') endif ENDIF IF ( ASSOCIATED( grid%qtflx_cu ) ) THEN DEALLOCATE(grid%qtflx_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qtflx_cu. ') endif ENDIF IF ( ASSOCIATED( grid%slflx_cu ) ) THEN DEALLOCATE(grid%slflx_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%slflx_cu. ') endif ENDIF IF ( ASSOCIATED( grid%uflx_cu ) ) THEN DEALLOCATE(grid%uflx_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uflx_cu. ') endif ENDIF IF ( ASSOCIATED( grid%vflx_cu ) ) THEN DEALLOCATE(grid%vflx_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vflx_cu. ') endif ENDIF IF ( ASSOCIATED( grid%qtten_cu ) ) THEN DEALLOCATE(grid%qtten_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qtten_cu. ') endif ENDIF IF ( ASSOCIATED( grid%slten_cu ) ) THEN DEALLOCATE(grid%slten_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%slten_cu. ') endif ENDIF IF ( ASSOCIATED( grid%uten_cu ) ) THEN DEALLOCATE(grid%uten_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uten_cu. ') endif ENDIF IF ( ASSOCIATED( grid%vten_cu ) ) THEN DEALLOCATE(grid%vten_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vten_cu. ') endif ENDIF IF ( ASSOCIATED( grid%qvten_cu ) ) THEN DEALLOCATE(grid%qvten_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qvten_cu. ') endif ENDIF IF ( ASSOCIATED( grid%qlten_cu ) ) THEN DEALLOCATE(grid%qlten_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qlten_cu. ') endif ENDIF IF ( ASSOCIATED( grid%qiten_cu ) ) THEN DEALLOCATE(grid%qiten_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qiten_cu. ') endif ENDIF IF ( ASSOCIATED( grid%cbmf_cu ) ) THEN DEALLOCATE(grid%cbmf_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cbmf_cu. ') endif ENDIF IF ( ASSOCIATED( grid%ufrcinvbase_cu ) ) THEN DEALLOCATE(grid%ufrcinvbase_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ufrcinvbase_cu. ') endif ENDIF IF ( ASSOCIATED( grid%ufrclcl_cu ) ) THEN DEALLOCATE(grid%ufrclcl_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ufrclcl_cu. ') endif ENDIF IF ( ASSOCIATED( grid%winvbase_cu ) ) THEN DEALLOCATE(grid%winvbase_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%winvbase_cu. ') endif ENDIF IF ( ASSOCIATED( grid%wlcl_cu ) ) THEN DEALLOCATE(grid%wlcl_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wlcl_cu. ') endif ENDIF IF ( ASSOCIATED( grid%plcl_cu ) ) THEN DEALLOCATE(grid%plcl_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%plcl_cu. ') endif ENDIF IF ( ASSOCIATED( grid%pinv_cu ) ) THEN DEALLOCATE(grid%pinv_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pinv_cu. ') endif ENDIF IF ( ASSOCIATED( grid%plfc_cu ) ) THEN DEALLOCATE(grid%plfc_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%plfc_cu. ') endif ENDIF IF ( ASSOCIATED( grid%pbup_cu ) ) THEN DEALLOCATE(grid%pbup_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pbup_cu. ') endif ENDIF IF ( ASSOCIATED( grid%ppen_cu ) ) THEN DEALLOCATE(grid%ppen_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ppen_cu. ') endif ENDIF IF ( ASSOCIATED( grid%qtsrc_cu ) ) THEN DEALLOCATE(grid%qtsrc_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qtsrc_cu. ') endif ENDIF IF ( ASSOCIATED( grid%thlsrc_cu ) ) THEN DEALLOCATE(grid%thlsrc_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%thlsrc_cu. ') endif ENDIF IF ( ASSOCIATED( grid%thvlsrc_cu ) ) THEN DEALLOCATE(grid%thvlsrc_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%thvlsrc_cu. ') endif ENDIF IF ( ASSOCIATED( grid%emkfbup_cu ) ) THEN DEALLOCATE(grid%emkfbup_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%emkfbup_cu. ') endif ENDIF IF ( ASSOCIATED( grid%cin_cu ) ) THEN DEALLOCATE(grid%cin_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cin_cu. ') endif ENDIF IF ( ASSOCIATED( grid%cinlcl_cu ) ) THEN DEALLOCATE(grid%cinlcl_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cinlcl_cu. ') endif ENDIF IF ( ASSOCIATED( grid%cbmflimit_cu ) ) THEN DEALLOCATE(grid%cbmflimit_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cbmflimit_cu. ') endif ENDIF IF ( ASSOCIATED( grid%tkeavg_cu ) ) THEN DEALLOCATE(grid%tkeavg_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tkeavg_cu. ') endif ENDIF IF ( ASSOCIATED( grid%zinv_cu ) ) THEN DEALLOCATE(grid%zinv_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zinv_cu. ') endif ENDIF IF ( ASSOCIATED( grid%rcwp_cu ) ) THEN DEALLOCATE(grid%rcwp_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rcwp_cu. ') endif ENDIF IF ( ASSOCIATED( grid%rlwp_cu ) ) THEN DEALLOCATE(grid%rlwp_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rlwp_cu. ') endif ENDIF IF ( ASSOCIATED( grid%riwp_cu ) ) THEN DEALLOCATE(grid%riwp_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%riwp_cu. ') endif ENDIF IF ( ASSOCIATED( grid%tophgt_cu ) ) THEN DEALLOCATE(grid%tophgt_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tophgt_cu. ') endif ENDIF IF ( ASSOCIATED( grid%wu_cu ) ) THEN DEALLOCATE(grid%wu_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wu_cu. ') endif ENDIF IF ( ASSOCIATED( grid%ufrc_cu ) ) THEN DEALLOCATE(grid%ufrc_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ufrc_cu. ') endif ENDIF IF ( ASSOCIATED( grid%qtu_cu ) ) THEN DEALLOCATE(grid%qtu_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qtu_cu. ') endif ENDIF IF ( ASSOCIATED( grid%thlu_cu ) ) THEN DEALLOCATE(grid%thlu_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%thlu_cu. ') endif ENDIF IF ( ASSOCIATED( grid%thvu_cu ) ) THEN DEALLOCATE(grid%thvu_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%thvu_cu. ') endif ENDIF IF ( ASSOCIATED( grid%uu_cu ) ) THEN DEALLOCATE(grid%uu_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uu_cu. ') endif ENDIF IF ( ASSOCIATED( grid%vu_cu ) ) THEN DEALLOCATE(grid%vu_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vu_cu. ') endif ENDIF IF ( ASSOCIATED( grid%qtu_emf_cu ) ) THEN DEALLOCATE(grid%qtu_emf_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qtu_emf_cu. ') endif ENDIF IF ( ASSOCIATED( grid%thlu_emf_cu ) ) THEN DEALLOCATE(grid%thlu_emf_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%thlu_emf_cu. ') endif ENDIF IF ( ASSOCIATED( grid%uu_emf_cu ) ) THEN DEALLOCATE(grid%uu_emf_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uu_emf_cu. ') endif ENDIF IF ( ASSOCIATED( grid%vu_emf_cu ) ) THEN DEALLOCATE(grid%vu_emf_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vu_emf_cu. ') endif ENDIF IF ( ASSOCIATED( grid%umf_cu ) ) THEN DEALLOCATE(grid%umf_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%umf_cu. ') endif ENDIF IF ( ASSOCIATED( grid%uemf_cu ) ) THEN DEALLOCATE(grid%uemf_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uemf_cu. ') endif ENDIF IF ( ASSOCIATED( grid%qcu_cu ) ) THEN DEALLOCATE(grid%qcu_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qcu_cu. ') endif ENDIF IF ( ASSOCIATED( grid%qlu_cu ) ) THEN DEALLOCATE(grid%qlu_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qlu_cu. ') endif ENDIF IF ( ASSOCIATED( grid%qiu_cu ) ) THEN DEALLOCATE(grid%qiu_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qiu_cu. ') endif ENDIF IF ( ASSOCIATED( grid%cufrc_cu ) ) THEN DEALLOCATE(grid%cufrc_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cufrc_cu. ') endif ENDIF IF ( ASSOCIATED( grid%fer_cu ) ) THEN DEALLOCATE(grid%fer_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fer_cu. ') endif ENDIF IF ( ASSOCIATED( grid%fdr_cu ) ) THEN DEALLOCATE(grid%fdr_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdr_cu. ') endif ENDIF IF ( ASSOCIATED( grid%dwten_cu ) ) THEN DEALLOCATE(grid%dwten_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dwten_cu. ') endif ENDIF IF ( ASSOCIATED( grid%diten_cu ) ) THEN DEALLOCATE(grid%diten_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%diten_cu. ') endif ENDIF IF ( ASSOCIATED( grid%qrten_cu ) ) THEN DEALLOCATE(grid%qrten_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qrten_cu. ') endif ENDIF IF ( ASSOCIATED( grid%qsten_cu ) ) THEN DEALLOCATE(grid%qsten_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qsten_cu. ') endif ENDIF IF ( ASSOCIATED( grid%flxrain_cu ) ) THEN DEALLOCATE(grid%flxrain_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%flxrain_cu. ') endif ENDIF IF ( ASSOCIATED( grid%flxsnow_cu ) ) THEN DEALLOCATE(grid%flxsnow_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%flxsnow_cu. ') endif ENDIF IF ( ASSOCIATED( grid%ntraprd_cu ) ) THEN DEALLOCATE(grid%ntraprd_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ntraprd_cu. ') endif ENDIF IF ( ASSOCIATED( grid%ntsnprd_cu ) ) THEN DEALLOCATE(grid%ntsnprd_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ntsnprd_cu. ') endif ENDIF IF ( ASSOCIATED( grid%excessu_cu ) ) THEN DEALLOCATE(grid%excessu_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%excessu_cu. ') endif ENDIF IF ( ASSOCIATED( grid%excessu0_cu ) ) THEN DEALLOCATE(grid%excessu0_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%excessu0_cu. ') endif ENDIF IF ( ASSOCIATED( grid%xc_cu ) ) THEN DEALLOCATE(grid%xc_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xc_cu. ') endif ENDIF IF ( ASSOCIATED( grid%aquad_cu ) ) THEN DEALLOCATE(grid%aquad_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aquad_cu. ') endif ENDIF IF ( ASSOCIATED( grid%bquad_cu ) ) THEN DEALLOCATE(grid%bquad_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bquad_cu. ') endif ENDIF IF ( ASSOCIATED( grid%cquad_cu ) ) THEN DEALLOCATE(grid%cquad_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cquad_cu. ') endif ENDIF IF ( ASSOCIATED( grid%bogbot_cu ) ) THEN DEALLOCATE(grid%bogbot_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bogbot_cu. ') endif ENDIF IF ( ASSOCIATED( grid%bogtop_cu ) ) THEN DEALLOCATE(grid%bogtop_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bogtop_cu. ') endif ENDIF IF ( ASSOCIATED( grid%exit_uwcu_cu ) ) THEN DEALLOCATE(grid%exit_uwcu_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exit_uwcu_cu. ') endif ENDIF IF ( ASSOCIATED( grid%exit_conden_cu ) ) THEN DEALLOCATE(grid%exit_conden_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exit_conden_cu. ') endif ENDIF IF ( ASSOCIATED( grid%exit_klclmkx_cu ) ) THEN DEALLOCATE(grid%exit_klclmkx_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exit_klclmkx_cu. ') endif ENDIF IF ( ASSOCIATED( grid%exit_klfcmkx_cu ) ) THEN DEALLOCATE(grid%exit_klfcmkx_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exit_klfcmkx_cu. ') endif ENDIF IF ( ASSOCIATED( grid%exit_ufrc_cu ) ) THEN DEALLOCATE(grid%exit_ufrc_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exit_ufrc_cu. ') endif ENDIF IF ( ASSOCIATED( grid%exit_wtw_cu ) ) THEN DEALLOCATE(grid%exit_wtw_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exit_wtw_cu. ') endif ENDIF IF ( ASSOCIATED( grid%exit_drycore_cu ) ) THEN DEALLOCATE(grid%exit_drycore_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exit_drycore_cu. ') endif ENDIF IF ( ASSOCIATED( grid%exit_wu_cu ) ) THEN DEALLOCATE(grid%exit_wu_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exit_wu_cu. ') endif ENDIF IF ( ASSOCIATED( grid%exit_cufliter_cu ) ) THEN DEALLOCATE(grid%exit_cufliter_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exit_cufliter_cu. ') endif ENDIF IF ( ASSOCIATED( grid%exit_kinv1_cu ) ) THEN DEALLOCATE(grid%exit_kinv1_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exit_kinv1_cu. ') endif ENDIF IF ( ASSOCIATED( grid%exit_rei_cu ) ) THEN DEALLOCATE(grid%exit_rei_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%exit_rei_cu. ') endif ENDIF IF ( ASSOCIATED( grid%limit_shcu_cu ) ) THEN DEALLOCATE(grid%limit_shcu_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%limit_shcu_cu. ') endif ENDIF IF ( ASSOCIATED( grid%limit_negcon_cu ) ) THEN DEALLOCATE(grid%limit_negcon_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%limit_negcon_cu. ') endif ENDIF IF ( ASSOCIATED( grid%limit_ufrc_cu ) ) THEN DEALLOCATE(grid%limit_ufrc_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%limit_ufrc_cu. ') endif ENDIF IF ( ASSOCIATED( grid%limit_ppen_cu ) ) THEN DEALLOCATE(grid%limit_ppen_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%limit_ppen_cu. ') endif ENDIF IF ( ASSOCIATED( grid%limit_emf_cu ) ) THEN DEALLOCATE(grid%limit_emf_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%limit_emf_cu. ') endif ENDIF IF ( ASSOCIATED( grid%limit_cinlcl_cu ) ) THEN DEALLOCATE(grid%limit_cinlcl_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%limit_cinlcl_cu. ') endif ENDIF IF ( ASSOCIATED( grid%limit_cin_cu ) ) THEN DEALLOCATE(grid%limit_cin_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%limit_cin_cu. ') endif ENDIF IF ( ASSOCIATED( grid%limit_cbmf_cu ) ) THEN DEALLOCATE(grid%limit_cbmf_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%limit_cbmf_cu. ') endif ENDIF IF ( ASSOCIATED( grid%limit_rei_cu ) ) THEN DEALLOCATE(grid%limit_rei_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%limit_rei_cu. ') endif ENDIF IF ( ASSOCIATED( grid%ind_delcin_cu ) ) THEN DEALLOCATE(grid%ind_delcin_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ind_delcin_cu. ') endif ENDIF IF ( ASSOCIATED( grid%rh_old_mp ) ) THEN DEALLOCATE(grid%rh_old_mp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rh_old_mp. ') endif ENDIF IF ( ASSOCIATED( grid%lcd_old_mp ) ) THEN DEALLOCATE(grid%lcd_old_mp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lcd_old_mp. ') endif ENDIF IF ( ASSOCIATED( grid%cldfra_old_mp ) ) THEN DEALLOCATE(grid%cldfra_old_mp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cldfra_old_mp. ') endif ENDIF IF ( ASSOCIATED( grid%cldfra_mp ) ) THEN DEALLOCATE(grid%cldfra_mp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cldfra_mp. ') endif ENDIF IF ( ASSOCIATED( grid%cldfra_mp_all ) ) THEN DEALLOCATE(grid%cldfra_mp_all,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cldfra_mp_all. ') endif ENDIF IF ( ASSOCIATED( grid%cldfra_conv ) ) THEN DEALLOCATE(grid%cldfra_conv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cldfra_conv. ') endif ENDIF IF ( ASSOCIATED( grid%cldfrai ) ) THEN DEALLOCATE(grid%cldfrai,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cldfrai. ') endif ENDIF IF ( ASSOCIATED( grid%cldfral ) ) THEN DEALLOCATE(grid%cldfral,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cldfral. ') endif ENDIF IF ( ASSOCIATED( grid%numc ) ) THEN DEALLOCATE(grid%numc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%numc. ') endif ENDIF IF ( ASSOCIATED( grid%nump ) ) THEN DEALLOCATE(grid%nump,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%nump. ') endif ENDIF IF ( ASSOCIATED( grid%sabv ) ) THEN DEALLOCATE(grid%sabv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sabv. ') endif ENDIF IF ( ASSOCIATED( grid%sabg ) ) THEN DEALLOCATE(grid%sabg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sabg. ') endif ENDIF IF ( ASSOCIATED( grid%lwup ) ) THEN DEALLOCATE(grid%lwup,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lwup. ') endif ENDIF IF ( ASSOCIATED( grid%lhsoi ) ) THEN DEALLOCATE(grid%lhsoi,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lhsoi. ') endif ENDIF IF ( ASSOCIATED( grid%lhveg ) ) THEN DEALLOCATE(grid%lhveg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lhveg. ') endif ENDIF IF ( ASSOCIATED( grid%lhtran ) ) THEN DEALLOCATE(grid%lhtran,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lhtran. ') endif ENDIF IF ( ASSOCIATED( grid%snl ) ) THEN DEALLOCATE(grid%snl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snl. ') endif ENDIF IF ( ASSOCIATED( grid%snowdp ) ) THEN DEALLOCATE(grid%snowdp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowdp. ') endif ENDIF IF ( ASSOCIATED( grid%wtc ) ) THEN DEALLOCATE(grid%wtc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wtc. ') endif ENDIF IF ( ASSOCIATED( grid%wtp ) ) THEN DEALLOCATE(grid%wtp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wtp. ') endif ENDIF IF ( ASSOCIATED( grid%h2osno ) ) THEN DEALLOCATE(grid%h2osno,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osno. ') endif ENDIF IF ( ASSOCIATED( grid%t_grnd ) ) THEN DEALLOCATE(grid%t_grnd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_grnd. ') endif ENDIF IF ( ASSOCIATED( grid%t_veg ) ) THEN DEALLOCATE(grid%t_veg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_veg. ') endif ENDIF IF ( ASSOCIATED( grid%h2ocan ) ) THEN DEALLOCATE(grid%h2ocan,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2ocan. ') endif ENDIF IF ( ASSOCIATED( grid%h2ocan_col ) ) THEN DEALLOCATE(grid%h2ocan_col,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2ocan_col. ') endif ENDIF IF ( ASSOCIATED( grid%t2m_max ) ) THEN DEALLOCATE(grid%t2m_max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t2m_max. ') endif ENDIF IF ( ASSOCIATED( grid%t2m_min ) ) THEN DEALLOCATE(grid%t2m_min,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t2m_min. ') endif ENDIF IF ( ASSOCIATED( grid%t2clm ) ) THEN DEALLOCATE(grid%t2clm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t2clm. ') endif ENDIF IF ( ASSOCIATED( grid%t_ref2m ) ) THEN DEALLOCATE(grid%t_ref2m,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_ref2m. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq_s1 ) ) THEN DEALLOCATE(grid%h2osoi_liq_s1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq_s1. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq_s2 ) ) THEN DEALLOCATE(grid%h2osoi_liq_s2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq_s2. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq_s3 ) ) THEN DEALLOCATE(grid%h2osoi_liq_s3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq_s3. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq_s4 ) ) THEN DEALLOCATE(grid%h2osoi_liq_s4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq_s4. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq_s5 ) ) THEN DEALLOCATE(grid%h2osoi_liq_s5,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq_s5. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq1 ) ) THEN DEALLOCATE(grid%h2osoi_liq1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq1. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq2 ) ) THEN DEALLOCATE(grid%h2osoi_liq2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq2. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq3 ) ) THEN DEALLOCATE(grid%h2osoi_liq3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq3. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq4 ) ) THEN DEALLOCATE(grid%h2osoi_liq4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq4. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq5 ) ) THEN DEALLOCATE(grid%h2osoi_liq5,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq5. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq6 ) ) THEN DEALLOCATE(grid%h2osoi_liq6,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq6. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq7 ) ) THEN DEALLOCATE(grid%h2osoi_liq7,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq7. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq8 ) ) THEN DEALLOCATE(grid%h2osoi_liq8,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq8. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq9 ) ) THEN DEALLOCATE(grid%h2osoi_liq9,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq9. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq10 ) ) THEN DEALLOCATE(grid%h2osoi_liq10,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq10. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice_s1 ) ) THEN DEALLOCATE(grid%h2osoi_ice_s1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice_s1. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice_s2 ) ) THEN DEALLOCATE(grid%h2osoi_ice_s2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice_s2. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice_s3 ) ) THEN DEALLOCATE(grid%h2osoi_ice_s3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice_s3. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice_s4 ) ) THEN DEALLOCATE(grid%h2osoi_ice_s4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice_s4. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice_s5 ) ) THEN DEALLOCATE(grid%h2osoi_ice_s5,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice_s5. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice1 ) ) THEN DEALLOCATE(grid%h2osoi_ice1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice1. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice2 ) ) THEN DEALLOCATE(grid%h2osoi_ice2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice2. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice3 ) ) THEN DEALLOCATE(grid%h2osoi_ice3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice3. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice4 ) ) THEN DEALLOCATE(grid%h2osoi_ice4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice4. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice5 ) ) THEN DEALLOCATE(grid%h2osoi_ice5,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice5. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice6 ) ) THEN DEALLOCATE(grid%h2osoi_ice6,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice6. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice7 ) ) THEN DEALLOCATE(grid%h2osoi_ice7,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice7. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice8 ) ) THEN DEALLOCATE(grid%h2osoi_ice8,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice8. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice9 ) ) THEN DEALLOCATE(grid%h2osoi_ice9,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice9. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice10 ) ) THEN DEALLOCATE(grid%h2osoi_ice10,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice10. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno_s1 ) ) THEN DEALLOCATE(grid%t_soisno_s1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno_s1. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno_s2 ) ) THEN DEALLOCATE(grid%t_soisno_s2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno_s2. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno_s3 ) ) THEN DEALLOCATE(grid%t_soisno_s3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno_s3. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno_s4 ) ) THEN DEALLOCATE(grid%t_soisno_s4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno_s4. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno_s5 ) ) THEN DEALLOCATE(grid%t_soisno_s5,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno_s5. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno1 ) ) THEN DEALLOCATE(grid%t_soisno1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno1. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno2 ) ) THEN DEALLOCATE(grid%t_soisno2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno2. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno3 ) ) THEN DEALLOCATE(grid%t_soisno3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno3. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno4 ) ) THEN DEALLOCATE(grid%t_soisno4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno4. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno5 ) ) THEN DEALLOCATE(grid%t_soisno5,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno5. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno6 ) ) THEN DEALLOCATE(grid%t_soisno6,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno6. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno7 ) ) THEN DEALLOCATE(grid%t_soisno7,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno7. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno8 ) ) THEN DEALLOCATE(grid%t_soisno8,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno8. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno9 ) ) THEN DEALLOCATE(grid%t_soisno9,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno9. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno10 ) ) THEN DEALLOCATE(grid%t_soisno10,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno10. ') endif ENDIF IF ( ASSOCIATED( grid%dzsnow1 ) ) THEN DEALLOCATE(grid%dzsnow1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzsnow1. ') endif ENDIF IF ( ASSOCIATED( grid%dzsnow2 ) ) THEN DEALLOCATE(grid%dzsnow2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzsnow2. ') endif ENDIF IF ( ASSOCIATED( grid%dzsnow3 ) ) THEN DEALLOCATE(grid%dzsnow3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzsnow3. ') endif ENDIF IF ( ASSOCIATED( grid%dzsnow4 ) ) THEN DEALLOCATE(grid%dzsnow4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzsnow4. ') endif ENDIF IF ( ASSOCIATED( grid%dzsnow5 ) ) THEN DEALLOCATE(grid%dzsnow5,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzsnow5. ') endif ENDIF IF ( ASSOCIATED( grid%snowrds1 ) ) THEN DEALLOCATE(grid%snowrds1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowrds1. ') endif ENDIF IF ( ASSOCIATED( grid%snowrds2 ) ) THEN DEALLOCATE(grid%snowrds2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowrds2. ') endif ENDIF IF ( ASSOCIATED( grid%snowrds3 ) ) THEN DEALLOCATE(grid%snowrds3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowrds3. ') endif ENDIF IF ( ASSOCIATED( grid%snowrds4 ) ) THEN DEALLOCATE(grid%snowrds4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowrds4. ') endif ENDIF IF ( ASSOCIATED( grid%snowrds5 ) ) THEN DEALLOCATE(grid%snowrds5,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowrds5. ') endif ENDIF IF ( ASSOCIATED( grid%t_lake1 ) ) THEN DEALLOCATE(grid%t_lake1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_lake1. ') endif ENDIF IF ( ASSOCIATED( grid%t_lake2 ) ) THEN DEALLOCATE(grid%t_lake2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_lake2. ') endif ENDIF IF ( ASSOCIATED( grid%t_lake3 ) ) THEN DEALLOCATE(grid%t_lake3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_lake3. ') endif ENDIF IF ( ASSOCIATED( grid%t_lake4 ) ) THEN DEALLOCATE(grid%t_lake4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_lake4. ') endif ENDIF IF ( ASSOCIATED( grid%t_lake5 ) ) THEN DEALLOCATE(grid%t_lake5,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_lake5. ') endif ENDIF IF ( ASSOCIATED( grid%t_lake6 ) ) THEN DEALLOCATE(grid%t_lake6,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_lake6. ') endif ENDIF IF ( ASSOCIATED( grid%t_lake7 ) ) THEN DEALLOCATE(grid%t_lake7,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_lake7. ') endif ENDIF IF ( ASSOCIATED( grid%t_lake8 ) ) THEN DEALLOCATE(grid%t_lake8,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_lake8. ') endif ENDIF IF ( ASSOCIATED( grid%t_lake9 ) ) THEN DEALLOCATE(grid%t_lake9,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_lake9. ') endif ENDIF IF ( ASSOCIATED( grid%t_lake10 ) ) THEN DEALLOCATE(grid%t_lake10,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_lake10. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_vol1 ) ) THEN DEALLOCATE(grid%h2osoi_vol1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_vol1. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_vol2 ) ) THEN DEALLOCATE(grid%h2osoi_vol2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_vol2. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_vol3 ) ) THEN DEALLOCATE(grid%h2osoi_vol3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_vol3. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_vol4 ) ) THEN DEALLOCATE(grid%h2osoi_vol4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_vol4. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_vol5 ) ) THEN DEALLOCATE(grid%h2osoi_vol5,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_vol5. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_vol6 ) ) THEN DEALLOCATE(grid%h2osoi_vol6,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_vol6. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_vol7 ) ) THEN DEALLOCATE(grid%h2osoi_vol7,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_vol7. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_vol8 ) ) THEN DEALLOCATE(grid%h2osoi_vol8,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_vol8. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_vol9 ) ) THEN DEALLOCATE(grid%h2osoi_vol9,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_vol9. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_vol10 ) ) THEN DEALLOCATE(grid%h2osoi_vol10,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_vol10. ') endif ENDIF IF ( ASSOCIATED( grid%albedosubgrid ) ) THEN DEALLOCATE(grid%albedosubgrid,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%albedosubgrid. ') endif ENDIF IF ( ASSOCIATED( grid%lhsubgrid ) ) THEN DEALLOCATE(grid%lhsubgrid,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lhsubgrid. ') endif ENDIF IF ( ASSOCIATED( grid%hfxsubgrid ) ) THEN DEALLOCATE(grid%hfxsubgrid,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hfxsubgrid. ') endif ENDIF IF ( ASSOCIATED( grid%lwupsubgrid ) ) THEN DEALLOCATE(grid%lwupsubgrid,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lwupsubgrid. ') endif ENDIF IF ( ASSOCIATED( grid%q2subgrid ) ) THEN DEALLOCATE(grid%q2subgrid,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2subgrid. ') endif ENDIF IF ( ASSOCIATED( grid%sabvsubgrid ) ) THEN DEALLOCATE(grid%sabvsubgrid,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sabvsubgrid. ') endif ENDIF IF ( ASSOCIATED( grid%sabgsubgrid ) ) THEN DEALLOCATE(grid%sabgsubgrid,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sabgsubgrid. ') endif ENDIF IF ( ASSOCIATED( grid%nrasubgrid ) ) THEN DEALLOCATE(grid%nrasubgrid,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%nrasubgrid. ') endif ENDIF IF ( ASSOCIATED( grid%swupsubgrid ) ) THEN DEALLOCATE(grid%swupsubgrid,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swupsubgrid. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_fm ) ) THEN DEALLOCATE(grid%ssib_fm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_fm. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_fh ) ) THEN DEALLOCATE(grid%ssib_fh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_fh. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_cm ) ) THEN DEALLOCATE(grid%ssib_cm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_cm. ') endif ENDIF IF ( ASSOCIATED( grid%ssibxdd ) ) THEN DEALLOCATE(grid%ssibxdd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssibxdd. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_br ) ) THEN DEALLOCATE(grid%ssib_br,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_br. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_lhf ) ) THEN DEALLOCATE(grid%ssib_lhf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_lhf. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_shf ) ) THEN DEALLOCATE(grid%ssib_shf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_shf. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_ghf ) ) THEN DEALLOCATE(grid%ssib_ghf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_ghf. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_egs ) ) THEN DEALLOCATE(grid%ssib_egs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_egs. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_eci ) ) THEN DEALLOCATE(grid%ssib_eci,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_eci. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_ect ) ) THEN DEALLOCATE(grid%ssib_ect,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_ect. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_egi ) ) THEN DEALLOCATE(grid%ssib_egi,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_egi. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_egt ) ) THEN DEALLOCATE(grid%ssib_egt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_egt. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_sdn ) ) THEN DEALLOCATE(grid%ssib_sdn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_sdn. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_sup ) ) THEN DEALLOCATE(grid%ssib_sup,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_sup. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_ldn ) ) THEN DEALLOCATE(grid%ssib_ldn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_ldn. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_lup ) ) THEN DEALLOCATE(grid%ssib_lup,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_lup. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_wat ) ) THEN DEALLOCATE(grid%ssib_wat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_wat. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_shc ) ) THEN DEALLOCATE(grid%ssib_shc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_shc. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_shg ) ) THEN DEALLOCATE(grid%ssib_shg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_shg. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_lai ) ) THEN DEALLOCATE(grid%ssib_lai,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_lai. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_vcf ) ) THEN DEALLOCATE(grid%ssib_vcf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_vcf. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_z00 ) ) THEN DEALLOCATE(grid%ssib_z00,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_z00. ') endif ENDIF IF ( ASSOCIATED( grid%ssib_veg ) ) THEN DEALLOCATE(grid%ssib_veg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssib_veg. ') endif ENDIF IF ( ASSOCIATED( grid%isnow ) ) THEN DEALLOCATE(grid%isnow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%isnow. ') endif ENDIF IF ( ASSOCIATED( grid%swe ) ) THEN DEALLOCATE(grid%swe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%swe. ') endif ENDIF IF ( ASSOCIATED( grid%snowden ) ) THEN DEALLOCATE(grid%snowden,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowden. ') endif ENDIF IF ( ASSOCIATED( grid%snowdepth ) ) THEN DEALLOCATE(grid%snowdepth,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowdepth. ') endif ENDIF IF ( ASSOCIATED( grid%tkair ) ) THEN DEALLOCATE(grid%tkair,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tkair. ') endif ENDIF IF ( ASSOCIATED( grid%dzo1 ) ) THEN DEALLOCATE(grid%dzo1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzo1. ') endif ENDIF IF ( ASSOCIATED( grid%wo1 ) ) THEN DEALLOCATE(grid%wo1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wo1. ') endif ENDIF IF ( ASSOCIATED( grid%tssn1 ) ) THEN DEALLOCATE(grid%tssn1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tssn1. ') endif ENDIF IF ( ASSOCIATED( grid%tssno1 ) ) THEN DEALLOCATE(grid%tssno1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tssno1. ') endif ENDIF IF ( ASSOCIATED( grid%bwo1 ) ) THEN DEALLOCATE(grid%bwo1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bwo1. ') endif ENDIF IF ( ASSOCIATED( grid%bto1 ) ) THEN DEALLOCATE(grid%bto1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bto1. ') endif ENDIF IF ( ASSOCIATED( grid%cto1 ) ) THEN DEALLOCATE(grid%cto1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cto1. ') endif ENDIF IF ( ASSOCIATED( grid%fio1 ) ) THEN DEALLOCATE(grid%fio1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fio1. ') endif ENDIF IF ( ASSOCIATED( grid%flo1 ) ) THEN DEALLOCATE(grid%flo1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%flo1. ') endif ENDIF IF ( ASSOCIATED( grid%bio1 ) ) THEN DEALLOCATE(grid%bio1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bio1. ') endif ENDIF IF ( ASSOCIATED( grid%blo1 ) ) THEN DEALLOCATE(grid%blo1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%blo1. ') endif ENDIF IF ( ASSOCIATED( grid%ho1 ) ) THEN DEALLOCATE(grid%ho1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ho1. ') endif ENDIF IF ( ASSOCIATED( grid%dzo2 ) ) THEN DEALLOCATE(grid%dzo2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzo2. ') endif ENDIF IF ( ASSOCIATED( grid%wo2 ) ) THEN DEALLOCATE(grid%wo2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wo2. ') endif ENDIF IF ( ASSOCIATED( grid%tssn2 ) ) THEN DEALLOCATE(grid%tssn2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tssn2. ') endif ENDIF IF ( ASSOCIATED( grid%tssno2 ) ) THEN DEALLOCATE(grid%tssno2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tssno2. ') endif ENDIF IF ( ASSOCIATED( grid%bwo2 ) ) THEN DEALLOCATE(grid%bwo2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bwo2. ') endif ENDIF IF ( ASSOCIATED( grid%bto2 ) ) THEN DEALLOCATE(grid%bto2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bto2. ') endif ENDIF IF ( ASSOCIATED( grid%cto2 ) ) THEN DEALLOCATE(grid%cto2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cto2. ') endif ENDIF IF ( ASSOCIATED( grid%fio2 ) ) THEN DEALLOCATE(grid%fio2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fio2. ') endif ENDIF IF ( ASSOCIATED( grid%flo2 ) ) THEN DEALLOCATE(grid%flo2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%flo2. ') endif ENDIF IF ( ASSOCIATED( grid%bio2 ) ) THEN DEALLOCATE(grid%bio2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bio2. ') endif ENDIF IF ( ASSOCIATED( grid%blo2 ) ) THEN DEALLOCATE(grid%blo2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%blo2. ') endif ENDIF IF ( ASSOCIATED( grid%ho2 ) ) THEN DEALLOCATE(grid%ho2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ho2. ') endif ENDIF IF ( ASSOCIATED( grid%dzo3 ) ) THEN DEALLOCATE(grid%dzo3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzo3. ') endif ENDIF IF ( ASSOCIATED( grid%wo3 ) ) THEN DEALLOCATE(grid%wo3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wo3. ') endif ENDIF IF ( ASSOCIATED( grid%tssn3 ) ) THEN DEALLOCATE(grid%tssn3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tssn3. ') endif ENDIF IF ( ASSOCIATED( grid%tssno3 ) ) THEN DEALLOCATE(grid%tssno3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tssno3. ') endif ENDIF IF ( ASSOCIATED( grid%bwo3 ) ) THEN DEALLOCATE(grid%bwo3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bwo3. ') endif ENDIF IF ( ASSOCIATED( grid%bto3 ) ) THEN DEALLOCATE(grid%bto3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bto3. ') endif ENDIF IF ( ASSOCIATED( grid%cto3 ) ) THEN DEALLOCATE(grid%cto3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cto3. ') endif ENDIF IF ( ASSOCIATED( grid%fio3 ) ) THEN DEALLOCATE(grid%fio3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fio3. ') endif ENDIF IF ( ASSOCIATED( grid%flo3 ) ) THEN DEALLOCATE(grid%flo3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%flo3. ') endif ENDIF IF ( ASSOCIATED( grid%bio3 ) ) THEN DEALLOCATE(grid%bio3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bio3. ') endif ENDIF IF ( ASSOCIATED( grid%blo3 ) ) THEN DEALLOCATE(grid%blo3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%blo3. ') endif ENDIF IF ( ASSOCIATED( grid%ho3 ) ) THEN DEALLOCATE(grid%ho3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ho3. ') endif ENDIF IF ( ASSOCIATED( grid%dzo4 ) ) THEN DEALLOCATE(grid%dzo4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzo4. ') endif ENDIF IF ( ASSOCIATED( grid%wo4 ) ) THEN DEALLOCATE(grid%wo4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wo4. ') endif ENDIF IF ( ASSOCIATED( grid%tssn4 ) ) THEN DEALLOCATE(grid%tssn4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tssn4. ') endif ENDIF IF ( ASSOCIATED( grid%tssno4 ) ) THEN DEALLOCATE(grid%tssno4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tssno4. ') endif ENDIF IF ( ASSOCIATED( grid%bwo4 ) ) THEN DEALLOCATE(grid%bwo4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bwo4. ') endif ENDIF IF ( ASSOCIATED( grid%bto4 ) ) THEN DEALLOCATE(grid%bto4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bto4. ') endif ENDIF IF ( ASSOCIATED( grid%cto4 ) ) THEN DEALLOCATE(grid%cto4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cto4. ') endif ENDIF IF ( ASSOCIATED( grid%fio4 ) ) THEN DEALLOCATE(grid%fio4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fio4. ') endif ENDIF IF ( ASSOCIATED( grid%flo4 ) ) THEN DEALLOCATE(grid%flo4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%flo4. ') endif ENDIF IF ( ASSOCIATED( grid%bio4 ) ) THEN DEALLOCATE(grid%bio4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bio4. ') endif ENDIF IF ( ASSOCIATED( grid%blo4 ) ) THEN DEALLOCATE(grid%blo4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%blo4. ') endif ENDIF IF ( ASSOCIATED( grid%ho4 ) ) THEN DEALLOCATE(grid%ho4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ho4. ') endif ENDIF IF ( ASSOCIATED( grid%p_pl ) ) THEN DEALLOCATE(grid%p_pl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p_pl. ') endif ENDIF IF ( ASSOCIATED( grid%u_pl ) ) THEN DEALLOCATE(grid%u_pl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u_pl. ') endif ENDIF IF ( ASSOCIATED( grid%v_pl ) ) THEN DEALLOCATE(grid%v_pl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v_pl. ') endif ENDIF IF ( ASSOCIATED( grid%t_pl ) ) THEN DEALLOCATE(grid%t_pl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_pl. ') endif ENDIF IF ( ASSOCIATED( grid%rh_pl ) ) THEN DEALLOCATE(grid%rh_pl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rh_pl. ') endif ENDIF IF ( ASSOCIATED( grid%ght_pl ) ) THEN DEALLOCATE(grid%ght_pl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ght_pl. ') endif ENDIF IF ( ASSOCIATED( grid%s_pl ) ) THEN DEALLOCATE(grid%s_pl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%s_pl. ') endif ENDIF IF ( ASSOCIATED( grid%td_pl ) ) THEN DEALLOCATE(grid%td_pl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%td_pl. ') endif ENDIF IF ( ASSOCIATED( grid%field_u_tend_perturb ) ) THEN DEALLOCATE(grid%field_u_tend_perturb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%field_u_tend_perturb. ') endif ENDIF IF ( ASSOCIATED( grid%field_v_tend_perturb ) ) THEN DEALLOCATE(grid%field_v_tend_perturb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%field_v_tend_perturb. ') endif ENDIF IF ( ASSOCIATED( grid%field_t_tend_perturb ) ) THEN DEALLOCATE(grid%field_t_tend_perturb,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%field_t_tend_perturb. ') endif ENDIF IF ( ASSOCIATED( grid%landmask ) ) THEN DEALLOCATE(grid%landmask,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%landmask. ') endif ENDIF IF ( ASSOCIATED( grid%sst ) ) THEN DEALLOCATE(grid%sst,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sst. ') endif ENDIF IF ( ASSOCIATED( grid%chem ) ) THEN DEALLOCATE(grid%chem,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%chem. ') endif ENDIF IF ( ASSOCIATED( grid%tracer ) ) THEN DEALLOCATE(grid%tracer,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tracer. ') endif ENDIF IF ( ASSOCIATED( grid%tracer_bxs ) ) THEN DEALLOCATE(grid%tracer_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tracer_bxs. ') endif NULLIFY(grid%tracer_bxs) ENDIF IF ( ASSOCIATED( grid%tracer_bxe ) ) THEN DEALLOCATE(grid%tracer_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tracer_bxe. ') endif NULLIFY(grid%tracer_bxe) ENDIF IF ( ASSOCIATED( grid%tracer_bys ) ) THEN DEALLOCATE(grid%tracer_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tracer_bys. ') endif NULLIFY(grid%tracer_bys) ENDIF IF ( ASSOCIATED( grid%tracer_bye ) ) THEN DEALLOCATE(grid%tracer_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tracer_bye. ') endif NULLIFY(grid%tracer_bye) ENDIF IF ( ASSOCIATED( grid%tracer_btxs ) ) THEN DEALLOCATE(grid%tracer_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tracer_btxs. ') endif NULLIFY(grid%tracer_btxs) ENDIF IF ( ASSOCIATED( grid%tracer_btxe ) ) THEN DEALLOCATE(grid%tracer_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tracer_btxe. ') endif NULLIFY(grid%tracer_btxe) ENDIF IF ( ASSOCIATED( grid%tracer_btys ) ) THEN DEALLOCATE(grid%tracer_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tracer_btys. ') endif NULLIFY(grid%tracer_btys) ENDIF IF ( ASSOCIATED( grid%tracer_btye ) ) THEN DEALLOCATE(grid%tracer_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tracer_btye. ') endif NULLIFY(grid%tracer_btye) ENDIF !ENDOFREGISTRYGENERATEDINCLUDE