From 543305ebcf41ec1a62409a765505fe72185964ca Mon Sep 17 00:00:00 2001 From: David Gill Date: Fri, 7 Jan 2011 22:43:12 +0000 Subject: [PATCH] Two easy sets of mods: 1) Add in the usual "ONLY" clause for some wide open "USE" statements in the WRF Fire code. The purpose is to allow the IBM xlf compiler to build the code without the ALIAS size error. No real coding issue as far as standards go, just a few line changes to make the code acceptable to IBM. Primarily, these changes impact the typical suspects: module_dm, module_comm_dm, and module_configure. M phys/module_fr_sfire_core.F M phys/module_fr_sfire_util.F M phys/module_fr_sfire_driver_wrf.F M phys/module_fr_sfire_driver.F 2) A new version of g95 on Darwin (0.92, up from 0.91) causes a build error at link time, with the phrase "non_lazy_ptr". Julie found a fix, where the ranlib command get the "-c" option. This is backward compatible, so that this option has no negative impact on the old version of g95 we have access to (to which we have access). This is only an impact for builds on Darwin with g95. M arch/configure_new.defaults git-svn-id: https://svn-wrf-model.cgd.ucar.edu/trunk@4645 b0b5d27b-6f0f-0410-a2a3-cb1e977edc3d --- arch/configure_new.defaults | 2 +- phys/module_fr_sfire_core.F | 2 +- phys/module_fr_sfire_driver.F | 10 +++++----- phys/module_fr_sfire_driver_wrf.F | 9 +++++---- phys/module_fr_sfire_util.F | 6 ++---- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/arch/configure_new.defaults b/arch/configure_new.defaults index 45895ba4f3..f1ab91bec3 100644 --- a/arch/configure_new.defaults +++ b/arch/configure_new.defaults @@ -677,7 +677,7 @@ CPP = cpp -C -P -xassembler-with-cpp AR = ar ARFLAGS = ru M4 = m4 -B 14000 -RANLIB = ranlib +RANLIB = ranlib -c CC_TOOLS = $(SCC) ########################################################### diff --git a/phys/module_fr_sfire_core.F b/phys/module_fr_sfire_core.F index 91be27c633..1c96f42201 100644 --- a/phys/module_fr_sfire_core.F +++ b/phys/module_fr_sfire_core.F @@ -9,7 +9,7 @@ module module_fr_sfire_core -use module_fr_sfire_phys +use module_fr_sfire_phys, only: fire_params , fire_ros use module_fr_sfire_util ! The mathematical core of the fire spread model. No physical constants here. diff --git a/phys/module_fr_sfire_driver.F b/phys/module_fr_sfire_driver.F index 39cadf51ef..eaee5de47b 100644 --- a/phys/module_fr_sfire_driver.F +++ b/phys/module_fr_sfire_driver.F @@ -67,7 +67,7 @@ module module_fr_sfire_driver ! use this module for standalone call, you only need to provide some mock-up wrf modules use module_fr_sfire_model -use module_fr_sfire_phys +use module_fr_sfire_phys, only : fire_params , init_fuel_cats use module_fr_sfire_util use module_fr_sfire_core, only: ignition_line_type @@ -102,7 +102,9 @@ subroutine sfire_driver_em ( grid , config_flags & ! Driver layer modules #ifdef DM_PARALLEL USE module_dm , ONLY : ntasks_x,ntasks_y,local_communicator,mytask,ntasks - USE module_comm_dm + USE module_comm_dm , ONLY : halo_fire_fuel_sub, halo_fire_tign_sub, halo_fire_wind_f_sub, & +halo_fire_wind_a_sub, halo_fire_ph_sub, halo_fire_zsf_sub, halo_fire_longlat_sub, & +halo_fire_phb_sub, halo_fire_z0_sub, halo_fire_lfn_sub #endif implicit none @@ -795,7 +797,7 @@ end subroutine sfire_driver_phys subroutine fire_ignition_convert (config_flags,fire_max_ignitions,fire_ignition_longlat, & ignition_line,fire_num_ignitions,unit_fxlong,unit_fxlat) - USE module_configure + USE module_configure, only : grid_config_rec_type implicit none ! create ignition arrays from scalar flags !*** arguments @@ -1417,8 +1419,6 @@ end subroutine check_fmesh !***************************** ! subroutine set_flags(config_flags) -USE module_configure -use module_fr_sfire_util implicit none TYPE (grid_config_rec_type) , INTENT(IN) :: config_flags ! copy flags from wrf to module_fr_sfire_util diff --git a/phys/module_fr_sfire_driver_wrf.F b/phys/module_fr_sfire_driver_wrf.F index a348e16e35..19fcf38f7f 100644 --- a/phys/module_fr_sfire_driver_wrf.F +++ b/phys/module_fr_sfire_driver_wrf.F @@ -19,8 +19,8 @@ subroutine sfire_driver_em_init (grid , config_flags & ! stub to call sfire_driver_em with irun=0 and omit last 3 args - USE module_domain - USE module_configure + USE module_domain , only: domain , get_ijk_from_subgrid + USE module_configure , only : grid_config_rec_type implicit none TYPE(domain) , TARGET :: grid ! data @@ -73,8 +73,9 @@ subroutine sfire_driver_em_step (grid , config_flags & ! stub to call sfire_driver_em - USE module_domain - USE module_configure + USE module_domain, only: domain , get_ijk_from_subgrid + USE module_configure , only : grid_config_rec_type + USE module_fr_sfire_util, only : fire_test_steps implicit none TYPE(domain) , TARGET :: grid ! data diff --git a/phys/module_fr_sfire_util.F b/phys/module_fr_sfire_util.F index 6344742565..8ed8528f6d 100644 --- a/phys/module_fr_sfire_util.F +++ b/phys/module_fr_sfire_util.F @@ -1135,7 +1135,6 @@ end subroutine write_array_m subroutine write_array_m3(its,ite,kts,kte,jts,jte, & ims,ime,kms,kme,jms,jme, & a,name,id) -use module_dm implicit none ! debug @@ -1224,7 +1223,6 @@ end subroutine read_array_2d_integer subroutine read_array_2d_real(filename,a,its,ite,jts,jte,ims,ime,jms,jme) -use module_dm #ifdef _OPENMP use OMP_LIB #endif @@ -1334,7 +1332,7 @@ subroutine print_chsum( id, & a,name) #ifdef DM_PARALLEL - USE module_dm + USE module_dm , only : wrf_dm_bxor_integer #endif integer, intent(in):: id, & @@ -1408,7 +1406,7 @@ real function fun_real(fun, & a,b) #ifdef DM_PARALLEL - USE module_dm + USE module_dm , only : wrf_dm_sum_real , wrf_dm_max_real #endif integer, intent(in):: fun, &