NPZD model makes hydrodynamic model unstable?

Discussion about coupled ecosystem models

Moderators: arango, robertson

Post Reply
Message
Author
drivas
Posts: 33
Joined: Tue Aug 28, 2007 8:31 pm
Location: CICESE

NPZD model makes hydrodynamic model unstable?

#1 Unread post by drivas »

Hi modelers,

I’m trying to run the NPZD_POWELL model in a workstation with CentOS and gfortran compiler. My domain is not very big: 160x155x22. When I run just the hydrodynamic model it runs very well, but when I include the NPZD it presents a segmentation fault. I’ve tried different options for the NtileI and NtileJ, trying to define them according to my number of parallel threads (16). The initial conditions of the biological model look OK (values >=0). The default stack size is 10240 kB, but I can easily change it to “unlimited”. However, if I change it the model runs but also develops some disturbances (apparently at the free surface) which grow and the model blows up. After this, if I deactivate the NPZD option, the model runs but it’s still unstable. Apparently, the model can be stable again only if I decrease the stack size. Does anybody know what’s going on?
By the way, memory shouldn’t be a problem, since I recently ran a significantly bigger model (including the NPZD_POWELL model) with no problem and no need to modify the stack size.
I’d appreciate any comment about this issue.
Best regards,

drivas

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: NPZD model makes hydrodynamic model unstable?

#2 Unread post by kate »

Have you tried compiling with array bounds checking? It might be useful here.

drivas
Posts: 33
Joined: Tue Aug 28, 2007 8:31 pm
Location: CICESE

Re: NPZD model makes hydrodynamic model unstable?

#3 Unread post by drivas »

Thank very much for your kind reply, Kate.
I'm trying to run the Debug option (with no NPZD model yet) but I get the following error message:

At the line 1114 of file read_phypar.f90
Fortran runtime error: Array reference out of bounds for array 'hout', lower bound of dimension 1 exceeded (0<1)

Any thought?

drivas

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: NPZD model makes hydrodynamic model unstable?

#4 Unread post by kate »

At the line 1114 of file read_phypar.f90
It's time to read the source. Look at that file within the $SCRATCHDIR directory to find out which of the Hout values is being trouble.

drivas
Posts: 33
Joined: Tue Aug 28, 2007 8:31 pm
Location: CICESE

Re: NPZD model makes hydrodynamic model unstable?

#5 Unread post by drivas »

Well, the model finally works. Apparently I had two problems: first, I was using a old version of the *.in file (not sure what the problem was); and second, there was some problem with a recent modification of the step3d_t to prevent negative values in the NPZD outputs. I just deactivated this modification and now the model works. I still need to prevent the negative values, I haven't been able to prevent them in any of my simulations.
Thanks for you help, Kate!

drivas

arnaudlaurent
Posts: 7
Joined: Thu Jun 19, 2008 3:24 am
Location: Oceanography Department, Dalhousie University

Re: NPZD model makes hydrodynamic model unstable?

#6 Unread post by arnaudlaurent »

Hi Drivas,

Have you tried the MPDATA advection scheme? It helps to prevent negative data in the biological variables, see this post

Cheers,

Arnaud

drivas
Posts: 33
Joined: Tue Aug 28, 2007 8:31 pm
Location: CICESE

Re: NPZD model makes hydrodynamic model unstable?

#7 Unread post by drivas »

Yeah, I think that can be used when running the model with MPI, I use OpenMP. Is that correct?
Thanks,
DAVID

arnaudlaurent
Posts: 7
Joined: Thu Jun 19, 2008 3:24 am
Location: Oceanography Department, Dalhousie University

Re: NPZD model makes hydrodynamic model unstable?

#8 Unread post by arnaudlaurent »

I did use MPDATA with OpenMP a few years back and it worked well. Give it a try to see if it solves your problem with negative values.

drivas
Posts: 33
Joined: Tue Aug 28, 2007 8:31 pm
Location: CICESE

Re: NPZD model makes hydrodynamic model unstable?

#9 Unread post by drivas »

Thanks a lot for your suggestion. I tried to use it but I get an error message saying that the TS_MPDATA can't be used width Open MP. When you used it, what did you modify?

drivas

arnaudlaurent
Posts: 7
Joined: Thu Jun 19, 2008 3:24 am
Location: Oceanography Department, Dalhousie University

Re: NPZD model makes hydrodynamic model unstable?

#10 Unread post by arnaudlaurent »

Ah true, sorry I forgot that OpenMP and MPDATA are not compatible anymore. I used it several years ago with an older version of ROMS.

drivas
Posts: 33
Joined: Tue Aug 28, 2007 8:31 pm
Location: CICESE

Re: NPZD model makes hydrodynamic model unstable?

#11 Unread post by drivas »

Ok, thanks anyway. I'll look for another option. I recently tried the different option for the advection but I got numerous negative values always. Zooplankton is the component that is especially problematic.

Post Reply