Skip to content

Commit 0e747c3

Browse files
author
mueller79
committed
updates for using AWICM forcing
1 parent 3f1825e commit 0e747c3

File tree

5 files changed

+77
-26
lines changed

5 files changed

+77
-26
lines changed

src/gen_ic3d.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,14 +580,14 @@ SUBROUTINE do_ic3d(tracers, partit, mesh)
580580
locDICmin = locDINmin
581581
locAlkmax = locDINmax
582582
locAlkmin = locDINmin
583-
locDICremax = locDINmax ! DICremin tracer (added by Sina)
584-
locDICremin = locDINmin
585583
locDSimax = locDINmax
586584
locDSimin = locDINmin
587585
locDFemax = locDINmax
588586
locDFemin = locDINmin
589587
locO2max = locDINmax
590588
locO2min = locDINmin
589+
locDICremax = locDINmax ! DICremin tracer (added by Sina)
590+
locDICremin = locDINmin
591591
#endif
592592
do n=1, partit%myDim_nod2d
593593
locTmax = max(locTmax,maxval(tracers%data(1)%values(mesh%ulevels_nod2D(n):mesh%nlevels_nod2D(n)-1,n)) )

src/gen_surface_forcing.F90

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -551,18 +551,18 @@ SUBROUTINE nc_sbc_ini_fillnames(yyyy)
551551
!! ** Purpose : Fill names of sbc_flfi array (file names and variable names)
552552

