The OASIS Coupler Forum

  HOME

OASIS3-MCT in the global coupled model of IPSL, Paris

Up to Specific issues in real coupled models

Posted by Anonymous at November 7 2013

Hi Laure and Sophie,

With OASIS3, it was possible to define a coupling field in a model but not in the namcouple and the corresponding field was not exchanged during the run. It was very useful to externalize the different configurations of the coupled model by  modifying the namcouple only.
It does not seems to be possible with OASIS3-MCT anymore, indeed by default. Do you confirm ? What will happen if a field is define in the model and not in the namcouple ?

Thanks, Arnaud

Posted by Anonymous at November 8 2013

Hi Arnaud,

The coupler OASIS3-MCT aborts if a variable is not written correctly in the namcouple or if it does not exist in the namcouple. We implemented this feature for "security" reasons".

In this case a field declared by oasis_dev_var, but not defined in the configuration file namcouple, will get an ID equal to -1.

In the documentation we explain that: "Trying to send with oasis_put a field declared with a oasis_def_var but not defined in the configuration file namcouple will lead to an abort. In this case, the field ID returned by the oasis_def_var is equal to -1 and the corresponding oasis_put should not be called. "


So if the user does not want to change his code when removing some variables in the namcouple, he only has to add a condition before its oasis_put :
if (var_id(n) .ne. -1) then
call oasis_put
else
...
endif

Best regards, Laure

Posted by Anonymous at November 9 2013

Hi Laure and Sophie 

In my opinion, the former behaviour was quite handy, and safe enough : if a field should have been in the namcouple but wasn't, the receiving model hanged, but there was no risk of wrong result. 

Which conception of "security" are you refering too, here ? S

Posted by Anonymous at November 10 2013

Hi Stephane,

First of all, Eric Maisonnave observed that some fields were not received if there were not defined in the namcouple, and that there was no easy error message. 

This implementation is also very usefull to externalize the different configurations of the coupled model by modifying only the namcouple and not the code. 

Best regards, Laure
Reply to this