From ecce7bcc8b75499e2f6595edd5a568687467f5f4 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 15 Apr 2020 16:20:15 -0600 Subject: [PATCH 1/2] fix conditional initialization of Model%iaerclm in GFS_typedefs.F90 and character length of Init_parm%fn_nml --- gfsphysics/GFS_layer/GFS_typedefs.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90 index d9f420897..e385271aa 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -147,7 +147,7 @@ module GFS_typedefs character(len=32), pointer :: tracer_names(:) !< tracers names to dereference tracer id !< based on name location in array - character(len=65) :: fn_nml !< namelist filename + character(len=64) :: fn_nml !< namelist filename character(len=256), pointer :: input_nml_file(:) !< character string containing full namelist !< for use with internal file reads end type GFS_init_type @@ -3330,6 +3330,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%ialb = ialb Model%iems = iems Model%iaer = iaer + Model%iaerclm = iaerclm if (iaer/1000 == 1 .or. Model%iccn == 2) then Model%iaerclm = .true. ntrcaer = ntrcaerm From 45114ec7e320cc621873ef1875d4438ffa2c7dcb Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 15 Apr 2020 16:45:48 -0600 Subject: [PATCH 2/2] in GFS_typedefs.F90: initialize Model%debug before use and delete redundant setting of NoahMP vars --- gfsphysics/GFS_layer/GFS_typedefs.F90 | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90 index e385271aa..fbe341b4c 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -3663,7 +3663,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%iau_filter_increments = iau_filter_increments Model%iau_drymassfixer = iau_drymassfixer if(Model%me==0) print *,' model init,iaufhrs=',Model%iaufhrs - + + !--- debug flag + Model%debug = debug + Model%pre_rad = pre_rad + !--- tracer handling Model%ntrac = size(tracer_names) #ifdef CCPP @@ -3783,10 +3787,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%ncnvcld3d = ncnvcld3d Model%nctp = nctp -!--- debug flag - Model%debug = debug - Model%pre_rad = pre_rad - !--- set initial values for time varying properties Model%ipt = 1 Model%lprnt = .false. @@ -3825,11 +3825,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- ps is replaced with p0. The value of p0 uses that in http://www.emc.ncep.noaa.gov/officenotes/newernotes/on461.pdf !--- ak/bk have been flipped from their original FV3 orientation and are defined sfc -> toa Model%si = (ak + bk * con_p0 - ak(Model%levr+1)) / (con_p0 - ak(Model%levr+1)) - - if (Model%lsm == Model%lsm_noahmp) then - Model%yearlen = 365 - Model%julian = -9999. - endif #endif #ifndef CCPP