Compilation

Compilation cindyhg Fri, 09/27/2019 - 14:06

Setting Environment

To build the components, you must first set some environment variables. The paths provided here are specific to Cheyenne. On your own machine these paths may vary. In you compilation window, set the following paths:Set Environment Variables
setenv LIB_W3_PATH ${SCRATCH}/hwrfrun/sorc/hwrf-utilities/libs
setenv LIB_SP_PATH ${SCRATCH}/hwrfrun/sorc/hwrf-utilities/libs
setenv LIB_SFCIO_PATH ${SCRATCH}/hwrfrun/sorc/hwrf-utilities/libs
setenv LIB_BACIO_PATH ${SCRATCH}/hwrfrun/sorc/hwrf-utilities/libs
setenv LIB_BLAS_PATH ${SCRATCH}/hwrfrun/sorc/hwrf-utilities/libs
setenv LIB_NEMSIO_PATH ${SCRATCH}/hwrfrun/sorc/hwrf-utilities/libs

You do not need these paths to build the hwrf-utilities, but will need them later to build the other components.

Running the compile script

Note: For debugging purposes, it is useful to save the standard out (stdout) and standard error (stderr), (e.g. the output sent to the screen by the ./compile command) into a file. This can be done one of two ways:

  • ./compile >& build.log
  • ./compile |& tee build.log

Both options redirect the output to a file named build.log while the second option also prints the output to the screen. The compilation commands on the following pages will use the second option.

Compile HWRF utilities

Compile HWRF utilities cindyhg Fri, 09/27/2019 - 14:08

Compile HWRF utilities

Set Environment VariablesTo build the HWRF Utilities from within the component directory, first run the configure script, creating the configure file configure.hwrf, and then run the compile script. Normally, you need to first build the WRF component prior to building the HWRF Utilities component. Here, that has already been done for you.

Execute the following commands:

cd ${SCRATCH}/hwrfrun/sorc/hwrf-utilities
setenv WRF_DIR ${SCRATCH}/hwrfrun/sorc/WRFV3
./clean -a

Ignore any errors from the clean. If the compilation fails for any reason, repeat the clean command prior to recompiling.

Next, run the configure and compile scripts.

./configure

For Cheyenne, select configuration option 3 to build with the Intel compiler w/MKL

./compile |& tee build.log

The compliation process should take approximately 15 minutes to complete. Sometimes the compilation takes more time, the user can consult the Configure the experiment page in a new tab and return back when the compilation is finished.

To verify a successful build, first check that the following 25 libraries were created in the libs/ directory:

libbacio_4.a
libbacio_8.a
libbacio.a
libblas.a
libbufr_i4r4.a
libbufr_i4r8.a
libg2.a
libg2c_v1.5.0_4.a
libg2tmpl.a
libgctpc.a
libhwrfutil_i4r4.a
libip_i4r4.a
libip_i4r8.a
libnemsio.a
libsfcio_i4r4.a
libsigio_i4r4.a
libsp_i4r4.a
libsp_i4r8.a
libw3emc_i4r8.a
libw3_i4r4.a
libw3_i4r8.a
libw3_i8r8.a
libw3nco_i4r4.a
libw3nco_i4r8.a
libw3nco_i8r8.a

Next, check for the following 79 executables in the exec/ directory:

bufr_remorest.exe
cnvgrib.exe
copygb.exe
diffwrf_3dvar.exe
getcenter.exe
grbindex.exe
grb2index.exe
gridparse.exe
grp_atcf_to_stats.exe
grp_getcenter.exe
grp_gridparse.exe
grp_hwrf_atcf_intensity.exe
grp_hwrf_atcf_tracks.exe
grp_inddiag.exe
grp_inddiagnull.exe
grp_nameparse.exe
grp_statsin_domain.exe
grp_statsin_domain_TI.exe
grp_totaldiag.exe
hwrf_afos.exe
hwrf_anl_4x_step2.exe
hwrf_anl_bogus_10m.exe
hwrf_anl_cs_10m.exe
hwrf_atcf_prob.exe
hwrf_atcf_to_stats.exe
hwrf_aux_rw.exe
hwrf_bdy_update.exe
hwrf_binary_grads.exe
hwrf_bin_io.exe
hwrf_blend_gsi.exe
hwrf_change_prepbufr_qm_in_circle.exe
hwrf_change_prepbufr_qm_typ.exe
hwrf_combinetrack.exe
hwrf_create_trak_fnl.exe
hwrf_create_trak_guess.exe
hwrf_ensemble.exe
hwrf_ens_prob.exe
hwrf_final_merge.exe
hwrf_gridgenfine.exe
hwrf_htcfstats.exe
hwrf_inter_2to1.exe
hwrf_inter_2to2.exe
hwrf_inter_2to6.exe
hwrf_inter_4to2.exe
hwrf_inter_4to6.exe
hwrf_merge_nest_4x_step12_3n.exe
hwrf_merge_nest_4x_step12_enkf.exe
hwrf_metgrid_levels.exe
hwrf_netcdf_grads.exe
hwrf_nhc_products.exe
hwrf_pert_ct1.exe
hwrf_prep.exe
hwrf_read_indi_write_all.exe
hwrf_readtdrstmid.exe
hwrf_readtdrtime.exe
hwrf_readtdrtrack.exe
hwrf_readtdrtrigger.exe
hwrf_regrid_merge.exe
hwrf_rem_prepbufr_typ_in_circle.exe
hwrf_split1.exe
hwrf_supvit.exe
hwrf_swath.exe
hwrf_swcorner_dynamic.exe
hwrf_wrfbdy_tinterp.exe
hwrf_wrfout_newtime.exe
inddiag.exe
inddiagnull.exe
mdate.exe
mpi_example.exe
mpiserial.exe
nameparse.exe
ndate.exe
nhour.exe
satgrib2.exe
serpoe.exe
totaldiag.exe
wave_sample.exe
wgrib2.exe
wgrib.exe

