NCAR / ccpp-physics

GFS physics for CCPP
Other
59 stars 146 forks source link

data type inconsistencies #915

Closed uturuncoglu closed 2 years ago

uturuncoglu commented 2 years ago

Description

When NoahMP source is compiled as an external component under UFS using 32BIT enabled, it fails to compile like following,

/glade/work/turuncu/NOAHMP/ufs-weather-model_dev/NOAHMP-interface/noahmp/src/module_sf_noahmplsm.f90(805): error #6633: The type of the actual argument differs from the type of the dummy argument.   [CANHS]
                 emissi ,pah    ,canhs,                           &
---------------------------------^
/glade/work/turuncu/NOAHMP/ufs-weather-model_dev/NOAHMP-interface/noahmp/src/module_sf_noahmplsm.f90(876): error #6633: The type of the actual argument differs from the type of the dummy argument.   [CANHS]
                 pahv   ,pahg   ,pahb   ,canhs,errmsg, errflg)   !in ( except errwat [out] and errmsg, errflg [inout] )
-----------------------------------------^
/glade/work/turuncu/NOAHMP/ufs-weather-model_dev/NOAHMP-interface/noahmp/src/module_sf_noahmplsm.f90(4497): error #6633: The type of the actual argument differs from the type of the dummy argument.   [0.0]
                         zpd  ,snowh,shdfac ,garea1  ,.false. ,0.0,ivgtyp ,      & !in
---------------------------------------------------------------^

This could be easily fixed by modifying following line as following

  real (kind=kind_phys)               :: canhs ! canopy heat storage change w/m2

and modifying following line like

zpd  ,snowh,shdfac ,garea1  ,.false. ,0.0_kind_phys,ivgtyp ,      & !in

Additional Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

dustinswales commented 2 years ago

@uturuncoglu Thanks for identifying this. Looking back, it appears that this issue has been resolved since April. There was a change to the interface of sfcdif3, and the real vs real=kind_real bug was addressed in a cleanup PR.