Commit 8768d874 authored by kb's avatar kb
Browse files

fixed SPM hot-start bug - Hofmeister

parent 0603e9b1
!$Id: spm.F90,v 1.15 2007-07-23 10:25:50 hb Exp $
!$Id: spm.F90,v 1.16 2009-07-18 12:36:00 kb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -487,7 +487,7 @@
! In drying grid boxes, the settling velocity is reduced.
do i=imin,imax
do j=jmin,jmax
do k=0,kmax
do k=1,kmax-1
ww_aux(i,j,k) = ww(i,j,k) - spm_ws(i,j,k)*dry_z(i,j)
end do
end do
......
!$Id: create_restart_ncdf.F90,v 1.3 2009-04-27 08:03:02 kb Exp $
!$Id: create_restart_ncdf.F90,v 1.4 2009-07-18 12:36:01 kb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -39,6 +39,9 @@
! Original author(s): Karsten Bolding
!
! $Log: create_restart_ncdf.F90,v $
! Revision 1.4 2009-07-18 12:36:01 kb
! fixed SPM hot-start bug - Hofmeister
!
! Revision 1.3 2009-04-27 08:03:02 kb
! getm/initialise.F90
!
......@@ -225,7 +228,7 @@
if (status .NE. NF90_NOERR) go to 10
status = nf90_def_var(ncid, "spmpool", nf90_double, &
(/ xdim_id, ydim_id, zdim_id /), spmpool_id)
(/ xdim_id, ydim_id /), spmpool_id)
if (status .NE. NF90_NOERR) go to 10
#endif
#ifdef GETM_BIO
......
!$Id: read_restart_ncdf.F90,v 1.7 2009-04-27 09:22:55 kb Exp $
!$Id: read_restart_ncdf.F90,v 1.8 2009-07-18 12:36:01 kb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -37,6 +37,9 @@
#ifdef GETM_BIO
use bio, only: bio_calc
use bio_var, only: numc
#endif
#ifdef SPM
use suspended_matter
#endif
IMPLICIT NONE
!
......@@ -53,6 +56,9 @@
! Original author(s): Karsten Bolding
!
! $Log: read_restart_ncdf.F90,v $
! Revision 1.8 2009-07-18 12:36:01 kb
! fixed SPM hot-start bug - Hofmeister
!
! Revision 1.7 2009-04-27 09:22:55 kb
! mean calculation de-activated with -DNO_3D
!
......@@ -393,6 +399,7 @@
#endif
#ifdef SPM
if(spm_calc) then
if (spm_hotstart) then
status = &
nf90_get_var(ncid,spm_id,spm(iloc:ilen,jloc:jlen,0:kmax),start,edges)
if (status .NE. NF90_NOERR) then
......@@ -404,14 +411,18 @@
end if
status = &
nf90_get_var(ncid,spmpool_id,spmpool(iloc:ilen,jloc:jlen),start,edges)
nf90_get_var(ncid,spmpool_id,spm_pool(iloc:ilen,jloc:jlen),start,edges)
if (status .NE. NF90_NOERR) then
LEVEL3 "read_restart_ncdf(): setting spmpool=0"
spmpool=_ZERO_
spm_pool=_ZERO_
else
call update_2d_halo(spmpool,spmpool,az,imin,jmin,imax,jmax,H_TAG)
call update_2d_halo(spm_pool,spm_pool,az,imin,jmin,imax,jmax,H_TAG)
call wait_halo(H_TAG)
end if
else
LEVEL3 'spm variables not read from hotstart file'
LEVEL3 'set spm_init_method=0 to read them from hotstart file'
end if
end if
#endif
#ifdef GETM_BIO
......
!$Id: write_restart_ncdf.F90,v 1.6 2009-04-27 09:22:55 kb Exp $
!$Id: write_restart_ncdf.F90,v 1.7 2009-07-18 12:36:01 kb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -27,6 +27,9 @@
#ifdef GETM_BIO
use bio, only: bio_calc
use bio_var, only: numc
#endif
#ifdef SPM
use suspended_matter
#endif
IMPLICIT NONE
!
......@@ -41,6 +44,9 @@
! Original author(s): Karsten Bolding
!
! $Log: write_restart_ncdf.F90,v $
! Revision 1.7 2009-07-18 12:36:01 kb
! fixed SPM hot-start bug - Hofmeister
!
! Revision 1.6 2009-04-27 09:22:55 kb
! mean calculation de-activated with -DNO_3D
!
......@@ -233,7 +239,7 @@
if (status .NE. NF90_NOERR) go to 10
status = &
nf90_put_var(ncid,spmpool_id,spmpool(imin:imax,jmin:jmax),start,edges)
nf90_put_var(ncid,spmpool_id,spm_pool(imin:imax,jmin:jmax),start,edges)
if (status .NE. NF90_NOERR) go to 10
end if
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment