COSP and CMOR

53 views
Skip to first unread message

Juan Carlos Perez

unread,
Feb 21, 2018, 7:43:26 AM2/21/18
to COSP users group
Hi,

I'm trying to run COSP v2 and I've found the following error.

Following the instructions in Readme file i compiled first the main COSP code and when i tried to compile the driver i got some errors related to the function cmor_dataset.

This function is called in  cosp_io.v2, but in newer versions of CMOR (>2.0) it seems that this function has been replaced by " cmor_dataset_json" which accepts as its only argument, the name of a json file which should contain all the information that the previous function accepted as arguments.

Are the tables used in cosp_test available in json format?

Regards,
Juan Carlos

Bodas-Salcedo, Alejandro

unread,
Feb 21, 2018, 9:41:37 AM2/21/18
to cosp...@googlegroups.com

Hello Juan Carlos,

 

Which version of CMOR are you using? I think the json tables were introduced for CMOR3, but COSP is only compatible with CMOR2. I use CMOR2.8.1 and it builds fine.

 

Regards,

Alejandro

 

 

--
You received this message because you are subscribed to the Google Groups "COSP users group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cosp-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Juan Carlos Perez

unread,
Feb 22, 2018, 6:32:06 AM2/22/18
to COSP users group
Hi Alejandro,

Thank you very much for your fast reply,

I've tried with both, CMOR2 and CMOR3. I've just compiled cmor2.9 and when i try to build COSP (the driver), it complains with errors like:


cosp_io.v2.f90(1031): error #6632: Keyword arguments are invalid without an explicit interface.   [OUTPATH]
error_flag = cmor_dataset(outpath=trim(outpath),experiment_id=trim(experiment_id),institution=trim(institution), &
        ------------------------------^
...

Looking for the function cmor_dataset in the source code of CMOR, i didn't find this function. There are some similar functions, like 
cmor_dataset_cff, but with different number of arguments than cmor_dataset. 

Any idea?

Thank you very much.
Regards,
Juan Carlos

Bodas-Salcedo, Alejandro

unread,
Feb 22, 2018, 11:28:20 AM2/22/18
to cosp...@googlegroups.com

Hello Juan Carlos,

 

Please, can you attach all the output from the make command?

 

Thanks,

Dustin Swales - NOAA Affiliate

unread,
Feb 22, 2018, 11:47:09 AM2/22/18
to cosp...@googlegroups.com
Hi Juan Carlos,

I'm sorry to hear you are having difficulties running COSP2.

I've been using CMOR v2.8.1 with COSP2, which works fine, but COSP2 (also COSP1 I believe) have not been tested with the latest versions of CMOR. 

Awhile back I tried running COSP2 using the latest version of CMOR (v3.4.2) and ran into some of the same problems you are encountering. It appears that at some point between CMOR v2.8.1 and v3.4.2 there were some substantial changes (e.g. subroutines were merged, interfaces changed, etc...). In any event, this is a limitation that we are aware of and are currently working on a new COSP2 testing suite which can be built with or without CMOR. It's our hope to have this new testing suite included in master branch as soon as possible. 

Cheers,
Dustin



To unsubscribe from this group and stop receiving emails from it, send an email to cosp-user+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
----------------------------------------------------------------------------------
Dustin Swales
Associate Scientist 
CIRES /NOAA-ESRL
(303)-497-7008
dustin...@noaa.gov
----------------------------------------------------------------------------------

Juan Carlos Perez

unread,
Feb 22, 2018, 12:36:53 PM2/22/18
to COSP users group
Hi again,

Here is the output of the make command.:

make -f Makefile.v2.0
ifort -O3 -traceback -c -I/home/jcperez/Descargas/Cmor/Cmor29/include -I/opt/netcdf-intel/include -I/home/jcperez/Descargas/Cosp/COSPv2.0_cmor2/COSPv2.0/obj cosp_io.v2.f90
cosp_io.v2.f90(1031): error #6632: Keyword arguments are invalid without an explicit interface.   [OUTPATH]
    error_flag = cmor_dataset(outpath=trim(outpath),experiment_id=trim(experiment_id),institution=trim(institution), &
------------------------------^
cosp_io.v2.f90(1031): error #6632: Keyword arguments are invalid without an explicit interface.   [EXPERIMENT_ID]
    error_flag = cmor_dataset(outpath=trim(outpath),experiment_id=trim(experiment_id),institution=trim(institution), &
----------------------------------------------------^
cosp_io.v2.f90(1031): error #6632: Keyword arguments are invalid without an explicit interface.   [INSTITUTION]
    error_flag = cmor_dataset(outpath=trim(outpath),experiment_id=trim(experiment_id),institution=trim(institution), &
--------------------------------------------------------------------------------------^
cosp_io.v2.f90(1032): error #6632: Keyword arguments are invalid without an explicit interface.   [SOURCE]
         source=trim(source),calendar=trim(calendar),realization=realization,contact=trim(contact), &
---------^
cosp_io.v2.f90(1032): error #6632: Keyword arguments are invalid without an explicit interface.   [CALENDAR]
         source=trim(source),calendar=trim(calendar),realization=realization,contact=trim(contact), &
-----------------------------^
cosp_io.v2.f90(1032): error #6632: Keyword arguments are invalid without an explicit interface.   [REALIZATION]
         source=trim(source),calendar=trim(calendar),realization=realization,contact=trim(contact), &
-----------------------------------------------------^
cosp_io.v2.f90(1032): error #6632: Keyword arguments are invalid without an explicit interface.   [CONTACT]
         source=trim(source),calendar=trim(calendar),realization=realization,contact=trim(contact), &
-----------------------------------------------------------------------------^
cosp_io.v2.f90(1033): error #6632: Keyword arguments are invalid without an explicit interface.   [HISTORY]
         history=trim(history),comment=trim(comment),references=trim(references),model_id=trim(model_id), &
---------^
cosp_io.v2.f90(1033): error #6632: Keyword arguments are invalid without an explicit interface.   [COMMENT]
         history=trim(history),comment=trim(comment),references=trim(references),model_id=trim(model_id), &
-------------------------------^
cosp_io.v2.f90(1033): error #6632: Keyword arguments are invalid without an explicit interface.   [REFERENCES]
         history=trim(history),comment=trim(comment),references=trim(references),model_id=trim(model_id), &
-----------------------------------------------------^
cosp_io.v2.f90(1033): error #6632: Keyword arguments are invalid without an explicit interface.   [MODEL_ID]
         history=trim(history),comment=trim(comment),references=trim(references),model_id=trim(model_id), &
---------------------------------------------------------------------------------^
cosp_io.v2.f90(1034): error #6632: Keyword arguments are invalid without an explicit interface.   [BRANCH_TIME]
         branch_time=branch_time,parent_experiment_id=trim(parent_experiment_id),forcing=trim(forcing), &
---------^
cosp_io.v2.f90(1034): error #6632: Keyword arguments are invalid without an explicit interface.   [PARENT_EXPERIMENT_ID]
         branch_time=branch_time,parent_experiment_id=trim(parent_experiment_id),forcing=trim(forcing), &
---------------------------------^
cosp_io.v2.f90(1034): error #6632: Keyword arguments are invalid without an explicit interface.   [FORCING]
         branch_time=branch_time,parent_experiment_id=trim(parent_experiment_id),forcing=trim(forcing), &
---------------------------------------------------------------------------------^
cosp_io.v2.f90(1035): error #6632: Keyword arguments are invalid without an explicit interface.   [INSTITUTE_ID]
         institute_id=trim(institute_id),parent_experiment_rip=trim(parent_experiment_rip), &
---------^
cosp_io.v2.f90(1035): error #6632: Keyword arguments are invalid without an explicit interface.   [PARENT_EXPERIMENT_RIP]
         institute_id=trim(institute_id),parent_experiment_rip=trim(parent_experiment_rip), &
-----------------------------------------^
cosp_io.v2.f90(1036): error #6632: Keyword arguments are invalid without an explicit interface.   [INITIALIZATION_METHOD]
         initialization_method=initialization_method,physics_version=physics_version)
---------^
cosp_io.v2.f90(1036): error #6632: Keyword arguments are invalid without an explicit interface.   [PHYSICS_VERSION]
         initialization_method=initialization_method,physics_version=physics_version)
-----------------------------------------------------^
cosp_io.v2.f90(1031): error #6404: This name does not have a type, and must have an explicit type.   [CMOR_DATASET]
    error_flag = cmor_dataset(outpath=trim(outpath),experiment_id=trim(experiment_id),institution=trim(institution), &
-----------------^
cosp_io.v2.f90(1037): error #6631: A non-optional actual argument must be present when invoking a procedure with an explicit interface.   [OPTIONAL]
    error_flag = cmor_set_cur_dataset_attribute('cosp_version',trim(COSP_VERSION))
-----------------^
compilation aborted for cosp_io.v2.f90 (code 1)
make: *** [cosp_io.v2.o] Error 1

********************

It seems that cmor_dataset and cmor_set_cur_dataset are missing in the actual version of cmor. 

Thank you very much.

Bodas-Salcedo, Alejandro

unread,
Feb 23, 2018, 7:11:04 AM2/23/18
to cosp...@googlegroups.com

Hello Juan Carlos,

 

I have built cosp2 in my home laptop with cmor2.9.2, so I suspect the problem is in Makefile.v2. I’d suggest you make the following changes so that you have full control of the path for each library.

 

Define the following environment variables for each library (replacing lines 22-28) with the appropriate values for your system:

 

HDF5_INC    = /usr/include

HDF5_LIB    = /usr/lib

NCDF_INC    = /usr/include

NCDF_LIB    = /usr/lib

NCDFF_INC    = /home/alejandro/sci_lib/netcdf-fortran-4.4.0/include

NCDFF_LIB    = /home/alejandro/sci_lib/netcdf-fortran-4.4.0/lib64

CMOR_INC    = /home/alejandro/sci_lib/cmor-CMOR-2.9.2/include

CMOR_LIB    = /home/alejandro/sci_lib/cmor-CMOR-2.9.2/lib

UDUNITS_INC = /home/alejandro/sci_lib/udunits-2.2.26/include

UDUNITS_LIB = /home/alejandro/sci_lib/udunits-2.2.26/lib

UUID_INC    = /home/alejandro/sci_lib/uuid-1.6.2/include

UUID_LIB    = /home/alejandro/sci_lib/uuid-1.6.2/lib

 

Replace line 64 (the one including -lnetcdff) with the following 3 lines:

 

    -I$(HDF5_INC) -L${HDF5_LIB} -Wl,-rpath=${HDF5_LIB} -lhdf5_hl -lhdf5 \

    -I$(NCDF_INC) -L${NCDF_LIB} -Wl,-rpath=${NCDF_LIB} -lnetcdf \

    -I$(NCDFF_INC) -L${NCDFF_LIB} -Wl,-rpath=${NCDFF_LIB} -lnetcdff \

Juan Carlos Perez

unread,
Feb 24, 2018, 5:01:40 AM2/24/18
to COSP users group
Hi Alejandro,

Finally I built COSP2.0. The problem, as you and Dustin said, was the CMOR version. I thought that i had downloaded from git the 2.9 version, but it was CMOR3. I downloaded CMOR2.9 tar file and now it compiled. 
Thank you very much for your help.

Regards,
Juan Carlos
Reply all
Reply to author
Forward
0 new messages