Skip to content

Commit

Permalink
Ensured constant radiation for fixed climate forcing configuration
Browse files Browse the repository at this point in the history
No answer change incurred.
  • Loading branch information
“Jinyun committed Feb 24, 2025
1 parent dc36e65 commit 064bdbf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/run_dir/climeConst/climeConst.namelist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ case_name='gh_dray'
prefix='../../inputs/dryland_maize/'
do_regression_test=.false.
pft_file_in='../../../input_data/ecosim_pftpar_20240723.nc'
grid_file_in='../../../examples/inputs/dryland_maize/dryland_grid_20230221.nc'
grid_file_in='../../../examples/inputs/climeConst/climeConst_grid_20250223.nc'
pft_mgmt_in='../../../examples/inputs/dryland_maize/dryland_pft_20230509.nc'
soil_mgmt_in='../../../examples/inputs/dryland_maize/dryland_soilmgmt_20230210.nc'
clm_hour_file_in='../../../examples/inputs/dryland_maize/dryland_clm_20230203.nc'
Expand Down
12 changes: 9 additions & 3 deletions f90src/Modelforc/WthrMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module WthrMod
use data_kind_mod, only: r8 => DAT_KIND_R8
use MiniMathMod, only: safe_adb, vapsat0, isclose
use MiniFuncMod, only: get_sun_declin
use EcoSIMCtrlMod, only: etimer, frectyp
use EcoSIMCtrlMod, only: etimer, frectyp,fixClime
use PlantMgmtDataType, only: NP
use MiniMathMod, only: AZMAX1
use UnitMod, only: units
Expand Down Expand Up @@ -291,8 +291,14 @@ subroutine CalcRadiation(I,J,NHW,NHE,NVN,NVS,RADN_col,PRECUI_col,PRECII_col)
AZI=SIN(ALAT(NY,NX)*RadianPerDegree)*SIN(DECLIN*RadianPerDegree)
DEC=COS(ALAT(NY,NX)*RadianPerDegree)*COS(DECLIN*RadianPerDegree)
!check eq.(11.1) in Campbell and Norman, 1998, p168.
SineSunInclAngle_col(NY,NX) = AZMAX1(AZI+DEC*COS(PICON12*(SolarNoonHour_col(NY,NX)-(J-0.5_r8))))
SineSunInclAnglNxtHour_col(NY,NX) = AZMAX1(AZI+DEC*COS(PICON12*(SolarNoonHour_col(NY,NX)-(J+0.5_r8))))
if(fixClime)then
!always assume the light is from zenith when using fixed climate forcing.
SineSunInclAngle_col(NY,NX) = AZMAX1(AZI+DEC*COS(PICON12*(SolarNoonHour_col(NY,NX)-11.5_r8)))
SineSunInclAnglNxtHour_col(NY,NX) = AZMAX1(AZI+DEC*COS(PICON12*(SolarNoonHour_col(NY,NX)-12.5_r8)))
else
SineSunInclAngle_col(NY,NX) = AZMAX1(AZI+DEC*COS(PICON12*(SolarNoonHour_col(NY,NX)-(J-0.5_r8))))
SineSunInclAnglNxtHour_col(NY,NX) = AZMAX1(AZI+DEC*COS(PICON12*(SolarNoonHour_col(NY,NX)-(J+0.5_r8))))
endif

!IF(SineSunInclAngle_col(NY,NX).GT.0.0_r8 .AND. SineSunInclAngle_col(NY,NX).LT.TWILGT)SineSunInclAngle_col(NY,NX)=TWILGT
IF(RADN_col(NY,NX).LE.0.0_r8)SineSunInclAngle_col(NY,NX)=0.0_r8
Expand Down

0 comments on commit 064bdbf

Please sign in to comment.