From 0cfa7f0d368d90d43ec16ffcfae4bdfec5768454 Mon Sep 17 00:00:00 2001 From: Tracy Date: Thu, 14 Nov 2024 17:13:56 +0000 Subject: [PATCH 1/2] fix input_area --- scm/src/scm_input.F90 | 2 +- scm/src/scm_setup.F90 | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scm/src/scm_input.F90 b/scm/src/scm_input.F90 index 4bb6b3c0f..8492b3408 100644 --- a/scm/src/scm_input.F90 +++ b/scm/src/scm_input.F90 @@ -1882,6 +1882,7 @@ subroutine get_case_init_DEPHY(scm_state, scm_input) scm_state%runtime = elapsed_sec*scm_state%runtime_mult end if + scm_input%input_area = input_area(active_init_time) scm_input%input_time = input_time scm_input%input_pres_surf(1) = input_pres_surf(active_init_time) !perhaps input_pres_surf should only be equal to input_force_pres_surf? scm_input%input_pres = input_pres(:,active_init_time) @@ -2067,7 +2068,6 @@ subroutine get_case_init_DEPHY(scm_state, scm_input) if (trim(input_surfaceForcingLSM) == "lsm") then scm_input%input_ozone = input_ozone(:,active_init_time) - scm_input%input_area = input_area(active_init_time) scm_input%input_stddev = input_stddev(active_init_time) scm_input%input_convexity= input_convexity(active_init_time) diff --git a/scm/src/scm_setup.F90 b/scm/src/scm_setup.F90 index b3603e88f..331b93246 100644 --- a/scm/src/scm_setup.F90 +++ b/scm/src/scm_setup.F90 @@ -43,7 +43,9 @@ subroutine set_state(scm_input, scm_reference, scm_state) scm_state%lat(i) = scm_input%input_lat*deg_to_rad_const end do - + do i=1, scm_state%n_cols + scm_state%area(i) = scm_input%input_area + end do !> - \todo When patching in a reference sounding, need to handle the case when the reference sounding is too short; patch_in_ref !! checks for the case, but as of now, it just extrapolates where it needs to and returns an error code; error should be handled @@ -160,7 +162,6 @@ subroutine set_state(scm_input, scm_reference, scm_state) scm_state%state_T(i,:,1) = scm_input%input_temp(:) scm_state%state_tracer(i,:,scm_state%water_vapor_index,1)=scm_input%input_qt scm_state%state_tracer(i,:,scm_state%ozone_index,1)=scm_input%input_ozone - scm_state%area(i) = scm_input%input_area if (scm_input%input_pres_i(1).GT. 0.0) then ! pressure are read in, overwrite values scm_state%pres_i(i,:)=scm_input%input_pres_i From 3babd2178b6a61d89087764a52743ee57337c0fb Mon Sep 17 00:00:00 2001 From: Tracy Date: Thu, 14 Nov 2024 18:49:07 +0000 Subject: [PATCH 2/2] fix scm_state%area --- scm/src/scm_setup.F90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scm/src/scm_setup.F90 b/scm/src/scm_setup.F90 index 331b93246..2d9f21739 100644 --- a/scm/src/scm_setup.F90 +++ b/scm/src/scm_setup.F90 @@ -44,7 +44,9 @@ subroutine set_state(scm_input, scm_reference, scm_state) end do do i=1, scm_state%n_cols - scm_state%area(i) = scm_input%input_area + if (scm_state%area(i) == 0) then + scm_state%area(i) = scm_input%input_area + end if end do !> - \todo When patching in a reference sounding, need to handle the case when the reference sounding is too short; patch_in_ref