Skip to content

Commit

Permalink
Merge pull request #1466 from sujayvkumar/feature/globalforcing
Browse files Browse the repository at this point in the history
Added support for the global EIS forcing data
  • Loading branch information
jvgeiger committed Dec 7, 2023
2 parents d648d72 + 4564797 commit baf9527
Show file tree
Hide file tree
Showing 11 changed files with 1,144 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lis/configs/lis.config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ endif::devonly[]
|"`COAMPSout`" | COAMPS output forcing
|"`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
|====

.Example _lis.config_ entry
Expand Down Expand Up @@ -6635,8 +6636,19 @@ of the GALWEM-GE forecast forcing data.
GALWEM-GE forecast forcing directory: ./GALWEM_GE
GALWEM-GE forecast run mode: forecast # forecast | analysis
GALWEM-GE forecast number of ensemble members: 21
....
[[sssec_geis,Global EIS]]
==== Global EIS
NOTE: There is no spatial interpolation support for this dataset.
`Global EIS forcing directory:` specifies the location
of the Global EIS forcing files.
.Example _lis.config_ entry
....
Global EIS forcing directory: ./geis
....
[[ssec_lsm,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

[GEIS]
enabled: True
macro: MF_GEIS
path: metforcing/geis

[GLDAS]
enabled: True
macro: MF_GLDAS
Expand Down
35 changes: 35 additions & 0 deletions lis/metforcing/geis/finalize_geis.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
!-----------------------BEGIN NOTICE -- DO NOT EDIT-----------------------
! NASA Goddard Space Flight Center
! Land Information System Framework (LISF)
! Version 7.4
!
! Copyright (c) 2022 United States Government as represented by the
! Administrator of the National Aeronautics and Space Administration.
! All Rights Reserved.
!-------------------------END NOTICE -- DO NOT EDIT-----------------------
#include "LIS_misc.h"
!BOP
! !MODULE: finalize_geis
! \label{finalize_geis}
!
! !REVISION HISTORY:
! 15 Nov 2023; Sujay Kumar, Initial Code
!
! !INTERFACE:
subroutine finalize_geis(findex)
! !USES:
use LIS_coreMod, only : LIS_rc
use geis_forcingMod, only : geis_struc
!
! !DESCRIPTION:
! Routine to cleanup geis forcing related memory allocations.
!
!EOP
implicit none

integer :: n
integer :: findex

deallocate(geis_struc)

end subroutine finalize_geis
142 changes: 142 additions & 0 deletions lis/metforcing/geis/geis_forcingMod.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
!-----------------------BEGIN NOTICE -- DO NOT EDIT-----------------------
! NASA Goddard Space Flight Center
! Land Information System Framework (LISF)
! Version 7.4
!
! Copyright (c) 2022 United States Government as represented by the
! Administrator of the National Aeronautics and Space Administration.
! All Rights Reserved.
!-------------------------END NOTICE -- DO NOT EDIT-----------------------
module geis_forcingMod
!BOP
! !MODULE: geis_forcingMod
!
! !DESCRIPTION:
! This module contains variables and data structures that are used
! for the implementation of the global forcing data used in the
! Earth Information System (EIS). The variables are produced
! at 5km spatial resolution, and at hourly intervals.
!
! NOTE: no spatial interpolation of the code is supported currently
!
! !REVISION HISTORY:
! 15 Nov 2023: Sujay Kumar; Initial Specification
!
! !USES:
use LIS_constantsMod, only : LIS_CONST_PATH_LEN
implicit none

PRIVATE
!-----------------------------------------------------------------------------
! !PUBLIC MEMBER FUNCTIONS:
!-----------------------------------------------------------------------------
public :: init_GEIS !defines the native resolution of
!the input data
!-----------------------------------------------------------------------------
! !PUBLIC TYPES:
!-----------------------------------------------------------------------------
public :: geis_struc
!EOP

type, public :: geis_type_dec
real :: ts
integer :: ncold, nrold ! AWIPS 212 dimensions
character*50 :: geis_filesrc
character(len=LIS_CONST_PATH_LEN) :: geisdir ! NLDAS-2 Forcing Directory
real*8 :: geistime1,geistime2

integer :: findtime1, findtime2
integer :: niter
integer :: c_off,r_off
real, allocatable :: metdata1(:,:,:)
real, allocatable :: metdata2(:,:,:)

end type geis_type_dec

type(geis_type_dec), allocatable :: geis_struc(:)
!EOP
contains

!BOP
!
! !ROUTINE: init_GEIS
! \label{init_GEIS}
!
! !INTERFACE:
subroutine init_GEIS(findex)
! !USES:
use LIS_coreMod, only : LIS_rc, LIS_domain
use LIS_timeMgrMod, only : LIS_update_timestep
use LIS_logMod, only : LIS_logunit,LIS_endrun
use LIS_spatialDownscalingMod, only : LIS_init_pcpclimo_native
use map_utils, only : proj_latlon
use LIS_forecastMod

implicit none

integer, intent(in) :: findex
!
! !DESCRIPTION:
! Defines the native resolution of the input forcing for NLDAS-2
! data. The grid description arrays are based on the decoding
! schemes used by NCEP and followed in the LIS interpolation
! schemes (see Section~\ref{interp}).
!
! The routines invoked are:
! \begin{description}
! \item[readcrd\_geis](\ref{readcrd_geis}) \newline
! reads the runtime options specified for NLDAS-2 data
! \item[bilinear\_interp\_input](\ref{bilinear_interp_input}) \newline
! computes the neighbor, weights for bilinear interpolation
! \item[conserv\_interp\_input](\ref{conserv_interp_input}) \newline
! computes the neighbor, weights for conservative interpolation
! \item[read\_geis\_elev](\ref{read_geis_elev}) \newline
! reads the native elevation of the NLDAS-2 data to be used
! for topographic adjustments to the forcing
! \end{description}
!EOP

integer :: n
real :: lat1, lon1

allocate(geis_struc(LIS_rc%nnest))
call readcrd_geis()

do n=1, LIS_rc%nnest
geis_struc(n)%ts = 3600
call LIS_update_timestep(LIS_rc, n, geis_struc(n)%ts)
enddo

LIS_rc%met_nf(findex) = 7

! Set NLDAS-2 grid dimensions and extent information:
geis_struc(:)%ncold = 7200
geis_struc(:)%nrold = 3000

do n=1,LIS_rc%nnest

allocate(geis_struc(n)%metdata1(1,&
LIS_rc%met_nf(findex),&
LIS_rc%ngrid(n)))
allocate(geis_struc(n)%metdata2(1,&
LIS_rc%met_nf(findex),&
LIS_rc%ngrid(n)))

geis_struc(n)%metdata1 = 0
geis_struc(n)%metdata2 = 0

geis_struc(n)%findtime1 = 0
geis_struc(n)%findtime2 = 0

geis_struc(n)%nIter = 1

lat1 = LIS_domain(n)%lat(1)
lon1 = LIS_domain(n)%lon(1)

geis_struc(n)%r_off = nint((lat1 + 59.975)/0.05) + 1
geis_struc(n)%c_off = nint((lon1 + 179.975)/0.05) + 1

enddo

end subroutine init_GEIS
end module geis_forcingMod
Loading

0 comments on commit baf9527

Please sign in to comment.