Main menu


enable COSP in CESM1.2.2

3 posts / 0 new
Last post
enable COSP in CESM1.2.2


I am trying to enable COSP package using CAM5 (CAM4) physics in CESM 1.2.2. I am using F_AMIP_CAM5 compset for these runs. In order to enable COSP I have followed the following steps on National Computational Infrastructure (NCI)’s Raijin computer:

1. Edit "CAM_CONFIG_OPTS" in env_build.xml to be "-phys cam5 -cosp" (/"-phys cam4 -cosp")

2. Add COSP related fields to user_nl_cam file as


When I try to build the case I get the following error:

 error #6633: The type of the actual argument differs from the type of the dummy argument.
           flag_xyfill=.true., mdimnames=(/'cosp_tau','cosp_prs'/), fill_value=R_UNDEF)

I don't know how to solve this error. Can anyone please help?




Based on the error message my guess is that the COSP library is not being
build with the compiler flags that enable autopromotion of type real to
type real*8.  If you look in cosp_constants.F90 you'll find that R_UNDEF is
defined as type real, while the dummy argument to addfld (in
cam_history.F90) is defined as type real*8.  The build of the cosp library
is controlled by the rule in scripts/ccsm_utils/Machines/Makefile for
$(COSP_LIBDIR)/libcosp.a.  You will find that this rule passes the macro
$(FC_AUTO_R8) to the cosp Makefile which should be located in
$(COSP_LIBDIR).  That macro contains the compiler options for autopromotion from real
to real*8.  These compiler options depend on the compiler you are using.
Examine the ouputs from building the cosp library and make sure the options
are correct for the compiler that you're using.  The options that the CESM
build uses for FC_AUTO_R8 come from the file


Hi Brian,

Thank you so much for your suggestion! It is working now.


Log in or register to post comments

Who's new

  • stans
  • ahadibfar@...
  • jskang@...
  • divanova@...
  • mrostami@...