Skip to content

Commit

Permalink
Address reviewers comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Feb 12, 2025
1 parent 7cba200 commit 07b6707
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/metavar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,7 @@ def add_variable(self, newvar, run_env, exists_ok=False, gen_unique=False,
# end if
# end if
# Check if local_name exists in Group. If applicable, Create new
# variable with uniquie name. There are two instances when new names are
# variable with unique name. There are two instances when new names are
# created:
# - Same <local_name> used in different DDTs.
# - Different <standard_name> using the same <local_name> in a Group.
Expand Down
4 changes: 4 additions & 0 deletions test/var_compatibility_test/effr_diag.F90
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ subroutine effr_diag_run( effrr_in, scalar_var, errmsg, errflg)

call cmp_effr_diag(effrr_in, effrr_min, effrr_max)

if (scalar_var .ne. 380) then
errmsg = 'ERROR: effr_diag_run(): scalar_var should be 380'
errflg = 1
endif
end subroutine effr_diag_run

subroutine cmp_effr_diag(effr, effr_min, effr_max)
Expand Down
5 changes: 5 additions & 0 deletions test/var_compatibility_test/effr_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ subroutine effr_post_run( effrr_inout, scalar_var, errmsg, errflg)
! Do some post-processing on effrr...
effrr_inout(:,:) = effrr_inout(:,:)*1._kind_phys

if (scalar_var .ne. 1013.0) then
errmsg = 'ERROR: effr_post_run(): scalar_var should be 1013.0'
errflg = 1
endif

end subroutine effr_post_run

end module effr_post
5 changes: 5 additions & 0 deletions test/var_compatibility_test/effr_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ subroutine effr_pre_run( effrr_inout, scalar_var, errmsg, errflg)
! Do some pre-processing on effrr...
effrr_inout(:,:) = effrr_inout(:,:)*1._kind_phys

if (scalar_var .ne. 273.15) then
errmsg = 'ERROR: effr_pre_run(): scalar_var should be 273.15'
errflg = 1
endif

end subroutine effr_pre_run

end module effr_pre
5 changes: 4 additions & 1 deletion test/var_compatibility_test/test_host_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ subroutine init_data()
call allocate_physics_state(ncols, pver, phys_state, has_graupel, has_ice)
phys_state%effrr = 1.0E-3 ! 1000 microns, in meter
phys_state%effrl = 1.0E-4 ! 100 microns, in meter
phys_state%scalar_var = 1.0 ! in m
phys_state%scalar_var = 1.0 ! in m
phys_state%scalar_varA = 273.15 ! in K
phys_state%scalar_varB = 1013.0 ! in mb
phys_state%scalar_varC = 380 ! in ppmv
effrs = 5.0E-4 ! 500 microns, in meter
if (has_graupel) then
phys_state%effrg = 2.5E-4 ! 250 microns, in meter
Expand Down

0 comments on commit 07b6707

Please sign in to comment.