The OASIS Coupler Forum

  HOME

ERROR: namcouple variable not used:

Up to Specific issues in real coupled models

Posted by Anonymous at December 4 2023

Good evening.

I'm working on coupling fesom2 with ufs, all with OASIS3-MCT 5.2.

At first, the model seems to be defining all the coupling fields ok, but then fails with the message (oasis_coupler_setup)

 (oasis_coupler_setup) ERROR: namcouple variable not used: sst_feom

the namcouple is:

########## First section #################
$NFIELDS
16
$RUNTIME
432000
$NLOGPRT
2 1 0
$NCDFTYP
cdf2
$NUNITNO
1024 9999
$NMAPDEC
decomp_1d
$NWGTOPT
abort_on_bad_index
########## Second section ##################
$STRINGS
# Field 1
sst_feom sst_oce_in 1 1800 1 sst_oce_in.nc EXPOUT
feom fv3a
R 0 R 0
LOCTRANS
INSTANT

---

The debug.01.000000 is:

(oasis_init_comp) OPEN debug file, for pe, unit :       0    9999
(oasis_init_comp) model compid fesom       1
 (oasis_unitget)        9998
(oasis_mem_init) Initset conversion flag is    T
(oasis_mem_init) 8 MB memory   alloc in MB is             8.00
(oasis_mem_init) 8 MB memory dealloc in MB is             7.81
(oasis_mem_init) Memory block size conversion in bytes is          4106.02
(oasis_mem_print) memory use (MB) =       971.9471       34.0989 (oasis_init_comp)
 localcomm :           3
  
 (oasis_def_var) prism_nvar    =            1
 (oasis_def_var) varname =            1 sst_feom
 (oasis_def_var) varpart =            1           1
 (oasis_def_var) varnum  =            1           1
 (oasis_def_var) varops  =            1          20
 (oasis_def_var) vartype =            1           8                                                                 
  
(oasis_mem_print) memory use (MB) =      1008.9320       83.0034 (oasis_enddef):start
 (oasis_enddef) compid         =            1
 (oasis_enddef) compnm         = fesom
 (oasis_enddef) mpi_comm_world =            0
 (oasis_enddef) mpi_comm_global=            6
 (oasis_enddef)     size_global=          126
 (oasis_enddef)     rank_global=            0
 (oasis_enddef) mpi_comm_local =            3
 (oasis_enddef)     size_local =          126
 (oasis_enddef)     rank_local =            0
 (oasis_enddef)     root_local =            0
 (oasis_enddef) OASIS_debug    =            2
 (oasis_enddef)   n,prism_model,root =            1 fesom           0
  
 (oasis_part_write) partnm = fesom_part000001
 (oasis_part_write) npart  =            1
 (oasis_part_write) part0  =           -1
 (oasis_part_write) mpicom =            7
 (oasis_part_write) npes   =          126
 (oasis_part_write) rank   =            0
 (oasis_part_write) compid =            1
 (oasis_part_write) ngseg  =          126
 (oasis_part_write) gsize  =         3140
 (oasis_part_write) lsize  =           24
 (oasis_part_write) indx   =            0
 (oasis_part_write) start  =            1          25          50          75
         100         125         150         175         199         224
 (oasis_part_write) length =           24          25          25          25
          25          25          25          24          25          25
 (oasis_part_write) pe_loc =            0           1           2           3
           4           5           6           7           8           9
 (oasis_part_write) pstart =            1          25          50          75
         100         125         150         175         199         224
 (oasis_part_write) plength=           24          25          25          25
          25          25          25          24          25          25
 (oasis_part_write) ppe_loc=            0           1           2           3
           4           5           6           7           8           9
  
(oasis_mem_print) memory use (MB) =      1008.9320       83.0152 (oasis_enddef):part_setup
(oasis_mem_print) memory use (MB) =      1008.9320       83.1248 (oasis_enddef):var_setup
(oasis_mem_print) memory use (MB) =      1012.9418       83.2501 (oasis_enddef):write2files
 (oasis_enddef) done mct_world_init 
 (oasis_coupler_setup) part2decomp = decomp_1d
 (oasis_coupler_setup) smatread_method = ceg
 (oasis_coupler_setup) model variable info:
         model,nvars =      1     1
                 model,idx,var,num,ops =      1     1  sst_feom     1    20  prism_out
  
 (oasis_coupler_setup) ERROR: namcouple variable not used: sst_feom
 (oasis_abort) ABORT: file      = mod_oasis_coupler.F90
 (oasis_abort) ABORT: line      =         1266
 (oasis_abort) ABORT: on model  = fesom
 (oasis_abort) ABORT: on global rank =            0
 (oasis_abort) ABORT: on local  rank =            0
 (oasis_abort) ABORT: CALLING ABORT FROM OASIS LAYER NOW

---

But is code:

do i = 1, nsend
       call oasis_def_var(send_id(i), cpl_send(i), part_id(1), &
            nodim, oasis_Out, total_shape, oasis_Double, ierror)
       if (ierror /= oasis_Ok) then
          print *, 'Failed to define transient ', i, trim(cpl_send(i))
          call oasis_abort(comp_id, 'cpl_oasis3mct_define_unstr', 'def_var failed')
       endif
enddo

I do the check, and there is no 'Failed ***' in log file.

I'm very confused about this. And in other forum posts I've seen that this is due to the name of the field being received not being correctly defined.

the recv code is here:

do i = 1, nrecv
    call ESMF_LogWrite(var_info%cpl_recv_name(i), ESMF_LOGMSG_INFO, rc=rc)
    call oasis_def_var(var_info%recv_id(i), var_info%cpl_recv_name(i), il_part_id, var_nodims, OASIS_In, OASIS_Real, ierror)
    if (ierror /= oasis_Ok) then
        print *, 'Failed to define transient ', i, trim(var_info%cpl_recv_name(i))
        call oasis_abort(cpl_info%comp_id, 'cpl_oasis3mct_define_unstr', 'def_var failed')
    endif
enddo

I also do the check, and there is no 'Failed ***' in log file.

Does anyone know what the problem could be here? Many thanks in advance for any help!

Posted by Anonymous at December 4 2023

Hello,
The error indeed tells you that your coupling field sst_feom is not defined in your code with the appropriate oasis_def_var call . In what you write above, it looks like there is no problem with the oasis_def_var that are called, but this does not mean that one is called with cpl_send(i) = sst_feom. This is what you need to check.
 Hoping this helps,
 Sophie

Posted by Anonymous at December 6 2023

Hello,

Thank you for your reply.

I've solved it.

Thanks again.
Reply to this