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