NOAA-EMC / UPP

Other
33 stars 95 forks source link

Remove dependency on sfcio and use sigio only when nemsio is enabled #930

Closed DusanJovic-NOAA closed 3 months ago

DusanJovic-NOAA commented 3 months ago

The sfcio library is not needed anymore, so we can remove the dependency on it. The sigio library is needed only in part of the code that reads nemsio files, so it should be required only when nemsio is enabled.

WenMeng-NOAA commented 3 months ago

@DusanJovic-NOAA Can you update modulefiles/wcoss2.lua to remove sfcio lib?

DusanJovic-NOAA commented 3 months ago

@DusanJovic-NOAA Can you update modulefiles/wcoss2.lua to remove sfcio lib?

Done

WenMeng-NOAA commented 3 months ago

@FernandoAndrade-NOAA You may start the UPP RTs on Hera and Orion. No baseline update is expected.

WenMeng-NOAA commented 3 months ago

@gspetro-NOAA The sfcio lib dependency will be completely retired from UPP. You might update the UPP documentation accordingly.

WenMeng-NOAA commented 3 months ago

@DusanJovic-NOAA I tested the option to build UPP executable without nemsio and got failure as:

> cd UPP/tests
> ./compile_upp.sh -n
Scanning dependencies of target upp.x
[ 95%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/upp.x.dir/intio_tags.f.o
[ 95%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/upp.x.dir/wrf_io_flags.f.o
[ 95%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/upp.x.dir/GFSPOSTSIG.F.o
[ 95%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/upp.x.dir/INITPOST_NETCDF.f.o
[ 97%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/upp.x.dir/WRFPOST.F.o
[ 97%] Building Fortran object sorc/ncep_post.fd/CMakeFiles/upp.x.dir/getlvls.f.o
/u/wen.meng/ptmp/dusan/UPP/sorc/ncep_post.fd/GFSPOSTSIG.F(97): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [SIGIO_MODULE]
  use sigio_module,   only : sigio_intkind, sigio_head
------^
/u/wen.meng/ptmp/dusan/UPP/sorc/ncep_post.fd/GFSPOSTSIG.F(98): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [SIGIO_R_MODULE]
  use sigio_r_module, only : sigio_dati, sigio_rrdati
------^
/u/wen.meng/ptmp/dusan/UPP/sorc/ncep_post.fd/GFSPOSTSIG.F(102): error #6683: A kind type parameter must be a compile-time constant.   [SIGIO_INTKIND]
  integer(sigio_intkind),intent(in)    :: lusig
----------^
/u/wen.meng/ptmp/dusan/UPP/sorc/ncep_post.fd/GFSPOSTSIG.F(103): error #6457: This derived type name has not been declared.   [SIGIO_HEAD]
  type(sigio_head),      intent(in)    :: head
-------^
/u/wen.meng/ptmp/dusan/UPP/sorc/ncep_post.fd/GFSPOSTSIG.F(112): error #6683: A kind type parameter must be a compile-time constant.   [SIGIO_INTKIND]
  integer(sigio_intkind):: irets
...
DusanJovic-NOAA commented 3 months ago

I forgot to move GFSPOSTSIG.F to if (BUILD_WITH_NEMSIO) block. Please try again.

WenMeng-NOAA commented 3 months ago

I forgot to move GFSPOSTSIG.F to if (BUILD_WITH_NEMSIO) block. Please try again.

@DusanJovic-NOAA Now it works well.

WenMeng-NOAA commented 3 months ago

The UPP RTs have been completed on WCOSS2. The UPP building without nemsio lib was tested.

FernandoAndrade-NOAA commented 3 months ago

@FernandoAndrade-NOAA You may start the UPP RTs on Hera and Orion. No baseline update is expected.

RTs completed on Hera, Hercules, and Orion with no changes to results.

WenMeng-NOAA commented 3 months ago

This PR is ready for merging.