Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup and reorganization of files in ./Raster (make_bcs) #707

Merged
merged 16 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5167,13 +5167,10 @@ subroutine Driver ( RC )
! Variables for FPAR
! --------------------------
real , allocatable, dimension (:,:) :: parzone
character(len=ESMF_MAXSTR) :: Co2_CycleFile

IAm=trim(COMP_NAME)//"::RUN2::Driver"

! Begin

IAm=trim(COMP_NAME)//"Driver"

! --------------------------------------------------------------------------
! Get time step from configuration
! --------------------------------------------------------------------------
Expand Down Expand Up @@ -5656,7 +5653,11 @@ subroutine Driver ( RC )
call MPI_Info_create(info, STATUS); VERIFY_(status)
call MPI_Info_set(info, "romio_cb_read", "automatic", STATUS); VERIFY_(status)

STATUS = NF_OPEN ('CO2_MonthlyMean_DiurnalCycle.nc4', NF_NOWRITE, CTfile); VERIFY_(status)
call MAPL_GetResource (MAPL, CO2_CycleFile, label = 'CO2_MonthlyMean_DiurnalCycle_FILE:', &
default = 'CO2_MonthlyMean_DiurnalCycle.nc4', RC=STATUS )
VERIFY_(STATUS)

STATUS = NF_OPEN (trim(CO2_CycleFile), NF_NOWRITE, CTfile); VERIFY_(status)

allocate (CT_CO2V (1: NUNQ, 1:12, 1:8))
allocate (CTCO2_TMP (1:CT_grid_N_lon, 1:CT_grid_N_lat, 1:12, 1:8))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5115,7 +5115,7 @@ subroutine Driver ( RC )
real, allocatable, dimension(:,:,:) :: pft

real, allocatable, dimension(:) :: lnfm
character(len=ESMF_MAXSTR) :: LNFMFile
character(len=ESMF_MAXSTR) :: LNFMFile, CO2_CycleFile

integer :: ntile, nv, dpy, ierr, iok, ndt
integer, save :: year_prev = -9999
Expand Down Expand Up @@ -5653,7 +5653,9 @@ subroutine Driver ( RC )
call MPI_Info_create(info, STATUS); VERIFY_(status)
call MPI_Info_set(info, "romio_cb_read", "automatic", STATUS); VERIFY_(status)

STATUS = NF_OPEN ('CO2_MonthlyMean_DiurnalCycle.nc4', NF_NOWRITE, CTfile); VERIFY_(status)
call MAPL_GetResource (MAPL, CO2_CycleFile, label = 'CO2_MonthlyMean_DiurnalCycle_FILE:', default = 'CO2_MonthlyMean_DiurnalCycle.nc4', RC=STATUS )
VERIFY_(STATUS)
STATUS = NF_OPEN (trim(CO2_CycleFile), NF_NOWRITE, CTfile); VERIFY_(status)

allocate (CT_CO2V (1: NUNQ, 1:12, 1:8))
allocate (CTCO2_TMP (1:CT_grid_N_lon, 1:CT_grid_N_lat, 1:12, 1:8))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1 @@
esma_set_this(OVERRIDE raster)
set (srcs
date_time_util.F90
leap_year.F90
EASE_conv.F90
mod_process_hres_data.F90
rasterize.F90
read_riveroutlet.F90
CubedSphere_GridMod.F90
rmTinyCatchParaMod.F90
zip.c
util.c
)

if(NOT FORTRAN_COMPILER_SUPPORTS_FINDLOC)
list(APPEND srcs findloc.F90)
endif ()

set_source_files_properties(mkMITAquaRaster.F90 PROPERTIES COMPILE_FLAGS "${BYTERECLEN}")

esma_add_library(${this} SRCS ${srcs} DEPENDENCIES MAPL GEOS_SurfaceShared GEOS_LandShared esmf NetCDF::NetCDF_Fortran OpenMP::OpenMP_Fortran OpenMP::OpenMP_C)

if(NOT FORTRAN_COMPILER_SUPPORTS_FINDLOC)
target_compile_definitions(${this} PRIVATE USE_EXTERNAL_FINDLOC)
endif ()

# MAT NOTE This should use find_package(ZLIB) but Baselibs currently
# confuses find_package(). This is a hack until Baselibs is
# reorganized.
if (Baselibs_FOUND)
set (INC_ZLIB ${BASEDIR}/include/zlib)
target_include_directories(${this} PRIVATE ${INC_ZLIB})
else ()
find_package(ZLIB)
target_link_libraries(${this} PRIVATE ZLIB::zlib)
endif ()

ecbuild_add_executable (TARGET chk_clsm_params.x SOURCES chk_clsm_params.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET CombineRasters.x SOURCES CombineRasters.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mkCatchParam.x SOURCES mkCatchParam.F90 LIBS MAPL ${this} OpenMP::OpenMP_Fortran)
ecbuild_add_executable (TARGET mkCubeFVRaster.x SOURCES mkCubeFVRaster.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mkLandRaster.x SOURCES mkLandRaster.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mkLatLonRaster.x SOURCES mkLatLonRaster.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mkMITAquaRaster.x SOURCES mkMITAquaRaster.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mkMOMAquaRaster.x SOURCES mkMOMAquaRaster.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET FillMomGrid.x SOURCES FillMomGrid.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mk_runofftbl.x SOURCES mk_runofftbl.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mkEASETilesParam.x SOURCES mkEASETilesParam.F90 LIBS MAPL ${this})

