Skip to content
Open
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
12 changes: 12 additions & 0 deletions lis/configs/lis.config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ endif::devonly[]
|"`GALWEM forecast`" | GALWEM 17km or 0.25deg deterministic forecast reader
|"`GALWEM-GE forecast`" | GALWEM-GE forecast reader
|"`Global EIS`" | Global Earth Information System (EIS) 5km forcing
|"`NLDAS-3 SWdown`" | CERES SWdown data for NLDAS-3
|====

.Example _lis.config_ entry
Expand Down Expand Up @@ -6728,6 +6729,17 @@ of the Global EIS forcing files.
Global EIS forcing directory: ./geis
....

[[sssec_nldas3sw,NLDAS-3 SWdown]]
==== CERES SWdown for NLDAS-3

`CERES SWdown forcing directory:` specifies the location
of the CERES SWdown 4-km binary hourly data.

.Example _lis.config_ entry
....
CERES SWdown forcing directory: ./CERES
....

[[ssec_lsm,Land surface models]]
=== Land surface models

Expand Down
5 changes: 5 additions & 0 deletions lis/make/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@ enabled: True
macro: MF_NLDAS2
path: metforcing/nldas2

[NLDAS3SW]
enabled: True
macro: MF_NLDAS3SW
path: metforcing/nldas3sw

[GEIS]
enabled: True
macro: MF_GEIS
Expand Down
17 changes: 17 additions & 0 deletions lis/metforcing/nldas3sw/0Intro_nldas3sw.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
!-----------------------BEGIN NOTICE -- DO NOT EDIT-----------------------
! NASA Goddard Space Flight Center
! Land Information System Framework (LISF)
! Version 7.5
!
! Copyright (c) 2024 United States Government as represented by the
! Administrator of the National Aeronautics and Space Administration.
! All Rights Reserved.
!-------------------------END NOTICE -- DO NOT EDIT-----------------------
!
!BOP
!\section{NLDAS3SW}
!These routines read in the CERES hourly SWdown 4-km binary data
!for interpolation and slope-aspect corrections down to the 1-km
!NLDAS-3 grid.
!
!EOP
70 changes: 70 additions & 0 deletions lis/metforcing/nldas3sw/finalize_nldas3sw.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
!-----------------------BEGIN NOTICE -- DO NOT EDIT-----------------------
! NASA Goddard Space Flight Center
! Land Information System Framework (LISF)
! Version 7.5
!
! Copyright (c) 2024 United States Government as represented by the
! Administrator of the National Aeronautics and Space Administration.
! All Rights Reserved.
!-------------------------END NOTICE -- DO NOT EDIT-----------------------
!BOP
! !ROUTINE: finalize_nldas3sw
! \label{finalize_nldas3sw}
!
! !REVISION HISTORY:
! 27 Dec 2024: David Mocko, Initial Specification
! (derived from finalize_nldas20.F90)
!
! !INTERFACE:
subroutine finalize_nldas3sw(findex)
! !USES:
use LIS_coreMod, only : LIS_rc
use nldas3sw_forcingMod, only : nldas3sw_struc

implicit none
! !ARGUMENTS:
integer :: findex
!
! !DESCRIPTION:
! Routine to cleanup NLDAS-3 SWdown forcing related memory allocations.
!
!EOP
integer :: n

do n = 1,LIS_rc%nnest
if (trim(LIS_rc%met_interp(findex)).eq."bilinear") then
deallocate(nldas3sw_struc(n)%n111)
deallocate(nldas3sw_struc(n)%n121)
deallocate(nldas3sw_struc(n)%n211)
deallocate(nldas3sw_struc(n)%n221)
deallocate(nldas3sw_struc(n)%w111)
deallocate(nldas3sw_struc(n)%w121)
deallocate(nldas3sw_struc(n)%w211)
deallocate(nldas3sw_struc(n)%w221)
elseif (trim(LIS_rc%met_interp(findex)).eq."budget-bilinear") &
then
deallocate(nldas3sw_struc(n)%n111)
deallocate(nldas3sw_struc(n)%n121)
deallocate(nldas3sw_struc(n)%n211)
deallocate(nldas3sw_struc(n)%n221)
deallocate(nldas3sw_struc(n)%w111)
deallocate(nldas3sw_struc(n)%w121)
deallocate(nldas3sw_struc(n)%w211)
deallocate(nldas3sw_struc(n)%w221)
deallocate(nldas3sw_struc(n)%n112)
deallocate(nldas3sw_struc(n)%n122)
deallocate(nldas3sw_struc(n)%n212)
deallocate(nldas3sw_struc(n)%n222)
deallocate(nldas3sw_struc(n)%w112)
deallocate(nldas3sw_struc(n)%w122)
deallocate(nldas3sw_struc(n)%w212)
deallocate(nldas3sw_struc(n)%w222)
elseif(trim(LIS_rc%met_interp(findex)).eq."neighbor") then
deallocate(nldas3sw_struc(n)%n113)
endif

enddo
deallocate(nldas3sw_struc)

end subroutine finalize_nldas3sw

77 changes: 77 additions & 0 deletions lis/metforcing/nldas3sw/get_ceres_filenames.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
!-----------------------BEGIN NOTICE -- DO NOT EDIT-----------------------
! NASA Goddard Space Flight Center
! Land Information System Framework (LISF)
! Version 7.5
!
! Copyright (c) 2024 United States Government as represented by the
! Administrator of the National Aeronautics and Space Administration.
! All Rights Reserved.
!-------------------------END NOTICE -- DO NOT EDIT-----------------------
!BOP
! !ROUTINE: ceres_nldas3swfile
! \label{ceres_nldas3swfile}
!
! !REVISION HISTORY:
! 27 Dec 2024: David Mocko, Initial Specification
! (derived from get_netcdf4_filenames.F90)
!
! !INTERFACE:
subroutine ceres_nldas3swfile(n,kk,findex,filename, &
nldas3swdir,yr,mo,da,doy,hr)
! !USES:
use LIS_coreMod
use LIS_logMod

implicit none
! !ARGUMENTS:
integer :: n
integer :: kk
integer :: findex
character(len=*), intent(out) :: filename
character(len=*), intent(in) :: nldas3swdir
integer, intent(in) :: yr,mo,da,doy,hr
!
! !DESCRIPTION:
! This subroutine assembles CERES 4-km binary filename
! for 1 hour file intervals.
!
! The arguments are:
! \begin{description}
! \item[nldas3swdir]
! Name of the CERES SWdown directory
! \item[yr]
! year
! \item[mo]
! month
! \item[da]
! day of month
! \item[doy]
! Julian day of year (needed for subdirectory structure)
! \item[hr]
! hour of day
! \item[filename]
! name of the timestamped CERES 4-km binary filename
! \end{description}
!
!EOP
character*4 :: fyr
character*3 :: fdoy
character*2 :: fmo, fda, fhr
integer :: doy2

!=== end variable definition ===========================================

if (LIS_rc%forecastMode.eq.0) then !hindcast run
write(unit=fyr, fmt="(i4.4)") yr
write(unit=fdoy,fmt="(i3.3)") doy
write(unit=fmo, fmt="(i2.2)") mo
write(unit=fda, fmt="(i2.2)") da
write(unit=fhr, fmt="(i2.2)") hr

!=== Assemble CERES 4-km binary filename
filename = trim(nldas3swdir)//"/"//fyr//"/"// &
"NLDAS3_INSOL_DAILY_"//fyr//fdoy//".dat"
endif

end subroutine ceres_nldas3swfile

Loading