Commit cdce3ce2 authored by kb's avatar kb
Browse files

mean calculation de-activated with -DNO_3D

parent 8a77c1b5
!$Id: integration.F90,v 1.13 2009-04-27 08:03:02 kb Exp $
!$Id: integration.F90,v 1.14 2009-04-27 09:22:54 kb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -20,6 +20,9 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: integration.F90,v $
! Revision 1.14 2009-04-27 09:22:54 kb
! mean calculation de-activated with -DNO_3D
!
! Revision 1.13 2009-04-27 08:03:02 kb
! getm/initialise.F90
!
......@@ -219,18 +222,22 @@
#endif
call update_time(n)
#ifndef NO_3D
if(meanout .ge. 0) then
call calc_mean_fields(n,meanout)
end if
#endif
call do_output(runtype,n,timestep)
#ifdef DIAGNOSE
call diagnose(n,MaxN,runtype)
#endif
end do
#ifndef NO_3D
if (meanout .eq. 0) then
call calc_mean_fields(n,n)
end if
#endif
#ifdef DEBUG
write(debug,*) 'Leaving time_loop()'
......
#$Id: Makefile,v 1.7 2007-09-21 13:03:42 kbk Exp $
#$Id: Makefile,v 1.8 2009-04-27 09:22:55 kb Exp $
#
# Makefile to build the ncdf module - ncdfio.o and the libncdfio.a library
#
......@@ -48,16 +48,16 @@ ifneq ($(GETM_NO_3D),true)
OBJ += \
${LIB}(init_3d_ncdf.o) \
${LIB}(save_3d_ncdf.o) \
${LIB}(create_restart_ncdf.o) \
${LIB}(write_restart_ncdf.o) \
${LIB}(open_restart_ncdf.o) \
${LIB}(read_restart_ncdf.o) \
${LIB}(init_mean_ncdf.o) \
${LIB}(save_mean_ncdf.o) \
${LIB}(get_field_ncdf.o) \
${LIB}(read_field_ncdf.o)
endif
OBJ += \
${LIB}(create_restart_ncdf.o) \
${LIB}(write_restart_ncdf.o) \
${LIB}(open_restart_ncdf.o) \
${LIB}(read_restart_ncdf.o) \
${LIB}(ncdf_close.o)
all: modules objects
......
!$Id: read_restart_ncdf.F90,v 1.6 2007-11-12 13:50:17 kb Exp $
!$Id: read_restart_ncdf.F90,v 1.7 2009-04-27 09:22:55 kb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -31,7 +31,9 @@
use halo_zones, only: update_2d_halo,update_3d_halo,wait_halo
use halo_zones, only: H_TAG,U_TAG,V_TAG
use variables_2d
#ifndef NO_3D
use variables_3d
#endif
#ifdef GETM_BIO
use bio, only: bio_calc
use bio_var, only: numc
......@@ -51,6 +53,9 @@
! Original author(s): Karsten Bolding
!
! $Log: read_restart_ncdf.F90,v $
! Revision 1.7 2009-04-27 09:22:55 kb
! mean calculation de-activated with -DNO_3D
!
! Revision 1.6 2007-11-12 13:50:17 kb
! also need bio_calc
!
......@@ -103,7 +108,9 @@
jlen = jh-jl+1
start(1) = il ; edges(1) = ih-il+1
start(2) = jl ; edges(2) = jh-jl+1
#ifndef NO_3D
start(3) = 1 ; edges(3) = kmax+1
#endif
! z is required
status = &
......@@ -156,7 +163,6 @@
nf90_get_var(ncid,Slru_id,Slru(iloc:ilen,jloc:jlen),start,edges)
if (status .NE. NF90_NOERR) then
LEVEL3 "read_restart_ncdf(): setting Slru=0"
ssun=_ZERO_
else
call update_2d_halo(Slru,Slru,au,imin,jmin,imax,jmax,U_TAG)
call wait_halo(U_TAG)
......
!$Id: write_restart_ncdf.F90,v 1.5 2007-11-12 13:50:17 kb Exp $
!$Id: write_restart_ncdf.F90,v 1.6 2009-04-27 09:22:55 kb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -21,7 +21,9 @@
use domain, only: xc,yc,lonc,latc
use domain, only: imin,imax,jmin,jmax,kmax
use variables_2d
#ifndef NO_3D
use variables_3d
#endif
#ifdef GETM_BIO
use bio, only: bio_calc
use bio_var, only: numc
......@@ -39,6 +41,9 @@
! Original author(s): Karsten Bolding
!
! $Log: write_restart_ncdf.F90,v $
! Revision 1.6 2009-04-27 09:22:55 kb
! mean calculation de-activated with -DNO_3D
!
! Revision 1.5 2007-11-12 13:50:17 kb
! also need bio_calc
!
......
#$Id: Makefile,v 1.3 2006-02-07 07:16:22 kbk Exp $
#$Id: Makefile,v 1.4 2009-04-27 09:22:55 kb Exp $
#
# Makefile to build the output module
#
......@@ -15,14 +15,20 @@ LIBSRC = diagnose.F90
SRC = $(MODSRC) $(LIBSRC)
MOD = \
${LIB}(nesting.o) \
${LIB}(diagnostic_variables.o) \
${LIB}(nesting.o)
ifneq ($(GETM_NO_3D),true)
${LIB}(diagnostic_variables.o)
endif
MOD += \
${LIB}(ncdf_out.o) \
${LIB}(ascii_out.o) \
${LIB}(output.o)
OBJ = \
$(LIB)(calc_mean_fields.o) \
OBJ =
ifneq ($(GETM_NO_3D),true)
$(LIB)(calc_mean_fields.o)
endif
OBJ += \
$(LIB)(diagnose.o)
all: modules objects
......
!$Id: output.F90,v 1.27 2009-04-22 10:07:19 lars Exp $
!$Id: output.F90,v 1.28 2009-04-27 09:22:55 kb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -59,6 +59,9 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: output.F90,v $
! Revision 1.28 2009-04-27 09:22:55 kb
! mean calculation de-activated with -DNO_3D
!
! Revision 1.27 2009-04-22 10:07:19 lars
! added switch for bottom stress output
!
......@@ -270,10 +273,12 @@
hotout(3) = 1
end if
#ifndef NO_3D
save_mean=(meanout .ge. 0 .and. runtype .gt. 1)
if ( save_mean ) then
LEVEL2 'Mean fields in: ',trim(out_f_mean)
end if
#endif
if( .not. dryrun) then
......@@ -290,9 +295,9 @@
if (save_2d) call init_2d_ncdf(out_f_2d,title,starttime)
#ifndef NO_3D
if (save_3d) call init_3d_ncdf(out_f_3d,title,starttime)
#endif
if (save_mean) &
call init_mean_ncdf(out_f_mean,title,starttime)
#endif
case (GRADS)
case DEFAULT
STDERR 'Fatal error: A non valid input format has been chosen'
......@@ -354,9 +359,11 @@
write_2d = save_2d .and. n .ge. first_2d .and. mod(n,step_2d).eq.0
write_3d = save_3d .and. n .ge. first_3d .and. mod(n,step_3d).eq.0
#ifndef NO_3D
if (meanout .gt. 0 .and. n .gt. 0) then
write_mean = save_mean .and. (mod(n,meanout) .eq. 0)
end if
#endif
if (write_2d .or. write_3d .or. write_mean) then
call write_time_string()
......@@ -378,8 +385,8 @@
if (write_2d) call save_2d_ncdf(secs)
#ifndef NO_3D
if (write_3d) call save_3d_ncdf(secs)
#endif
if (write_mean) call save_mean_ncdf(secs)
#endif
case DEFAULT
STDERR 'Fatal error: A non valid input format has been chosen'
stop 'do_output'
......@@ -682,7 +689,9 @@
select case (out_fmt)
case(NETCDF)
dummy=-_ZERO_
#ifndef NO_3D
call save_mean_ncdf(dummy)
#endif
end select
end if
......
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