Commit 042b868a authored by kb's avatar kb
Browse files

option for storing SS and NN

parent 45779afd
!$Id: init_3d_ncdf.F90,v 1.13 2007-03-30 13:11:00 hb Exp $
!$Id: init_3d_ncdf.F90,v 1.14 2009-01-05 09:57:06 kb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -35,6 +35,9 @@
! !REVISION HISTORY:
!
! $Log: init_3d_ncdf.F90,v $
! Revision 1.14 2009-01-05 09:57:06 kb
! option for storing SS and NN
!
! Revision 1.13 2007-03-30 13:11:00 hb
! Use of adaptive and hybrid vertical coordinates technically enabled
!
......@@ -329,6 +332,29 @@
end if
end if
if (save_SS_NN) then
fv = SS_missing
mv = SS_missing
vr(1) = 0.
vr(2) = 0.01
err = nf_def_var(ncid,'SS',NF_REAL,4,f4_dims,SS_id)
if (err .NE. NF_NOERR) go to 10
call set_attributes(ncid,SS_id,long_name='shear stress',units='s-1',&
FillValue=fv,missing_value=mv,valid_range=vr)
#ifndef NO_BAROCLINIC
fv = NN_missing
mv = NN_missing
vr(1) = -0.001
vr(2) = 0.01
err = nf_def_var(ncid,'NN',NF_REAL,4,f4_dims,NN_id)
if (err .NE. NF_NOERR) go to 10
call set_attributes(ncid,NN_id,long_name='Brunt-Vaisala frequency', &
units='s-1',&
FillValue=fv,missing_value=mv,valid_range=vr)
#endif
end if
#ifdef SPM
if (spm_save) then
fv = spm_missing
......
!$Id: ncdf_3d.F90,v 1.8 2007-02-20 13:52:15 kbk Exp $
!$Id: ncdf_3d.F90,v 1.9 2009-01-05 09:57:06 kb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -27,6 +27,7 @@
integer :: salt_id,temp_id,sigma_t_id
integer :: rad_id
integer :: tke_id,num_id,nuh_id,eps_id
integer :: SS_id,NN_id
#ifdef SPM
integer :: spmpool_id,spm_id
#endif
......@@ -48,6 +49,8 @@
REALTYPE, parameter :: nuh_missing =-9999.0
REALTYPE, parameter :: num_missing =-9999.0
REALTYPE, parameter :: eps_missing =-9999.0
REALTYPE, parameter :: SS_missing =-9999.0
REALTYPE, parameter :: NN_missing =-9999.0
#ifdef SPM
REALTYPE, parameter :: spmpool_missing=-9999.0
REALTYPE, parameter :: spm_missing =-9999.0
......@@ -61,6 +64,9 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: ncdf_3d.F90,v $
! Revision 1.9 2009-01-05 09:57:06 kb
! option for storing SS and NN
!
! Revision 1.8 2007-02-20 13:52:15 kbk
! solar radiation -> 3d field - possible to save
!
......
!$Id: save_3d_ncdf.F90,v 1.17 2007-06-07 10:25:19 kbk Exp $
!$Id: save_3d_ncdf.F90,v 1.18 2009-01-05 09:57:06 kb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -23,9 +23,9 @@
#endif
use variables_2d, only: z,D
use variables_2d, only: U,V,DU,DV
use variables_3d, only: dt,kmin,ho,hn,uu,hun,vv,hvn,ww,hcc
use variables_3d, only: dt,kmin,ho,hn,uu,hun,vv,hvn,ww,hcc,SS
#ifndef NO_BAROCLINIC
use variables_3d, only: S,T,rho,rad
use variables_3d, only: S,T,rho,rad,NN
#endif
use variables_3d, only: tke,num,nuh,eps
#ifdef SPM
......@@ -51,6 +51,9 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: save_3d_ncdf.F90,v $
! Revision 1.18 2009-01-05 09:57:06 kb
! option for storing SS and NN
!
! Revision 1.17 2007-06-07 10:25:19 kbk
! iimin,iimax,jjmin,jjmax -> imin,imax,jmin,jmax
!
......@@ -295,6 +298,23 @@
end if
end if ! save_turb
if (save_ss_nn) then
call cnv_3d(imin,jmin,imax,jmax,kmin,kmax,az,SS,SS_missing, &
imin,imax,jmin,jmax,0,kmax,ws)
err = nf_put_vara_real(ncid, SS_id, start, edges, ws)
if (err .NE. NF_NOERR) go to 10
#ifndef NO_BAROCLINIC
call cnv_3d(imin,jmin,imax,jmax,kmin,kmax,az,NN,NN_missing, &
imin,imax,jmin,jmax,0,kmax,ws)
err = nf_put_vara_real(ncid, NN_id, start, edges, ws)
if (err .NE. NF_NOERR) go to 10
#endif
end if ! save_ss_nn
#ifdef SPM
if (spm_save) then
call cnv_3d(imin,jmin,imax,jmax,kmin,kmax,az,spm,spm_missing, &
......
!$Id: output.F90,v 1.25 2007-10-19 07:52:35 kbk Exp $
!$Id: output.F90,v 1.26 2009-01-05 09:57:06 kb Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -46,6 +46,7 @@
logical :: save_eps=.true.
logical :: save_num=.true.
logical :: save_nuh=.true.
logical :: save_ss_nn=.false.
integer :: first_2d=1
integer :: step_2d=1
integer :: first_3d=1
......@@ -57,6 +58,9 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: output.F90,v $
! Revision 1.26 2009-01-05 09:57:06 kb
! option for storing SS and NN
!
! Revision 1.25 2007-10-19 07:52:35 kbk
! zub and zvb not in hotstart files anymore
!
......@@ -193,7 +197,7 @@
in_dir,out_dir, &
save_2d,save_3d,save_masks,save_vel,destag, &
save_strho,save_s,save_t,save_rho,save_rad, &
save_turb,save_tke,save_eps,save_num,save_nuh, &
save_turb,save_tke,save_eps,save_num,save_nuh,save_ss_nn, &
first_2d,step_2d,first_3d,step_3d,hotout,meanout, &
save_meteo
! logical :: nesting=.true.
......
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