Skip to content

Commit 0f48214

Browse files
authored
Merge pull request #1633 from lbusschaert/feature/ac.7.2_integration
Feature/AquaCropv7.2 integration
2 parents 011af69 + 0689afc commit 0f48214

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+47953
-2
lines changed

ldt/configs/ldt.config.adoc

+44
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ Surface model types: "LSM"
100100
|RDHM.3.5.6 |Sacramento+snow17
101101
|GeoWRSI.2 |GeoWRSI, v2.0
102102
|SiB2 |SiB v2
103+
|AquaCrop.7.2 |AquaCrop 7.2
103104
ifdef::devonly[]
104105
|FASST |FASST
105106
|CABLE |CABLE
@@ -2987,6 +2988,49 @@ SiB2 resolution (dx): 0.05
29872988
SiB2 resolution (dy): 0.05
29882989
....
29892990

2991+
`AquaCrop crop type data source:` specifies the data source for the crop types. Only current option is "`CONSTANT`".
2992+
2993+
`AquaCrop crop library directory:` specifies the location of the crop library directory containing the AC_Crop.Inventory file and the AC_Crop.List directory containing the crop files.
2994+
2995+
`AquaCrop crop type:` specifies the crop type used for the "`CONSTANT`" crop type data source option.
2996+
2997+
`AquaCrop number of soil layers:` specifies the number of soil layers (from top to bottom).
2998+
2999+
`AquaCrop soil layer thickness:` specifies the thickness of each soil layer.
3000+
3001+
`AquaCrop temperature climatology directory:` specifies the directory containing the monthly climatologies of minimum and maximum temperatures used for the a priori parametrization of the fertility. The files are provided as formatted monthly .txt files for Tmin and Tmax.
3002+
3003+
`AquaCrop reference year for climatology`: specifies the reference year to be used for the a priori parametrization of the fertility (usually set to the center of the period used to compute the climatologies).
3004+
3005+
`AquaCrop temperature climatology spatial transform`: specifies the spatial transformation for the climatologies of minimum and maximum temperatures. Options include:
3006+
3007+
[cols="<,<",]
3008+
|===
3009+
|Value |Description
3010+
3011+
|none |Data on same grid as LDT domain
3012+
|neighbor |Reinterpolate by selecting nearest gridcell neighbor
3013+
|bilinear |Reinterpolate by using bilinear interpolation
3014+
|===
3015+
3016+
.Example _ldt.config_ entry
3017+
....
3018+
##AquaCrop crop file directories
3019+
AquaCrop crop type data source: "CONSTANT"
3020+
AquaCrop crop library directory: ./crop_params_dir/
3021+
AquaCrop crop type: "crop_type"
3022+
3023+
##AquaCrop soil layers
3024+
AquaCrop number of soil layers: 2
3025+
AquaCrop soil layer thickness: 0.3 0.9
3026+
3027+
##AquaCrop tmin/tmax climatology
3028+
AquaCrop temperature climatology directory: ./climatologies_dir/
3029+
AquaCrop reference year for climatology: 2011
3030+
AquaCrop temperature climatology spatial transform: "bilinear"
3031+
....
3032+
3033+
29903034
==== WRSI model parameter files
29913035

29923036
`WRSI landmask file:` specifies the location of the GeoWRSI 2.0 land mask file (default file is in *BIL format).