553553
!prepare proper nc file (add year and .nc to the end of the file name from namelist
554-
if (l_xwind) write(sbc_flfi(i_xwind)%file_name, *) trim(nm_xwind_file),trim(yyear),'.nc'
555-
if (l_ywind) write(sbc_flfi(i_ywind)%file_name, *) trim(nm_ywind_file),trim(yyear),'.nc'
556-
if (l_xstre) write(sbc_flfi(i_xstre)%file_name, *) trim(nm_xstre_file),trim(yyear),'.nc'
557-
if (l_ystre) write(sbc_flfi(i_ystre)%file_name, *) trim(nm_ystre_file),trim(yyear),'.nc'
558-
if (l_humi) write(sbc_flfi(i_humi)%file_name, *) trim(nm_humi_file), trim(yyear),'.nc'
559-
if (l_qsr) write(sbc_flfi(i_qsr)%file_name, *) trim(nm_qsr_file), trim(yyear),'.nc'
560-
if (l_qlw) write(sbc_flfi(i_qlw)%file_name, *) trim(nm_qlw_file), trim(yyear),'.nc'
561-
if (l_tair) write(sbc_flfi(i_tair)%file_name, *) trim(nm_tair_file), trim(yyear),'.nc'
562-
if (l_prec) write(sbc_flfi(i_prec)%file_name, *) trim(nm_prec_file), trim(yyear),'.nc'
563-
if (l_snow) write(sbc_flfi(i_snow)%file_name, *) trim(nm_snow_file), trim(yyear),'.nc'
564-
if (l_mslp) write(sbc_flfi(i_mslp)%file_name, *) trim(nm_mslp_file), trim(yyear),'.nc'
565-
if (l_cloud) write(sbc_flfi(i_cloud)%file_name, *) trim(nm_cloud_file),trim(yyear),'.nc'
554+
if (l_xwind) write(sbc_flfi(i_xwind)%file_name, *) trim(nm_xwind_file),trim(yyear),'01_reduced.nc'
555+
if (l_ywind) write(sbc_flfi(i_ywind)%file_name, *) trim(nm_ywind_file),trim(yyear),'01_reduced.nc'
556+
if (l_xstre) write(sbc_flfi(i_xstre)%file_name, *) trim(nm_xstre_file),trim(yyear),'01_reduced.nc'
557+
if (l_ystre) write(sbc_flfi(i_ystre)%file_name, *) trim(nm_ystre_file),trim(yyear),'01_reduced.nc'
558+
if (l_humi) write(sbc_flfi(i_humi)%file_name, *) trim(nm_humi_file), trim(yyear),'01_reduced.nc'
559+
if (l_qsr) write(sbc_flfi(i_qsr)%file_name, *) trim(nm_qsr_file), trim(yyear),'01_reduced.nc'
560+
if (l_qlw) write(sbc_flfi(i_qlw)%file_name, *) trim(nm_qlw_file), trim(yyear),'01_reduced.nc'
561+
if (l_tair) write(sbc_flfi(i_tair)%file_name, *) trim(nm_tair_file), trim(yyear),'01_reduced.nc'
562+
if (l_prec) write(sbc_flfi(i_prec)%file_name, *) trim(nm_prec_file), trim(yyear),'01_reduced.nc'
563+
if (l_snow) write(sbc_flfi(i_snow)%file_name, *) trim(nm_snow_file), trim(yyear),'01_reduced.nc'
564+
if (l_mslp) write(sbc_flfi(i_mslp)%file_name, *) trim(nm_mslp_file), trim(yyear),'01_reduced.nc'
565+
if (l_cloud) write(sbc_flfi(i_cloud)%file_name, *) trim(nm_cloud_file),trim(yyear),'01_reduced.nc'
566566

567567
if (l_xwind) sbc_flfi(i_xwind)%file_name=ADJUSTL(trim(sbc_flfi(i_xwind)%file_name))
568568
if (l_ywind) sbc_flfi(i_ywind)%file_name=ADJUSTL(trim(sbc_flfi(i_ywind)%file_name))
@@ -1201,7 +1201,8 @@ SUBROUTINE sbc_ini(partit, mesh)
12011201
! Warning: For a global mesh, conservative scheme is to be updated!!
12021202
call read_other_NetCDF(nm_runoff_file, 'Foxx_o_roff', 1, runoff, .false., .true., partit, mesh)
12031203
runoff=runoff/1000.0_WP ! Kg/s/m2 --> m/s
1204-
end if
1204+
endif
1205+
12051206

12061207
if (use_sw_pene) then
12071208
if (chl_data_source == 'Sweeney') then

src/int_recom/recom_init.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ subroutine recom_init(tracers, partit, mesh)
728728
locDFemin = min(locDFemin,minval(tracers%data(21)%values(ulevels_nod2D(n):nlevels_nod2D(n)-1,n)) )
729729
locO2max = max(locO2max,maxval(tracers%data(24)%values(ulevels_nod2D(n):nlevels_nod2D(n)-1,n)) )
730730
locO2min = min(locO2min,minval(tracers%data(24)%values(ulevels_nod2D(n):nlevels_nod2D(n)-1,n)) )
731-
locDICremax = min(locDICremax,minval(tracers%data(39)%values(ulevels_nod2D(n):nlevels_nod2D(n)-1,n)) ) ! init DIC remin (added by Sina)
731+
locDICremax = max(locDICremax,maxval(tracers%data(39)%values(ulevels_nod2D(n):nlevels_nod2D(n)-1,n)) ) ! init DIC remin (added by Sina)
732732
locDICremin = min(locDICremin,minval(tracers%data(39)%values(ulevels_nod2D(n):nlevels_nod2D(n)-1,n)) ) ! init DIC remin (added by Sina)
733733
end do
734734

src/io_meandata.F90

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ module io_MEANDATA
7272
!
7373
!--------------------------------------------------------------------------------------------
7474
!
75-
type(Meandata), save, target :: io_stream(200) ! todo: find a way to increase the array withhout move_alloc to keep the derived types in Meandata intact
75+
type(Meandata), save, target :: io_stream(250) ! todo: find a way to increase the array withhout move_alloc to keep the derived types in Meandata intact
7676
integer, save :: io_NSTREAMS=0
7777
real(kind=WP) :: ctime !current time in seconds from the beginning of the year
7878
!
@@ -533,6 +533,18 @@ subroutine ini_mean_io(ice, dynamics, tracers, partit, mesh)
533533
if (use_REcoM) then
534534
call def_stream(nod2D, myDim_nod2D, 'benCalc','Benthos calcite','mmol', Benthos(:,4), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
535535
end if
536+
537+
!CASE ('denb ')
538+
! Variable: denb
539+
! Description: Benthic denitrification rate
540+
! Function: Conversion of nitrate to N₂ gas in anoxic sediments
541+
! Process: NO₃⁻ → NO₂⁻ → NO → N₂O → N₂ (anaerobic respiration pathway)
542+
! Role: Permanent nitrogen loss from ocean; regulates ocean N inventory
543+
! Units: mmol/m² (millimoles per square meter)
544+
! if (use_REcoM) then
545+
! call def_stream(nod2D, myDim_nod2D, 'denb','Benthic denitrification rate', 'mmol/m2', DenitBen(:), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
546+
! end if
547+
536548
! ciso
537549
CASE ('benC_13 ')
538550
if (use_REcoM) then
@@ -1111,6 +1123,37 @@ subroutine ini_mean_io(ice, dynamics, tracers, partit, mesh)
11111123
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIN', 'Dissolved Inorganic Nitrogen', '[mmol/m3]', tracers%data(j)%values(:,:), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
11121124
endif
11131125

1126+
if (tracers%data(j)%ltra_diag) then
1127+
! horizontal advection
1128+
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIN_hor_adv', 'Horizontal advection part of dissolved Inorganic N', '[mmol/m3/s]', tracers%work%tra_advhoriz(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1129+
1130+
! horizontal advection LO
1131+
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIN_lo_hor_adv', 'LO Horizontal advection part of dissolved Inorganic N', '[mmol/m3]', tracers%work%tra_advhoriz_LO(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1132+
1133+
! vertical advection
1134+
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIN_ver_adv', 'Vertical advection part of dissolved Inorganic N', '[mmol/m3/s]', tracers%work%tra_advvert(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1135+
1136+
! vertical advection LO
1137+
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIN_lo_ver_adv', 'LO Vertical advection part of dissolved Inorganic N', '[mmol/m3]', tracers%work%tra_advvert_LO(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1138+
1139+
! horizontal diffusion
1140+
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIN_tra_diff_part_hor_redi', 'Horizontal diffusion of dissolved Inorganic N (includes Redi diffusivity if Redi=.true.)', '[mmol/m3/s]', tracers%work%tra_diff_part_hor_redi(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1141+
1142+
if (.not. tracers%data(j)%i_vert_diff) then
1143+
! vertical diffusion (Explicit)
1144+
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIN_tra_diff_part_ver_expl', 'Vertical diffusion of dissolved Inorganic N (Explicit)', '[mmol/m3/s]', tracers%work%tra_diff_part_ver_expl(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1145+
end if
1146+
1147+
! projection of horizontal Redi diffussivity onto vertical
1148+
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIN_tra_diff_part_ver_redi_expl', 'Projection of horizontal Redi diffussivity onto vertical for dissolved Inorganic N (Explicit)', '[mmol/m3/s]', tracers%work%tra_diff_part_ver_redi_expl(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1149+
1150+
! vertical diffusion (Implicit)
1151+
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIN_tra_diff_part_ver_impl', 'Vertical diffusion of dissolved Inorganic N (Implicit)', '[mmol/m3/s]', tracers%work%tra_diff_part_ver_impl(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1152+
1153+
! recom_sms
1154+
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIN_recom_sms', 'Recom SMS', '[mmol/m3/s]', tracers%work%tra_recom_sms(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1155+
endif
1156+
11141157
else if (tracers%data(j)%ID==1002) then
11151158
if (use_REcoM) then
11161159
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIC', 'Dissolved Inorganic C', '[mmol/m3]', tracers%data(j)%values(:,:), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
@@ -1119,9 +1162,15 @@ subroutine ini_mean_io(ice, dynamics, tracers, partit, mesh)
11191162
! horizontal advection
11201163
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIC_hor_adv', 'Horizontal advection part of dissolved Inorganic C', '[mmol/m3/s]', tracers%work%tra_advhoriz(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
11211164

1165+
! horizontal advection LO
1166+
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIC_lo_hor_adv', 'LO Horizontal advection part of dissolved Inorganic C', '[mmol/m3]', tracers%work%tra_advhoriz_LO(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1167+
11221168
! vertical advection
11231169
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIC_ver_adv', 'Vertical advection part of dissolved Inorganic C', '[mmol/m3/s]', tracers%work%tra_advvert(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
11241170

1171+
! vertical advection LO
1172+
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIC_lo_ver_adv', 'LO Vertical advection part of dissolved Inorganic C', '[mmol/m3]', tracers%work%tra_advvert_LO(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1173+
11251174
! horizontal diffusion
11261175
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIC_tra_diff_part_hor_redi', 'Horizontal diffusion of dissolved Inorganic C (includes Redi diffusivity if Redi=.true.)', '[mmol/m3/s]', tracers%work%tra_diff_part_hor_redi(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
11271176

@@ -1139,7 +1188,6 @@ subroutine ini_mean_io(ice, dynamics, tracers, partit, mesh)
11391188
! recom_sms
11401189
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DIC_recom_sms', 'Recom SMS', '[mmol/m3/s]', tracers%work%tra_recom_sms(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
11411190
end if
1142-
11431191
endif
11441192

11451193
else if (tracers%data(j)%ID==1003) then
@@ -1149,8 +1197,10 @@ subroutine ini_mean_io(ice, dynamics, tracers, partit, mesh)
11491197
if (tracers%data(j)%ltra_diag) then ! OG - tra_diag
11501198
! horizontal advection
11511199
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'Alk_hor_adv', 'Horizontal advection part of Total Alkalinity', '[mmol/m3]', tracers%work%tra_advhoriz(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1152-
! horizontal advection LO
1200+
1201+
! horizontal advection LO
11531202
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'Alk_lo_hor_adv', 'LO Horizontal advection part of Total Alkalinity', '[mmol/m3]', tracers%work%tra_advhoriz_LO(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1203+
11541204
! vertical advection
11551205
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'Alk_ver_adv', 'Vertical advection part of Total Alkalinity', '[mmol/m3]', tracers%work%tra_advvert(:,:,j), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
11561206

@@ -1546,7 +1596,7 @@ subroutine ini_mean_io(ice, dynamics, tracers, partit, mesh)
15461596
endif
15471597

15481598
! =====================================================================
1549-
! Tracer IDs 1035-1036: Only in FULL model configuration
1599+
! Tracer IDs 1035-1037: Only in FULL model configuration
15501600
! These are Microzooplankton tracers
15511601
! =====================================================================
15521602
else if (tracers%data(j)%ID==1035) then
@@ -1567,14 +1617,14 @@ subroutine ini_mean_io(ice, dynamics, tracers, partit, mesh)
15671617
endif
15681618

15691619
! =====================================================================
1570-
! Tracer ID 1037: Only in FULL model configuration with rivers
1620+
! Tracer ID 1038: Only in FULL model configuration with rivers
15711621
! This is Terrestrial DOC
15721622
! =====================================================================
1573-
else if (tracers%data(j)%ID==1037) then
1623+
else if (tracers%data(j)%ID==1038) then
15741624
if (use_REcoM .and. enable_coccos .and. enable_3zoo2det .and. useRivers) then
15751625
! Full model with rivers: This is Terrestrial DOC
15761626
call def_stream((/nl-1, nod2D/), (/nl-1, myDim_nod2D/), 'DOCt', 'Terrestrial Dissolved Organic Carbon', '[mmol/m3]', tracers%data(j)%values(:,:), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh)
1577-
endif
1627+
endif
15781628

15791629
else
15801630
#endif

src/oce_setup_step.F90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ SUBROUTINE tracer_init(tracers, partit, mesh)
436436
tracers%data(n)%valuesAB = 0.
437437
tracers%data(n)%valuesold = 0.
438438
tracers%data(n)%i_vert_diff = i_vert_diff
439-
tracers%data(n)%ltra_diag = ltra_diag
439+
tracers%data(n)%ltra_diag = ltra_diag
440440
end do
441441
allocate(tracers%work%del_ttf(nl-1,node_size))
442442
allocate(tracers%work%del_ttf_advhoriz(nl-1,node_size),tracers%work%del_ttf_advvert(nl-1,node_size))
@@ -998,7 +998,7 @@ SUBROUTINE oce_initial_state(tracers, partit, mesh)
998998
type(t_partit), intent(inout), target :: partit
999999
type(t_mesh), intent(in) , target :: mesh
10001000
!___________________________________________________________________________
1001-
integer :: i, k, counter, rcounter3, id, tr_num
1001+
integer :: i, k, counter, rcounter3, id, tr_num ! tr_num used for DICremin (added by Sina)
10021002
character(len=10) :: i_string, id_string
10031003
real(kind=WP) :: loc, max_temp, min_temp, max_salt, min_salt
10041004
!___________________________________________________________________________
@@ -1044,7 +1044,7 @@ SUBROUTINE oce_initial_state(tracers, partit, mesh)
10441044
write(*,*) 'read Nitrate climatology from:', trim(filelist(6))
10451045
write(*,*) 'read Salt climatology from:', trim(filelist(7))
10461046
write(*,*) 'read Temperature climatology from:', trim(filelist(8))
1047-
write(*,*) 'read DIC remineralization from:', trim(filelist(9)) ! DIC remin (added by Sina)
1047+
write(*,*) 'read DIC remineralization from:', trim(filelist(9)) ! DICremin (added by Sina)
10481048
end if
10491049
! read ocean state
10501050
! this must be always done! First two tracers with IDs 0 and 1 are the temperature and salinity.

0 commit comments

Comments
 (0)