# Activate COSP output
ifs_cosp_isccp=TRUE
ifs_cosp_calipso=TRUE
ifs_cosp_modis=TRUE

cat << EOF
! add extra output for COSP
! Note 1: make sure to also add corresponding output request to the ppt files
! Note 2: resolve conflicts with other PEXTRA declarations
!         to do this, setting of NAMDPHY and NAMPHYDS has to be done elsewhere,
!         moved out of namelist.cosp.sh
&NAMCOSPINPUT
  COSP_DEBUG=.FALSE.,
  COSP_OUTPUT_FREQUENCY=$ifs_output_freq,
  COSP_USE_VGRID=.TRUE.,
  COSP_NCOLUMNS=50,
  COSP_NPOINTS_IT=10000,
  COSP_NLVGRID=40,
  COSP_CSAT_VGRID=.TRUE.,
  COSP_RADAR_FREQ=94.0,
  COSP_SURFACE_RADAR=0,
  COSP_USE_GAS_ABS=1,
  COSP_DO_RAY=0,
  COSP_K2=-1.0,
  COSP_USE_MIE_TABLES=0,
  COSP_USE_REFF=.TRUE.,
  COSP_MELT_LAY=0,
  COSP_EMSFC_LW=0.98, ! fraction of LW sfc em. From NOAA: possible: 0.98 or 1.0
  COSP_NPRMTS_MAX_HYDRO=12,
  COSP_NUMAERO=1,
  COSP_NPRMTS_MAX_AERO=1,
  COSP_LIDAR_ICE_TYPE=0,
  COSP_OVERLAP=3, ! Overlap type: 1 = max, 2 = rand, 3 = max/rand
  COSP_ISCCP_TOPHEIGHT=1,
  COSP_ISCCP_TOPHEIGHT_DIRECTION=2,
  COSP_USE_PRECIPITATION_FLUXES=.TRUE.,
  ! MICROPHYSICAL SETTINGS FOR THE PRECIPITATION FLUX TO MIXING RATIO CONVERSION
  COSP_CLOUDSAT_MICRO_SCHEME="MMF_V3_SINGLE_MOMENT",
  ! Simulator flags
  COSP_LRADAR_SIM=.FALSE.,
  COSP_LLIDAR_SIM=$ifs_cosp_calipso,
  COSP_LISCCP_SIM=$ifs_cosp_isccp,
  COSP_LMISR_SIM=.FALSE.,
  COSP_LMODIS_SIM=$ifs_cosp_modis,
  COSP_LRTTOV_SIM=.FALSE.,
/
 ! Namelist that sets up output-related variables. It controls
 ! the instrument simulators to run and the list of variables
 ! to be written to file
