Up to Installation and compilation
I successfully compiled the latest version of oasis3-mct
But when I try to compile WRF+OASIS I get an error
module_cpl_oasis3.f90(174): error #6285: There is no matching specific subroutine for this generic subroutine call. [OASIS_DEF_VAR]
CALL oasis_def_var(ssnd(jw,je,jf)%nid, ssnd(jw,je,jf)%clname, id_part, (/2,1/), OASIS_Out, ishape, OASIS_Real,ierror)
--------------------^
module_cpl_oasis3.f90(198): error #6285: There is no matching specific subroutine for this generic subroutine call. [OASIS_DEF_VAR]
CALL oasis_def_var(srcv(jw,je,jf)%nid, srcv(jw,je,jf)%clname, id_part, (/2,1/), OASIS_In , ishape, OASIS_Real,ierror)
--------------------^
compilation aborted for module_cpl_oasis3.f90 (code 1)
It seems that there is no subroutine oasis_def_var in oasis3-mct.
I found only subroutine oasis_def_var_v1 and subroutine oasis_def_var_v2.
And WRF calls oasis_def_var.
Is it possible to make WRF compatible with the new oasis3-mct?
Hi, oasis_def_var is an interface to oasis_def_var_V1 and oasis_def_var_V2, so calling oasis_def_var is what you should do. You certainly have a problem when linking the oasis3-mct library at compilation. You should double check this. Regards, Sophie
I am having the same error in our model. Based from the docs, ishape is supposed to be a 1d array but here I believe it was defined as a 2d array. However, passing a 2d ishape worked just fine for previous OASIS versions until it didn't on OASIS v5.0. Can't a 2d ishape work in OASIS v5.0 just like in previous OASIS versions? Here's our oasis_def_var usage for reference: https://github.com/parflow/parflow/blob/master/pfsimulator/amps/oas3/oas_pfl_define.F90#L288
I am having the same error in our model. Based from the docs, ishape is supposed to be a 1d array but here I believe it was defined as a 2d array. However, passing a 2d ishape worked just fine for previous OASIS versions until it didn't on OASIS v5.0. Can't a 2d ishape work in OASIS v5.0 just like in previous OASIS versions? Here's our oasis_def_var usage for reference: https://github.com/parflow/parflow/blob/master/pfsimulator/amps/oas3/oas_pfl_define.F90#L288
Hi, I had the same problem when I recompiled nemo with OASIS3-MCT_5.0. I don't understand the problem as we have now a generic interface for oasis_def_var, i.e. oasis_def_var_v1 and oasis_def_var_v2, and oasis_def_var_v1 is the same than in OASIS3-MCT_4.0 or OASIS3-MCT_3.0. So it should be upward compatible (but it is not). I have to understand that but in the mean time, you can simply remove the argument ishape; your call will now fit the oasis_def_var_v2 and it should work. At least, it worked for me. Can you try and let me know? Sophie
I successfully recompiled WRF with OASIS3-MCT_4.0. It seems that WRF uses INTEGER :: ishape(2,2) while OASIS_5.0 requires INTEGER :: ishape(4)
Hi Sophie,
Removing ishape works. However it would be difficult to implement this fix since I don't own the codes. I was hoping we could upgrade to OASIS v5 without changing our codebase.
You can replicate the issue by compiling the test Fortran code below with
different OASIS versions.
```
program def_var_test
use mod_oasis
integer :: vid
integer :: part_id
integer :: var_nodims(2)
integer :: ierror
integer :: ishape(2,2) ! ishape is 2d on some legacy codes
! Set dummy values
var_nodims(1) = 2
var_nodims(2) = 1
ishape(1,1) = 1
ishape(2,1) = 5
ishape(1,2) = 1
ishape(2,2) = 5
! compiles on OASIS v2,0-4.0, but not on v5.0
call prism_def_var_proto ( vid, "DUMMY", part_id, &
var_nodims, PRISM_Out, ishape, PRISM_Real, ierror )
end program def_var_test
```
Hi, I will check what we can do and I will be back to you! Sophie