install(PROGRAMS make_bcs clsm_plots.pro plot_curves.pro create_README.csh plot_curves.csh DESTINATION bin)
esma_add_subdirectories (makebcs preproc)

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
esma_set_this()

set (srcs
LDAS_DateTimeMod.F90
EASE_conv.F90
mod_process_hres_data.F90
rasterize.F90
read_riveroutlet.F90
CubedSphere_GridMod.F90
rmTinyCatchParaMod.F90
zip.c
util.c
)

if(NOT FORTRAN_COMPILER_SUPPORTS_FINDLOC)
list(APPEND srcs findloc.F90)
endif ()

set_source_files_properties(mkMITAquaRaster.F90 PROPERTIES COMPILE_FLAGS "${BYTERECLEN}")

esma_add_library(${this} SRCS ${srcs} DEPENDENCIES MAPL GEOS_SurfaceShared GEOS_LandShared esmf NetCDF::NetCDF_Fortran OpenMP::OpenMP_Fortran OpenMP::OpenMP_C)

if(NOT FORTRAN_COMPILER_SUPPORTS_FINDLOC)
target_compile_definitions(${this} PRIVATE USE_EXTERNAL_FINDLOC)
endif ()

# MAT NOTE This should use find_package(ZLIB) but Baselibs currently
# confuses find_package(). This is a hack until Baselibs is
# reorganized.
if (Baselibs_FOUND)
set (INC_ZLIB ${BASEDIR}/include/zlib)
target_include_directories(${this} PRIVATE ${INC_ZLIB})
else ()
find_package(ZLIB)
target_link_libraries(${this} PRIVATE ZLIB::zlib)
endif ()

ecbuild_add_executable (TARGET CombineRasters.x SOURCES CombineRasters.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mkCatchParam.x SOURCES mkCatchParam.F90 LIBS MAPL ${this} OpenMP::OpenMP_Fortran)
ecbuild_add_executable (TARGET mkCubeFVRaster.x SOURCES mkCubeFVRaster.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mkLandRaster.x SOURCES mkLandRaster.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mkLatLonRaster.x SOURCES mkLatLonRaster.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mkMITAquaRaster.x SOURCES mkMITAquaRaster.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mkMOMAquaRaster.x SOURCES mkMOMAquaRaster.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET FillMomGrid.x SOURCES FillMomGrid.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mk_runofftbl.x SOURCES mk_runofftbl.F90 LIBS MAPL ${this})
ecbuild_add_executable (TARGET mkEASETilesParam.x SOURCES mkEASETilesParam.F90 LIBS MAPL ${this})

install(PROGRAMS make_bcs clsm_plots.pro create_README.csh DESTINATION bin)
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
! $Id:

#include "Raster.h"
#define I_AM_MAIN
#include "MAPL_ErrLog.h"

program mkOverlaySimple

use LogRectRasterizeMod
use MAPL_SortMod
use MAPL_HashMod
use MAPL_ExceptionHandling
use MAPL_Constants

! Overlay atmosphere, land, and ocean rasters, creating a .idx file.
! The ocean raster should be defined everywhere, or at least, everywhere
Expand All @@ -27,7 +28,7 @@ program mkOverlaySimple
integer, parameter :: TILUNIT1 = 22
integer, parameter :: TILUNIT2 = 23

REAL_, parameter :: PI = RASTER_PI
real(kind=8), parameter :: PI = MAPL_PI_R8

integer :: command_argument_count
integer :: nxt, argl, fill
Expand All @@ -42,12 +43,12 @@ program mkOverlaySimple
integer, allocatable :: RST2(: )
integer, allocatable :: iTable(:,:)

REAL_ , allocatable :: Table1(:,:)
REAL_ , allocatable :: Table2(:,:)
REAL_ , allocatable :: rTable(:,:)
REAL_ , allocatable :: cc(:), ss(:)
REAL_ :: dx, dy, area, xc, yc, d2r, vv(4)
REAL_ :: lats, lons, da
real(kind=8) , allocatable :: Table1(:,:)
real(kind=8) , allocatable :: Table2(:,:)
real(kind=8) , allocatable :: rTable(:,:)
real(kind=8) , allocatable :: cc(:), ss(:)
real(kind=8) :: dx, dy, area, xc, yc, d2r, vv(4)
real(kind=8) :: lats, lons, da

logical :: DoZip
logical :: Verb
Expand All @@ -64,6 +65,7 @@ program mkOverlaySimple
character*128 :: &
Usage = "CombineRasters -v -h -z -t MT -g GF -f TYPE BOTTOMRASTER TOPRASTER"

character*128 :: Iam = "CombineRasters"
integer :: Pix1, Pix2

! Argument defaults
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
!#include "Raster.h"
#define VERIFY_(A) IF(A/=0)THEN;PRINT *,'ERROR AT LINE ', __LINE__;STOP;ENDIF
#define ASSERT_(A) if(.not.A)then;print *,'Error:',__FILE__,__LINE__;stop;endif

Expand Down
Loading