Commit 719fa500 authored by ph290's avatar ph290
Browse files

adding menue of possible output variables controled form run_map_parallel.py

parent 54fe7c7a
"""
import os
import subprocess
import shutil
......@@ -30,6 +30,37 @@ depth_min = 10
depth_max = 100
write_error_output = False
#######################################################
# Variables to output from model #
# =1 means output, =0 means do not output #
# the columns in the output will be left to right in #
# the order that the variables are here top-to-bottom #
#######################################################
include_depth_output=1
include_temp_surface_output=1
include_temp_bottom_output=1
include_chlorophyll_surface_output=1
include_phyto_biomass_surface_output=1
include_phyto_biomass_bottom_output=1
include_PAR_surface_output=1 # daily mean surface of PAR W m-2
include_PAR_bottom_output=1 # daily mean bottom of PAR W m-2
include_windspeed_output=0 # windspeed
include_stressx_output=0 # x component of surface wind drag
include_stressy_output=0 # y component of surface wind drag
include_Etide_output=0 # Mixing power in the tidal currents (assumes constant mixing efficiency 0.003)
include_Ewind_output=0 # Mixing power in the wind (assumes constant mixing efficiency 0.023 and slippage factor=0.025)
include_u_mean_surface_output=0 # daily mean surface u in cm/s !!
include_u_mean_bottom_output=0 # daily mean bottom u in cm/s !!
include_grow1_mean_surface_output=0 # daily mean growth rate d-1 surface
include_grow1_mean_bottom_output=0 # daily mean growth rate d-1 bottom
include_uptake1_mean_surface_output=0 # daily mean DIN uptake rate mmol DIN (mg C)-1 d-1 surface
include_uptake1_mean_bottom_output=0 # daily mean DIN uptake rate mmol DIN (mg C)-1 d-1 bottom
include_tpn1_output=0 # total water column net production / mg C m-2 d-1
include_tpg1_output=0 # total water column gross production / mg C m-2 hd-1
include_speed3_output=0 # depth-mean current speed
##################################################
# functions used by the script #
##################################################
......@@ -87,10 +118,10 @@ for i,line in enumerate(lines[1::]):
woa_nutrient.append(lines2[i][16:22])
"""
def run_model(domain_file_name,lats_lons,year,start_year,unique_job_id,met_data_temporary_location,lon_domain,lat_domain,smaj1,smin1,smaj2,smin2,smaj3,smin3,smaj4,smin4,smaj5,smin5,woa_nutrient,alldepth,i):
def run_model(domain_file_name,lats_lons,year,start_year,unique_job_id,met_data_temporary_location,lon_domain,lat_domain,smaj1,smin1,smaj2,smin2,smaj3,smin3,smaj4,smin4,smaj5,smin5,woa_nutrient,alldepth,include_depth_output,include_temp_surface_output,include_temp_bottom_output,include_chlorophyll_surface_output,include_phyto_biomass_surface_output,include_phyto_biomass_bottom_output,include_PAR_surface_output,include_PAR_bottom_output,include_windspeed_output,include_stressx_output,include_stressy_output,include_Etide_output,include_Ewind_output,include_u_mean_surface_output,include_u_mean_bottom_output,include_grow1_mean_surface_output,include_grow1_mean_bottom_output,include_uptake1_mean_surface_output,include_uptake1_mean_bottom_output,include_tpn1_output,include_tpg1_output,include_speed3_output,i):
#modifying so that the fortran code looks for the correct met file, rather than us having to copy it into the working dorectory
# lon,lat = return_domain_lon(base_directory+'domain/'+domain_file_name,i)
lon_domain_tmp = float(lon_domain[i])
......@@ -125,6 +156,28 @@ map
"""+str(smin5[i])+"""
"""+str(woa_nutrient[i])+"""
"""+str(alldepth[i])+"""
"""+str(include_depth_output)+"""
"""+str(include_temp_surface_output)+"""
"""+str(include_temp_bottom_output)+"""
"""+str(include_chlorophyll_surface_output)+"""
"""+str(include_phyto_biomass_surface_output)+"""
"""+str(include_phyto_biomass_bottom_output)+"""
"""+str(include_PAR_surface_output)+"""
"""+str(include_PAR_bottom_output)+"""
"""+str(include_windspeed_output)+"""
"""+str(include_stressx_output)+"""
"""+str(include_stressy_output)+"""
"""+str(include_Etide_output)+"""
"""+str(include_Ewind_output)+"""
"""+str(include_u_mean_surface_output)+"""
"""+str(include_u_mean_bottom_output)+"""
"""+str(include_grow1_mean_surface_output)+"""
"""+str(include_grow1_mean_bottom_output)+"""
"""+str(include_uptake1_mean_surface_output)+"""
"""+str(include_uptake1_mean_bottom_output)+"""
"""+str(include_tpn1_output)+"""
"""+str(include_tpg1_output)+"""
"""+str(include_speed3_output)+"""
"""+str(start_year)+"""
"""+str(year)+"""
"""+str(float(lat_domain[i]))+"""
......@@ -147,6 +200,28 @@ map
"""+str(smin5[i])+"""
"""+str(woa_nutrient[i])+"""
"""+str(alldepth[i])+"""
"""+str(include_depth_output)+"""
"""+str(include_temp_surface_output)+"""
"""+str(include_temp_bottom_output)+"""
"""+str(include_chlorophyll_surface_output)+"""
"""+str(include_phyto_biomass_surface_output)+"""
"""+str(include_phyto_biomass_bottom_output)+"""
"""+str(include_PAR_surface_output)+"""
"""+str(include_PAR_bottom_output)+"""
"""+str(include_windspeed_output)+"""
"""+str(include_stressx_output)+"""
"""+str(include_stressy_output)+"""
"""+str(include_Etide_output)+"""
"""+str(include_Ewind_output)+"""
"""+str(include_u_mean_surface_output)+"""
"""+str(include_u_mean_bottom_output)+"""
"""+str(include_grow1_mean_surface_output)+"""
"""+str(include_grow1_mean_bottom_output)+"""
"""+str(include_uptake1_mean_surface_output)+"""
"""+str(include_uptake1_mean_bottom_output)+"""
"""+str(include_tpn1_output)+"""
"""+str(include_tpg1_output)+"""
"""+str(include_speed3_output)+"""
EOF"""
# print run_command
proc = subprocess.Popen([run_command], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
......@@ -176,15 +251,19 @@ for i,file in enumerate(files):
lats_lons[i][1] = float(tmp[1].split('_')[0])
year=2006
pool = mp.Pool(processes=num_procs)
func = partial(run_model, domain_file_name, lats_lons, year, start_year, unique_job_id, met_data_temporary_location,lon_domain,lat_domain,smaj1,smin1,smaj2,smin2,smaj3,smin3,smaj4,smin4,smaj5,smin5,woa_nutrient,alldepth)
results, errors = zip(*pool.map(func, range(1)))
print results[0].split('\n')[0]
print errors[0].split('\n')[0]
pool.close()
"""
# ##testing
# year=2006
# pool = mp.Pool(processes=num_procs)
# func = partial(run_model, domain_file_name, lats_lons, year, start_year, unique_job_id, met_data_temporary_location,lon_domain,lat_domain,smaj1,smin1,smaj2,smin2,smaj3,smin3,smaj4,smin4,smaj5,smin5,woa_nutrient,alldepth,include_depth_output,include_temp_surface_output,include_temp_bottom_output,include_chlorophyll_surface_output,include_phyto_biomass_surface_output,include_phyto_biomass_bottom_output,include_PAR_surface_output,include_PAR_bottom_output,include_windspeed_output,include_stressx_output,include_stressy_output,include_Etide_output,include_Ewind_output,include_u_mean_surface_output,include_u_mean_bottom_output,include_grow1_mean_surface_output,include_grow1_mean_bottom_output,include_uptake1_mean_surface_output,include_uptake1_mean_bottom_output,include_tpn1_output,include_tpg1_output,include_speed3_output)
# results, errors = zip(*pool.map(func, range(1)))
# print results[0].split('\n')[0]
# print results[0].split('\n')[1]
# print results[0].split('\n')[2]
# # print errors[0].split('\n')[0]
# pool.close()
for year in range(start_year,end_year+1):
#clean up and prexisting met files
......@@ -199,7 +278,7 @@ for year in range(start_year,end_year+1):
except:
print 'no previous output file to move'
pool = mp.Pool(processes=num_procs)
func = partial(run_model, domain_file_name, lats_lons, year, start_year, unique_job_id, met_data_temporary_location,lon_domain,lat_domain,smaj1,smin1,smaj2,smin2,smaj3,smin3,smaj4,smin4,smaj5,smin5,woa_nutrient,alldepth)
func = partial(run_model, domain_file_name, lats_lons, year, start_year, unique_job_id, met_data_temporary_location,lon_domain,lat_domain,smaj1,smin1,smaj2,smin2,smaj3,smin3,smaj4,smin4,smaj5,smin5,woa_nutrient,alldepth,include_depth_output,include_temp_surface_output,include_temp_bottom_output,include_chlorophyll_surface_output,include_phyto_biomass_surface_output,include_phyto_biomass_bottom_output,include_PAR_surface_output,include_PAR_bottom_output,include_windspeed_output,include_stressx_output,include_stressy_output,include_Etide_output,include_Ewind_output,include_u_mean_surface_output,include_u_mean_bottom_output,include_grow1_mean_surface_output,include_grow1_mean_bottom_output,include_uptake1_mean_surface_output,include_uptake1_mean_bottom_output,include_tpn1_output,include_tpg1_output,include_speed3_output)
# results,errors = pool.map(func, range(num_lines))
results, errors = zip(*pool.map(func, range(len(lat_domain))))
......@@ -236,5 +315,3 @@ for remove_file in remove_files:
# with open(output_directory+output_file_name+'_'+str(year)+'_error','w') as fout:
# for result in results:
# fout.write(result)
"""
No preview for this file type
......@@ -185,12 +185,13 @@ END MODULE GRAPHICS_VARIABLES
character(len=36) :: unique_job_id
character(len=300) :: met_data_location
real :: woa_nutrient
INTEGER :: include_depth_output,include_temp_surface_output,include_temp_bottom_output,include_chlorophyll_surface_output,include_phyto_biomass_surface_output,include_phyto_biomass_bottom_output,include_PAR_surface_output,include_PAR_bottom_output,include_windspeed_output,include_stressx_output,include_stressy_output,include_Etide_output,include_Ewind_output,include_u_mean_surface_output,include_u_mean_bottom_output,include_grow1_mean_surface_output,include_grow1_mean_bottom_output,include_uptake1_mean_surface_output,include_uptake1_mean_bottom_output,include_tpn1_output,include_tpg1_output,include_speed3_output
!
! Initialise Winteracter
!
! print*, 'getting physics defaults'
call get_physics_defaults(lat_in_domain,lon_in_domain,run_year,start_year,unique_job_id,met_data_location,iline,woa_nutrient)
call get_physics_defaults(lat_in_domain,lon_in_domain,run_year,start_year,unique_job_id,met_data_location,iline,woa_nutrient,include_depth_output,include_temp_surface_output,include_temp_bottom_output,include_chlorophyll_surface_output,include_phyto_biomass_surface_output,include_phyto_biomass_bottom_output,include_PAR_surface_output,include_PAR_bottom_output,include_windspeed_output,include_stressx_output,include_stressy_output,include_Etide_output,include_Ewind_output,include_u_mean_surface_output,include_u_mean_bottom_output,include_grow1_mean_surface_output,include_grow1_mean_bottom_output,include_uptake1_mean_surface_output,include_uptake1_mean_bottom_output,include_tpn1_output,include_tpg1_output,include_speed3_output)
depth=newdepth; N=newN; dz=newdz
! print*, 'getting phyto defaults'
call get_phyto_defaults()
......@@ -249,11 +250,13 @@ END MODULE GRAPHICS_VARIABLES
character(len=36) :: unique_job_id
character(len=300) :: met_data_location
real :: woa_nutrient
INTEGER :: include_depth_output,include_temp_surface_output,include_temp_bottom_output,include_chlorophyll_surface_output,include_phyto_biomass_surface_output,include_phyto_biomass_bottom_output,include_PAR_surface_output,include_PAR_bottom_output,include_windspeed_output,include_stressx_output,include_stressy_output,include_Etide_output,include_Ewind_output,include_u_mean_surface_output,include_u_mean_bottom_output,include_grow1_mean_surface_output,include_grow1_mean_bottom_output,include_uptake1_mean_surface_output,include_uptake1_mean_bottom_output,include_tpn1_output,include_tpg1_output,include_speed3_output
!
! Branch depending on chosen menu item
!
call save_work(lat_in_domain,lon_in_domain,run_year,start_year,unique_job_id,met_data_location,iline,woa_nutrient)
call save_work(lat_in_domain,lon_in_domain,run_year,start_year,unique_job_id,met_data_location,iline,woa_nutrient,include_depth_output,include_temp_surface_output,include_temp_bottom_output,include_chlorophyll_surface_output,include_phyto_biomass_surface_output,include_phyto_biomass_bottom_output,include_PAR_surface_output,include_PAR_bottom_output,include_windspeed_output,include_stressx_output,include_stressy_output,include_Etide_output,include_Ewind_output,include_u_mean_surface_output,include_u_mean_bottom_output,include_grow1_mean_surface_output,include_grow1_mean_bottom_output,include_uptake1_mean_surface_output,include_uptake1_mean_bottom_output,include_tpn1_output,include_tpg1_output,include_speed3_output)
deallocate (contour_data,xdata,ydata,profile,au,bu,cu,du,ru,qu,tke,tkeold,eps)
!
! Open required files for results, and write headers
......@@ -318,7 +321,13 @@ END MODULE GRAPHICS_VARIABLES
426 FORMAT(1x,' month SH Ts Tb delta-T Wstress Chlt Ct Cgross Cnet accumC')
!
CALL run_model(run_year,start_year,unique_job_id,iline,woa_nutrient)
CALL run_model(run_year,start_year,unique_job_id,iline,woa_nutrient,include_depth_output,&
include_temp_surface_output,include_temp_bottom_output,include_chlorophyll_surface_output,&
include_phyto_biomass_surface_output,include_phyto_biomass_bottom_output,include_PAR_surface_output,&
include_PAR_bottom_output,include_windspeed_output,include_stressx_output,include_stressy_output,&
include_Etide_output,include_Ewind_output,include_u_mean_surface_output,include_u_mean_bottom_output,&
include_grow1_mean_surface_output,include_grow1_mean_bottom_output,include_uptake1_mean_surface_output,&
include_uptake1_mean_bottom_output,include_tpn1_output,include_tpg1_output,include_speed3_output)
surface_out='surface'//unique_job_id//'.dat'; phys_profile_day='physday.dat'; bio_profile_day='biolday.dat'; monthly_out='monthly'//unique_job_id//'.dat'
......@@ -343,7 +352,13 @@ END MODULE GRAPHICS_VARIABLES
!
!*****************************************************************************
!
Subroutine save_work(lat_in_domain,lon_in_domain,run_year,start_year,unique_job_id,met_data_location,iline,woa_nutrient)
Subroutine save_work(lat_in_domain,lon_in_domain,run_year,start_year,unique_job_id,met_data_location,iline,woa_nutrient,&
include_depth_output,include_temp_surface_output,include_temp_bottom_output,include_chlorophyll_surface_output,&
include_phyto_biomass_surface_output,include_phyto_biomass_bottom_output,include_PAR_surface_output,&
include_PAR_bottom_output,include_windspeed_output,include_stressx_output,include_stressy_output,&
include_Etide_output,include_Ewind_output,include_u_mean_surface_output,include_u_mean_bottom_output,&
include_grow1_mean_surface_output,include_grow1_mean_bottom_output,include_uptake1_mean_surface_output,&
include_uptake1_mean_bottom_output,include_tpn1_output,include_tpg1_output,include_speed3_output)
USE VARIABLES
use physics
use turbulence
......@@ -372,6 +387,13 @@ END MODULE GRAPHICS_VARIABLES
character(len=12) :: lon_in_domain
character(len=36) :: unique_job_id
character(len=300) :: met_data_location
integer :: include_depth_output,include_temp_surface_output,include_temp_bottom_output,include_chlorophyll_surface_output,&
include_phyto_biomass_surface_output,include_phyto_biomass_bottom_output,include_PAR_surface_output,&
include_PAR_bottom_output,include_windspeed_output,include_stressx_output,include_stressy_output,&
include_Etide_output,include_Ewind_output,include_u_mean_surface_output,include_u_mean_bottom_output,&
include_grow1_mean_surface_output,include_grow1_mean_bottom_output,include_uptake1_mean_surface_output,&
include_uptake1_mean_bottom_output,include_tpn1_output,include_tpg1_output,include_speed3_output
if(initialdata.eq.'Initialisation data not saved')then
......@@ -483,6 +505,28 @@ END MODULE GRAPHICS_VARIABLES
read(5,'(f6.1)') smin5
read(5,'(f6.1)') woa_nutrient
read(5,'(f6.1)') alldepth
read(5,'(i1)') include_depth_output
read(5,'(i1)') include_temp_surface_output
read(5,'(i1)') include_temp_bottom_output
read(5,'(i1)') include_chlorophyll_surface_output
read(5,'(i1)') include_phyto_biomass_surface_output
read(5,'(i1)') include_phyto_biomass_bottom_output
read(5,'(i1)') include_PAR_surface_output
read(5,'(i1)') include_PAR_bottom_output
read(5,'(i1)') include_windspeed_output
read(5,'(i1)') include_stressx_output
read(5,'(i1)') include_stressy_output
read(5,'(i1)') include_Etide_output
read(5,'(i1)') include_Ewind_output
read(5,'(i1)') include_u_mean_surface_output
read(5,'(i1)') include_u_mean_bottom_output
read(5,'(i1)') include_grow1_mean_surface_output
read(5,'(i1)') include_grow1_mean_bottom_output
read(5,'(i1)') include_uptake1_mean_surface_output
read(5,'(i1)') include_uptake1_mean_bottom_output
read(5,'(i1)') include_tpn1_output
read(5,'(i1)') include_tpg1_output
read(5,'(i1)') include_speed3_output
imode=1
! do i = 1,iline
......@@ -833,7 +877,14 @@ Subroutine physics_input() ! Get physics driving parameters
!*********************************************************************************************
!**********************************************************************************************
!
subroutine get_physics_defaults(lat_in_domain,lon_in_domain,run_year,start_year,unique_job_id,met_data_location,iline,woa_nutrient)
subroutine get_physics_defaults(lat_in_domain,lon_in_domain,run_year,start_year,unique_job_id,met_data_location,iline,&
woa_nutrient,include_depth_output,include_temp_surface_output,include_temp_bottom_output,&
include_chlorophyll_surface_output,include_phyto_biomass_surface_output,include_phyto_biomass_bottom_output,&
include_PAR_surface_output,include_PAR_bottom_output,include_windspeed_output,include_stressx_output,&
include_stressy_output,include_Etide_output,include_Ewind_output,include_u_mean_surface_output,&
include_u_mean_bottom_output,include_grow1_mean_surface_output,include_grow1_mean_bottom_output,&
include_uptake1_mean_surface_output,include_uptake1_mean_bottom_output,include_tpn1_output,&
include_tpg1_output,include_speed3_output)
use physics
use turbulence
......@@ -854,7 +905,12 @@ character(len=300) :: nutrient_file
character(len=300) :: met_data_location
real :: smaj1, smin1, smaj2, smin2, smaj3, smin3, smaj4, smin4, smaj5, smin5
real :: woa_nutrient_tmp, woa_nutrient
integer :: include_depth_output,include_temp_surface_output,include_temp_bottom_output,include_chlorophyll_surface_output,&
include_phyto_biomass_surface_output,include_phyto_biomass_bottom_output,include_PAR_surface_output,&
include_PAR_bottom_output,include_windspeed_output,include_stressx_output,include_stressy_output,&
include_Etide_output,include_Ewind_output,include_u_mean_surface_output,include_u_mean_bottom_output,&
include_grow1_mean_surface_output,include_grow1_mean_bottom_output,include_uptake1_mean_surface_output,&
include_uptake1_mean_bottom_output,include_tpn1_output,include_tpg1_output,include_speed3_output
! get lon, lat, depth
......@@ -881,6 +937,28 @@ real :: woa_nutrient_tmp, woa_nutrient
read(5,'(f6.1)') smin5
read(5,'(f6.1)') woa_nutrient
read(5,'(f6.1)') alldepth
read(5,'(i1)') include_depth_output
read(5,'(i1)') include_temp_surface_output
read(5,'(i1)') include_temp_bottom_output
read(5,'(i1)') include_chlorophyll_surface_output
read(5,'(i1)') include_phyto_biomass_surface_output
read(5,'(i1)') include_phyto_biomass_bottom_output
read(5,'(i1)') include_PAR_surface_output
read(5,'(i1)') include_PAR_bottom_output
read(5,'(i1)') include_windspeed_output
read(5,'(i1)') include_stressx_output
read(5,'(i1)') include_stressy_output
read(5,'(i1)') include_Etide_output
read(5,'(i1)') include_Ewind_output
read(5,'(i1)') include_u_mean_surface_output
read(5,'(i1)') include_u_mean_bottom_output
read(5,'(i1)') include_grow1_mean_surface_output
read(5,'(i1)') include_grow1_mean_bottom_output
read(5,'(i1)') include_uptake1_mean_surface_output
read(5,'(i1)') include_uptake1_mean_bottom_output
read(5,'(i1)') include_tpn1_output
read(5,'(i1)') include_tpg1_output
read(5,'(i1)') include_speed3_output
imode=1
! do i = 2,iline+1
......@@ -1198,7 +1276,13 @@ Subroutine grazing() ! Get phytoplankton grazing parameters
!********************************************************************
!********************************************************************
subroutine run_model(run_year,start_year,unique_job_id,iline,woa_nutrient)
subroutine run_model(run_year,start_year,unique_job_id,iline,woa_nutrient,include_depth_output,include_temp_surface_output,&
include_temp_bottom_output,include_chlorophyll_surface_output,include_phyto_biomass_surface_output,&
include_phyto_biomass_bottom_output,include_PAR_surface_output,include_PAR_bottom_output,include_windspeed_output,&
include_stressx_output,include_stressy_output,include_Etide_output,include_Ewind_output,include_u_mean_surface_output,&
include_u_mean_bottom_output,include_grow1_mean_surface_output,include_grow1_mean_bottom_output,&
include_uptake1_mean_surface_output,include_uptake1_mean_bottom_output,include_tpn1_output,&
include_tpg1_output,include_speed3_output)
use variables
use variables_all
......@@ -1230,6 +1314,12 @@ Subroutine grazing() ! Get phytoplankton grazing parameters
double precision, DIMENSION(:), ALLOCATABLE :: recltest
integer :: reclen
character(len=36) :: unique_job_id
INTEGER ::include_depth_output,include_temp_surface_output,include_temp_bottom_output,include_chlorophyll_surface_output,&
include_phyto_biomass_surface_output,include_phyto_biomass_bottom_output,include_PAR_surface_output,&
include_PAR_bottom_output,include_windspeed_output,include_stressx_output,include_stressy_output,&
include_Etide_output,include_Ewind_output,include_u_mean_surface_output,include_u_mean_bottom_output,&
include_grow1_mean_surface_output,include_grow1_mean_bottom_output,include_uptake1_mean_surface_output,&
include_uptake1_mean_bottom_output,include_tpn1_output,include_tpg1_output,include_speed3_output
!
......@@ -1733,8 +1823,110 @@ end if
! map output
!Note, I moved this to get output for each day
if(imode.eq.1) then
! include_depth_output=1
! include_temp_surface_output=1
!write(6,'(2f8.3,5f8.2)') lon,lat,depth,dlog10(depth/u3_mean),strat_jul,rad_sum/acount,month_net1+accumulated,bottom_phyto_biomass
write(6,fmt="(i4,2f8.3,5f8.2)")iday,lon,lat,depth,temp_new(N),temp_new(1),x_new(N),x_new(1)/chl_carbon
! write(6,fmt="(i4,2f8.3,5f8.2)")iday,lon,lat,depth,temp_new(N),temp_new(1),x_new(N),x_new(1)/chl_carbon
write(6,fmt="(i4,2f8.3)",advance="no")iday,lon,lat
! to include additional variables add more if the template if statements copied bleow before write(6,fmt="()") and add to list where others defined etc
! then add to run_map_parallel by extending the lists containing existing output variables
! if(include_XXNEWXX_output.eq.1) then
! write(6,fmt="(1f8.2)",advance="no")XXNEWXX
! end if
if(include_depth_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")depth
end if
if(include_temp_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")temp_new(N)
end if
if(include_temp_bottom_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")temp_new(1)
end if
if(include_chlorophyll_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")x_new(N)
end if
if(include_phyto_biomass_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")x_new(N)/chl_carbon
end if
if(include_phyto_biomass_bottom_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")x_new(1)/chl_carbon
end if
if(include_PAR_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")rad_mean(N)
end if
if(include_PAR_bottom_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")rad_mean(1)
end if
if(include_windspeed_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")windspeed
end if
if(include_stressx_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")stressx
end if
if(include_stressy_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")stressy
end if
if(include_Etide_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")Etide
end if
if(include_Ewind_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")Ewind
end if
if(include_u_mean_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")u_mean(N)
end if
if(include_u_mean_bottom_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")u_mean(1)
end if
if(include_grow1_mean_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")grow1_mean(N)
end if
if(include_grow1_mean_bottom_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")grow1_mean(1)
end if
if(include_uptake1_mean_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")uptake1_mean(N)
end if
if(include_uptake1_mean_bottom_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")uptake1_mean(1)
end if
if(include_tpn1_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")tpn1
end if
if(include_tpg1_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")tpg1
end if
if(include_speed3_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")speed3
end if
write(6,fmt="()")
! ,5f8.2)")iday,lon,lat,depth,temp_new(N),temp_new(1),x_new(N),x_new(1)/chl_carbon
! write (*,"(3f8.3)",advance="no") a,b,c
!note 2f8.3,8f8.2 means that there are two columns with 8 spaces for digits,
!three numbers below the decimal place, then 8 columns with 8 spaces for
......@@ -1797,10 +1989,104 @@ month_stress=(month_stress+sqrt(stressx**2.0+stressy**2.0))/real(montest)
! map output
if(imode.eq.1) then
!write(6,'(2f8.3,5f8.2)') lon,lat,depth,dlog10(depth/u3_mean),strat_jul,rad_sum/acount,month_net1+accumulated,bottom_phyto_biomass
write(6,fmt="(i4,2f8.3,5f8.2)")iday,lon,lat,depth,temp_new(N),temp_new(1),x_new(N),x_new(1)/chl_carbon
! write(6,fmt="(i4,2f8.3,5f8.2)")iday,lon,lat,depth,temp_new(N),temp_new(1),x_new(N),x_new(1)/chl_carbon
!note 2f8.3,8f8.2 means that there are two columns with 8 spaces for digits,
!three numbers below the decimal place, then 8 columns with 8 spaces for
!and two numbers behind the decimal place
write(6,fmt="(i4,2f8.3)",advance="no")iday,lon,lat
if(include_depth_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")depth
end if
if(include_temp_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")temp_new(N)
end if
if(include_temp_bottom_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")temp_new(1)
end if
if(include_chlorophyll_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")x_new(N)
end if
if(include_phyto_biomass_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")x_new(N)/chl_carbon
end if
if(include_phyto_biomass_bottom_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")x_new(1)/chl_carbon
end if
if(include_PAR_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")rad_mean(N)
end if
if(include_PAR_bottom_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")rad_mean(1)
end if
if(include_windspeed_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")windspeed
end if
if(include_stressx_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")stressx
end if
if(include_stressy_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")stressy
end if
if(include_Etide_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")Etide
end if
if(include_Ewind_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")Ewind
end if
if(include_u_mean_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")u_mean(N)
end if
if(include_u_mean_bottom_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")u_mean(1)
end if
if(include_grow1_mean_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")grow1_mean(N)
end if
if(include_grow1_mean_bottom_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")grow1_mean(1)
end if
if(include_uptake1_mean_surface_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")uptake1_mean(N)
end if
if(include_uptake1_mean_bottom_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")uptake1_mean(1)
end if
if(include_tpn1_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")tpn1
end if
if(include_tpg1_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")tpg1
end if
if(include_speed3_output.eq.1) then
write(6,fmt="(1f8.2)",advance="no")speed3
end if
write(6,fmt="()")
endif
! time series output
......
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