From 50bafbfef26fecc251755d6471af2e405233193b Mon Sep 17 00:00:00 2001 From: jswhit2 Date: Mon, 18 Jul 2022 21:57:53 +0000 Subject: [PATCH 1/4] remove 3d variable capability - not needed and broken --- .../src/getsfcensmeanp.fd/getsfcensmeanp.f90 | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/EnKF/gfs/src/getsfcensmeanp.fd/getsfcensmeanp.f90 b/src/EnKF/gfs/src/getsfcensmeanp.fd/getsfcensmeanp.f90 index e0efd0a4..af02bb01 100644 --- a/src/EnKF/gfs/src/getsfcensmeanp.fd/getsfcensmeanp.f90 +++ b/src/EnKF/gfs/src/getsfcensmeanp.fd/getsfcensmeanp.f90 @@ -42,9 +42,8 @@ program getsfcensmeanp logical:: nemsio, sfcio, ncio type(Dataset) :: dset,dseto - type(Dimension) :: londim,latdim,levdim + type(Dimension) :: londim,latdim real(4), allocatable, dimension(:,:) :: values_2d, values_2d_avg - real(4), allocatable, dimension(:,:,:):: values_3d, values_3d_avg character*500 filenamein,filenameout,datapath,fileprefix character*3 charnanal @@ -309,12 +308,10 @@ program getsfcensmeanp elseif (ncio) then londim = get_dim(dset,'grid_xt'); lonb = londim%len latdim = get_dim(dset,'grid_yt'); latb = latdim%len - levdim = get_dim(dset,'pfull'); levs = levdim%len allocate(values_2d_avg(lonb,latb)) - allocate(values_3d_avg(lonb,latb,levs)) if (mype == 0) then dseto = create_dataset(filenameout, dset, copy_vardata=.true.) - print *,'opened netcdf file ',trim(filenameout) + print *,'opened netcdf file ',trim(filenameout),lonb,latb,levs endif do nvar=1,dset%nvars ! Following fields are not averaged @@ -339,14 +336,6 @@ program getsfcensmeanp print *,'writing ens mean ',trim(dset%variables(nvar)%name) call write_vardata(dseto,trim(dset%variables(nvar)%name),values_2d_avg) endif - elseif (dset%variables(nvar)%ndims == 4) then - call read_vardata(dset,trim(dset%variables(nvar)%name),values_3d) - call mpi_allreduce(values_3d,values_3d_avg,lonb*latb*levs,mpi_real4,mpi_sum,new_comm,iret) - values_3d_avg = values_3d_avg * rnanals - if (mype == 0) then - print *,'writing ens mean ',trim(dset%variables(nvar)%name) - call write_vardata(dseto,trim(dset%variables(nvar)%name),values_3d_avg) - endif else write(6,*)'***ERROR*** invalid ndims= ',dset%variables(nvar)%ndims,& ' for variable ',trim(dset%variables(nvar)%name) @@ -354,7 +343,7 @@ program getsfcensmeanp endif enddo if (mype == 0) call close_dataset(dseto) - deallocate(values_2d,values_2d_avg,values_3d,values_3d_avg) + deallocate(values_2d,values_2d_avg) endif ! Jump here if more mpi processors than files to process else From 9d9f8f5faa4f3db416bbeee97a469903cdff2761 Mon Sep 17 00:00:00 2001 From: David Huber <69919478+DavidHuber-NOAA@users.noreply.github.com> Date: Mon, 9 Sep 2024 18:10:38 +0000 Subject: [PATCH 2/4] Send/receive layers to reduce buffer transfer time (#49) This reduces the amount of data sent/received when collecting data to be written to the output interpolated increment netCDF file. --- src/netcdf_io/interp_inc.fd/driver.F90 | 45 +++++++++++++++++++------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/src/netcdf_io/interp_inc.fd/driver.F90 b/src/netcdf_io/interp_inc.fd/driver.F90 index d01a5d13..7b1d384e 100644 --- a/src/netcdf_io/interp_inc.fd/driver.F90 +++ b/src/netcdf_io/interp_inc.fd/driver.F90 @@ -23,7 +23,7 @@ program interp_inc !--------------------------------------------------------------------- use netcdf - use mpi + use mpi_f08 #ifdef IP_V4 use ip_mod, only: ipolates, ipolatev #endif @@ -61,9 +61,12 @@ program interp_inc integer :: header_buffer_val = 16384 integer :: kgds_in(200), kgds_out(200) integer :: ip, ipopt(20), no + integer :: klev integer, allocatable :: ibi(:), ibo(:), levs(:) - integer :: mpierr, mype, npes, mpistat(mpi_status_size) + integer :: mpierr, mype, npes + + type (MPI_Status) :: mpistat logical*1, allocatable :: li(:,:), lo(:,:) @@ -76,6 +79,7 @@ program interp_inc real(8), allocatable :: slat(:), wlat(:) real(8), allocatable :: rlon(:), rlat(:), crot(:), srot(:) real(8), allocatable :: gi(:,:), gi2(:,:), go(:,:), go2(:,:), go3(:,:) + real(8), allocatable :: send_layer(:), recv_layer(:) ! NOTE: u_inc,v_inc must be consecutive @@ -351,6 +355,8 @@ program interp_inc allocate(go(mo,lev)) allocate(go2(mo,lev)) allocate(go3(mo,lev)) + allocate(send_layer(mo)) + allocate(recv_layer(mo)) call mpi_barrier(mpi_comm_world, mpierr) do rec = 1, num_recs @@ -397,10 +403,18 @@ program interp_inc print*,'FATAL ERROR: ipolatev returned wrong number of pts ',no stop 77 endif - call mpi_send(go(1,1), size(go), mpi_double_precision, & - npes-1, 1000+rec, mpi_comm_world, mpierr) - call mpi_send(go3(1,1), size(go3), mpi_double_precision, & - npes-1, 2000+rec, mpi_comm_world, mpierr) + + do klev=1, lev + send_layer=go(:,klev) + call mpi_send(send_layer, size(send_layer), mpi_double_precision, & + npes-1, 1000+rec, mpi_comm_world, mpierr) + enddo + + do klev=1, lev + send_layer=go3(:,klev) + call mpi_send(send_layer, size(send_layer), mpi_double_precision, & + npes-1, 2000+rec, mpi_comm_world, mpierr) + enddo else call ipolates(ip, ipopt, kgds_in, kgds_out, mi, mo, & lev, ibi, li, gi, no, rlat, rlon, ibo, & @@ -415,13 +429,19 @@ program interp_inc endif !dummy_out = reshape(go, (/lon_out,lat_out,lev/)) !print *, lon_out, lat_out, lev, 'send' - call mpi_send(go(1,1), size(go), mpi_double_precision, & - npes-1, 1000+rec, mpi_comm_world, mpierr) + do klev=1, lev + send_layer=go(:,klev) + call mpi_send(send_layer, size(send_layer), mpi_double_precision, & + npes-1, 1000+rec, mpi_comm_world, mpierr) + enddo endif else if (mype == npes-1) then !print *, lon_out, lat_out, lev, 'recv' - call mpi_recv(go2(1,1), size(go2), mpi_double_precision, & + do klev=1, lev + call mpi_recv(recv_layer, size(recv_layer), mpi_double_precision, & rec-1, 1000+rec, mpi_comm_world, mpistat, mpierr) + go2(:,klev) = recv_layer + enddo dummy_out = reshape(go2, (/lon_out,lat_out,lev/)) error = nf90_inq_varid(ncid_out, trim(records(rec)), id_var) call netcdf_err(error, 'inquiring ' // trim(records(rec)) // ' id for file='//trim(outfile) ) @@ -429,8 +449,11 @@ program interp_inc call netcdf_err(error, 'writing ' // trim(records(rec)) // ' for file='//trim(outfile) ) if (trim(records(rec)) .eq. 'u_inc') then ! process v_inc also. - call mpi_recv(go2(1,1), size(go2), mpi_double_precision, & - rec-1, 2000+rec, mpi_comm_world, mpistat, mpierr) + do klev=1, lev + call mpi_recv(recv_layer, size(recv_layer), mpi_double_precision, & + rec-1, 2000+rec, mpi_comm_world, mpistat, mpierr) + go2(:,klev) = recv_layer + enddo dummy_out = reshape(go2, (/lon_out,lat_out,lev/)) error = nf90_inq_varid(ncid_out, 'v_inc', id_var) call netcdf_err(error, 'inquiring v_inc id for file='//trim(outfile) ) From 7837cc7b920272fa0f75d8ab5ad447afd9648585 Mon Sep 17 00:00:00 2001 From: Cory Martin Date: Tue, 17 Sep 2024 15:49:13 +0000 Subject: [PATCH 3/4] Bugfix for where some fields are not in the input increment file (#53) * skip possibly missing hydrometeors * add warning print * handle case of missing increment in calc_analysis, add omga to calc_analysis * correct erroneous calc_analysis runtime printout --- src/netcdf_io/calc_analysis.fd/inc2anl.f90 | 43 ++++++++++++++-------- src/netcdf_io/interp_inc.fd/driver.F90 | 20 ++++++++-- 2 files changed, 45 insertions(+), 18 deletions(-) diff --git a/src/netcdf_io/calc_analysis.fd/inc2anl.f90 b/src/netcdf_io/calc_analysis.fd/inc2anl.f90 index 512bf48e..66bc2e90 100644 --- a/src/netcdf_io/calc_analysis.fd/inc2anl.f90 +++ b/src/netcdf_io/calc_analysis.fd/inc2anl.f90 @@ -17,7 +17,7 @@ module inc2anl integer, parameter :: nincv=13 character(len=7) :: incvars_nemsio(nincv), incvars_netcdf(nincv), incvars_ncio(nincv) - integer, parameter :: nnciov=22 + integer, parameter :: nnciov=23 integer, parameter :: naero=14 integer, parameter :: naero_copy=6 character(len=7) :: iovars_netcdf(nnciov), iovars_aero(naero), copyvars_aero(naero_copy) @@ -36,7 +36,7 @@ module inc2anl 'delz ', 'dpres ', 'dzdt ', 'grle ', 'hgtsfc ',& 'icmr ', 'o3mr ', 'pressfc', 'rwmr ', 'snmr ',& 'spfh ', 'tmp ', 'ugrd ', 'vgrd ', 'cld_amt',& - 'nccice ', 'nconrd '/ + 'nccice ', 'nconrd ', 'omga '/ data iovars_aero / 'so4 ', 'bc1 ', 'bc2 ', 'oc1 ', 'oc2 ', & 'dust1 ', 'dust2 ', 'dust3 ', 'dust4 ', 'dust5 ',& 'seas1 ', 'seas2 ', 'seas3 ', 'seas4 '/ @@ -60,11 +60,11 @@ subroutine gen_anl ! increment, add the two together, and write out ! the analysis to a new file !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - use vars_calc_analysis, only: mype, do_aero + use vars_calc_analysis, only: mype, do_aero, jedi implicit none ! variables local to this subroutine integer :: i, j, iincvar - logical :: use_increment + logical :: use_increment,readinc ! loop through each variable in the background file @@ -85,9 +85,15 @@ subroutine gen_anl call add_psfc_increment else ! call generic subroutine for all other fields - if (mype==0) print *, 'Adding Increment to ', iovars_netcdf(i), incvars_netcdf(iincvar) - call add_increment(iovars_netcdf(i), incvars_netcdf(iincvar)) - end if + call add_increment(iovars_netcdf(i), incvars_netcdf(iincvar), readinc) + if (mype==0) then + if ((.not.jedi) .or. (jedi.and.readinc)) then + print *, 'Adding Increment to ', iovars_netcdf(i), incvars_netcdf(iincvar) + else + print *, 'Copying from Background ', iovars_netcdf(i) + endif + endif + endif else ! otherwise just write out what is in the input to the output if (mype==0) print *, 'Copying from Background ', iovars_netcdf(i) @@ -241,7 +247,7 @@ subroutine add_aero_inc(fcstvar, incvar) end subroutine add_aero_inc - subroutine add_increment(fcstvar, incvar) + subroutine add_increment(fcstvar, incvar, readinc) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! subroutine add_increment ! generic subroutine for adding increment to background @@ -250,6 +256,7 @@ subroutine add_increment(fcstvar, incvar) ! fcstvar - input string of netCDF fcst/anal var name ! incvar - input string of netCDF increment var name ! (without _inc suffix added) + ! readinc - .true. if read increment, .false otherwise !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! use vars_calc_analysis, only: fcstncfile, anlncfile, incr_file,& nlat, nlon, nlev, anlfile, use_nemsio_anl, & @@ -260,6 +267,7 @@ subroutine add_increment(fcstvar, incvar) implicit none ! input vars character(7), intent(in) :: fcstvar, incvar + logical, intent(out):: readinc ! local variables real, allocatable, dimension(:,:,:) :: work3d_bg real, allocatable, dimension(:,:) :: work3d_inc_gsi @@ -268,6 +276,7 @@ subroutine add_increment(fcstvar, incvar) integer :: j,jj,k,krev,iret type(Dataset) :: incncfile + readinc=.true. if (has_var(fcstncfile, fcstvar)) then do k=1,nlev if (mype == levpe(k)) then @@ -277,12 +286,16 @@ subroutine add_increment(fcstvar, incvar) incncfile = open_dataset(incr_file, paropen=.true.) ! JEDI-derived increments have a time dimension, so read to appropriate array if ( jedi ) then - call read_vardata(incncfile, trim(incvar)//"_inc", work3d_inc_jedi, nslice=k, slicedim=3) - ! add increment to background - do j=1,nlat - jj=nlat+1-j ! increment is S->N, history files are N->S - work3d_bg(:,j,1) = work3d_bg(:,j,1) + work3d_inc_jedi(:,jj,1) - end do + if (has_var(incncfile, trim(incvar)//"_inc")) then + call read_vardata(incncfile, trim(incvar)//"_inc", work3d_inc_jedi, nslice=k, slicedim=3) + ! add increment to background, otherwise do nothing + do j=1,nlat + jj=nlat+1-j ! increment is S->N, history files are N->S + work3d_bg(:,j,1) = work3d_bg(:,j,1) + work3d_inc_jedi(:,jj,1) + end do + else + readinc = .false. + endif else call read_vardata(incncfile, trim(incvar)//"_inc", work3d_inc_gsi, nslice=k, slicedim=3) ! add increment to background @@ -306,7 +319,7 @@ subroutine add_increment(fcstvar, incvar) end do ! clean up and close if ( jedi ) then - deallocate(work3d_inc_jedi) + if (allocated(work3d_inc_jedi)) deallocate(work3d_inc_jedi) else deallocate(work3d_inc_gsi) end if diff --git a/src/netcdf_io/interp_inc.fd/driver.F90 b/src/netcdf_io/interp_inc.fd/driver.F90 index 7b1d384e..2dceddce 100644 --- a/src/netcdf_io/interp_inc.fd/driver.F90 +++ b/src/netcdf_io/interp_inc.fd/driver.F90 @@ -81,6 +81,7 @@ program interp_inc real(8), allocatable :: gi(:,:), gi2(:,:), go(:,:), go2(:,:), go3(:,:) real(8), allocatable :: send_layer(:), recv_layer(:) + logical :: readvar ! NOTE: u_inc,v_inc must be consecutive data records /'u_inc', 'v_inc', 'delp_inc', 'delz_inc', 'T_inc', & @@ -366,11 +367,24 @@ program interp_inc if (mype == rec-1) then print*,'- PROCESS RECORD: ', trim(records(rec)) + readvar = .true. error = nf90_inq_varid(ncid_in, trim(records(rec)), id_var) - call netcdf_err(error, 'inquiring ' // trim(records(rec)) // ' id for file='//trim(infile) ) - error = nf90_get_var(ncid_in, id_var, dummy_in) - call netcdf_err(error, 'reading ' // trim(records(rec)) // ' for file='//trim(infile) ) + ! handle missing hydrometeor increments + if (error .ne. 0) then + if (ANY((/ 'rwmr_inc', 'snmr_inc', 'grle_inc' /) == trim(records(rec)))) then + print *, 'WARNING: ', trim(records(rec)), ' is missing in increment file. Skipping.' + readvar = .false. + else + call netcdf_err(error, 'inquiring ' // trim(records(rec)) // ' id for file='//trim(infile) ) + end if + end if + if (readvar) then + error = nf90_get_var(ncid_in, id_var, dummy_in) + call netcdf_err(error, 'reading ' // trim(records(rec)) // ' for file='//trim(infile) ) + else + dummy_in(:,:,:) = 0.0 + end if ip = 0 ! bilinear ipopt = 0 From 4f9f0822efdca60c9b209f565903737e572fe0c1 Mon Sep 17 00:00:00 2001 From: DavidBurrows-NCO <82525974+DavidBurrows-NCO@users.noreply.github.com> Date: Wed, 6 Nov 2024 14:22:20 -0500 Subject: [PATCH 4/4] Add/fix build capability for Gaea-C5, Gaea-C6, and container (#55) * Update scripts to build on Gaea-C5 and C6 * updates for container * update text in C6 module file * final adjustments to detect_machine and module-setup * update spack-stack path to C6 install --------- Co-authored-by: Mark A Potts --- modulefiles/gsiutils_container.intel.lua | 23 ++++++++++++++++++ ...ea.intel.lua => gsiutils_gaeac5.intel.lua} | 6 ++--- modulefiles/gsiutils_gaeac6.intel.lua | 24 +++++++++++++++++++ ush/detect_machine.sh | 20 +++++++++++----- ush/module-setup.sh | 5 ++++ 5 files changed, 69 insertions(+), 9 deletions(-) create mode 100644 modulefiles/gsiutils_container.intel.lua rename modulefiles/{gsiutils_gaea.intel.lua => gsiutils_gaeac5.intel.lua} (81%) create mode 100644 modulefiles/gsiutils_gaeac6.intel.lua diff --git a/modulefiles/gsiutils_container.intel.lua b/modulefiles/gsiutils_container.intel.lua new file mode 100644 index 00000000..e95d7115 --- /dev/null +++ b/modulefiles/gsiutils_container.intel.lua @@ -0,0 +1,23 @@ +help([[ +]]) + +prepend_path("MODULEPATH", "/opt/spack-stack/spack-stack-1.8.0/envs/unified-env/install/modulefiles/Core") + +--local python_ver=os.getenv("python_ver") or "3.11.6" +local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.10.0" +local stack_impi_ver=os.getenv("stack_impi_ver") or "2021.12.2" +local cmake_ver=os.getenv("cmake_ver") or "3.27.9" +local prod_util_ver=os.getenv("prod_util_ver") or "2.1.1" + +load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver)) +load(pathJoin("cmake", cmake_ver)) + +load("gsiutils_common") + +load(pathJoin("prod_util", prod_util_ver)) + +pushenv("CFLAGS", "-march=ivybridge") +pushenv("FFLAGS", "-march=ivybridge") + +whatis("Description: GSI utilities environment in a container with Intel Compilers") diff --git a/modulefiles/gsiutils_gaea.intel.lua b/modulefiles/gsiutils_gaeac5.intel.lua similarity index 81% rename from modulefiles/gsiutils_gaea.intel.lua rename to modulefiles/gsiutils_gaeac5.intel.lua index dbc9f8cc..21c807a7 100644 --- a/modulefiles/gsiutils_gaea.intel.lua +++ b/modulefiles/gsiutils_gaeac5.intel.lua @@ -4,8 +4,8 @@ help([[ prepend_path("MODULEPATH", "/ncrc/proj/epic/spack-stack/spack-stack-1.6.0/envs/gsi-addon-dev/install/modulefiles/Core") local python_ver=os.getenv("python_ver") or "3.11.6" -local stack_intel_ver=os.getenv("stack_intel_ver") or "2023.1.0" -local stack_cray_mpich_ver=os.getenv("stack_cray_mpich_ver") or "8.1.25" +local stack_intel_ver=os.getenv("stack_intel_ver") or "2023.2.0" +local stack_cray_mpich_ver=os.getenv("stack_cray_mpich_ver") or "8.1.28" local cmake_ver=os.getenv("cmake_ver") or "3.23.1" local prod_util_ver=os.getenv("prod_util_ver") or "2.1.1" @@ -21,4 +21,4 @@ load(pathJoin("prod_util", prod_util_ver)) pushenv("CFLAGS", "-xHOST") pushenv("FFLAGS", "-xHOST") -whatis("Description: GSI utilities environment on Gaea with Intel Compilers") +whatis("Description: GSI utilities environment on GaeaC5 with Intel Compilers") diff --git a/modulefiles/gsiutils_gaeac6.intel.lua b/modulefiles/gsiutils_gaeac6.intel.lua new file mode 100644 index 00000000..7cf9a72f --- /dev/null +++ b/modulefiles/gsiutils_gaeac6.intel.lua @@ -0,0 +1,24 @@ +help([[ +]]) + +prepend_path("MODULEPATH", "/ncrc/proj/epic/spack-stack/c6/spack-stack-1.6.0/envs/gsi-addon/install/modulefiles/Core") + +local python_ver=os.getenv("python_ver") or "3.11.6" +local stack_intel_ver=os.getenv("stack_intel_ver") or "2023.2.0" +local stack_cray_mpich_ver=os.getenv("stack_cray_mpich_ver") or "8.1.29" +local cmake_ver=os.getenv("cmake_ver") or "3.23.1" +local prod_util_ver=os.getenv("prod_util_ver") or "2.1.1" + +load(pathJoin("stack-intel", stack_intel_ver)) +load(pathJoin("stack-cray-mpich", stack_cray_mpich_ver)) +load(pathJoin("python", python_ver)) +load(pathJoin("cmake", cmake_ver)) + +load("gsiutils_common") + +load(pathJoin("prod_util", prod_util_ver)) + +pushenv("CFLAGS", "-xHOST") +pushenv("FFLAGS", "-xHOST") + +whatis("Description: GSI utilities environment on GaeaC6 with Intel Compilers") diff --git a/ush/detect_machine.sh b/ush/detect_machine.sh index b049a604..14e7359b 100755 --- a/ush/detect_machine.sh +++ b/ush/detect_machine.sh @@ -21,8 +21,11 @@ case $(hostname -f) in dlogin0[1-9].dogwood.wcoss2.ncep.noaa.gov) MACHINE_ID=wcoss2 ;; ### dogwood01-9 dlogin10.dogwood.wcoss2.ncep.noaa.gov) MACHINE_ID=wcoss2 ;; ### dogwood10 - gaea5[1-8]) MACHINE_ID=gaea ;; ### gaea51-58 - gaea5[1-8].ncrc.gov) MACHINE_ID=gaea ;; ### gaea51-58 + gaea5[1-8]) MACHINE_ID=gaeac5 ;; ### gaea51-58 + gaea5[1-8].ncrc.gov) MACHINE_ID=gaeac5 ;; ### gaea51-58 + + gaea6[1-8]) MACHINE_ID=gaeac6 ;; ### gaea61-68 + gaea6[1-8].ncrc.gov) MACHINE_ID=gaeac6 ;; ### gaea61-68 hfe0[1-9]) MACHINE_ID=hera ;; ### hera01-09 hfe1[0-2]) MACHINE_ID=hera ;; ### hera10-12 @@ -61,7 +64,9 @@ if [[ "${MACHINE_ID}" != "UNKNOWN" ]]; then fi # Try searching based on paths since hostname may not match on compute nodes -if [[ -d /lfs/h3 ]]; then +if [[ -d /opt/spack-stack ]]; then + MACHINE_ID=container +elif [[ -d /lfs/h3 ]]; then # We are on NOAA Cactus or Dogwood MACHINE_ID=wcoss2 elif [[ -d /lfs/h1 && ! -d /lfs/h3 ]]; then @@ -81,9 +86,12 @@ elif [[ -d /work ]]; then else MACHINE_ID=orion fi -elif [[ -d /gpfs && -d /ncrc ]]; then - # We are on GAEA. - MACHINE_ID=gaea +elif [[ -d /gpfs/f5 ]]; then + # We are on GAEAC5. + MACHINE_ID=gaeac5 +elif [[ -d /gpfs/f6 ]]; then + # We are on GAEAC6. + MACHINE_ID=gaeac6 elif [[ -d /data/prod ]]; then # We are on SSEC's S4 MACHINE_ID=s4 diff --git a/ush/module-setup.sh b/ush/module-setup.sh index 3d738b51..458b7195 100755 --- a/ush/module-setup.sh +++ b/ush/module-setup.sh @@ -7,6 +7,11 @@ if [[ $MACHINE_ID = jet* ]] ; then source /apps/lmod/lmod/init/bash fi module purge +elif [[ $MACHINE_ID = container* ]] ; then + if ( ! eval module help > /dev/null 2>&1 ) ; then + source /usr/lmod/lmod/init/bash + fi + module purge elif [[ $MACHINE_ID = hera* ]] ; then # We are on NOAA Hera