Commit 1b1dba04 authored by ph290's avatar ph290
Browse files

removing many of teh separate read statements so that it only reads the domain...

removing many of teh separate read statements so that it only reads the domain file etc. once per year rather than for each profile
parent e9fcc397
......@@ -357,7 +357,7 @@ END MODULE GRAPHICS_VARIABLES
integer :: run_year,start_year,iline
real :: real_clock
real :: woa_nutrient_tmp, woa_nutrient
real :: smaj1, smin1, smaj2, smin2, smaj3, smin3, smaj4, smin4, smaj5, smin5
real :: smaj1, smin1, smaj2, smin2, smaj3, smin3, smaj4, smin4, smaj5, smin5, alldepth
character(len=6) :: met_time
character(len=30) :: filter
character (len=50) :: filein
......@@ -471,24 +471,25 @@ END MODULE GRAPHICS_VARIABLES
read(5,'(a300)') met_data_location
read(5,'(a3)') type
read(5,*) iline
open(1,file=TRIM(ADJUSTL(nutrient_file)),status='old')
do i = 1,iline
read(1,'(16x,f6.1)') woa_nutrient_tmp
if(i.eq.iline) then
woa_nutrient = woa_nutrient_tmp
endif
enddo
close (1)
open(1,file=TRIM(ADJUSTL(domain_file)),status='old')
read(1,'(i1)') imode
do i = 1,iline
read(1,'(16x,10f6.1)') smaj1, smin1, smaj2, smin2, smaj3, smin3, smaj4, smin4, smaj5, smin5
!Note, reading in 1st 6 constituents of teh tides, but only using the first 5
! write(6,'(16x,6f6.1)') smaj1, smin1, smaj2, smin2, smaj3, smin3
if(i.eq.iline) then
read(5,'(f6.1)') smaj1
read(5,'(f6.1)') smin1
read(5,'(f6.1)') smaj2
read(5,'(f6.1)') smin2
read(5,'(f6.1)') smaj3
read(5,'(f6.1)') smin3
read(5,'(f6.1)') smaj4
read(5,'(f6.1)') smin4
read(5,'(f6.1)') smaj5
read(5,'(f6.1)') smin5
read(5,'(f6.1)') woa_nutrient
read(5,'(f6.1)') alldepth
imode=1
! do i = 1,iline
! read(1,'(16x,10f6.1)') smaj1, smin1, smaj2, smin2, smaj3, smin3, smaj4, smin4, smaj5, smin5
! !Note, reading in 1st 6 constituents of teh tides, but only using the first 5
! ! write(6,'(16x,6f6.1)') smaj1, smin1, smaj2, smin2, smaj3, smin3
! if(i.eq.iline) then
semi_major(1)=smaj1*1e-2
semi_minor(1)=smin1*1e-2
semi_major(2)=smaj2*1e-2
......@@ -499,8 +500,8 @@ END MODULE GRAPHICS_VARIABLES
semi_minor(4)=smin4*1e-2
semi_major(5)=smaj5*1e-2
semi_minor(5)=smin5*1e-2
endif
enddo
! endif
! enddo
close (1)
......@@ -851,6 +852,7 @@ character(len=36) :: unique_job_id
character(len=300) :: domain_file
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
......@@ -867,26 +869,32 @@ real :: woa_nutrient_tmp, woa_nutrient
read(5,'(a300)') met_data_location
read(5,'(a3)') type
read(5,*) iline
open(1,file=TRIM(ADJUSTL(nutrient_file)),status='old')
do i = 1,iline
read(1,'(16x,f6.1)') woa_nutrient_tmp
if(i.eq.iline) then
woa_nutrient = woa_nutrient_tmp
endif
enddo
close (1)
open(1,file=TRIM(ADJUSTL(domain_file)),status='old')
read(1,'(i1)') imode
do i = 2,iline+1
read(1,'(f8.3,f8.3,62x,f6.1)') lon,lat,alldepth
! read(1,'(f8.3,f8.3,38x,f6.1)') lon,lat,alldepth
! write(6,'(f8.3,f8.3,38x,f6.1)') lon,lat,alldepth
if(i.eq.iline+1) newdepth = alldepth
enddo
close (1)
read(5,'(f6.1)') smaj1
read(5,'(f6.1)') smin1
read(5,'(f6.1)') smaj2
read(5,'(f6.1)') smin2
read(5,'(f6.1)') smaj3
read(5,'(f6.1)') smin3
read(5,'(f6.1)') smaj4
read(5,'(f6.1)') smin4
read(5,'(f6.1)') smaj5
read(5,'(f6.1)') smin5
read(5,'(f6.1)') woa_nutrient
read(5,'(f6.1)') alldepth
imode=1
! do i = 2,iline+1
! read(1,'(f8.3,f8.3,62x,f6.1)') lon,lat,alldepth
! ! read(1,'(f8.3,f8.3,38x,f6.1)') lon,lat,alldepth
! ! write(6,'(f8.3,f8.3,38x,f6.1)') lon,lat,alldepth
! if(i.eq.iline+1) newdepth = alldepth
! enddo
! close (1)
read( lon_in_domain, * ) lon
read( lat_in_domain, * ) lat
newdepth = alldepth
! number of depth levels; bottom drag coefficient
!newN=20; kb=0.003
......@@ -911,7 +919,6 @@ endif
!open(1,file='s12_m2_s2_n2_h.dat',status='old')
!open(1,file='s12_m2_s2_n2_h_sec.dat',status='old')
!open(1,file='s12_m2_s2_n2_h_tim.dat',status='old')
!vismax=0.1; Nz_bg=1.0e-5; Kz_bg=1.0e-5; first_temp=5.0; lambda=0.1; heat_shade=0.012; bed_din=woa_nutrient; din_rate=10.0
vismax=0.1; Nz_bg=1.0e-5; Kz_bg=1.0e-5; first_temp=5.0; lambda=0.1; heat_shade=0.012; bed_din=woa_nutrient; din_rate=10.0
par_atten=0.1; par_percent=0.45
uamp(1)=0.4; uamp(2:5)=0.0; uphase(1:5)=0.0; vphase(1:5)=0.0
......@@ -1726,8 +1733,8 @@ end if
! map output
!Note, I moved this to get output for each day
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
write(6,fmt="(i4,2f8.3,4f8.2)")iday,lon,lat,depth,temp_new(N),temp_new(1),x_new(N)
!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
!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
......@@ -1789,9 +1796,8 @@ 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
write(6,fmt="(i4,2f8.3,4f8.2)")iday,lon,lat,depth,temp_new(N),temp_new(1),x_new(N)
!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
!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
......
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