Skip to content

Commit

Permalink
Merge pull request ESCOMP#16 from ESCOMP/minimize_compiler_warnings
Browse files Browse the repository at this point in the history
remove unused variables
  • Loading branch information
jedwards4b authored Aug 10, 2020
2 parents 339112c + 7c65629 commit fc1a331
Show file tree
Hide file tree
Showing 31 changed files with 689 additions and 830 deletions.
47 changes: 26 additions & 21 deletions .github/workflows/extbuild.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a basic workflow to help you get started with Actions
# This is a workflow to compile the cdeps source without cime
name: extbuild
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
Expand All @@ -10,30 +10,35 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Build the ESMF library, if the cache contains a previous build it will be used instead
build-cdeps:
runs-on: ubuntu-latest
env:
CC: mpicc
FC: mpifort
CXX: mpicxx
CPPFLAGS: "-I/usr/include -I/usr/local/include"
# Versions of all dependencies can be updated here
ESMF_VERSION: ESMF_8_1_0_beta_snapshot_25
PNETCDF_VERSION: pnetcdf-1.12.1
NETCDF_FORTRAN_VERSION: v4.5.2
PIO_VERSION: pio-2.5.1
steps:
- uses: actions/checkout@v2
# Build the ESMF library, if the cache contains a previous build
# it will be used instead
- id: cache-esmf
uses: actions/cache@v2
with:
path: ~/ESMF
key: ${{ runner.os }}-ESMF
key: ${{ runner.os }}-${{ env.ESMF_VERSION }}-ESMF
- id: load-env
run: sudo apt-get install gfortran wget openmpi-bin netcdf-bin libopenmpi-dev