Note: If diffwrf_3dvar.exe fails to build because of missing NetCDF libraries, you may have a very recent version of the NetCDF library where the original libnetcdf.a is split into two libraries, libnetcdf.a and libnetcdff.a. You will need to add this additional library to the makefile. Edit hwrf-utilities/vortex_init/hwrf_diffwrf_3dvar/Makefile and hwrf-utilities/vortex_init_2d/hwrf_diffwrf_3dvar/Makefile and add -lnetcdff to the LIBS variable.

 

Compile POM-TC

Compile POM-TC cindyhg Tue, 10/15/2019 - 09:55

Compile POM-TC

Configure MPIPOM-TC

To configure MPIPOM-TC for compilation from within the pomtc directory, type:

cd ${SCRATCH}/hwrfrun/sorc/pomtc
./configure

For Cheyenne, select configuration option 3 to build with the Intel compiler.

Compile MPIPOM-TC

To compile the MPIPOM-TC and save the build output to a log file, type:

./compile |& tee ocean.log

The compilation should take approximately 2 minutes to complete.

If the compilation is successful, 19 executables are created in the ocean_exec/ directory:

archv2data3z.xc
gfdl_date2day.exe
gfdl_day2date.exe
gfdl_getsst.exe
gfdl_sharp_mcs_rf_l2m_rmy5.exe
hwrf_ocean_bs_fcst.exe
hwrf_ocean_bs_init.exe
hwrf_ocean_fcst.exe
hwrf_ocean_init.exe
hycom2raw.xc
pomprep_bs_fbtr.xc
pomprep_fbtr.xc
pomprep_gdm3.xc
pomprep_hycu.xc
pomprep_idel.xc
pomprep_ncda.xc
pomprep_rtof.xc
readsstuvhflux.exe
transatl06prep.xc

Note: If the compilation does not succeed in producing the executables, it will be necessary to conduct a clean on the pomtc directory. A complete clean is strongly recommended if the compilation failed or if the configuration file is changed.

To conduct a partial clean that retains the configuration file, and just removes the object files, type:

./clean

To conduct a complete clean which removes all built files in all directories, as well as the configure.pom, type:

./clean -a

To get help about compilation, type:

./compile -h

Compile coupler

Compile coupler cindyhg Tue, 10/15/2019 - 09:57

Compile coupler

Configure the coupler

To configure the NCEP Coupler for compilation, from within the ncep-coupler directory:

cd ${SCRATCH}/hwrfrun/sorc/ncep-coupler
./configure

For Cheyenne, select configuration option 3 to build with the Intel compiler.

Compile the coupler

To compile the coupler and save the build output to a log file, type:

./compile |& tee coupler.log

The compilation should take approximately 2 minutes to complete.

If the compilation is successful, 1 executable is created in the cpl_exec/ directory:

hwrf_wm3c.exe

Note: If the compilation does not succeed in producing the executable, it will be necessary to conduct a clean on the pomtc directory. A complete clean is strongly recommended if the compilation failed or if the configuration file is changed.

To conduct a partial clean that retains the configuration file, and just removes the object files, type:

./clean

To conduct a complete clean which removes all built files in all directories, as well as the configure.cpl file, type:

./clean -a

To get help about compilation, type:

./compile -h

Compile GFDL vortex tracker

Compile GFDL vortex tracker cindyhg Tue, 10/15/2019 - 09:59

Compile GFDL vortex tracker

To configure the vortex tracker for compilation, from within the gfdl-vortextracker directory, type:Configure GFDL vortex tracker

cd ${SCRATCH}/hwrfrun/sorc/gfdl-vortextracker
./configure

For Cheyenne, select configuration option 2 to build with the Intel compiler.

Compile GFDL vortex tracker

To compile the vortex tracker and save the build output to a log file, type:

./compile |& tee tracker.log

The compilation should take approximately 2 minutes to complete.

If the compilation was successfull, 3 executables will be created in the trk_exec/ directory:

hwrf_gettrk.exe
hwrf_tave.exe
hwrf_vint.exe

Note: If the compilation does not succeed in producing the executables, it will be necessary to conduct a clean on the gfdl-vortextracker directory. A complete clean is strongly recommended if the compilation failed or if the configuration file is changed.

To conduct a partial clean that retains the configuration file, and just removes the object files, type:

./clean

To conduct a complete clean which removes all built files in all directories, as well as the configure.trk file, type:

./clean -a

To get help about compilation, type:

./compile -h