NPZD model makes hydrodynamic model unstable?
NPZD model makes hydrodynamic model unstable?
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
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
Re: NPZD model makes hydrodynamic model unstable?
Have you tried compiling with array bounds checking? It might be useful here.
Re: NPZD model makes hydrodynamic model unstable?
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
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
Re: NPZD model makes hydrodynamic model unstable?
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.At the line 1114 of file read_phypar.f90
Re: NPZD model makes hydrodynamic model unstable?
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
Thanks for you help, Kate!
drivas
-
- Posts: 7
- Joined: Thu Jun 19, 2008 3:24 am
- Location: Oceanography Department, Dalhousie University
Re: NPZD model makes hydrodynamic model unstable?
Hi Drivas,
Have you tried the MPDATA advection scheme? It helps to prevent negative data in the biological variables, see this post
Cheers,
Arnaud
Have you tried the MPDATA advection scheme? It helps to prevent negative data in the biological variables, see this post
Cheers,
Arnaud
Re: NPZD model makes hydrodynamic model unstable?
Yeah, I think that can be used when running the model with MPI, I use OpenMP. Is that correct?
Thanks,
DAVID
Thanks,
DAVID
-
- Posts: 7
- Joined: Thu Jun 19, 2008 3:24 am
- Location: Oceanography Department, Dalhousie University
Re: NPZD model makes hydrodynamic model unstable?
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.
Re: NPZD model makes hydrodynamic model unstable?
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
drivas
-
- Posts: 7
- Joined: Thu Jun 19, 2008 3:24 am
- Location: Oceanography Department, Dalhousie University
Re: NPZD model makes hydrodynamic model unstable?
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.
Re: NPZD model makes hydrodynamic model unstable?
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.