- id: build-ESMF
if: steps.cache-esmf.outputs.cache-hit != 'true'
run: |
wget https://github.com/esmf-org/esmf/archive/ESMF_8_1_0_beta_snapshot_25.tar.gz
tar -xzvf ESMF_8_1_0_beta_snapshot_25.tar.gz
pushd esmf-ESMF_8_1_0_beta_snapshot_25
wget https://github.com/esmf-org/esmf/archive/${{ env.ESMF_VERSION }}.tar.gz
tar -xzvf ${{ env.ESMF_VERSION }}.tar.gz
pushd esmf-${{ env.ESMF_VERSION }}
export ESMF_DIR=`pwd`
export ESMF_COMM=openmpi
export ESMF_YAMLCPP="internal"
Expand All @@ -46,14 +51,14 @@ jobs:
uses: actions/cache@v2
with:
path: ~/pnetcdf
key: ${{ runner.os }}-pnetcdf
key: ${{ runner.os }}-${{ env.PNETCDF_VERSION}}-pnetcdf
- name: pnetcdf build
if: steps.cache-pnetcdf.outputs.cache-hit != 'true'
run: |
wget https://parallel-netcdf.github.io/Release/pnetcdf-1.12.1.tar.gz
tar -xzvf pnetcdf-1.12.1.tar.gz
wget https://parallel-netcdf.github.io/Release/${{ env.PNETCDF_VERSION }}.tar.gz
tar -xzvf ${{ env.PNETCDF_VERSION }}.tar.gz
ls -l
pushd pnetcdf-1.12.1
pushd ${{ env.PNETCDF_VERSION }}
./configure --prefix=$HOME/pnetcdf --enable-shared --disable-cxx
make
make install
Expand All @@ -63,15 +68,15 @@ jobs:
uses: actions/cache@v2
with:
path: ~/netcdf-fortran
key: ${{ runner.os }}-netcdf-fortran
key: ${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-netcdf-fortran
- name: netcdf fortran build
if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true'
run: |
sudo apt-get install libnetcdf-dev
wget https://github.com/Unidata/netcdf-fortran/archive/v4.5.2.tar.gz
tar -xzvf v4.5.2.tar.gz
wget https://github.com/Unidata/netcdf-fortran/archive/${{ env.NETCDF_FORTRAN_VERSION }}.tar.gz
tar -xzvf ${{ env.NETCDF_FORTRAN_VERSION }}.tar.gz
ls -l
pushd netcdf-fortran-4.5.2
pushd netcdf-fortran-*
./configure --prefix=$HOME/netcdf-fortran
make
make install
Expand All @@ -81,18 +86,18 @@ jobs:
uses: actions/cache@v2
with:
path: ~/pio
key: ${{ runner.os }}-pio
key: ${{ runner.os }}-${{ env.PIO_VERSION }}.pio
restore-keys: |
${{ runner.os }}-netcdf-fortran
${{ runner.os }}-pnetcdf
${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-netcdf-fortran
${{ runner.os }}-${{ env.PNETCDF_VERSION }}-pnetcdf
- name: Build PIO
if: steps.cache-PIO.outputs.cache-hit != 'true'
run: |
wget https://github.com/NCAR/ParallelIO/releases/download/pio_2_5_1/pio-2.5.1.tar.gz
tar -xzvf pio-2.5.1.tar.gz
wget https://github.com/NCAR/ParallelIO/releases/download/pio_2_5_1/${{ env.PIO_VERSION }}.tar.gz
tar -xzvf ${{ env.PIO_VERSION }}.tar.gz
mkdir build-pio
pushd build-pio
cmake -Wno-dev -DNetCDF_C_LIBRARY=/usr/lib/x86_64-linux-gnu/libnetcdf.so -DNetCDF_C_INCLUDE_DIR=/usr/include -DCMAKE_PREFIX_PATH=/usr -DCMAKE_INSTALL_PREFIX=$HOME/pio -DPIO_HDF5_LOGGING=On -DPIO_USE_MALLOC=On -DPIO_ENABLE_LOGGING=On -DPIO_ENABLE_TIMING=Off -DNetCDF_Fortran_PATH=$HOME/netcdf-fortran -DPnetCDF_PATH=$HOME/pnetcdf ../pio-2.5.1
cmake -Wno-dev -DNetCDF_C_LIBRARY=/usr/lib/x86_64-linux-gnu/libnetcdf.so -DNetCDF_C_INCLUDE_DIR=/usr/include -DCMAKE_PREFIX_PATH=/usr -DCMAKE_INSTALL_PREFIX=$HOME/pio -DPIO_HDF5_LOGGING=On -DPIO_USE_MALLOC=On -DPIO_ENABLE_LOGGING=On -DPIO_ENABLE_TIMING=Off -DNetCDF_Fortran_PATH=$HOME/netcdf-fortran -DPnetCDF_PATH=$HOME/pnetcdf ../${{ env.PIO_VERSION }}
make VERBOSE=1
make install
popd
Expand Down
23 changes: 10 additions & 13 deletions datm/atm_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ module atm_comp_nuopc
logical :: flds_presaero = .false. ! true => send valid prescribe aero fields to mediator
logical :: flds_co2 = .false. ! true => send prescribed co2 to mediator
logical :: flds_wiso = .false. ! true => send water isotopes to mediator
character(CL) :: bias_correct = nullstr ! send bias correction fields to coupler (not used here)
character(CL) :: anomaly_forcing(8) = nullstr ! send anomaly forcing fields to coupler (not used here)
character(CL) :: bias_correct = nullstr ! send bias correction fields to coupler
character(CL) :: anomaly_forcing(8) = nullstr ! send anomaly forcing fields to coupler

character(CL) :: restfilm = nullstr ! model restart file namelist
integer :: nx_global ! global nx
integer :: ny_global ! global ny
Expand Down Expand Up @@ -177,7 +178,6 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
integer, intent(out) :: rc

! local variables
character(len=CL) :: cvalue ! temporary
integer :: nu ! unit number
integer :: ierr ! error code
logical :: exists ! check for file existence
Expand Down Expand Up @@ -417,7 +417,6 @@ subroutine ModelAdvance(gcomp, rc)
! local variables
type(ESMF_State) :: importState, exportState
type(ESMF_Clock) :: clock
type(ESMF_Time) :: time
type(ESMF_Alarm) :: alarm
type(ESMF_Time) :: currTime
type(ESMF_Time) :: nextTime
Expand All @@ -432,7 +431,6 @@ subroutine ModelAdvance(gcomp, rc)
real(R8) :: orbMvelpp ! orb moving vernal eq (radians)
real(R8) :: orbLambm0 ! orb mean long of perhelion (radians)
real(R8) :: orbObliqr ! orb obliquity (radians)
character(len=CL) :: cvalue ! temporary
character(len=*),parameter :: subname=trim(modName)//':(ModelAdvance) '
!-------------------------------------------------------------------------------

Expand Down Expand Up @@ -587,14 +585,14 @@ subroutine datm_comp_run(importState, exportState, target_ymd, target_tod, targe
call ESMF_TraceRegionEnter('datm_datamode')
select case (trim(datamode))
case('CORE2_NYF','CORE2_IAF')
call datm_datamode_core2_advance(exportstate, datamode, target_ymd, target_tod, target_mon, &
sdat%model_calendar, factorfn_mesh, factorfn_data, rc)
call datm_datamode_core2_advance(datamode, target_ymd, target_tod, target_mon, &
sdat%model_calendar, factorfn_mesh, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('CORE_IAF_JRA')
call datm_datamode_jra_advance(exportstate, target_ymd, target_tod, sdat%model_calendar, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('CLMNCEP')
call datm_datamode_clmncep_advance(importstate, exportstate, masterproc, logunit, mpicom, rc)
call datm_datamode_clmncep_advance(masterproc, logunit, mpicom, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('ERA5')
call datm_datamode_era5_advance(exportstate, masterproc, logunit, mpicom, target_ymd, &
Expand All @@ -607,19 +605,19 @@ subroutine datm_comp_run(importState, exportState, target_ymd, target_tod, targe
select case (trim(datamode))
case('CORE2_NYF','CORE2_IAF')
call datm_datamode_core2_restart_write(case_name, inst_suffix, target_ymd, target_tod, &
logunit, mpicom, my_task, sdat)
logunit, my_task, sdat)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('CORE_IAF_JRA')
call datm_datamode_jra_restart_write(case_name, inst_suffix, target_ymd, target_tod, &
logunit, mpicom, my_task, sdat)
logunit, my_task, sdat)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('CLMNCEP')
call datm_datamode_clmncep_restart_write(case_name, inst_suffix, target_ymd, target_tod, &
logunit, mpicom, my_task, sdat)
logunit, my_task, sdat)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('ERA5')
call datm_datamode_era5_restart_write(case_name, inst_suffix, target_ymd, target_tod, &
logunit, mpicom, my_task, sdat)
logunit, my_task, sdat)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
end select
end if
Expand Down Expand Up @@ -735,7 +733,6 @@ real(R8) function getNextRadCDay( ymd, tod, stepno, dtime, iradsw, calendar )
real(R8) :: nextsw_cday
real(R8) :: julday
integer :: liradsw
integer :: yy,mm,dd
character(*),parameter :: subName = '(getNextRadCDay) '
!-------------------------------------------------------------------------------

Expand Down
Loading

0 comments on commit fc1a331

Please sign in to comment.