ldt/make/Filepath

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dirs := . ../main ../core ../interp ../plugins ../lib/bil ../lib/xmrg ../params/mask ../params/landcover ../params/soils ../params/topo ../params/albedo ../params/gfrac ../params/LAISAI ../params/slopetype ../params/tbot ../params/pet ../params/climateparms ../params/crop_parms ../params/irrigation ../params/catchment ../params/CLM2 ../params/GeoWRSI ../params/FLAKE ../params/HYMAP ../params/JULES ../params/Mosaic ../params/Noah ../params/RDHM ../params/RUC ../params/SACHTET ../params/Snow17 ../params/SnowModel ../params/SiB2 ../params/VIC ../params/glacier ../runmodes/ANNproc ../runmodes/DApreproc ../runmodes/LSMparamproc ../runmodes/EnsRstpreproc ../runmodes/NUWRFpreproc ../runmodes/Metforcproc ../runmodes/MetTimeDScale ../runmodes/climoRstproc ../runmodes/rstTransformProc ../runmodes/StatDscaleMetForc ../runmodes/OPTUEproc/ ../domains/latlon ../domains/gaussian ../domains/hrap ../domains/lambert ../domains/polar ../domains/merc ../domains/easev2 ../DAobs/MCD15A2H_LAI ../DAobs/LISlsmSMobs ../DAobs/LISlsmPrecipobs ../DAobs/LISlsmTEFFobs ../DAobs/synthetic_sm ../DAobs/NASA_AMSRE_sm ../DAobs/LPRM_AMSREsm ../DAobs/LPRMvod ../DAobs/ESACCI_sm ../DAobs/WindSat_sm ../DAobs/GRACE_tws ../DAobs/GRACEQL_tws ../DAobs/SMOPS ../DAobs/ASCAT_TUW ../DAobs/SMOS_L2sm ../DAobs/SMOS_NESDIS ../DAobs/GCOMW_AMSR2L3snd ../DAobs/GCOMW_AMSR2L3sm ../DAobs/Aquarius_L2sm ../DAobs/simGRACE_JPL ../DAobs/SMMR_SNWD ../DAobs/SSMI_SNWD ../DAobs/ANSA_SNWD ../DAobs/NASA_SMAPsm ../DAobs/SMOS_NRTNN_L2sm ../DAobs/NASA_SMAPvod ../DAobs/GLASSlai ../DAobs/THySM ../DAobs/GEOS_FP_TEFFobs ../DAobs/SMAP_E_OPLsm ../DAobs/VIIRS_GVF ../DAobs/CDFS_GVF ../RESTRICTED/usaf/usaf ../metforcing/agrradps ../metforcing/cmap ../metforcing/cmorph ../metforcing/ecmwf ../metforcing/gdas ../metforcing/geos5fcst ../metforcing/gfs ../metforcing/gldas ../metforcing/gswp1 ../metforcing/gswp2 ../metforcing/merra2 ../metforcing/era5 ../metforcing/nam242 ../metforcing/narr ../metforcing/princeton ../metforcing/nldas2 ../metforcing/WRFoutv2 ../metforcing/WRFAKdom ../metforcing/stg2 ../metforcing/stg4 ../metforcing/3B42RTV7 ../metforcing/3B42V6 ../metforcing/3B42V7 ../metforcing/RFE2Daily ../metforcing/RFE2gdas ../metforcing/chirps2 ../MetforcScale ../ANNdata/LISlsmSM ../ANNdata/synthetic_sm ../ANNdata/LPRM_AMSREsm ../ANNdata/MODIS_LST ../ANNdata/MOD10A1 ../ANNdata/GHCNsnwd ../ANNdata/GCOMW_AMSR2_TB ../statDscale/BayesianMerging ../statDscale/Climo ../params/CLM45 ../USAFSI ../SMAP_E_OPL ../runmodes/USAFSI ../runmodes/LISHydropreproc ../runmodes/SMAP_E_OPL ../params/Crocus ../runmodes/obsSim ../obsSim/NatureRun/LISout/ ../obsSim/OSSEmask/LISout/ ../obsSim/OSSEmask/AMSR2/ ../obsSim/OSSEmask/TSMM/ ../obsSim/OSSEmask/MODIS/ ../obsSim/OSSEmask/Sentinel1A/
1+
dirs := . ../main ../core ../interp ../plugins ../lib/bil ../lib/xmrg ../params/mask ../params/landcover ../params/soils ../params/topo ../params/albedo ../params/gfrac ../params/LAISAI ../params/slopetype ../params/tbot ../params/pet ../params/climateparms ../params/crop_parms ../params/irrigation ../params/catchment ../params/CLM2 ../params/GeoWRSI ../params/FLAKE ../params/HYMAP ../params/JULES ../params/Mosaic ../params/Noah ../params/AquaCrop ../params/RDHM ../params/RUC ../params/SACHTET ../params/Snow17 ../params/SnowModel ../params/SiB2 ../params/VIC ../params/glacier ../runmodes/ANNproc ../runmodes/DApreproc ../runmodes/LSMparamproc ../runmodes/EnsRstpreproc ../runmodes/NUWRFpreproc ../runmodes/Metforcproc ../runmodes/MetTimeDScale ../runmodes/climoRstproc ../runmodes/rstTransformProc ../runmodes/StatDscaleMetForc ../runmodes/OPTUEproc/ ../domains/latlon ../domains/gaussian ../domains/hrap ../domains/lambert ../domains/polar ../domains/merc ../domains/easev2 ../DAobs/MCD15A2H_LAI ../DAobs/LISlsmSMobs ../DAobs/LISlsmPrecipobs ../DAobs/LISlsmTEFFobs ../DAobs/synthetic_sm ../DAobs/NASA_AMSRE_sm ../DAobs/LPRM_AMSREsm ../DAobs/LPRMvod ../DAobs/ESACCI_sm ../DAobs/WindSat_sm ../DAobs/GRACE_tws ../DAobs/GRACEQL_tws ../DAobs/SMOPS ../DAobs/ASCAT_TUW ../DAobs/SMOS_L2sm ../DAobs/SMOS_NESDIS ../DAobs/GCOMW_AMSR2L3snd ../DAobs/GCOMW_AMSR2L3sm ../DAobs/Aquarius_L2sm ../DAobs/simGRACE_JPL ../DAobs/SMMR_SNWD ../DAobs/SSMI_SNWD ../DAobs/ANSA_SNWD ../DAobs/NASA_SMAPsm ../DAobs/SMOS_NRTNN_L2sm ../DAobs/NASA_SMAPvod ../DAobs/GLASSlai ../DAobs/THySM ../DAobs/GEOS_FP_TEFFobs ../DAobs/SMAP_E_OPLsm ../DAobs/VIIRS_GVF ../DAobs/CDFS_GVF ../RESTRICTED/usaf/usaf ../metforcing/agrradps ../metforcing/cmap ../metforcing/cmorph ../metforcing/ecmwf ../metforcing/gdas ../metforcing/geos5fcst ../metforcing/gfs ../metforcing/gldas ../metforcing/gswp1 ../metforcing/gswp2 ../metforcing/merra2 ../metforcing/era5 ../metforcing/nam242 ../metforcing/narr ../metforcing/princeton ../metforcing/nldas2 ../metforcing/WRFoutv2 ../metforcing/WRFAKdom ../metforcing/stg2 ../metforcing/stg4 ../metforcing/3B42RTV7 ../metforcing/3B42V6 ../metforcing/3B42V7 ../metforcing/RFE2Daily ../metforcing/RFE2gdas ../metforcing/chirps2 ../MetforcScale ../ANNdata/LISlsmSM ../ANNdata/synthetic_sm ../ANNdata/LPRM_AMSREsm ../ANNdata/MODIS_LST ../ANNdata/MOD10A1 ../ANNdata/GHCNsnwd ../ANNdata/GCOMW_AMSR2_TB ../statDscale/BayesianMerging ../statDscale/Climo ../params/CLM45 ../USAFSI ../SMAP_E_OPL ../runmodes/USAFSI ../runmodes/LISHydropreproc ../runmodes/SMAP_E_OPL ../params/Crocus ../runmodes/obsSim ../obsSim/NatureRun/LISout/ ../obsSim/OSSEmask/LISout/ ../obsSim/OSSEmask/AMSR2/ ../obsSim/OSSEmask/TSMM/ ../obsSim/OSSEmask/MODIS/ ../obsSim/OSSEmask/Sentinel1A/
+311
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,311 @@
1+
!-----------------------BEGIN NOTICE -- DO NOT EDIT-----------------------
2+
! NASA Goddard Space Flight Center
3+
! Land Information System Framework (LISF)
4+
! Version 7.5
5+
!
6+
! Copyright (c) 2024 United States Government as represented by the
7+
! Administrator of the National Aeronautics and Space Administration.
8+
! All Rights Reserved.
9+
!-------------------------END NOTICE -- DO NOT EDIT-----------------------
10+
#include "LDT_misc.h"
11+
module AquaCrop_parmsMod
12+
!BOP
13+
!
14+
! !MODULE: AquaCrop_parmsMod
15+
!
16+
! !DESCRIPTION:
17+
! \subsubsection{Overview}
18+
! This routines in this module provides routines to read the AquaCrop
19+
! crop type from the AC_Crop.Inventory
20+
!
21+
! !REVISION HISTORY:
22+
!
23+
! 10 May 2024; Michel Becthold, Louise Busschaert, initial implementation
24+
!
25+
use LDT_constantsMod, only: LDT_CONST_PATH_LEN
26+
use LDT_paramDataMod, only: LDT_paramEntry
27+
28+
implicit none
29+
30+
PRIVATE
31+
!------------------------------------------------------------------------------
32+
! !PUBLIC MEMBER FUNCTIONS:
33+
!------------------------------------------------------------------------------
34+
public :: AquaCropParms_init !allocates memory for required structures
35+
public :: AquaCropParms_writeHeader
36+
public :: AquaCropParms_writeData
37+
38+
!------------------------------------------------------------------------------
39+
! !PUBLIC TYPES:
40+
!------------------------------------------------------------------------------
41+
public :: AquaCrop_struc
42+
43+
type, public :: aquacrop_type_dec
44+
! - AquaCrop LSM-specific:
45+
type(LDT_paramEntry) :: cropt ! crop type
46+
type(LDT_paramEntry) :: comp_size ! compartment size
47+
type(LDT_paramEntry) :: tmin_cli ! tmin climatology
48+
type(LDT_paramEntry) :: tmax_cli ! tmax climatology
49+
integer :: nlayers ! number of soil layers
50+
real :: lthickness(5) ! thickness of layers, max 5 layers for AC
51+
integer :: max_comp ! fixed to 12
52+
integer :: tempcli_refyr ! reference year for cli
53+
character(len=LDT_CONST_PATH_LEN) :: tempclimdir
54+
character(len=LDT_CONST_PATH_LEN) :: tempclimfile
55+
character(125) :: tempclim_gridtransform
56+
end type aquacrop_type_dec
57+
58+
type(aquacrop_type_dec), allocatable :: AquaCrop_struc(:)
59+
60+
contains
61+
62+
subroutine AquaCropParms_init(flag)
63+
64+
! !USES:
65+
use ESMF
66+
use LDT_coreMod, only: LDT_rc, LDT_config
67+
use LDT_logMod, only: LDT_verify, LDT_logunit, LDT_endrun
68+
!
69+
! !DESCRIPTION:
70+
!
71+
! Allocates memory for data structures for reading
72+
! the required AquaCrop datasets
73+
!
74+
! The routines invoked are:
75+
! \begin{description}
76+
! \item[read_CONSTANT_AC_crop]\newline
77+
! calls the reader of the crop type via the Crop.Inventory
78+
! (for now: only CONSTANT method is implemented)
79+
! \item[define_AC_compartments]\newline
80+
! calls the calculation fo the compartment number/size
81+
! \item[read_AC_Tclim]\newline
82+
! calls the reader of the Tmin and Tmax climatologies
83+
! \end{description}
84+
!
85+
!EOP
86+
implicit none
87+
88+
integer, intent(in) :: flag
89+
90+
integer :: n,k
91+
integer :: rc
92+
93+
external :: read_CONSTANT_AC_crop
94+
external :: define_AC_compartments
95+
external :: read_AC_Tclim
96+
97+
character*3 :: months(12)
98+
data months /'jan','feb','mar','apr','may','jun','jul','aug', &
99+
'sep','oct','nov','dec'/
100+
101+
! _____________________________________________________________________
102+
103+
allocate(AquaCrop_struc(LDT_rc%nnest))
104+
do n=1,LDT_rc%nnest
105+
AquaCrop_struc(n)%max_comp = 12
106+
! Set crop type
107+
call set_param_attribs(Aquacrop_struc(n)%cropt, "AC_CROPT",&
108+
units="-", &
109+
full_name="Aquacrop crop type")
110+
call ESMF_ConfigFindLabel(LDT_config,"AquaCrop crop type data source:",rc=rc)
111+
call ESMF_ConfigGetAttribute(LDT_config,AquaCrop_struc(n)%cropt%source,rc=rc)
112+
call LDT_verify(rc,"AquaCrop crop type data source: not defined")
113+
allocate(Aquacrop_struc(n)%cropt%value(&
114+
LDT_rc%lnc(n),LDT_rc%lnr(n),&
115+
Aquacrop_struc(n)%cropt%vlevels))
116+
select case (AquaCrop_struc(n)%cropt%source)
117+
case( "CONSTANT" )
118+
call read_CONSTANT_AC_crop(&
119+
n,AquaCrop_struc(n)%cropt%value(:,:,1))
120+
case default
121+
write(LDT_logunit,*) "[ERR] crop type data source not valid for AquaCrop."
122+
write(LDT_logunit,*) " Please select: CONSTANT"
123+
write(LDT_logunit,*) "Program stopping ..."
124+
call LDT_endrun
125+
end select
126+
! End crop type
127+
128+
! Define compartment size
129+
call set_param_attribs(Aquacrop_struc(n)%comp_size, "AC_comp_size",&
130+
units="m", &
131+
full_name="Aquacrop compartment size")
132+
Aquacrop_struc(n)%comp_size%vlevels = AquaCrop_struc(n)%max_comp
133+
Aquacrop_struc(n)%comp_size%num_bins = AquaCrop_struc(n)%max_comp
134+
allocate(Aquacrop_struc(n)%comp_size%value(&
135+
LDT_rc%lnc(n),LDT_rc%lnr(n),&
136+
Aquacrop_struc(n)%comp_size%vlevels))
137+
call define_AC_compartments(n, AquaCrop_struc(n)%comp_size%value(:,:,:))
138+
139+
140+
!! Read temperature climatology file
141+
! Read options from ldt.config
142+
call ESMF_ConfigFindLabel(LDT_config,"AquaCrop temperature climatology directory:",rc=rc)
143+
call ESMF_ConfigGetAttribute(LDT_config,AquaCrop_struc(n)%tempclimdir,rc=rc)
144+
call LDT_verify(rc,"AquaCrop temperature climatology directory: not defined")
145+
146+
call ESMF_ConfigFindLabel(LDT_config,"AquaCrop reference year for climatology:",rc=rc)
147+
call ESMF_ConfigGetAttribute(LDT_config,AquaCrop_struc(n)%tempcli_refyr,rc=rc)
148+
call LDT_verify(rc,"AquaCrop reference year for climatology: not defined")
149+
150+
call ESMF_ConfigFindLabel(LDT_config,"AquaCrop temperature climatology spatial transform:",rc=rc)
151+
call ESMF_ConfigGetAttribute(LDT_config,AquaCrop_struc(n)%tempclim_gridtransform,rc=rc)
152+
call LDT_verify(rc,"AquaCrop temperature climatology spatial transform: not defined")
153+
154+
LDT_rc%monthlyData(n) = .true.
155+
156+
! tmin
157+
call set_param_attribs(Aquacrop_struc(n)%tmin_cli, "AC_Tmin_clim",&
158+
units="K", &
159+
full_name="minimum temperature climatology")
160+
Aquacrop_struc(n)%tmin_cli%vlevels = 12
161+
Aquacrop_struc(n)%tmin_cli%num_bins = 12
162+
allocate(Aquacrop_struc(n)%tmin_cli%value(&
163+
LDT_rc%lnc(n),LDT_rc%lnr(n),&
164+
Aquacrop_struc(n)%tmin_cli%vlevels))
165+
166+
! tmax
167+
call set_param_attribs(Aquacrop_struc(n)%tmax_cli, "AC_Tmax_clim",&
168+
units="K", &
169+
full_name="maximum temperature climatology")
170+
Aquacrop_struc(n)%tmax_cli%vlevels = 12
171+
Aquacrop_struc(n)%tmax_cli%num_bins = 12
172+
allocate(Aquacrop_struc(n)%tmax_cli%value(&
173+
LDT_rc%lnc(n),LDT_rc%lnr(n),&
174+
Aquacrop_struc(n)%tmax_cli%vlevels))
175+
176+
! Call function to read monthly data
177+
do k = 1,12
178+
AquaCrop_struc(n)%tempclimfile = &
179+
trim(AquaCrop_struc(n)%tempclimdir)//'tmin.'//&
180+
trim(months(k))//'.txt'
181+
call read_AC_Tclim(n, AquaCrop_struc(n)%tmin_cli%value(:,:,k))
182+
AquaCrop_struc(n)%tempclimfile = &
183+
trim(AquaCrop_struc(n)%tempclimdir)//'tmax.'//&
184+
trim(months(k))//'.txt'
185+
call read_AC_Tclim(n, AquaCrop_struc(n)%tmax_cli%value(:,:,k))
186+
enddo ! end months
187+
188+
enddo ! End nest
189+
190+
end subroutine AquaCropParms_init
191+
192+
subroutine AquaCropParms_writeHeader(n,ftn,dimID,monthID)
193+
194+
use LDT_historyMod, only: LDT_writeNetcdfDataHeader
195+
use LDT_logMod, only: LDT_verify
196+
#if(defined USE_NETCDF3 || defined USE_NETCDF4)
197+
use netcdf
198+
#endif
199+
200+
implicit none
201+
202+
integer, intent(in) :: n
203+
integer, intent(in) :: ftn
204+
integer, intent(in) :: dimID(3)
205+
integer, intent(in) :: monthID
206+
207+
integer :: i
208+
integer :: ndimID(3) ! 3D, vlevel>1
209+
character(25) :: str
210+
211+
ndimID(1) = dimID(1)
212+
ndimID(2) = dimID(2)
213+
214+
#if(defined USE_NETCDF3 || defined USE_NETCDF4)
215+
216+
call LDT_writeNETCDFdataHeader(n,ftn,dimID,&
217+
Aquacrop_struc(n)%cropt)
218+
call LDT_verify(nf90_def_dim(ftn,'compartment',&
219+
AquaCrop_struc(n)%max_comp,ndimID(3)))
220+
ndimID(1) = dimID(1)
221+
ndimID(2) = dimID(2)
222+
call LDT_writeNETCDFdataHeader(n,ftn,ndimID,&
223+
Aquacrop_struc(n)%comp_size)
224+
225+
ndimID(3) = monthID
226+
call LDT_writeNETCDFdataHeader(n,ftn,ndimID,&
227+
Aquacrop_struc(n)%tmin_cli)
228+
call LDT_writeNETCDFdataHeader(n,ftn,ndimID,&
229+
Aquacrop_struc(n)%tmax_cli)
230+
231+
! Add number of soil layers
232+
call LDT_verify(nf90_put_att(ftn,NF90_GLOBAL,"SOIL_LAYERS", &
233+
AquaCrop_struc(n)%nlayers))
234+
! Add thickness of soil layers
235+
do i=1,AquaCrop_struc(n)%nlayers
236+
write (str, '(i0)') i
237+
call LDT_verify(nf90_put_att(ftn,NF90_GLOBAL,"THICKNESS_LAYER_"//trim(str),&
238+
AquaCrop_struc(n)%lthickness(i)))
239+
! Add Reference year for temperature climatology
240+
call LDT_verify(nf90_put_att(ftn,NF90_GLOBAL,"AC_CLIM_REF_YEAR", &
241+
AquaCrop_struc(n)%tempcli_refyr))
242+
enddo
243+
#endif
244+
245+
end subroutine AquaCropParms_writeHeader
246+
247+
subroutine AquaCropParms_writeData(n,ftn)
248+
249+
use LDT_historyMod, only: LDT_writeNetcdfData
250+
251+
implicit none
252+
253+
integer, intent(in) :: n
254+
integer, intent(in) :: ftn
255+
256+
call LDT_writeNETCDFdata(n,ftn,AquaCrop_struc(n)%cropt)
257+
call LDT_writeNETCDFdata(n,ftn,AquaCrop_struc(n)%comp_size)
258+
call LDT_writeNETCDFdata(n,ftn,AquaCrop_struc(n)%tmin_cli)
259+
call LDT_writeNETCDFdata(n,ftn,AquaCrop_struc(n)%tmax_cli)
260+
261+
end subroutine AquaCropParms_writeData
262+
263+
!BOP
264+
! !ROUTINE: set_param_attribs
265+
! \label{set_param_attribs}
266+
!
267+
! !INTERFACE:
268+
subroutine set_param_attribs(paramEntry, short_name, &
269+
units, full_name )
270+
271+
! !DESCRIPTION:
272+
! This routine reads over the parameter attribute entries
273+
! in the param_attribs.txt file.
274+
!
275+
! !USES:
276+
use LDT_paramDataMod, only: LDT_paramEntry
277+
278+
implicit none
279+
280+
type(LDT_paramEntry),intent(inout) :: paramEntry
281+
character(len=*), intent(in) :: short_name
282+
character(len=*), optional :: units
283+
character(len=*), optional :: full_name
284+
285+
character(20) :: unit_temp
286+
character(100):: name_temp
287+
! ____________________________________________________
288+
289+
if(present(units)) then
290+
unit_temp = units
291+
else
292+
unit_temp = "none"
293+
endif
294+
if(present(full_name)) then
295+
name_temp = full_name
296+
else
297+
name_temp = trim(short_name)
298+
endif
299+
300+
paramEntry%short_name = trim(short_name)
301+
paramEntry%vlevels = 1
302+
paramEntry%selectOpt = 1
303+
paramEntry%source = "AquaCrop"
304+
paramEntry%units = unit_temp
305+
paramEntry%num_times = 1
306+
paramEntry%num_bins = 1
307+
paramEntry%standard_name = trim(name_temp)
308+
309+
end subroutine set_param_attribs
310+
311+
end module AquaCrop_parmsMod

0 commit comments

Comments
 (0)