#261 closed Bug (fixed)
AGRIF syntax problem with allocation of FLD arrays
Reported by: | sga@… | Owned by: | nemo |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | AGRIF | Version: | trunk |
Severity: | Keywords: | ||
Cc: |
Description
I hope no one minds, but I've been trying the new AGRIF code from trunk revision 1207.
Many thanks for all the hard work on it.
I have found a small problem in the build step. The conv routine doesn't seem to understand the syntax:
ALLOCATE( sf(ji)%fnow(jpi,jpj) )
A work around is to declare a temporary FLD variable tmpfld and rewrite as:
tmpfld = sf(ji)
ALLOCATE( tmpfld%fnow(jpi,jpj) )
But I guess the real solution is a fix to the conv routine!
This problem occurs in routines sbcblk_core, sbcblk_clio, sbcflx, sbcice_if and sbcssr.
Steven Alderson
Commit History (1)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
1208 | rblod | 2008-09-25T12:23:13+02:00 | Correct syntax error with the conv, thanks to Steven, see ticket #261 |
Change History (9)
comment:1 Changed 16 years ago by rblod
comment:2 Changed 16 years ago by nemo_user
Thanks for that Rachid.
Two other problems arose.
Again with conv, the where statement in albedo.F90 doesn't seem to be understood. I guess this may also not be a real problem if conv just leaves it in place. To avoid the error I changed
WHERE( llmask ) ; zalbfz = albice ELSEWHERE ; zalbfz = alphdi END WHERE
into
WHERE( llmask ) zalbfz = albice ELSEWHERE zalbfz = alphdi END WHERE
I've also had a problem with the line
IF(ALLOCATED(nrank_ice)) DEALLOCATE(nrank_ice)
in routine mpp_ini_ice in lib_mpp.F90. After transformation by conv, my compiler objects to the array that substitutes for nrank_ice in the ALLOCATED function, claiming that it's not allocatable. If I comment this line out the problem goes away since mpp_ini_ice doesn't seem to be used at the moment.
Steven
comment:3 Changed 16 years ago by rblod
Thanks againto remind me problems I knew about and forgot just after. We're a bit in a hurry
This can be temporarly fixed in deallocating nrank_ice anyway (at least with agrif) and reallocating after . It is used in LIM3.
This feeature should also be fixed in the conv.
comment:4 Changed 16 years ago by nemo_user
Hello again, just to let you know that I've now successfully run a small experiment with ORCA2 and AGRIF under MPI.
My tmpfld solution (to a problem that doesn't really exist) isn't quite correct (actually it's wrong), since although it fixes the conv syntax errors it breaks the model! tmpfld has to be declared and used as a pointer, otherwise what gets allocated are arrays in a copy of the sf structure rather than the real thing.
The only other problem I had was that my flx.nc and 1_flx.nc files have temperatures in degrees C (I guess they must be out of date), so I had to fix up temperatures in sbcblk_clio.
Thanks again. Steven
comment:5 Changed 16 years ago by rblod
Hi again
The new input files have been updated to be in Kelvin : http://dodsp.idris.fr/reee512/NEMO/ORCA2_LIM_nemo_v3.tar
I have also successfully run Agrif in MPI on opteron with ifort and on IBM.
Thanks again for being so reactive on this modifications, it has been a great help for us today
Rachid
comment:6 Changed 9 years ago by clevy
- Resolution set to fixed
- Status changed from new to closed
comment:7 Changed 8 years ago by nicolasmartin
- Keywords improvements added
comment:8 Changed 8 years ago by nicolasmartin
- Keywords improvements removed
Thanks a lot for testing so quickly.
Actually it does not understand this kind of syntax, but this allocation doesn't have to be transformed so the conv let it as it is, but effectively this not very clean and it has to be fixed in the fortran syntaxic analyser.
Rachid