&NAMCOSPOUTPUT
 ! THESE ARE PROVIDED FOR DEBUGGING OR SPECIAL PURPOSES
 COSP_LFRACOUT=.FALSE.,
 ! ISSCP
 COSP_LPCTISCCP=.TRUE.,         ! ISCCP MEAN CLOUD TOP PRESSURE
 COSP_LCLISCCP=.TRUE.,          ! ISCCP CLOUD AREA FRACTION
 COSP_LBOXPTOPISCCP=.TRUE.,     ! ISCCP CTP IN EACH COLUMN
 COSP_LBOXTAUISCCP=.TRUE.,      ! ISCCP OPTICAL EPTH IN EACH COLUMN
 COSP_LTAUISCCP=.TRUE.,         ! ISCCP MEAN OPTICAL DEPTH
 COSP_LCLTISCCP=.TRUE.,         ! ISCCP TOTAL CLOUD FRACTION
 COSP_LMEANTBISCCP=.TRUE.,      ! ISCCP MEAN ALL-SKY 10.5MICRON BRIGHTNESS TEMP
 COSP_LMEANTBCLRISCCP=.TRUE.,   ! ISCCP MEAN CLEAR-SKY 10.5MICRON BRIGHTNESS TEMP
 COSP_LALBISCCP=.TRUE.,         ! ISCCP MEAN CLOUD ALBEDO
 ! MISR
 COSP_LCLMISR=.TRUE.,           ! MISR CLOUD FRACTION
 ! MODIS
 COSP_LCLTMODIS=.TRUE.,          ! MODIS TOTAL CLOUD FRACTION
 COSP_LCLWMODIS=.TRUE.,          ! MODIS LIQUID CLOUD FRACTION
 COSP_LCLIMODIS=.TRUE.,          ! MODIS ICE CLOUD FRACTION
 COSP_LCLHMODIS=.FALSE.,         ! MODIS HIGH-LEVEL CLOUD FRACTION
 COSP_LCLMMODIS=.FALSE.,         ! MODIS MID-LEVEL CLOUD FRACTION
 COSP_LCLLMODIS=.FALSE.,         ! MODIS LOW-LEVEL CLOUD FRACTION
 COSP_LTAUTMODIS=.FALSE.,        ! MODIS TOTAL CLOUD OPTICAL THICKNES
 COSP_LTAUWMODIS=.FALSE.,        ! MODIS LIQUID OPTICAL THICKNESS
 COSP_LTAUIMODIS=.FALSE.,        ! MODIS ICE OPTICAL THICKNESS
 COSP_LTAUTLOGMODIS=.FALSE.,     ! MODIS TOTAL CLOUD OPTICAL THICKNESS (LOG10 MEAN)
 COSP_LTAUWLOGMODIS=.FALSE.,     ! MODIS LIQUID OPTICAL THICKNESS (LOG10 MEAN)
 COSP_LTAUILOGMODIS=.FALSE.,     ! MODIS ICE OPTICAL THICKNESS (LOG10 MEAN)
 COSP_LREFFCLWMODIS=.FALSE.,     ! MODIS LIQUID CLOUD PARTICLE SIZE
 COSP_LREFFCLIMODIS=.FALSE.,     ! MODIS ICE PARTICLE SIZE
 COSP_LPCTMODIS=.FALSE.,         ! MODIS CLOUD TOP PRESSURE
 COSP_LLWPMODIS=.FALSE.,         ! MODIS CLOUD LIQUID WATER PATH
 COSP_LIWPMODIS=.FALSE.,         ! MODIS CLOUD ICE WATER PATH
 COSP_LCLMODIS=.FALSE.,          ! MODIS CLOUD AREA FRACTION
 ! CALIPSO 
 COSP_LATB532=.FALSE.,           ! CALIPSO ATTENUATED TOTAL BACKSCATTER (532NM)
 COSP_LLIDARBETAMOL532=.FALSE.,  ! CALIPSO MOLECULAR BACKSCATTER (532NM)
 COSP_LCFADLIDARSR532=.FALSE.,   ! CALIPSO SCATTERING RATIO CFAD
 COSP_LCLCALIPSO=.FALSE.,        ! CALIPSO CLOUD AREA FRACTION
 COSP_LCLHCALIPSO=.TRUE.,       ! CALIPSO HIGH-LEVEL CLOUD FRACTION
 COSP_LCLLCALIPSO=.TRUE.,       ! CALIPSO LOW-LEVEL CLOUD FRACTION
 COSP_LCLMCALIPSO=.TRUE.,       ! CALIPSO MID-LEVEL CLOUD FRACTION
 COSP_LCLTCALIPSO=.TRUE.,       ! CALIPSO TOTAL CLOUD FRACTION
 COSP_LCLCALIPSOLIQ=.FALSE.,     ! CALIPSO LIQUID CLOUD AREA FRACTION
 COSP_LCLCALIPSOICE=.FALSE.,     ! CALIPSO ICE CLOUD AREA FRACTION
 COSP_LCLCALIPSOUN=.FALSE.,      ! CALIPSO UNDETECTED CLOUD AREA FRACTION
 COSP_LCLCALIPSOTMP=.FALSE.,     ! CALIPSO UNDETECTED CLOUD AREA FRACTION
 COSP_LCLCALIPSOTMPLIQ=.FALSE.,  ! CALIPSO LIQUID CLOUD AREA FRACTION
 COSP_LCLCALIPSOTMPICE=.FALSE.,  ! CALIPSO ICE CLOUD AREA FRACTION
 COSP_LCLCALIPSOTMPUN=.FALSE.,   ! CALIPSO UNDETECTED CLOUD AREA FRACTION
 COSP_LCLTCALIPSOLIQ=.FALSE.,    ! CALIPSO LIQUID TOTAL CLOUD FRACTION
 COSP_LCLTCALIPSOICE=.FALSE.,    ! CALIPSO ICE TOTAL CLOUD FRACTION
 COSP_LCLTCALIPSOUN=.FALSE.,     ! CALIPSO UNDETECTED TOTAL CLOUD FRACTION
 COSP_LCLHCALIPSOLIQ=.FALSE.,    ! CALIPSO HIGH-LEVEL LIQUID CLOUD FRACTION
 COSP_LCLHCALIPSOICE=.FALSE.,    ! CALIPSO HIGH-LEVEL ICE CLOUD FRACTION
 COSP_LCLHCALIPSOUN=.FALSE.,     ! CALIPSO HIGH-LEVEL UNDETECTED CLOUD FRACTION
 COSP_LCLMCALIPSOLIQ=.FALSE.,    ! CALIPSO MID-LEVEL LIQUID CLOUD FRACTION
 COSP_LCLMCALIPSOICE=.FALSE.,    ! CALIPSO MID-LEVEL ICE CLOUD FRACTION
 COSP_LCLMCALIPSOUN=.FALSE.,     ! CALIPSO MID-LEVEL UNDETECTED CLOUD FRACTION
 COSP_LCLLCALIPSOLIQ=.FALSE.,    ! CALIPSO LOW-LEVEL LIQUID CLOUD FRACTION
 COSP_LCLLCALIPSOICE=.FALSE.,    ! CALIPSO LOW-LEVEL ICE CLOUD FRACTION
 COSP_LCLLCALIPSOUN=.FALSE.,     ! CALIPSO LOW-LEVEL UNDETECTED CLOUD FRACTION
 ! CLOUDSAT AND CALIPSO
 COSP_LCLCALIPSO2=.FALSE.,      ! CALIPSO CLOUD FRACTION UNDETECTED BY CLOUDSAT
 COSP_LCLTLIDARRADAR=.FALSE.,   ! CALIPSO-CLOUDSAT TOTAL CLOUD FRACTION
 ! CLOUDSAT ONLY
 COSP_LCFADDBZE94=.FALSE.,      ! CLOUDSAT RADAR REFLECTIVITY CFAD
 COSP_LDBZE94=.FALSE.,          ! CLOUDSAT RADAR REFLECTIVITY
 ! PARASOL
 COSP_LPARASOLREFL=.FALSE.,     ! PARASOL REFLECTANCE
 ! RTTOV
 COSP_LTBRTTOV=.FALSE.,         ! RTTOV MEAN BRIGHTNESS TEMPERATURE
 !- VARIABLES UNIQUE IN 1D (CURTAIN) MODE
 COSP_LTOFFSET=.FALSE.,
/
EOF
