Skip to content

Commit

Permalink
Merge pull request #18 from smsaleeb/main
Browse files Browse the repository at this point in the history
Updates to dprep Makefiles and Readme files. Also update to dprep f90…
  • Loading branch information
smsaleeb authored Sep 12, 2023
2 parents b8eee94 + ab3c477 commit 183c7e0
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 13 deletions.
7 changes: 4 additions & 3 deletions bin.dp.grib1/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Makefile
#Makefile
###############################################################################
# Include definitions
# Include definitions
###############################################################################
include ../include.mk
###############################################################################
Expand Down Expand Up @@ -51,7 +51,8 @@ rams_wgrib:

$(EXE): $(ARC) $(MAIN) FORCE
@echo ""
$(F_COMP) -o $(EXE) $(MAIN_OBJ) $(LOADER_OPTS) $(ARC)
$(F_COMP) -o $(EXE) $(MAIN_OBJ) $(LOADER_OPTS) $(ARC) \
$(PAR_LIBS)
rm -f *.o
@echo ""
@echo Finished building === $(EXE)
Expand Down
4 changes: 2 additions & 2 deletions bin.dp.grib1/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
3. Not all Grib reanalysis and forecast gridded datasets are accounted for.

You can view the degribbing code in the files such as:
src/6.2.11/dprep/dgrib1_main.f90 and
src/6.2.11/lib/griber_grb1.c
src/dprep/dgrib1_main.f90 and
src/lib/griber_grb1.c

In these routines are the specfications for adding a new dataset. Grib
names and numbers and labels can vary among datasets and each variation
Expand Down
8 changes: 5 additions & 3 deletions bin.dp.grib2/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Makefile
#Makefile

###############################################################################
# Include definitions
# Include definitions
###############################################################################
include ../include.mk
###############################################################################
Expand Down Expand Up @@ -52,7 +53,8 @@ wgrib2:

$(EXE): $(ARC) $(MAIN) FORCE
@echo ""
$(F_COMP) -o $(EXE) $(MAIN_OBJ) $(LOADER_OPTS) $(ARC)
$(F_COMP) -o $(EXE) $(MAIN_OBJ) $(LOADER_OPTS) $(ARC) \
$(PAR_LIBS)
rm -f *.o
@echo ""
@echo Finished building === $(EXE)
Expand Down
4 changes: 2 additions & 2 deletions bin.dp.grib2/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
3. Not all Grib reanalysis and forecast gridded datasets are accounted for.

You can view the degribbing code in the files such as:
src/6.2.11/dprep/dgrib2_main.f90 and
src/6.2.11/lib/griber_grb2.c
src/dprep/dgrib2_main.f90 and
src/lib/griber_grb2.c

In these routines are the specfications for adding a new dataset. Grib
names and numbers and labels can vary among datasets and each variation
Expand Down
2 changes: 1 addition & 1 deletion include.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MAKE=/usr/bin/make
#############################################################################
# Set your RAMS root path and version number.
#############################################################################
RAMS_ROOT=/home/smsaleeb/rams_steve/RAMS
RAMS_ROOT=/home/smsaleeb/rams_steve_git/RAMS
RAMS_VERSION=6.3.04

#############################################################################
Expand Down
18 changes: 17 additions & 1 deletion src/dprep/dgrib1_main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Program griber
,nlev,slev,inproj,miss,startlev,endlev &
,iyyyy,imm,idd,ihh,fyyyy,fmm,fdd,fhh,leapyear &
,nvar3d,nvar2d,nvarsd,iplevs(1000),islevs(1000),datatype &
,writesoillevs,writesnowlevs
,writesoillevs,writesnowlevs,mx,plev1(1000),plev2(1000)
real :: alat1,alon1,alat2,alon2,alov,aorient,dx,dy,reflat1,reflat2 &
,tinc,amiss,alatscr
logical :: llisglobal,matched
Expand Down Expand Up @@ -416,6 +416,22 @@ Program griber
endif
print*,'Number of Pressure Levels= ',nlev

!**************************************************************************
!Make sure the pressure levels are in descending order for correct output
!if not ordered properly in grib file - plev1, plev23, and mx added to
!integer variables declarations (Stephen Noble, SRNL)
plev1=iplevs
do i=1,nlev
mx=maxval(plev1)
plev2(i)=mx
do j=1,nlev
if (plev1(j)==mx) then
plev1(j)=-999
endif
enddo
enddo
iplevs=plev2

!**************************************************************************
!Determine the number of SOIL levels we are going to use.
!Only add soil (moisture and/or temperature) if the soil moisture is there.
Expand Down
18 changes: 17 additions & 1 deletion src/dprep/dgrib2_main.f90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Program griber
,nlev,slev,inproj,miss,startlev,endlev &
,iyyyy,imm,idd,ihh,fyyyy,fmm,fdd,fhh,leapyear &
,nvar3d,nvar2d,nvarsd,iplevs(1000),islevs(1000),datatype &
,writesoillevs,writesnowlevs
,writesoillevs,writesnowlevs,mx,plev1(1000),plev2(1000)
real :: alat1,alon1,alat2,alon2,alov,aorient,dx,dy,reflat1,reflat2 &
,tinc,amiss,alatscr
logical :: llisglobal,matched
Expand Down Expand Up @@ -416,6 +416,22 @@ Program griber
endif
print*,'Number of Pressure Levels= ',nlev

!**************************************************************************
!Make sure the pressure levels are in descending order for correct output
!if not ordered properly in grib file - plev1, plev23, and mx added to
!integer variables declarations (Stephen Noble, SRNL)
plev1=iplevs
do i=1,nlev
mx=maxval(plev1)
plev2(i)=mx
do j=1,nlev
if (plev1(j)==mx) then
plev1(j)=-999
endif
enddo
enddo
iplevs=plev2

!**************************************************************************
!Determine the number of SOIL levels we are going to use.
!Only add soil (moisture and/or temperature) if the soil moisture is there.
Expand Down

0 comments on commit 183c7e0

Please sign in to comment.