!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%lake2d ) ) THEN DEALLOCATE(grid%lake2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lake2d. ') endif ENDIF IF ( ASSOCIATED( grid%lakedepth2d ) ) THEN DEALLOCATE(grid%lakedepth2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lakedepth2d. ') endif ENDIF IF ( ASSOCIATED( grid%savedtke12d ) ) THEN DEALLOCATE(grid%savedtke12d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%savedtke12d. ') endif ENDIF IF ( ASSOCIATED( grid%snowdp2d ) ) THEN DEALLOCATE(grid%snowdp2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowdp2d. ') endif ENDIF IF ( ASSOCIATED( grid%h2osno2d ) ) THEN DEALLOCATE(grid%h2osno2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osno2d. ') endif ENDIF IF ( ASSOCIATED( grid%snl2d ) ) THEN DEALLOCATE(grid%snl2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snl2d. ') endif ENDIF IF ( ASSOCIATED( grid%t_grnd2d ) ) THEN DEALLOCATE(grid%t_grnd2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_grnd2d. ') endif ENDIF IF ( ASSOCIATED( grid%t_lake3d ) ) THEN DEALLOCATE(grid%t_lake3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_lake3d. ') endif ENDIF IF ( ASSOCIATED( grid%lake_icefrac3d ) ) THEN DEALLOCATE(grid%lake_icefrac3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lake_icefrac3d. ') endif ENDIF IF ( ASSOCIATED( grid%z_lake3d ) ) THEN DEALLOCATE(grid%z_lake3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%z_lake3d. ') endif ENDIF IF ( ASSOCIATED( grid%dz_lake3d ) ) THEN DEALLOCATE(grid%dz_lake3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dz_lake3d. ') endif ENDIF IF ( ASSOCIATED( grid%t_soisno3d ) ) THEN DEALLOCATE(grid%t_soisno3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_soisno3d. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_ice3d ) ) THEN DEALLOCATE(grid%h2osoi_ice3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_ice3d. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_liq3d ) ) THEN DEALLOCATE(grid%h2osoi_liq3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_liq3d. ') endif ENDIF IF ( ASSOCIATED( grid%h2osoi_vol3d ) ) THEN DEALLOCATE(grid%h2osoi_vol3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%h2osoi_vol3d. ') endif ENDIF IF ( ASSOCIATED( grid%z3d ) ) THEN DEALLOCATE(grid%z3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%z3d. ') endif ENDIF IF ( ASSOCIATED( grid%dz3d ) ) THEN DEALLOCATE(grid%dz3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dz3d. ') endif ENDIF IF ( ASSOCIATED( grid%zi3d ) ) THEN DEALLOCATE(grid%zi3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zi3d. ') endif ENDIF IF ( ASSOCIATED( grid%watsat3d ) ) THEN DEALLOCATE(grid%watsat3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%watsat3d. ') endif ENDIF IF ( ASSOCIATED( grid%csol3d ) ) THEN DEALLOCATE(grid%csol3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%csol3d. ') endif ENDIF IF ( ASSOCIATED( grid%tkmg3d ) ) THEN DEALLOCATE(grid%tkmg3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tkmg3d. ') endif ENDIF IF ( ASSOCIATED( grid%tkdry3d ) ) THEN DEALLOCATE(grid%tkdry3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tkdry3d. ') endif ENDIF IF ( ASSOCIATED( grid%tksatu3d ) ) THEN DEALLOCATE(grid%tksatu3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tksatu3d. ') endif ENDIF IF ( ASSOCIATED( grid%szj ) ) THEN DEALLOCATE(grid%szj,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%szj. ') endif ENDIF IF ( ASSOCIATED( grid%s1z ) ) THEN DEALLOCATE(grid%s1z,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%s1z. ') endif ENDIF IF ( ASSOCIATED( grid%spz ) ) THEN DEALLOCATE(grid%spz,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%spz. ') endif ENDIF IF ( ASSOCIATED( grid%tcs ) ) THEN DEALLOCATE(grid%tcs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tcs. ') 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%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%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%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%input_soil_cat ) ) THEN DEALLOCATE(grid%input_soil_cat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%input_soil_cat. ') 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%xice_gc ) ) THEN DEALLOCATE(grid%xice_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%xice_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%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%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%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%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%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%greenfrac_gc ) ) THEN DEALLOCATE(grid%greenfrac_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%greenfrac_gc. ') endif ENDIF IF ( ASSOCIATED( grid%albedo12m_gc ) ) THEN DEALLOCATE(grid%albedo12m_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%albedo12m_gc. ') endif ENDIF IF ( ASSOCIATED( grid%lai12m_gc ) ) THEN DEALLOCATE(grid%lai12m_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lai12m_gc. ') endif ENDIF IF ( ASSOCIATED( grid%soilcbot_gc ) ) THEN DEALLOCATE(grid%soilcbot_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilcbot_gc. ') endif ENDIF IF ( ASSOCIATED( grid%soilctop_gc ) ) THEN DEALLOCATE(grid%soilctop_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%soilctop_gc. ') 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%htv_gc ) ) THEN DEALLOCATE(grid%htv_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%htv_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%landusef_gc ) ) THEN DEALLOCATE(grid%landusef_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%landusef_gc. ') endif ENDIF IF ( ASSOCIATED( grid%vlon_gc ) ) THEN DEALLOCATE(grid%vlon_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vlon_gc. ') endif ENDIF IF ( ASSOCIATED( grid%vlat_gc ) ) THEN DEALLOCATE(grid%vlat_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vlat_gc. ') endif ENDIF IF ( ASSOCIATED( grid%hlon_gc ) ) THEN DEALLOCATE(grid%hlon_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hlon_gc. ') endif ENDIF IF ( ASSOCIATED( grid%hlat_gc ) ) THEN DEALLOCATE(grid%hlat_gc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hlat_gc. ') endif ENDIF IF ( ASSOCIATED( grid%nrnd1 ) ) THEN DEALLOCATE(grid%nrnd1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%nrnd1. ') endif ENDIF IF ( ASSOCIATED( grid%relaxwork ) ) THEN DEALLOCATE(grid%relaxwork,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%relaxwork. ') endif ENDIF IF ( ASSOCIATED( grid%relaximask ) ) THEN DEALLOCATE(grid%relaximask,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%relaximask. ') endif ENDIF IF ( ASSOCIATED( grid%relaxmask ) ) THEN DEALLOCATE(grid%relaxmask,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%relaxmask. ') endif ENDIF IF ( ASSOCIATED( grid%interesting ) ) THEN DEALLOCATE(grid%interesting,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%interesting. ') endif ENDIF IF ( ASSOCIATED( grid%nest_imid ) ) THEN DEALLOCATE(grid%nest_imid,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%nest_imid. ') endif ENDIF IF ( ASSOCIATED( grid%nest_jmid ) ) THEN DEALLOCATE(grid%nest_jmid,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%nest_jmid. ') endif ENDIF IF ( ASSOCIATED( grid%cuprecip_swath ) ) THEN DEALLOCATE(grid%cuprecip_swath,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cuprecip_swath. ') endif ENDIF IF ( ASSOCIATED( grid%precip_swath ) ) THEN DEALLOCATE(grid%precip_swath,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%precip_swath. ') endif ENDIF IF ( ASSOCIATED( grid%windsq_swath ) ) THEN DEALLOCATE(grid%windsq_swath,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%windsq_swath. ') endif ENDIF IF ( ASSOCIATED( grid%suswind ) ) THEN DEALLOCATE(grid%suswind,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%suswind. ') endif ENDIF IF ( ASSOCIATED( grid%wind10_ratio ) ) THEN DEALLOCATE(grid%wind10_ratio,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wind10_ratio. ') endif ENDIF IF ( ASSOCIATED( grid%suswind_swath ) ) THEN DEALLOCATE(grid%suswind_swath,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%suswind_swath. ') endif ENDIF IF ( ASSOCIATED( grid%tracker_distsq ) ) THEN DEALLOCATE(grid%tracker_distsq,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tracker_distsq. ') endif ENDIF IF ( ASSOCIATED( grid%tracker_angle ) ) THEN DEALLOCATE(grid%tracker_angle,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tracker_angle. ') endif ENDIF IF ( ASSOCIATED( grid%track_old_lon ) ) THEN DEALLOCATE(grid%track_old_lon,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_old_lon. ') endif ENDIF IF ( ASSOCIATED( grid%track_old_lat ) ) THEN DEALLOCATE(grid%track_old_lat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_old_lat. ') endif ENDIF IF ( ASSOCIATED( grid%track_old_ntsd ) ) THEN DEALLOCATE(grid%track_old_ntsd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%track_old_ntsd. ') endif ENDIF IF ( ASSOCIATED( grid%tracker_fixes ) ) THEN DEALLOCATE(grid%tracker_fixes,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tracker_fixes. ') endif ENDIF IF ( ASSOCIATED( grid%membrane_mslp ) ) THEN DEALLOCATE(grid%membrane_mslp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%membrane_mslp. ') endif ENDIF IF ( ASSOCIATED( grid%p850rv ) ) THEN DEALLOCATE(grid%p850rv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p850rv. ') endif ENDIF IF ( ASSOCIATED( grid%p700rv ) ) THEN DEALLOCATE(grid%p700rv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p700rv. ') endif ENDIF IF ( ASSOCIATED( grid%p850wind ) ) THEN DEALLOCATE(grid%p850wind,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p850wind. ') endif ENDIF IF ( ASSOCIATED( grid%p700wind ) ) THEN DEALLOCATE(grid%p700wind,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p700wind. ') endif ENDIF IF ( ASSOCIATED( grid%p500u ) ) THEN DEALLOCATE(grid%p500u,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p500u. ') endif ENDIF IF ( ASSOCIATED( grid%p500v ) ) THEN DEALLOCATE(grid%p500v,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p500v. ') endif ENDIF IF ( ASSOCIATED( grid%p700u ) ) THEN DEALLOCATE(grid%p700u,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p700u. ') endif ENDIF IF ( ASSOCIATED( grid%p700v ) ) THEN DEALLOCATE(grid%p700v,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p700v. ') endif ENDIF IF ( ASSOCIATED( grid%p850u ) ) THEN DEALLOCATE(grid%p850u,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p850u. ') endif ENDIF IF ( ASSOCIATED( grid%p850v ) ) THEN DEALLOCATE(grid%p850v,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p850v. ') endif ENDIF IF ( ASSOCIATED( grid%p850z ) ) THEN DEALLOCATE(grid%p850z,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p850z. ') endif ENDIF IF ( ASSOCIATED( grid%p700z ) ) THEN DEALLOCATE(grid%p700z,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%p700z. ') endif ENDIF IF ( ASSOCIATED( grid%m10wind ) ) THEN DEALLOCATE(grid%m10wind,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%m10wind. ') endif ENDIF IF ( ASSOCIATED( grid%m10rv ) ) THEN DEALLOCATE(grid%m10rv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%m10rv. ') endif ENDIF IF ( ASSOCIATED( grid%sp850rv ) ) THEN DEALLOCATE(grid%sp850rv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sp850rv. ') endif ENDIF IF ( ASSOCIATED( grid%sp700rv ) ) THEN DEALLOCATE(grid%sp700rv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sp700rv. ') endif ENDIF IF ( ASSOCIATED( grid%sp850wind ) ) THEN DEALLOCATE(grid%sp850wind,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sp850wind. ') endif ENDIF IF ( ASSOCIATED( grid%sp700wind ) ) THEN DEALLOCATE(grid%sp700wind,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sp700wind. ') endif ENDIF IF ( ASSOCIATED( grid%sp850z ) ) THEN DEALLOCATE(grid%sp850z,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sp850z. ') endif ENDIF IF ( ASSOCIATED( grid%sp700z ) ) THEN DEALLOCATE(grid%sp700z,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sp700z. ') endif ENDIF IF ( ASSOCIATED( grid%sm10wind ) ) THEN DEALLOCATE(grid%sm10wind,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm10wind. ') endif ENDIF IF ( ASSOCIATED( grid%sm10rv ) ) THEN DEALLOCATE(grid%sm10rv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm10rv. ') endif ENDIF IF ( ASSOCIATED( grid%smslp ) ) THEN DEALLOCATE(grid%smslp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%smslp. ') endif ENDIF IF ( ASSOCIATED( grid%distsq ) ) THEN DEALLOCATE(grid%distsq,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%distsq. ') endif ENDIF IF ( ASSOCIATED( grid%weightout ) ) THEN DEALLOCATE(grid%weightout,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%weightout. ') endif ENDIF IF ( ASSOCIATED( grid%mslp_noisy ) ) THEN DEALLOCATE(grid%mslp_noisy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mslp_noisy. ') endif ENDIF IF ( ASSOCIATED( grid%pdyn_smooth ) ) THEN DEALLOCATE(grid%pdyn_smooth,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pdyn_smooth. ') endif ENDIF IF ( ASSOCIATED( grid%pdyn_parent ) ) THEN DEALLOCATE(grid%pdyn_parent,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pdyn_parent. ') endif ENDIF IF ( ASSOCIATED( grid%pdyn ) ) THEN DEALLOCATE(grid%pdyn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pdyn. ') endif ENDIF IF ( ASSOCIATED( grid%mslp ) ) THEN DEALLOCATE(grid%mslp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mslp. ') endif ENDIF IF ( ASSOCIATED( grid%best_mslp ) ) THEN DEALLOCATE(grid%best_mslp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%best_mslp. ') endif ENDIF IF ( ASSOCIATED( grid%sqws ) ) THEN DEALLOCATE(grid%sqws,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sqws. ') endif ENDIF IF ( ASSOCIATED( grid%ducudt ) ) THEN DEALLOCATE(grid%ducudt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ducudt. ') endif ENDIF IF ( ASSOCIATED( grid%dvcudt ) ) THEN DEALLOCATE(grid%dvcudt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dvcudt. ') endif ENDIF IF ( ASSOCIATED( grid%randstate1 ) ) THEN DEALLOCATE(grid%randstate1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%randstate1. ') endif ENDIF IF ( ASSOCIATED( grid%randstate2 ) ) THEN DEALLOCATE(grid%randstate2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%randstate2. ') endif ENDIF IF ( ASSOCIATED( grid%randstate3 ) ) THEN DEALLOCATE(grid%randstate3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%randstate3. ') endif ENDIF IF ( ASSOCIATED( grid%randstate4 ) ) THEN DEALLOCATE(grid%randstate4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%randstate4. ') endif ENDIF IF ( ASSOCIATED( grid%random ) ) THEN DEALLOCATE(grid%random,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%random. ') endif ENDIF IF ( ASSOCIATED( grid%iih ) ) THEN DEALLOCATE(grid%iih,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iih. ') endif ENDIF IF ( ASSOCIATED( grid%jjh ) ) THEN DEALLOCATE(grid%jjh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%jjh. ') endif ENDIF IF ( ASSOCIATED( grid%iiv ) ) THEN DEALLOCATE(grid%iiv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iiv. ') endif ENDIF IF ( ASSOCIATED( grid%jjv ) ) THEN DEALLOCATE(grid%jjv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%jjv. ') endif ENDIF IF ( ASSOCIATED( grid%hnear_i ) ) THEN DEALLOCATE(grid%hnear_i,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hnear_i. ') endif ENDIF IF ( ASSOCIATED( grid%hnear_j ) ) THEN DEALLOCATE(grid%hnear_j,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hnear_j. ') endif ENDIF IF ( ASSOCIATED( grid%hbwgt1 ) ) THEN DEALLOCATE(grid%hbwgt1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hbwgt1. ') endif ENDIF IF ( ASSOCIATED( grid%hbwgt2 ) ) THEN DEALLOCATE(grid%hbwgt2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hbwgt2. ') endif ENDIF IF ( ASSOCIATED( grid%hbwgt3 ) ) THEN DEALLOCATE(grid%hbwgt3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hbwgt3. ') endif ENDIF IF ( ASSOCIATED( grid%hbwgt4 ) ) THEN DEALLOCATE(grid%hbwgt4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hbwgt4. ') endif ENDIF IF ( ASSOCIATED( grid%vbwgt1 ) ) THEN DEALLOCATE(grid%vbwgt1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vbwgt1. ') endif ENDIF IF ( ASSOCIATED( grid%vbwgt2 ) ) THEN DEALLOCATE(grid%vbwgt2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vbwgt2. ') endif ENDIF IF ( ASSOCIATED( grid%vbwgt3 ) ) THEN DEALLOCATE(grid%vbwgt3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vbwgt3. ') endif ENDIF IF ( ASSOCIATED( grid%vbwgt4 ) ) THEN DEALLOCATE(grid%vbwgt4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vbwgt4. ') endif ENDIF IF ( ASSOCIATED( grid%hlon ) ) THEN DEALLOCATE(grid%hlon,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hlon. ') endif ENDIF IF ( ASSOCIATED( grid%hlat ) ) THEN DEALLOCATE(grid%hlat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hlat. ') endif ENDIF IF ( ASSOCIATED( grid%vlon ) ) THEN DEALLOCATE(grid%vlon,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vlon. ') endif ENDIF IF ( ASSOCIATED( grid%vlat ) ) THEN DEALLOCATE(grid%vlat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vlat. ') endif ENDIF IF ( ASSOCIATED( grid%tg_max_m10wind ) ) THEN DEALLOCATE(grid%tg_max_m10wind,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg_max_m10wind. ') endif ENDIF IF ( ASSOCIATED( grid%tg_max_wwind ) ) THEN DEALLOCATE(grid%tg_max_wwind,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg_max_wwind. ') endif ENDIF IF ( ASSOCIATED( grid%tg_min_wwind ) ) THEN DEALLOCATE(grid%tg_min_wwind,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg_min_wwind. ') endif ENDIF IF ( ASSOCIATED( grid%tg_max_zhel_25 ) ) THEN DEALLOCATE(grid%tg_max_zhel_25,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg_max_zhel_25. ') endif ENDIF IF ( ASSOCIATED( grid%tg_min_zhel_25 ) ) THEN DEALLOCATE(grid%tg_min_zhel_25,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg_min_zhel_25. ') endif ENDIF IF ( ASSOCIATED( grid%tg_max_zhel_03 ) ) THEN DEALLOCATE(grid%tg_max_zhel_03,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg_max_zhel_03. ') endif ENDIF IF ( ASSOCIATED( grid%tg_min_zhel_03 ) ) THEN DEALLOCATE(grid%tg_min_zhel_03,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg_min_zhel_03. ') endif ENDIF IF ( ASSOCIATED( grid%tg_updhel25 ) ) THEN DEALLOCATE(grid%tg_updhel25,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg_updhel25. ') endif ENDIF IF ( ASSOCIATED( grid%tg_max_updhel25 ) ) THEN DEALLOCATE(grid%tg_max_updhel25,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg_max_updhel25. ') endif ENDIF IF ( ASSOCIATED( grid%tg_updhel03 ) ) THEN DEALLOCATE(grid%tg_updhel03,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg_updhel03. ') endif ENDIF IF ( ASSOCIATED( grid%tg_max_updhel03 ) ) THEN DEALLOCATE(grid%tg_max_updhel03,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg_max_updhel03. ') endif ENDIF IF ( ASSOCIATED( grid%tg_total_precip ) ) THEN DEALLOCATE(grid%tg_total_precip,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg_total_precip. ') endif ENDIF IF ( ASSOCIATED( grid%tlow ) ) THEN DEALLOCATE(grid%tlow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tlow. ') endif ENDIF IF ( ASSOCIATED( grid%zlow ) ) THEN DEALLOCATE(grid%zlow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zlow. ') endif ENDIF IF ( ASSOCIATED( grid%rotangle ) ) THEN DEALLOCATE(grid%rotangle,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rotangle. ') endif ENDIF IF ( ASSOCIATED( grid%pstd ) ) THEN DEALLOCATE(grid%pstd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pstd. ') endif ENDIF IF ( ASSOCIATED( grid%hres_fis ) ) THEN DEALLOCATE(grid%hres_fis,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hres_fis. ') endif ENDIF IF ( ASSOCIATED( grid%hres_avc ) ) THEN DEALLOCATE(grid%hres_avc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hres_avc. ') endif ENDIF IF ( ASSOCIATED( grid%hres_lnd ) ) THEN DEALLOCATE(grid%hres_lnd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hres_lnd. ') endif ENDIF IF ( ASSOCIATED( grid%hbm2 ) ) THEN DEALLOCATE(grid%hbm2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hbm2. ') endif ENDIF IF ( ASSOCIATED( grid%hbm3 ) ) THEN DEALLOCATE(grid%hbm3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hbm3. ') endif ENDIF IF ( ASSOCIATED( grid%vbm2 ) ) THEN DEALLOCATE(grid%vbm2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vbm2. ') endif ENDIF IF ( ASSOCIATED( grid%vbm3 ) ) THEN DEALLOCATE(grid%vbm3,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vbm3. ') 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%sm_bxs ) ) THEN DEALLOCATE(grid%sm_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm_bxs. ') endif NULLIFY(grid%sm_bxs) ENDIF IF ( ASSOCIATED( grid%sm_bxe ) ) THEN DEALLOCATE(grid%sm_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm_bxe. ') endif NULLIFY(grid%sm_bxe) ENDIF IF ( ASSOCIATED( grid%sm_bys ) ) THEN DEALLOCATE(grid%sm_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm_bys. ') endif NULLIFY(grid%sm_bys) ENDIF IF ( ASSOCIATED( grid%sm_bye ) ) THEN DEALLOCATE(grid%sm_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm_bye. ') endif NULLIFY(grid%sm_bye) ENDIF IF ( ASSOCIATED( grid%sm_btxs ) ) THEN DEALLOCATE(grid%sm_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm_btxs. ') endif NULLIFY(grid%sm_btxs) ENDIF IF ( ASSOCIATED( grid%sm_btxe ) ) THEN DEALLOCATE(grid%sm_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm_btxe. ') endif NULLIFY(grid%sm_btxe) ENDIF IF ( ASSOCIATED( grid%sm_btys ) ) THEN DEALLOCATE(grid%sm_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm_btys. ') endif NULLIFY(grid%sm_btys) ENDIF IF ( ASSOCIATED( grid%sm_btye ) ) THEN DEALLOCATE(grid%sm_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sm_btye. ') endif NULLIFY(grid%sm_btye) ENDIF IF ( ASSOCIATED( grid%sice ) ) THEN DEALLOCATE(grid%sice,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sice. ') endif ENDIF IF ( ASSOCIATED( grid%pd ) ) THEN DEALLOCATE(grid%pd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pd. ') endif ENDIF IF ( ASSOCIATED( grid%pd_bxs ) ) THEN DEALLOCATE(grid%pd_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pd_bxs. ') endif NULLIFY(grid%pd_bxs) ENDIF IF ( ASSOCIATED( grid%pd_bxe ) ) THEN DEALLOCATE(grid%pd_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pd_bxe. ') endif NULLIFY(grid%pd_bxe) ENDIF IF ( ASSOCIATED( grid%pd_bys ) ) THEN DEALLOCATE(grid%pd_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pd_bys. ') endif NULLIFY(grid%pd_bys) ENDIF IF ( ASSOCIATED( grid%pd_bye ) ) THEN DEALLOCATE(grid%pd_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pd_bye. ') endif NULLIFY(grid%pd_bye) ENDIF IF ( ASSOCIATED( grid%pd_btxs ) ) THEN DEALLOCATE(grid%pd_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pd_btxs. ') endif NULLIFY(grid%pd_btxs) ENDIF IF ( ASSOCIATED( grid%pd_btxe ) ) THEN DEALLOCATE(grid%pd_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pd_btxe. ') endif NULLIFY(grid%pd_btxe) ENDIF IF ( ASSOCIATED( grid%pd_btys ) ) THEN DEALLOCATE(grid%pd_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pd_btys. ') endif NULLIFY(grid%pd_btys) ENDIF IF ( ASSOCIATED( grid%pd_btye ) ) THEN DEALLOCATE(grid%pd_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pd_btye. ') endif NULLIFY(grid%pd_btye) ENDIF IF ( ASSOCIATED( grid%fis ) ) THEN DEALLOCATE(grid%fis,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fis. ') endif ENDIF IF ( ASSOCIATED( grid%res ) ) THEN DEALLOCATE(grid%res,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%res. ') endif ENDIF IF ( ASSOCIATED( grid%t ) ) THEN DEALLOCATE(grid%t,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t. ') 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%q ) ) THEN DEALLOCATE(grid%q,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q. ') endif ENDIF IF ( ASSOCIATED( grid%q_bxs ) ) THEN DEALLOCATE(grid%q_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q_bxs. ') endif NULLIFY(grid%q_bxs) ENDIF IF ( ASSOCIATED( grid%q_bxe ) ) THEN DEALLOCATE(grid%q_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q_bxe. ') endif NULLIFY(grid%q_bxe) ENDIF IF ( ASSOCIATED( grid%q_bys ) ) THEN DEALLOCATE(grid%q_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q_bys. ') endif NULLIFY(grid%q_bys) ENDIF IF ( ASSOCIATED( grid%q_bye ) ) THEN DEALLOCATE(grid%q_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q_bye. ') endif NULLIFY(grid%q_bye) ENDIF IF ( ASSOCIATED( grid%q_btxs ) ) THEN DEALLOCATE(grid%q_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q_btxs. ') endif NULLIFY(grid%q_btxs) ENDIF IF ( ASSOCIATED( grid%q_btxe ) ) THEN DEALLOCATE(grid%q_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q_btxe. ') endif NULLIFY(grid%q_btxe) ENDIF IF ( ASSOCIATED( grid%q_btys ) ) THEN DEALLOCATE(grid%q_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q_btys. ') endif NULLIFY(grid%q_btys) ENDIF IF ( ASSOCIATED( grid%q_btye ) ) THEN DEALLOCATE(grid%q_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q_btye. ') endif NULLIFY(grid%q_btye) ENDIF IF ( ASSOCIATED( grid%test_vgrid ) ) THEN DEALLOCATE(grid%test_vgrid,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%test_vgrid. ') endif ENDIF IF ( ASSOCIATED( grid%u ) ) THEN DEALLOCATE(grid%u,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%u. ') 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%v ) ) THEN DEALLOCATE(grid%v,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%v. ') 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%told ) ) THEN DEALLOCATE(grid%told,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%told. ') endif ENDIF IF ( ASSOCIATED( grid%uold ) ) THEN DEALLOCATE(grid%uold,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uold. ') endif ENDIF IF ( ASSOCIATED( grid%vold ) ) THEN DEALLOCATE(grid%vold,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vold. ') 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_pd ) ) THEN DEALLOCATE(grid%dfi_pd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_pd. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_pint ) ) THEN DEALLOCATE(grid%dfi_pint,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_pint. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_dwdt ) ) THEN DEALLOCATE(grid%dfi_dwdt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_dwdt. ') 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_q ) ) THEN DEALLOCATE(grid%dfi_q,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_q. ') 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_q2 ) ) THEN DEALLOCATE(grid%dfi_q2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_q2. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_cwm ) ) THEN DEALLOCATE(grid%dfi_cwm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_cwm. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_rrw ) ) THEN DEALLOCATE(grid%dfi_rrw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_rrw. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_stc ) ) THEN DEALLOCATE(grid%dfi_stc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_stc. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_smc ) ) THEN DEALLOCATE(grid%dfi_smc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_smc. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_sh2o ) ) THEN DEALLOCATE(grid%dfi_sh2o,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_sh2o. ') 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_nmm_tsk ) ) THEN DEALLOCATE(grid%dfi_nmm_tsk,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_nmm_tsk. ') 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%dx_nmm ) ) THEN DEALLOCATE(grid%dx_nmm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dx_nmm. ') endif ENDIF IF ( ASSOCIATED( grid%wpdar ) ) THEN DEALLOCATE(grid%wpdar,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%wpdar. ') endif ENDIF IF ( ASSOCIATED( grid%cpgfu ) ) THEN DEALLOCATE(grid%cpgfu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cpgfu. ') endif ENDIF IF ( ASSOCIATED( grid%curv ) ) THEN DEALLOCATE(grid%curv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%curv. ') endif ENDIF IF ( ASSOCIATED( grid%fcp ) ) THEN DEALLOCATE(grid%fcp,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fcp. ') endif ENDIF IF ( ASSOCIATED( grid%fdiv ) ) THEN DEALLOCATE(grid%fdiv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fdiv. ') 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%fad ) ) THEN DEALLOCATE(grid%fad,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fad. ') endif ENDIF IF ( ASSOCIATED( grid%ddmpu ) ) THEN DEALLOCATE(grid%ddmpu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ddmpu. ') endif ENDIF IF ( ASSOCIATED( grid%ddmpv ) ) THEN DEALLOCATE(grid%ddmpv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ddmpv. ') endif ENDIF IF ( ASSOCIATED( grid%deta ) ) THEN DEALLOCATE(grid%deta,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%deta. ') endif ENDIF IF ( ASSOCIATED( grid%rdeta ) ) THEN DEALLOCATE(grid%rdeta,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rdeta. ') endif ENDIF IF ( ASSOCIATED( grid%aeta ) ) THEN DEALLOCATE(grid%aeta,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aeta. ') endif ENDIF IF ( ASSOCIATED( grid%f4q2 ) ) THEN DEALLOCATE(grid%f4q2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%f4q2. ') endif ENDIF IF ( ASSOCIATED( grid%etax ) ) THEN DEALLOCATE(grid%etax,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%etax. ') endif ENDIF IF ( ASSOCIATED( grid%dfl ) ) THEN DEALLOCATE(grid%dfl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfl. ') endif ENDIF IF ( ASSOCIATED( grid%deta1 ) ) THEN DEALLOCATE(grid%deta1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%deta1. ') endif ENDIF IF ( ASSOCIATED( grid%aeta1 ) ) THEN DEALLOCATE(grid%aeta1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aeta1. ') endif ENDIF IF ( ASSOCIATED( grid%eta1 ) ) THEN DEALLOCATE(grid%eta1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%eta1. ') endif ENDIF IF ( ASSOCIATED( grid%deta2 ) ) THEN DEALLOCATE(grid%deta2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%deta2. ') endif ENDIF IF ( ASSOCIATED( grid%aeta2 ) ) THEN DEALLOCATE(grid%aeta2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aeta2. ') endif ENDIF IF ( ASSOCIATED( grid%eta2 ) ) THEN DEALLOCATE(grid%eta2,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%eta2. ') endif ENDIF IF ( ASSOCIATED( grid%em ) ) THEN DEALLOCATE(grid%em,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%em. ') endif ENDIF IF ( ASSOCIATED( grid%emt ) ) THEN DEALLOCATE(grid%emt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%emt. ') endif ENDIF IF ( ASSOCIATED( grid%adt ) ) THEN DEALLOCATE(grid%adt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%adt. ') endif ENDIF IF ( ASSOCIATED( grid%adu ) ) THEN DEALLOCATE(grid%adu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%adu. ') endif ENDIF IF ( ASSOCIATED( grid%adv ) ) THEN DEALLOCATE(grid%adv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%adv. ') endif ENDIF IF ( ASSOCIATED( grid%em_loc ) ) THEN DEALLOCATE(grid%em_loc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%em_loc. ') endif ENDIF IF ( ASSOCIATED( grid%emt_loc ) ) THEN DEALLOCATE(grid%emt_loc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%emt_loc. ') endif ENDIF IF ( ASSOCIATED( grid%pdsl ) ) THEN DEALLOCATE(grid%pdsl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pdsl. ') endif ENDIF IF ( ASSOCIATED( grid%pdslo ) ) THEN DEALLOCATE(grid%pdslo,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pdslo. ') endif ENDIF IF ( ASSOCIATED( grid%psdt ) ) THEN DEALLOCATE(grid%psdt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%psdt. ') 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%def3d ) ) THEN DEALLOCATE(grid%def3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%def3d. ') endif ENDIF IF ( ASSOCIATED( grid%few ) ) THEN DEALLOCATE(grid%few,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%few. ') endif ENDIF IF ( ASSOCIATED( grid%fne ) ) THEN DEALLOCATE(grid%fne,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fne. ') endif ENDIF IF ( ASSOCIATED( grid%fns ) ) THEN DEALLOCATE(grid%fns,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fns. ') endif ENDIF IF ( ASSOCIATED( grid%fse ) ) THEN DEALLOCATE(grid%fse,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%fse. ') endif ENDIF IF ( ASSOCIATED( grid%omgalf ) ) THEN DEALLOCATE(grid%omgalf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%omgalf. ') endif ENDIF IF ( ASSOCIATED( grid%petdt ) ) THEN DEALLOCATE(grid%petdt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%petdt. ') endif ENDIF IF ( ASSOCIATED( grid%rtop ) ) THEN DEALLOCATE(grid%rtop,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rtop. ') 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%lpbl ) ) THEN DEALLOCATE(grid%lpbl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lpbl. ') endif ENDIF IF ( ASSOCIATED( grid%mixht ) ) THEN DEALLOCATE(grid%mixht,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mixht. ') endif ENDIF IF ( ASSOCIATED( grid%ustar ) ) THEN DEALLOCATE(grid%ustar,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ustar. ') 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%mz0 ) ) THEN DEALLOCATE(grid%mz0,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mz0. ') endif ENDIF IF ( ASSOCIATED( grid%scurx ) ) THEN DEALLOCATE(grid%scurx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scurx. ') endif ENDIF IF ( ASSOCIATED( grid%scury ) ) THEN DEALLOCATE(grid%scury,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scury. ') endif ENDIF IF ( ASSOCIATED( grid%charn ) ) THEN DEALLOCATE(grid%charn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%charn. ') endif ENDIF IF ( ASSOCIATED( grid%msang ) ) THEN DEALLOCATE(grid%msang,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%msang. ') endif ENDIF IF ( ASSOCIATED( grid%rchno ) ) THEN DEALLOCATE(grid%rchno,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rchno. ') endif ENDIF IF ( ASSOCIATED( grid%zsig1 ) ) THEN DEALLOCATE(grid%zsig1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zsig1. ') endif ENDIF IF ( ASSOCIATED( grid%ulowl ) ) THEN DEALLOCATE(grid%ulowl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ulowl. ') endif ENDIF IF ( ASSOCIATED( grid%vlowl ) ) THEN DEALLOCATE(grid%vlowl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vlowl. ') endif ENDIF IF ( ASSOCIATED( grid%rc2d ) ) THEN DEALLOCATE(grid%rc2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rc2d. ') endif ENDIF IF ( ASSOCIATED( grid%dku3d ) ) THEN DEALLOCATE(grid%dku3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dku3d. ') endif ENDIF IF ( ASSOCIATED( grid%dkt3d ) ) THEN DEALLOCATE(grid%dkt3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dkt3d. ') endif ENDIF IF ( ASSOCIATED( grid%scalefun ) ) THEN DEALLOCATE(grid%scalefun,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scalefun. ') endif ENDIF IF ( ASSOCIATED( grid%scalefun1 ) ) THEN DEALLOCATE(grid%scalefun1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%scalefun1. ') endif ENDIF IF ( ASSOCIATED( grid%sigmu ) ) THEN DEALLOCATE(grid%sigmu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sigmu. ') endif ENDIF IF ( ASSOCIATED( grid%sigmu1 ) ) THEN DEALLOCATE(grid%sigmu1,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sigmu1. ') endif ENDIF IF ( ASSOCIATED( grid%dthcudt ) ) THEN DEALLOCATE(grid%dthcudt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dthcudt. ') endif ENDIF IF ( ASSOCIATED( grid%dqvcudt ) ) THEN DEALLOCATE(grid%dqvcudt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dqvcudt. ') endif ENDIF IF ( ASSOCIATED( grid%dqrcudt ) ) THEN DEALLOCATE(grid%dqrcudt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dqrcudt. ') endif ENDIF IF ( ASSOCIATED( grid%dqccudt ) ) THEN DEALLOCATE(grid%dqccudt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dqccudt. ') endif ENDIF IF ( ASSOCIATED( grid%dqicudt ) ) THEN DEALLOCATE(grid%dqicudt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dqicudt. ') endif ENDIF IF ( ASSOCIATED( grid%dqscudt ) ) THEN DEALLOCATE(grid%dqscudt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dqscudt. ') endif ENDIF IF ( ASSOCIATED( grid%dthbldt ) ) THEN DEALLOCATE(grid%dthbldt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dthbldt. ') endif ENDIF IF ( ASSOCIATED( grid%dqvbldt ) ) THEN DEALLOCATE(grid%dqvbldt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dqvbldt. ') endif ENDIF IF ( ASSOCIATED( grid%dubldt ) ) THEN DEALLOCATE(grid%dubldt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dubldt. ') endif ENDIF IF ( ASSOCIATED( grid%dvbldt ) ) THEN DEALLOCATE(grid%dvbldt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dvbldt. ') endif ENDIF IF ( ASSOCIATED( grid%hpbl2d ) ) THEN DEALLOCATE(grid%hpbl2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hpbl2d. ') endif ENDIF IF ( ASSOCIATED( grid%heat2d ) ) THEN DEALLOCATE(grid%heat2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%heat2d. ') endif ENDIF IF ( ASSOCIATED( grid%evap2d ) ) THEN DEALLOCATE(grid%evap2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%evap2d. ') endif ENDIF IF ( ASSOCIATED( grid%z0base ) ) THEN DEALLOCATE(grid%z0base,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%z0base. ') endif ENDIF IF ( ASSOCIATED( grid%ths ) ) THEN DEALLOCATE(grid%ths,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ths. ') 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%qsh ) ) THEN DEALLOCATE(grid%qsh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qsh. ') endif ENDIF IF ( ASSOCIATED( grid%twbs ) ) THEN DEALLOCATE(grid%twbs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%twbs. ') endif ENDIF IF ( ASSOCIATED( grid%qwbs ) ) THEN DEALLOCATE(grid%qwbs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qwbs. ') endif ENDIF IF ( ASSOCIATED( grid%taux ) ) THEN DEALLOCATE(grid%taux,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%taux. ') endif ENDIF IF ( ASSOCIATED( grid%tauy ) ) THEN DEALLOCATE(grid%tauy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tauy. ') endif ENDIF IF ( ASSOCIATED( grid%prec ) ) THEN DEALLOCATE(grid%prec,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%prec. ') endif ENDIF IF ( ASSOCIATED( grid%aprec ) ) THEN DEALLOCATE(grid%aprec,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aprec. ') endif ENDIF IF ( ASSOCIATED( grid%acprec ) ) THEN DEALLOCATE(grid%acprec,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acprec. ') endif ENDIF IF ( ASSOCIATED( grid%cuprec ) ) THEN DEALLOCATE(grid%cuprec,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cuprec. ') endif ENDIF IF ( ASSOCIATED( grid%lspa ) ) THEN DEALLOCATE(grid%lspa,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lspa. ') endif ENDIF IF ( ASSOCIATED( grid%ddata ) ) THEN DEALLOCATE(grid%ddata,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ddata. ') endif ENDIF IF ( ASSOCIATED( grid%accliq ) ) THEN DEALLOCATE(grid%accliq,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%accliq. ') endif ENDIF IF ( ASSOCIATED( grid%sno ) ) THEN DEALLOCATE(grid%sno,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sno. ') endif ENDIF IF ( ASSOCIATED( grid%si ) ) THEN DEALLOCATE(grid%si,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%si. ') 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%deep ) ) THEN DEALLOCATE(grid%deep,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%deep. ') endif ENDIF IF ( ASSOCIATED( grid%rf ) ) THEN DEALLOCATE(grid%rf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rf. ') 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%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%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%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%q2_bxs ) ) THEN DEALLOCATE(grid%q2_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2_bxs. ') endif NULLIFY(grid%q2_bxs) ENDIF IF ( ASSOCIATED( grid%q2_bxe ) ) THEN DEALLOCATE(grid%q2_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2_bxe. ') endif NULLIFY(grid%q2_bxe) ENDIF IF ( ASSOCIATED( grid%q2_bys ) ) THEN DEALLOCATE(grid%q2_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2_bys. ') endif NULLIFY(grid%q2_bys) ENDIF IF ( ASSOCIATED( grid%q2_bye ) ) THEN DEALLOCATE(grid%q2_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2_bye. ') endif NULLIFY(grid%q2_bye) ENDIF IF ( ASSOCIATED( grid%q2_btxs ) ) THEN DEALLOCATE(grid%q2_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2_btxs. ') endif NULLIFY(grid%q2_btxs) ENDIF IF ( ASSOCIATED( grid%q2_btxe ) ) THEN DEALLOCATE(grid%q2_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2_btxe. ') endif NULLIFY(grid%q2_btxe) ENDIF IF ( ASSOCIATED( grid%q2_btys ) ) THEN DEALLOCATE(grid%q2_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2_btys. ') endif NULLIFY(grid%q2_btys) ENDIF IF ( ASSOCIATED( grid%q2_btye ) ) THEN DEALLOCATE(grid%q2_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%q2_btye. ') endif NULLIFY(grid%q2_btye) ENDIF IF ( ASSOCIATED( grid%t_adj ) ) THEN DEALLOCATE(grid%t_adj,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_adj. ') endif ENDIF IF ( ASSOCIATED( grid%t_old ) ) THEN DEALLOCATE(grid%t_old,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t_old. ') endif ENDIF IF ( ASSOCIATED( grid%zero_3d ) ) THEN DEALLOCATE(grid%zero_3d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%zero_3d. ') 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%akhs_out ) ) THEN DEALLOCATE(grid%akhs_out,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%akhs_out. ') endif ENDIF IF ( ASSOCIATED( grid%akms_out ) ) THEN DEALLOCATE(grid%akms_out,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%akms_out. ') endif ENDIF IF ( ASSOCIATED( grid%cd_out ) ) THEN DEALLOCATE(grid%cd_out,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cd_out. ') endif ENDIF IF ( ASSOCIATED( grid%ch_out ) ) THEN DEALLOCATE(grid%ch_out,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ch_out. ') endif ENDIF IF ( ASSOCIATED( grid%albase ) ) THEN DEALLOCATE(grid%albase,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%albase. ') 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%cnvbot ) ) THEN DEALLOCATE(grid%cnvbot,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cnvbot. ') endif ENDIF IF ( ASSOCIATED( grid%cnvtop ) ) THEN DEALLOCATE(grid%cnvtop,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cnvtop. ') endif ENDIF IF ( ASSOCIATED( grid%czen ) ) THEN DEALLOCATE(grid%czen,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%czen. ') 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%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%epsr ) ) THEN DEALLOCATE(grid%epsr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%epsr. ') endif ENDIF IF ( ASSOCIATED( grid%gffc ) ) THEN DEALLOCATE(grid%gffc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gffc. ') endif ENDIF IF ( ASSOCIATED( grid%glat ) ) THEN DEALLOCATE(grid%glat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%glat. ') endif ENDIF IF ( ASSOCIATED( grid%glon ) ) THEN DEALLOCATE(grid%glon,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%glon. ') endif ENDIF IF ( ASSOCIATED( grid%nmm_tsk ) ) THEN DEALLOCATE(grid%nmm_tsk,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%nmm_tsk. ') endif ENDIF IF ( ASSOCIATED( grid%hdac ) ) THEN DEALLOCATE(grid%hdac,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hdac. ') endif ENDIF IF ( ASSOCIATED( grid%hdacv ) ) THEN DEALLOCATE(grid%hdacv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hdacv. ') endif ENDIF IF ( ASSOCIATED( grid%mxsnal ) ) THEN DEALLOCATE(grid%mxsnal,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%mxsnal. ') endif ENDIF IF ( ASSOCIATED( grid%radin ) ) THEN DEALLOCATE(grid%radin,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%radin. ') endif ENDIF IF ( ASSOCIATED( grid%radot ) ) THEN DEALLOCATE(grid%radot,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%radot. ') endif ENDIF IF ( ASSOCIATED( grid%sigt4 ) ) THEN DEALLOCATE(grid%sigt4,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sigt4. ') endif ENDIF IF ( ASSOCIATED( grid%tg ) ) THEN DEALLOCATE(grid%tg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tg. ') endif ENDIF IF ( ASSOCIATED( grid%dfrlg ) ) THEN DEALLOCATE(grid%dfrlg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfrlg. ') endif ENDIF IF ( ASSOCIATED( grid%lvl ) ) THEN DEALLOCATE(grid%lvl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lvl. ') 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%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 ) ) 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_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%qc_cu ) ) THEN DEALLOCATE(grid%qc_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qc_cu. ') endif ENDIF IF ( ASSOCIATED( grid%qi_cu ) ) THEN DEALLOCATE(grid%qi_cu,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qi_cu. ') 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%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%ierr_shallow ) ) THEN DEALLOCATE(grid%ierr_shallow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ierr_shallow. ') 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%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%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%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%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%qnwfa2d ) ) THEN DEALLOCATE(grid%qnwfa2d,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%qnwfa2d. ') 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%dfi_re_cloud ) ) THEN DEALLOCATE(grid%dfi_re_cloud,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_re_cloud. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_re_ice ) ) THEN DEALLOCATE(grid%dfi_re_ice,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_re_ice. ') endif ENDIF IF ( ASSOCIATED( grid%dfi_re_snow ) ) THEN DEALLOCATE(grid%dfi_re_snow,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dfi_re_snow. ') endif ENDIF IF ( ASSOCIATED( grid%hrswpd ) ) THEN DEALLOCATE(grid%hrswpd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hrswpd. ') endif ENDIF IF ( ASSOCIATED( grid%hrlwpd ) ) THEN DEALLOCATE(grid%hrlwpd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hrlwpd. ') 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%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%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%cwm ) ) THEN DEALLOCATE(grid%cwm,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cwm. ') endif ENDIF IF ( ASSOCIATED( grid%cwm_bxs ) ) THEN DEALLOCATE(grid%cwm_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cwm_bxs. ') endif NULLIFY(grid%cwm_bxs) ENDIF IF ( ASSOCIATED( grid%cwm_bxe ) ) THEN DEALLOCATE(grid%cwm_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cwm_bxe. ') endif NULLIFY(grid%cwm_bxe) ENDIF IF ( ASSOCIATED( grid%cwm_bys ) ) THEN DEALLOCATE(grid%cwm_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cwm_bys. ') endif NULLIFY(grid%cwm_bys) ENDIF IF ( ASSOCIATED( grid%cwm_bye ) ) THEN DEALLOCATE(grid%cwm_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cwm_bye. ') endif NULLIFY(grid%cwm_bye) ENDIF IF ( ASSOCIATED( grid%cwm_btxs ) ) THEN DEALLOCATE(grid%cwm_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cwm_btxs. ') endif NULLIFY(grid%cwm_btxs) ENDIF IF ( ASSOCIATED( grid%cwm_btxe ) ) THEN DEALLOCATE(grid%cwm_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cwm_btxe. ') endif NULLIFY(grid%cwm_btxe) ENDIF IF ( ASSOCIATED( grid%cwm_btys ) ) THEN DEALLOCATE(grid%cwm_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cwm_btys. ') endif NULLIFY(grid%cwm_btys) ENDIF IF ( ASSOCIATED( grid%cwm_btye ) ) THEN DEALLOCATE(grid%cwm_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cwm_btye. ') endif NULLIFY(grid%cwm_btye) ENDIF IF ( ASSOCIATED( grid%rrw ) ) THEN DEALLOCATE(grid%rrw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rrw. ') endif ENDIF IF ( ASSOCIATED( grid%rrw_bxs ) ) THEN DEALLOCATE(grid%rrw_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rrw_bxs. ') endif NULLIFY(grid%rrw_bxs) ENDIF IF ( ASSOCIATED( grid%rrw_bxe ) ) THEN DEALLOCATE(grid%rrw_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rrw_bxe. ') endif NULLIFY(grid%rrw_bxe) ENDIF IF ( ASSOCIATED( grid%rrw_bys ) ) THEN DEALLOCATE(grid%rrw_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rrw_bys. ') endif NULLIFY(grid%rrw_bys) ENDIF IF ( ASSOCIATED( grid%rrw_bye ) ) THEN DEALLOCATE(grid%rrw_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rrw_bye. ') endif NULLIFY(grid%rrw_bye) ENDIF IF ( ASSOCIATED( grid%rrw_btxs ) ) THEN DEALLOCATE(grid%rrw_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rrw_btxs. ') endif NULLIFY(grid%rrw_btxs) ENDIF IF ( ASSOCIATED( grid%rrw_btxe ) ) THEN DEALLOCATE(grid%rrw_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rrw_btxe. ') endif NULLIFY(grid%rrw_btxe) ENDIF IF ( ASSOCIATED( grid%rrw_btys ) ) THEN DEALLOCATE(grid%rrw_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rrw_btys. ') endif NULLIFY(grid%rrw_btys) ENDIF IF ( ASSOCIATED( grid%rrw_btye ) ) THEN DEALLOCATE(grid%rrw_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rrw_btye. ') endif NULLIFY(grid%rrw_btye) ENDIF IF ( ASSOCIATED( grid%f_ice ) ) THEN DEALLOCATE(grid%f_ice,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%f_ice. ') endif ENDIF IF ( ASSOCIATED( grid%f_rain ) ) THEN DEALLOCATE(grid%f_rain,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%f_rain. ') endif ENDIF IF ( ASSOCIATED( grid%f_rimef ) ) THEN DEALLOCATE(grid%f_rimef,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%f_rimef. ') 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%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%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%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%islope ) ) THEN DEALLOCATE(grid%islope,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%islope. ') endif ENDIF IF ( ASSOCIATED( grid%dzsoil ) ) THEN DEALLOCATE(grid%dzsoil,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dzsoil. ') endif ENDIF IF ( ASSOCIATED( grid%rtdpth ) ) THEN DEALLOCATE(grid%rtdpth,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rtdpth. ') endif ENDIF IF ( ASSOCIATED( grid%sldpth ) ) THEN DEALLOCATE(grid%sldpth,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sldpth. ') endif ENDIF IF ( ASSOCIATED( grid%cmc ) ) THEN DEALLOCATE(grid%cmc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cmc. ') endif ENDIF IF ( ASSOCIATED( grid%grnflx ) ) THEN DEALLOCATE(grid%grnflx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%grnflx. ') endif ENDIF IF ( ASSOCIATED( grid%pctsno ) ) THEN DEALLOCATE(grid%pctsno,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pctsno. ') 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%vegfrc ) ) THEN DEALLOCATE(grid%vegfrc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vegfrc. ') 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%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%smc ) ) THEN DEALLOCATE(grid%smc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%smc. ') endif ENDIF IF ( ASSOCIATED( grid%stc ) ) THEN DEALLOCATE(grid%stc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%stc. ') endif ENDIF IF ( ASSOCIATED( grid%hstdv ) ) THEN DEALLOCATE(grid%hstdv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hstdv. ') endif ENDIF IF ( ASSOCIATED( grid%hcnvx ) ) THEN DEALLOCATE(grid%hcnvx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hcnvx. ') endif ENDIF IF ( ASSOCIATED( grid%hasyw ) ) THEN DEALLOCATE(grid%hasyw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hasyw. ') endif ENDIF IF ( ASSOCIATED( grid%hasys ) ) THEN DEALLOCATE(grid%hasys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hasys. ') endif ENDIF IF ( ASSOCIATED( grid%hasysw ) ) THEN DEALLOCATE(grid%hasysw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hasysw. ') endif ENDIF IF ( ASSOCIATED( grid%hasynw ) ) THEN DEALLOCATE(grid%hasynw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hasynw. ') endif ENDIF IF ( ASSOCIATED( grid%hlenw ) ) THEN DEALLOCATE(grid%hlenw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hlenw. ') endif ENDIF IF ( ASSOCIATED( grid%hlens ) ) THEN DEALLOCATE(grid%hlens,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hlens. ') endif ENDIF IF ( ASSOCIATED( grid%hlensw ) ) THEN DEALLOCATE(grid%hlensw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hlensw. ') endif ENDIF IF ( ASSOCIATED( grid%hlennw ) ) THEN DEALLOCATE(grid%hlennw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hlennw. ') endif ENDIF IF ( ASSOCIATED( grid%hangl ) ) THEN DEALLOCATE(grid%hangl,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hangl. ') endif ENDIF IF ( ASSOCIATED( grid%hanis ) ) THEN DEALLOCATE(grid%hanis,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hanis. ') endif ENDIF IF ( ASSOCIATED( grid%hslop ) ) THEN DEALLOCATE(grid%hslop,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hslop. ') endif ENDIF IF ( ASSOCIATED( grid%hzmax ) ) THEN DEALLOCATE(grid%hzmax,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hzmax. ') endif ENDIF IF ( ASSOCIATED( grid%crot ) ) THEN DEALLOCATE(grid%crot,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%crot. ') endif ENDIF IF ( ASSOCIATED( grid%srot ) ) THEN DEALLOCATE(grid%srot,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%srot. ') endif ENDIF IF ( ASSOCIATED( grid%ugwdsfc ) ) THEN DEALLOCATE(grid%ugwdsfc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ugwdsfc. ') endif ENDIF IF ( ASSOCIATED( grid%vgwdsfc ) ) THEN DEALLOCATE(grid%vgwdsfc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vgwdsfc. ') 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%dwdtmn ) ) THEN DEALLOCATE(grid%dwdtmn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dwdtmn. ') endif ENDIF IF ( ASSOCIATED( grid%dwdtmx ) ) THEN DEALLOCATE(grid%dwdtmx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dwdtmx. ') endif ENDIF IF ( ASSOCIATED( grid%baro ) ) THEN DEALLOCATE(grid%baro,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%baro. ') endif ENDIF IF ( ASSOCIATED( grid%dwdt ) ) THEN DEALLOCATE(grid%dwdt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dwdt. ') endif ENDIF IF ( ASSOCIATED( grid%pdwdt ) ) THEN DEALLOCATE(grid%pdwdt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pdwdt. ') endif ENDIF IF ( ASSOCIATED( grid%pint ) ) THEN DEALLOCATE(grid%pint,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pint. ') endif ENDIF IF ( ASSOCIATED( grid%w ) ) THEN DEALLOCATE(grid%w,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w. ') endif ENDIF IF ( ASSOCIATED( grid%w_tot ) ) THEN DEALLOCATE(grid%w_tot,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%w_tot. ') 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%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%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%ssroff ) ) THEN DEALLOCATE(grid%ssroff,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ssroff. ') endif ENDIF IF ( ASSOCIATED( grid%bgroff ) ) THEN DEALLOCATE(grid%bgroff,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%bgroff. ') endif ENDIF IF ( ASSOCIATED( grid%rlwin ) ) THEN DEALLOCATE(grid%rlwin,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rlwin. ') endif ENDIF IF ( ASSOCIATED( grid%rlwout ) ) THEN DEALLOCATE(grid%rlwout,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rlwout. ') 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%alwin ) ) THEN DEALLOCATE(grid%alwin,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%alwin. ') endif ENDIF IF ( ASSOCIATED( grid%alwout ) ) THEN DEALLOCATE(grid%alwout,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%alwout. ') endif ENDIF IF ( ASSOCIATED( grid%alwtoa ) ) THEN DEALLOCATE(grid%alwtoa,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%alwtoa. ') endif ENDIF IF ( ASSOCIATED( grid%rswin ) ) THEN DEALLOCATE(grid%rswin,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rswin. ') endif ENDIF IF ( ASSOCIATED( grid%rswinc ) ) THEN DEALLOCATE(grid%rswinc,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rswinc. ') endif ENDIF IF ( ASSOCIATED( grid%rswout ) ) THEN DEALLOCATE(grid%rswout,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rswout. ') 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%aswin ) ) THEN DEALLOCATE(grid%aswin,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aswin. ') endif ENDIF IF ( ASSOCIATED( grid%aswout ) ) THEN DEALLOCATE(grid%aswout,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aswout. ') endif ENDIF IF ( ASSOCIATED( grid%aswtoa ) ) THEN DEALLOCATE(grid%aswtoa,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%aswtoa. ') endif ENDIF IF ( ASSOCIATED( grid%sfcshx ) ) THEN DEALLOCATE(grid%sfcshx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfcshx. ') endif ENDIF IF ( ASSOCIATED( grid%sfclhx ) ) THEN DEALLOCATE(grid%sfclhx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfclhx. ') endif ENDIF IF ( ASSOCIATED( grid%subshx ) ) THEN DEALLOCATE(grid%subshx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%subshx. ') 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%sfcuvx ) ) THEN DEALLOCATE(grid%sfcuvx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%sfcuvx. ') 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%potflx ) ) THEN DEALLOCATE(grid%potflx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%potflx. ') endif ENDIF IF ( ASSOCIATED( grid%tlmin ) ) THEN DEALLOCATE(grid%tlmin,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tlmin. ') endif ENDIF IF ( ASSOCIATED( grid%tlmax ) ) THEN DEALLOCATE(grid%tlmax,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tlmax. ') endif ENDIF IF ( ASSOCIATED( grid%t02_min ) ) THEN DEALLOCATE(grid%t02_min,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t02_min. ') endif ENDIF IF ( ASSOCIATED( grid%t02_max ) ) THEN DEALLOCATE(grid%t02_max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%t02_max. ') endif ENDIF IF ( ASSOCIATED( grid%rh02_min ) ) THEN DEALLOCATE(grid%rh02_min,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rh02_min. ') endif ENDIF IF ( ASSOCIATED( grid%rh02_max ) ) THEN DEALLOCATE(grid%rh02_max,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rh02_max. ') endif ENDIF IF ( ASSOCIATED( grid%rlwtt ) ) THEN DEALLOCATE(grid%rlwtt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rlwtt. ') endif ENDIF IF ( ASSOCIATED( grid%rswtt ) ) THEN DEALLOCATE(grid%rswtt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rswtt. ') endif ENDIF IF ( ASSOCIATED( grid%tcucn ) ) THEN DEALLOCATE(grid%tcucn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%tcucn. ') endif ENDIF IF ( ASSOCIATED( grid%train ) ) THEN DEALLOCATE(grid%train,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%train. ') 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%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%ihe ) ) THEN DEALLOCATE(grid%ihe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ihe. ') endif ENDIF IF ( ASSOCIATED( grid%ihw ) ) THEN DEALLOCATE(grid%ihw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ihw. ') endif ENDIF IF ( ASSOCIATED( grid%ive ) ) THEN DEALLOCATE(grid%ive,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ive. ') endif ENDIF IF ( ASSOCIATED( grid%ivw ) ) THEN DEALLOCATE(grid%ivw,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ivw. ') endif ENDIF IF ( ASSOCIATED( grid%irad ) ) THEN DEALLOCATE(grid%irad,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%irad. ') endif ENDIF IF ( ASSOCIATED( grid%iheg ) ) THEN DEALLOCATE(grid%iheg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iheg. ') endif ENDIF IF ( ASSOCIATED( grid%ihwg ) ) THEN DEALLOCATE(grid%ihwg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ihwg. ') endif ENDIF IF ( ASSOCIATED( grid%iveg ) ) THEN DEALLOCATE(grid%iveg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iveg. ') endif ENDIF IF ( ASSOCIATED( grid%ivwg ) ) THEN DEALLOCATE(grid%ivwg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ivwg. ') endif ENDIF IF ( ASSOCIATED( grid%iradg ) ) THEN DEALLOCATE(grid%iradg,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iradg. ') endif ENDIF IF ( ASSOCIATED( grid%n_iup_h ) ) THEN DEALLOCATE(grid%n_iup_h,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%n_iup_h. ') endif ENDIF IF ( ASSOCIATED( grid%n_iup_v ) ) THEN DEALLOCATE(grid%n_iup_v,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%n_iup_v. ') endif ENDIF IF ( ASSOCIATED( grid%n_iup_adh ) ) THEN DEALLOCATE(grid%n_iup_adh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%n_iup_adh. ') endif ENDIF IF ( ASSOCIATED( grid%n_iup_adv ) ) THEN DEALLOCATE(grid%n_iup_adv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%n_iup_adv. ') endif ENDIF IF ( ASSOCIATED( grid%iup_h ) ) THEN DEALLOCATE(grid%iup_h,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iup_h. ') endif ENDIF IF ( ASSOCIATED( grid%iup_v ) ) THEN DEALLOCATE(grid%iup_v,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iup_v. ') endif ENDIF IF ( ASSOCIATED( grid%iup_adh ) ) THEN DEALLOCATE(grid%iup_adh,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iup_adh. ') endif ENDIF IF ( ASSOCIATED( grid%iup_adv ) ) THEN DEALLOCATE(grid%iup_adv,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iup_adv. ') endif ENDIF IF ( ASSOCIATED( grid%winfo ) ) THEN DEALLOCATE(grid%winfo,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%winfo. ') endif ENDIF IF ( ASSOCIATED( grid%winfo_bxs ) ) THEN DEALLOCATE(grid%winfo_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%winfo_bxs. ') endif NULLIFY(grid%winfo_bxs) ENDIF IF ( ASSOCIATED( grid%winfo_bxe ) ) THEN DEALLOCATE(grid%winfo_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%winfo_bxe. ') endif NULLIFY(grid%winfo_bxe) ENDIF IF ( ASSOCIATED( grid%winfo_bys ) ) THEN DEALLOCATE(grid%winfo_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%winfo_bys. ') endif NULLIFY(grid%winfo_bys) ENDIF IF ( ASSOCIATED( grid%winfo_bye ) ) THEN DEALLOCATE(grid%winfo_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%winfo_bye. ') endif NULLIFY(grid%winfo_bye) ENDIF IF ( ASSOCIATED( grid%winfo_btxs ) ) THEN DEALLOCATE(grid%winfo_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%winfo_btxs. ') endif NULLIFY(grid%winfo_btxs) ENDIF IF ( ASSOCIATED( grid%winfo_btxe ) ) THEN DEALLOCATE(grid%winfo_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%winfo_btxe. ') endif NULLIFY(grid%winfo_btxe) ENDIF IF ( ASSOCIATED( grid%winfo_btys ) ) THEN DEALLOCATE(grid%winfo_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%winfo_btys. ') endif NULLIFY(grid%winfo_btys) ENDIF IF ( ASSOCIATED( grid%winfo_btye ) ) THEN DEALLOCATE(grid%winfo_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%winfo_btye. ') endif NULLIFY(grid%winfo_btye) ENDIF IF ( ASSOCIATED( grid%iinfo ) ) THEN DEALLOCATE(grid%iinfo,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iinfo. ') endif ENDIF IF ( ASSOCIATED( grid%iinfo_bxs ) ) THEN DEALLOCATE(grid%iinfo_bxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iinfo_bxs. ') endif NULLIFY(grid%iinfo_bxs) ENDIF IF ( ASSOCIATED( grid%iinfo_bxe ) ) THEN DEALLOCATE(grid%iinfo_bxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iinfo_bxe. ') endif NULLIFY(grid%iinfo_bxe) ENDIF IF ( ASSOCIATED( grid%iinfo_bys ) ) THEN DEALLOCATE(grid%iinfo_bys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iinfo_bys. ') endif NULLIFY(grid%iinfo_bys) ENDIF IF ( ASSOCIATED( grid%iinfo_bye ) ) THEN DEALLOCATE(grid%iinfo_bye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iinfo_bye. ') endif NULLIFY(grid%iinfo_bye) ENDIF IF ( ASSOCIATED( grid%iinfo_btxs ) ) THEN DEALLOCATE(grid%iinfo_btxs,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iinfo_btxs. ') endif NULLIFY(grid%iinfo_btxs) ENDIF IF ( ASSOCIATED( grid%iinfo_btxe ) ) THEN DEALLOCATE(grid%iinfo_btxe,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iinfo_btxe. ') endif NULLIFY(grid%iinfo_btxe) ENDIF IF ( ASSOCIATED( grid%iinfo_btys ) ) THEN DEALLOCATE(grid%iinfo_btys,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iinfo_btys. ') endif NULLIFY(grid%iinfo_btys) ENDIF IF ( ASSOCIATED( grid%iinfo_btye ) ) THEN DEALLOCATE(grid%iinfo_btye,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%iinfo_btye. ') endif NULLIFY(grid%iinfo_btye) 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%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%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%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%greenmax ) ) THEN DEALLOCATE(grid%greenmax,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%greenmax. ') endif ENDIF IF ( ASSOCIATED( grid%greenmin ) ) THEN DEALLOCATE(grid%greenmin,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%greenmin. ') endif ENDIF IF ( ASSOCIATED( grid%albedomx ) ) THEN DEALLOCATE(grid%albedomx,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%albedomx. ') 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%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_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%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%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%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%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%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%lake_depth ) ) THEN DEALLOCATE(grid%lake_depth,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%lake_depth. ') 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%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%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%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%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%shall ) ) THEN DEALLOCATE(grid%shall,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%shall. ') 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%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%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%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%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%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%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%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%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%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%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%acrunoff ) ) THEN DEALLOCATE(grid%acrunoff,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%acrunoff. ') 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%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%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%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%force_sst ) ) THEN DEALLOCATE(grid%force_sst,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%force_sst. ') 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%uoce ) ) THEN DEALLOCATE(grid%uoce,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uoce. ') endif ENDIF IF ( ASSOCIATED( grid%voce ) ) THEN DEALLOCATE(grid%voce,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%voce. ') endif ENDIF IF ( ASSOCIATED( grid%weasd ) ) THEN DEALLOCATE(grid%weasd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%weasd. ') 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%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%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%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%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%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%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%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%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%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%psfc_out ) ) THEN DEALLOCATE(grid%psfc_out,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%psfc_out. ') endif ENDIF IF ( ASSOCIATED( grid%uz0h ) ) THEN DEALLOCATE(grid%uz0h,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uz0h. ') endif ENDIF IF ( ASSOCIATED( grid%vz0h ) ) THEN DEALLOCATE(grid%vz0h,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%vz0h. ') endif ENDIF IF ( ASSOCIATED( grid%dudt ) ) THEN DEALLOCATE(grid%dudt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dudt. ') endif ENDIF IF ( ASSOCIATED( grid%dvdt ) ) THEN DEALLOCATE(grid%dvdt,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%dvdt. ') 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%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%htopd ) ) THEN DEALLOCATE(grid%htopd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%htopd. ') endif ENDIF IF ( ASSOCIATED( grid%hbotd ) ) THEN DEALLOCATE(grid%hbotd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hbotd. ') endif ENDIF IF ( ASSOCIATED( grid%htops ) ) THEN DEALLOCATE(grid%htops,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%htops. ') endif ENDIF IF ( ASSOCIATED( grid%hbots ) ) THEN DEALLOCATE(grid%hbots,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%hbots. ') 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%cprate ) ) THEN DEALLOCATE(grid%cprate,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cprate. ') 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%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%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%udr_kf ) ) THEN DEALLOCATE(grid%udr_kf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%udr_kf. ') endif ENDIF IF ( ASSOCIATED( grid%ddr_kf ) ) THEN DEALLOCATE(grid%ddr_kf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%ddr_kf. ') endif ENDIF IF ( ASSOCIATED( grid%uer_kf ) ) THEN DEALLOCATE(grid%uer_kf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%uer_kf. ') endif ENDIF IF ( ASSOCIATED( grid%der_kf ) ) THEN DEALLOCATE(grid%der_kf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%der_kf. ') endif ENDIF IF ( ASSOCIATED( grid%timec_kf ) ) THEN DEALLOCATE(grid%timec_kf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%timec_kf. ') 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%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%rhosn ) ) THEN DEALLOCATE(grid%rhosn,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rhosn. ') 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%rhosnf ) ) THEN DEALLOCATE(grid%rhosnf,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rhosnf. ') endif ENDIF IF ( ASSOCIATED( grid%snowfallac ) ) THEN DEALLOCATE(grid%snowfallac,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%snowfallac. ') endif ENDIF IF ( ASSOCIATED( grid%precipfr ) ) THEN DEALLOCATE(grid%precipfr,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%precipfr. ') 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%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%smoiseq ) ) THEN DEALLOCATE(grid%smoiseq,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%smoiseq. ') endif ENDIF IF ( ASSOCIATED( grid%smcwtdxy ) ) THEN DEALLOCATE(grid%smcwtdxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%smcwtdxy. ') endif ENDIF IF ( ASSOCIATED( grid%rechxy ) ) THEN DEALLOCATE(grid%rechxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%rechxy. ') endif ENDIF IF ( ASSOCIATED( grid%deeprechxy ) ) THEN DEALLOCATE(grid%deeprechxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%deeprechxy. ') endif ENDIF IF ( ASSOCIATED( grid%grainxy ) ) THEN DEALLOCATE(grid%grainxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%grainxy. ') endif ENDIF IF ( ASSOCIATED( grid%gddxy ) ) THEN DEALLOCATE(grid%gddxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%gddxy. ') endif ENDIF IF ( ASSOCIATED( grid%croptype ) ) THEN DEALLOCATE(grid%croptype,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%croptype. ') endif ENDIF IF ( ASSOCIATED( grid%planting ) ) THEN DEALLOCATE(grid%planting,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%planting. ') endif ENDIF IF ( ASSOCIATED( grid%harvest ) ) THEN DEALLOCATE(grid%harvest,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%harvest. ') endif ENDIF IF ( ASSOCIATED( grid%season_gdd ) ) THEN DEALLOCATE(grid%season_gdd,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%season_gdd. ') endif ENDIF IF ( ASSOCIATED( grid%cropcat ) ) THEN DEALLOCATE(grid%cropcat,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%cropcat. ') endif ENDIF IF ( ASSOCIATED( grid%pgsxy ) ) THEN DEALLOCATE(grid%pgsxy,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%pgsxy. ') 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%power ) ) THEN DEALLOCATE(grid%power,STAT=ierr) if (ierr.ne.0) then CALL wrf_error_fatal ( & 'frame/module_domain.f: Failed to deallocate grid%power. ') 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%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 !ENDOFREGISTRYGENERATEDINCLUDE