Changeset 2775


Ignore:
Timestamp:
Jul 6, 2022, 3:40:12 PM (2 years ago)
Author:
aslmd
Message:

modified the default configuration in WRFV3 arch so that executing configure creates a configure.wrf that is compliant with planetary applications directly without the need to patch. a by-product is that there no longer a weird mix of NETCDF env variable and harcoded stuff when patching, from now on setting the NETCDF environment variable is enough (as usually in WRF). the link to compiled LMDZ physics library is done through the libo_links folder that contains only ciclad right now but can be populated with configurations. for the moment the changes to default is only applicable to ifort cases but it is easy to broaden this to other cases by working on arch/configure_new.defaults.

Location:
trunk/WRF.COMMON/WRFV3
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WRF.COMMON/WRFV3/arch/Config_new.pl

    r2759 r2775  
    3434$sw_ompparallel = "" ;
    3535$sw_stubmpi = "" ;
    36 $sw_usenetcdff = "" ;    # for 3.6.2 and greater, the fortran bindings might be in a separate lib file
     36$sw_usenetcdff = "-lnetcdff" ;    # for 3.6.2 and greater, the fortran bindings might be in a separate lib file
    3737$sw_time = "" ;          # name of a timer to time fortran compiles, e.g. timex or time
    3838$sw_ifort_r8 = 0 ;
     
    6868    $sw_opt_level = substr( $ARGV[0], 11 ) ;
    6969  }
    70   if ( substr( $ARGV[0], 1, 11 ) eq "USENETCDFF=" )
    71   {
    72     $sw_usenetcdff = substr( $ARGV[0], 12 ) ;
    73   }
     70#  if ( substr( $ARGV[0], 1, 11 ) eq "USENETCDFF=" )
     71#  {
     72#    $sw_usenetcdff = substr( $ARGV[0], 12 ) ;
     73#  }
    7474  if ( substr( $ARGV[0], 1, 5 ) eq "time=" )
    7575  {
     
    321321        $_ =~ s:CONFIGURE_NETCDF_FLAG:-DNETCDF: ;
    322322        if ( $sw_os == Interix ) {
    323           $_ =~ s:CONFIGURE_NETCDF_LIB_PATH:\$\(WRF_SRC_ROOT_DIR\)/external/io_netcdf/libwrfio_nf.a -L$sw_netcdf_path/lib -lnetcdf $sw_usenetcdff : ;
     323          $_ =~ s:CONFIGURE_NETCDF_LIB_PATH:\$\(WRF_SRC_ROOT_DIR\)/external/io_netcdf/libwrfio_nf.a -L$sw_netcdf_path/lib -lnetcdf $sw_usenetcdff $sw_netcdf_path/lib/libnetcdf.a : ;
    324324        } else {
    325           $_ =~ s:CONFIGURE_NETCDF_LIB_PATH:-L\$\(WRF_SRC_ROOT_DIR\)/external/io_netcdf -lwrfio_nf -L$sw_netcdf_path/lib -lnetcdf $sw_usenetcdff : ;
     325          $_ =~ s:CONFIGURE_NETCDF_LIB_PATH:-L\$\(WRF_SRC_ROOT_DIR\)/external/io_netcdf -lwrfio_nf -L$sw_netcdf_path/lib -lnetcdf $sw_usenetcdff $sw_netcdf_path/lib/libnetcdf.a : ;
    326326        }
    327327         }
  • trunk/WRF.COMMON/WRFV3/arch/configure_new.defaults

    r2761 r2775  
    192192CC              =       CONFIGURE_CC
    193193LD              =       $(FC)
    194 RWORDSIZE       =       CONFIGURE_RWORDSIZE
    195 PROMOTION       =       -i4
    196 ARCH_LOCAL      =       -DNONSTANDARD_SYSTEM_FUNC
    197 CFLAGS_LOCAL    =       -w -O3 -ip
     194RWORDSIZE       =       8
     195PROMOTION       =       -i4 -real-size 64
     196ARCH_LOCAL      =       -DNEWPHYS -DNONSTANDARD_SYSTEM_FUNC
     197CFLAGS_LOCAL    =       -w -O3 -mcmodel=large -shared-intel -ip
    198198LDFLAGS_LOCAL   =       -ip
    199199CPLUSPLUSLIB    =       
    200200ESMF_LDFLAG     =       $(CPLUSPLUSLIB)
    201 FCOPTIM         =       -O3
     201FCOPTIM         =       -O3 -mcmodel=large -shared-intel
    202202FCREDUCEDOPT    =       $(FCOPTIM)
    203203FCNOOPT         =       -O0
     
    207207FCSUFFIX        =
    208208BYTESWAPIO      =       -convert big_endian
    209 FCBASEOPTS      =       -w -ftz -align all -fno-alias -fp-model precise $(FCDEBUG) $(FORMAT_FREE) $(BYTESWAPIO)
     209FCBASEOPTS      =       -w -ftz -align all -fno-alias -fp-model precise $(FCDEBUG) $(FORMAT_FREE) $(BYTESWAPIO) -mkl=parallel
    210210MODULE_SRCH_FLAG =     
    211211TRADFLAG        =      -traditional
    212 CPP             =      /lib/cpp -C -P
     212CPP             =      /lib/cpp -P
    213213AR              =      ar
    214214ARFLAGS         =      ru
  • trunk/WRF.COMMON/WRFV3/arch/postamble_new

    r2759 r2775  
    3333                      -I$(WRF_SRC_ROOT_DIR)/phys \
    3434                      -I$(WRF_SRC_ROOT_DIR)/chem -I$(WRF_SRC_ROOT_DIR)/inc \
     35                      -I$(WRF_SRC_ROOT_DIR)/libo_links/.config/inc \
     36                      -ICONFIGURE_NETCDF_PATH/include \
    3537                      CONFIGURE_CRTM_INC \
    3638                      CONFIGURE_RTTOV_INC
     
    4951
    5052LIB_EXTERNAL    = \
    51                      CONFIGURE_NETCDF_LIB_PATH CONFIGURE_PNETCDF_LIB_PATH CONFIGURE_GRIB2_LIB
     53                     CONFIGURE_NETCDF_LIB_PATH CONFIGURE_PNETCDF_LIB_PATH CONFIGURE_GRIB2_LIB \
     54                     -L$(WRF_SRC_ROOT_DIR)/libo_links/.config/lib -llmdz \
     55                     -lnetcdf
    5256
    5357LIB             =    $(LIB_BUNDLED) $(LIB_EXTERNAL) $(LIB_LOCAL)
Note: See TracChangeset for help on using the changeset viewer.